wcc-base 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/db.rake +6 -12
- data/lib/wcc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94205352d36070433943dc9b9de961e0f450a09a
|
4
|
+
data.tar.gz: 574d9df4a23fad35a5ec0608217ceb0400e5af88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f4203cd6329d356ec87be65f932396447b1d15509a29e4f87adbdd0d3e0e48401914a2208008acce49ca58d295d037bc892372c17f6988e345f87c876e3a836
|
7
|
+
data.tar.gz: 1a42d129b62153187a8ad30a609196a82f7a54b768db9d8730aee41156d2f49393eed7c10aa20aa489a1031911467804dbf227e095f22b245d757d78e314ad2e
|
data/lib/tasks/db.rake
CHANGED
@@ -10,36 +10,30 @@ module WCC
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.db_cmd_with_password_string(cmd, pw)
|
13
|
-
%{PGPASSWORD=
|
13
|
+
%{PGPASSWORD='#{pw}' #{cmd.join(' ')}}
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.postgresql?
|
17
|
-
db_config[
|
17
|
+
db_config['adapter'] == 'postgresql'
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.mysql?
|
21
|
-
db_config[
|
21
|
+
db_config['adapter'] == 'mysql'
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.db_config_file_data
|
25
25
|
if defined?(ActiveRecord::Base) && ActiveRecord::Base.configurations.present?
|
26
26
|
ActiveRecord::Base.configurations
|
27
27
|
else
|
28
|
-
@yaml_file ||= YAML.load(
|
29
|
-
ERB.new(File.read("#{app_dir}/config/database.yml" )).result
|
30
|
-
)
|
28
|
+
@yaml_file ||= YAML.load(ERB.new(File.read('config/database.yml' )).result)
|
31
29
|
end
|
32
30
|
rescue SystemCallError
|
33
31
|
{}
|
34
32
|
end
|
35
|
-
|
36
33
|
end
|
37
34
|
end
|
38
35
|
|
39
36
|
namespace :db do
|
40
|
-
|
41
|
-
|
42
|
-
task :rebuild => ["db:drop", "db:create", "db:migrate", "db:seed", "db:test:prepare"]
|
43
|
-
|
37
|
+
desc 'Drops, creates, migrates, seeds dev DB and prepares test DB'
|
38
|
+
task rebuild: %w[db:drop db:create db:migrate db:seed db:test:prepare]
|
44
39
|
end
|
45
|
-
|
data/lib/wcc/version.rb
CHANGED