bard-rake 0.10.3 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.4
|
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.
|
8
|
+
s.version = "0.10.4"
|
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-06-
|
12
|
+
s.date = "2013-06-24"
|
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 = [
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|
27
27
|
"lib/bard/rake.rb",
|
28
28
|
"lib/bard/rake/bootstrap.rb",
|
29
29
|
"lib/bard/rake/db_dump_load.rb",
|
30
|
-
"lib/bard/rake/
|
30
|
+
"lib/bard/rake/db_multiple_environment_sanity.rb",
|
31
31
|
"lib/bard/rake/railtie.rb",
|
32
32
|
"lib/bard/rake/testing.rb",
|
33
33
|
"spec/bard-rake_spec.rb",
|
data/lib/bard/rake.rb
CHANGED
@@ -1,10 +1,4 @@
|
|
1
1
|
namespace :db do
|
2
|
-
namespace :drop do
|
3
|
-
task :current_environment => [:load_config, :rails_env] do
|
4
|
-
drop_database_and_rescue Rails.env
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
2
|
desc "Dump the current database to db/data.sql"
|
9
3
|
task :dump => :environment do
|
10
4
|
klass = adapter_from_config BardRake.database_config
|
@@ -12,7 +6,7 @@ namespace :db do
|
|
12
6
|
end
|
13
7
|
|
14
8
|
desc "Load the db/data.sql data into the current database."
|
15
|
-
task :load => ["db:drop:
|
9
|
+
task :load => ["db:drop:current", "db:create:current"] do
|
16
10
|
klass = adapter_from_config BardRake.database_config
|
17
11
|
klass.load
|
18
12
|
end
|
@@ -35,5 +35,27 @@ if defined?(ActiveRecord)
|
|
35
35
|
configs_for_environment.each &block
|
36
36
|
end
|
37
37
|
end
|
38
|
+
|
39
|
+
namespace :drop do
|
40
|
+
task :current => [:load_config] do
|
41
|
+
if defined?(ActiveRecord::Tasks::DatabaseTasks)
|
42
|
+
config = ActiveRecord::Tasks::DatabaseTasks.current_config
|
43
|
+
ActiveRecord::Tasks::DatabaseTasks.drop config
|
44
|
+
else
|
45
|
+
drop_database current_config
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
namespace :create do
|
51
|
+
task :current => [:load_config] do
|
52
|
+
if defined?(ActiveRecord::Tasks::DatabaseTasks)
|
53
|
+
config = ActiveRecord::Tasks::DatabaseTasks.current_config
|
54
|
+
ActiveRecord::Tasks::DatabaseTasks.create config
|
55
|
+
else
|
56
|
+
create_database current_config
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
38
60
|
end
|
39
61
|
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:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
version: 0.10.
|
9
|
+
- 4
|
10
|
+
version: 0.10.4
|
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-06-
|
18
|
+
date: 2013-06-24 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|
@@ -56,7 +56,7 @@ files:
|
|
56
56
|
- lib/bard/rake.rb
|
57
57
|
- lib/bard/rake/bootstrap.rb
|
58
58
|
- lib/bard/rake/db_dump_load.rb
|
59
|
-
- lib/bard/rake/
|
59
|
+
- lib/bard/rake/db_multiple_environment_sanity.rb
|
60
60
|
- lib/bard/rake/railtie.rb
|
61
61
|
- lib/bard/rake/testing.rb
|
62
62
|
- spec/bard-rake_spec.rb
|