Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: krikis/nomad
base: a3ccc3b843
...
head fork: krikis/nomad
compare: 01292a0ab5
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 8 files changed
  • 0 commit comments
  • 1 contributor
View
2  config/application.rb
@@ -24,7 +24,7 @@ class Application < Rails::Application
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
- config.active_record.observers = :post_observer
+ # config.active_record.observers = :post_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
View
8 config/cucumber.yml
@@ -1,8 +0,0 @@
-<%
-rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
-rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
-std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
-%>
-default: <%= std_opts %> features
-wip: --tags @wip:3 --wip features
-rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
View
22 faye/Gemfile.lock
@@ -1,28 +1,24 @@
GEM
remote: http://rubygems.org/
specs:
- addressable (2.2.7)
+ addressable (2.2.8)
cookiejar (0.3.0)
daemons (1.1.8)
- em-http-request (1.0.2)
- addressable (>= 2.2.3)
- cookiejar
- em-socksify
- eventmachine (>= 1.0.0.beta.4)
- http_parser.rb (>= 0.5.3)
- em-socksify (0.2.0)
- eventmachine (>= 1.0.0.beta.4)
- eventmachine (1.0.0.beta.4)
- faye (0.8.1)
+ em-http-request (0.3.0)
+ addressable (>= 2.0.0)
+ escape_utils
+ eventmachine (>= 0.12.9)
+ escape_utils (0.2.4)
+ eventmachine (0.12.10)
+ faye (0.8.2)
cookiejar (>= 0.3.0)
em-http-request (>= 0.3.0)
eventmachine (>= 0.12.0)
faye-websocket (>= 0.4.0)
rack (>= 1.0.0)
yajl-ruby (>= 1.0.0)
- faye-websocket (0.4.4)
+ faye-websocket (0.4.5)
eventmachine (>= 0.12.0)
- http_parser.rb (0.5.3)
rack (1.4.1)
thin (1.3.1)
daemons (>= 1.0.9)
View
7 faye/client.rb
@@ -0,0 +1,7 @@
+@client.subscribe('/server/*') do |message|
+ @client.publish('/sync/posts', :message => 'test')
+end
+
+EventMachine.add_periodic_timer(30) {
+ @client.publish('/sync/posts', 'hello' => 'world')
+}
View
21 faye/server.rb
@@ -1,14 +1,5 @@
-require 'rubygems'
-
-# ROOT_DIR = File.expand_path(File.dirname(__FILE__))
-# File.open(File.join(ROOT_DIR, '..', 'tmp', 'pids', 'faye.pid'), 'w') do |f|
-# f << Process.pid
-# f << "\n"
-# end
-
-port = ARGV[0] || 9292
-secure = ARGV[1] == 'ssl'
-shared = File.expand_path('../../shared', __FILE__)
+port = @args[:port] || 9292
+secure = @args[:ssl] == 'ssl'
require File.expand_path('../app', __FILE__)
Faye::WebSocket.load_adapter('thin')
@@ -28,12 +19,8 @@
end
end
- client = App.get_client
-
- client.subscribe('/server/*') do |message|
- client.publish('/sync/posts', :message => 'test')
- end
+ @client = App.get_client
- client.publish('/sync/posts', 'hello' => 'world')
+ require File.expand_path('../client', __FILE__)
}
View
65 lib/tasks/cucumber.rake
@@ -1,65 +0,0 @@
-# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
-# It is recommended to regenerate this file in the future when you upgrade to a
-# newer version of cucumber-rails. Consider adding your own code to a new file
-# instead of editing this one. Cucumber will automatically load all features/**/*.rb
-# files.
-
-
-unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
-
-vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
-$LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
-
-begin
- require 'cucumber/rake/task'
-
- namespace :cucumber do
- Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
- t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
- t.fork = true # You may get faster startup if you set this to false
- t.profile = 'default'
- end
-
- Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
- t.binary = vendored_cucumber_bin
- t.fork = true # You may get faster startup if you set this to false
- t.profile = 'wip'
- end
-
- Cucumber::Rake::Task.new({:rerun => 'db:test:prepare'}, 'Record failing features and run only them if any exist') do |t|
- t.binary = vendored_cucumber_bin
- t.fork = true # You may get faster startup if you set this to false
- t.profile = 'rerun'
- end
-
- desc 'Run all features'
- task :all => [:ok, :wip]
-
- task :statsetup do
- require 'rails/code_statistics'
- ::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
- ::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
- end
- end
- desc 'Alias for cucumber:ok'
- task :cucumber => 'cucumber:ok'
-
- task :default => :cucumber
-
- task :features => :cucumber do
- STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
- end
-
- # In case we don't have ActiveRecord, append a no-op task that we can depend upon.
- task 'db:test:prepare' do
- end
-
- task :stats => 'cucumber:statsetup'
-rescue LoadError
- desc 'cucumber rake task not available (cucumber not installed)'
- task :cucumber do
- abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
- end
-end
-
-end
View
6 lib/tasks/faye.rake
@@ -0,0 +1,6 @@
+desc "Start faye server"
+task :faye, [:port, :ssl] => :environment do |t, args|
+ @args = args
+ app_root = File.join(File.expand_path(File.dirname(__FILE__)), '..', '..')
+ require File.join(app_root, 'faye', 'server')
+end
View
10 script/cucumber
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-
-vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
-if vendored_cucumber_bin
- load File.expand_path(vendored_cucumber_bin)
-else
- require 'rubygems' unless ENV['NO_RUBYGEMS']
- require 'cucumber'
- load Cucumber::BINARY
-end

No commit comments for this range

Something went wrong with that request. Please try again.