Skip to content

Commit

Permalink
Fixed issues in public rake tasks [#11, #12]
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkersten committed Nov 24, 2011
1 parent e89bfc3 commit 3e19ee3
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 37 deletions.
10 changes: 9 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ gem 'delayed_job', '~> 2.0.4'
gem 'hashie', '~> 1.0.0'
gem 'friendly_id', '~> 3.2.1'

group :development do
group :development, :test do
gem "rails", "2.3.14"
gem "fastercsv"
gem "rubytree", "~> 0.5.2", :require => 'tree'
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3"
gem "webrat"

gem 'cucumber'
gem 'shoulda'
gem 'rspec', '~> 1.3'
gem 'rspec-rails'
gem 'redmine_plugin_support'
gem 'autotest-rails', '~> 4.1.0'
Expand Down
85 changes: 57 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,69 @@ GEM
remote: http://rubygems.org/
specs:
ZenTest (4.5.0)
autotest-rails (4.1.0)
ZenTest
babosa (0.3.2)
actionmailer (2.3.14)
actionpack (= 2.3.14)
actionpack (2.3.14)
activesupport (= 2.3.14)
rack (~> 1.1.0)
activerecord (2.3.14)
activesupport (= 2.3.14)
activeresource (2.3.14)
activesupport (= 2.3.14)
activesupport (2.3.14)
autotest-rails (4.1.1)
ZenTest (= 4.5)
babosa (0.3.5)
builder (3.0.0)
crack (0.1.8)
cucumber (0.10.0)
cucumber (1.1.3)
builder (>= 2.1.2)
diff-lcs (~> 1.1.2)
gherkin (~> 2.3.2)
json (~> 1.4.6)
term-ansicolor (~> 1.0.5)
daemons (1.1.0)
delayed_job (2.0.4)
daemons
diff-lcs (1.1.2)
diff-lcs (>= 1.1.2)
gherkin (~> 2.6.7)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
daemons (1.0.10)
delayed_job (2.0.7)
activesupport (~> 2.0)
daemons (= 1.0.10)
diff-lcs (1.1.3)
fakeweb (1.3.0)
fastercsv (1.5.4)
friendly_id (3.2.1.1)
babosa (~> 0.3.0)
gherkin (2.3.3)
json (~> 1.4.6)
gherkin (2.6.8)
json (>= 1.4.6)
hashie (1.0.0)
hoe (2.8.0)
rake (>= 0.8.7)
httparty (0.7.4)
httparty (0.7.8)
crack (= 0.1.8)
json (1.4.6)
json (1.6.1)
nokogiri (1.5.0)
rack (1.1.2)
rake (0.8.7)
rack-test (0.6.1)
rack (>= 1.0)
rails (2.3.14)
actionmailer (= 2.3.14)
actionpack (= 2.3.14)
activerecord (= 2.3.14)
activeresource (= 2.3.14)
activesupport (= 2.3.14)
rake (>= 0.8.3)
rake (0.9.2.2)
redmine_plugin_support (0.0.4)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
rspec-mocks (~> 2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.5.0)
rspec-rails (1.3.2)
rspec (1.3.2)
rspec-rails (1.3.4)
rack (>= 1.0.0)
rspec (>= 1.3.0)
term-ansicolor (1.0.5)
rspec (~> 1.3.1)
rubytree (0.5.3)
shoulda (2.11.3)
sqlite3-ruby (1.2.5)
term-ansicolor (1.0.7)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)

PLATFORMS
ruby
Expand All @@ -53,9 +75,16 @@ DEPENDENCIES
cucumber
delayed_job (~> 2.0.4)
fakeweb
fastercsv
friendly_id (~> 3.2.1)
hashie (~> 1.0.0)
hoe (~> 2.8.0)
httparty (~> 0.7.4)
rails (= 2.3.14)
redmine_plugin_support
rspec (~> 1.3)
rspec-rails
rubytree (~> 0.5.2)
shoulda
sqlite3-ruby (< 1.3)
webrat
5 changes: 5 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
== 0.2.2 2011-11-23

* Fixed issues in supplied rake tasks for installing gem and
managing delayed_job daemon. [#11, #12]

== 0.2.1 2011-08-18

* Fixed missing link to edit a video's meta-data
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ Cycle your application server (mongrel, unicorn, etc)
Start the delayed\_job daemon

```
RAILS_ENV=production rake chili_videos:delayed_job ACTION=start
RAILS_ENV=production rake "chili_videos:delayed_job[start]"
```

## UNINSTALL:

Stop the delayed\_job daemon

```
RAILS_ENV=production rake chili_videos:delayed_job ACTION=stop
RAILS_ENV=production rake "chili_videos:delayed_job[stop]"
```

Run the uninstall rake task (reverts migrations & uninstalls assets)
Expand Down
3 changes: 0 additions & 3 deletions app/models/assembly.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
class Encoding < Hashie::Mash
end

class Assembly < ActiveRecord::Base
unloadable

Expand Down
2 changes: 2 additions & 0 deletions app/models/encoding.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Encoding < Hashie::Mash
end
8 changes: 5 additions & 3 deletions lib/tasks/chili_videos_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ def define
end

desc "Manage delayed_job...requires argument [ACTION=(#{VALID_DJ_ACTIONS.join('|')})]"
task :delayed_job, 'action' => [:environment] do |task, args|
task :delayed_job, [:action] => [:environment] do |task, args|
unless(args[:action] && VALID_DJ_ACTIONS.include?(args[:action]))
puts "'ACTION' is a required parameter. Valid values are: #{VALID_DJ_ACTIONS.join(', ')}"
puts "No action specified!"
puts "\nUsage: rake \"#{task.name}[action]\" (Note the quotes, and include the brackets...)"
puts "Valid values for 'action' are: #{VALID_DJ_ACTIONS.join(', ')}."
exit(1)
end

Expand All @@ -39,7 +41,7 @@ def define
end

task :migrate_db => [:environment] do
puts "Migrating chili_videos-#{ChiliVideos::VERSION}..."
puts "Migrating chili_videos..."
ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
ActiveRecord::Migrator.migrate(gem_db_migrate_dir, ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
Expand Down

0 comments on commit 3e19ee3

Please sign in to comment.