bard-rake 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.1
1
+ 0.10.2
data/bard-rake.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bard-rake"
8
- s.version = "0.10.1"
8
+ s.version = "0.10.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Micah Geisel"]
12
- s.date = "2013-05-18"
12
+ s.date = "2013-05-19"
13
13
  s.description = "Rake tasks for all bard projects.\n* Bootstrap projects\n* Database backup"
14
14
  s.email = "micah@botandrose.com"
15
15
  s.extra_rdoc_files = [
@@ -5,7 +5,7 @@ end
5
5
  desc "Bootstrap project"
6
6
  task :bootstrap => "bootstrap:files" do
7
7
  invoke_task_if_exists "db:create"
8
- Rake::Task["db:migrate:all"].invoke if Rake::Task.task_defined?("db:migrate")
8
+ invoke_task_if_exists "db:migrate:all"
9
9
  Rake::Task["restart"].invoke
10
10
  end
11
11
 
@@ -1,27 +1,29 @@
1
- namespace :db do
2
- namespace :migrate do
3
- task :all => [:load_config, :rails_env] do
4
- configs_for_environment.each do |config|
5
- ActiveRecord::Base.establish_connection(config)
6
- ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
7
- ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_paths, ENV["VERSION"] ? ENV["VERSION"].to_i : nil) do |migration|
8
- ENV["SCOPE"].blank? || (ENV["SCOPE"] == migration.scope)
1
+ if defined?(ActiveRecord)
2
+ namespace :db do
3
+ namespace :migrate do
4
+ task :all => [:load_config, :rails_env] do
5
+ configs_for_environment.each do |config|
6
+ ActiveRecord::Base.establish_connection(config)
7
+ ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
8
+ ActiveRecord::Migrator.migrate(ActiveRecord::Migrator.migrations_paths, ENV["VERSION"] ? ENV["VERSION"].to_i : nil) do |migration|
9
+ ENV["SCOPE"].blank? || (ENV["SCOPE"] == migration.scope)
10
+ end
9
11
  end
10
- end
11
12
 
12
- Rake::Task["db:_dump"].invoke
13
+ Rake::Task["db:_dump"].invoke
14
+ end
13
15
  end
14
- end
15
16
 
16
- namespace :rollback do
17
- task :all => [:load_config, :rails_env] do
18
- configs_for_environment.each do |config|
19
- ActiveRecord::Base.establish_connection(config)
20
- step = ENV['STEP'] ? ENV['STEP'].to_i : 1
21
- ActiveRecord::Migrator.rollback(ActiveRecord::Migrator.migrations_paths, step)
22
- end
17
+ namespace :rollback do
18
+ task :all => [:load_config, :rails_env] do
19
+ configs_for_environment.each do |config|
20
+ ActiveRecord::Base.establish_connection(config)
21
+ step = ENV['STEP'] ? ENV['STEP'].to_i : 1
22
+ ActiveRecord::Migrator.rollback(ActiveRecord::Migrator.migrations_paths, step)
23
+ end
23
24
 
24
- Rake::Task["db:_dump"].invoke
25
+ Rake::Task["db:_dump"].invoke
26
+ end
25
27
  end
26
28
  end
27
29
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard-rake
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 10
9
- - 1
10
- version: 0.10.1
9
+ - 2
10
+ version: 0.10.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Micah Geisel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-05-18 00:00:00 Z
18
+ date: 2013-05-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement