wcc-base 0.2.1 → 0.2.2
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.
- checksums.yaml +4 -4
- data/lib/tasks/db.rake +3 -3
- data/lib/tasks/db/psql.rake +2 -2
- data/lib/wcc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5ffcb2f194975822128b22d2974798fa6f55c2b
|
|
4
|
+
data.tar.gz: c48c096a7543d02f4cfe0a5db226a13ef60fd4aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a40deac1be76edbaa952ba2477c091afaaf74a3eade3a2e09091f10d15f3fad30ec0c494e5c0ac6375fab7c6c15e8b31702b5eaac52e79c534bb11d47b2713b4
|
|
7
|
+
data.tar.gz: 2d113be9c9dce854322ac690f52b14e87f511fc20902b8c1a3394dd878af0ef379a05b4c070645ae003428c1605bbb33652429ec28cb9583b92f0ec3c08716f7
|
data/lib/tasks/db.rake
CHANGED
|
@@ -2,7 +2,7 @@ module WCC
|
|
|
2
2
|
module RakeHelpers
|
|
3
3
|
|
|
4
4
|
def self.db_config
|
|
5
|
-
|
|
5
|
+
db_config_file_data[ENV['RAILS_ENV'] || 'development'] || {}
|
|
6
6
|
end
|
|
7
7
|
|
|
8
8
|
def self.db_cmd_with_password(cmd, pw)
|
|
@@ -22,10 +22,10 @@ module WCC
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def self.db_config_file_data
|
|
25
|
-
if defined?(ActiveRecord::Base)
|
|
25
|
+
if defined?(ActiveRecord::Base) && ActiveRecord::Base.configurations.present?
|
|
26
26
|
ActiveRecord::Base.configurations
|
|
27
27
|
else
|
|
28
|
-
YAML.load_file("config/database.yml")
|
|
28
|
+
@yaml_file ||= YAML.load_file("config/database.yml")
|
|
29
29
|
end
|
|
30
30
|
rescue SystemCallError
|
|
31
31
|
{}
|
data/lib/tasks/db/psql.rake
CHANGED
|
@@ -15,7 +15,7 @@ namespace :db do
|
|
|
15
15
|
Rake::Task['db:drop'].enhance ['db:drop_pg_connections']
|
|
16
16
|
|
|
17
17
|
desc 'Dump the pg database to the specified file'
|
|
18
|
-
task :dump, :file do |t, args|
|
|
18
|
+
task :dump, [:file] => :environment do |t, args|
|
|
19
19
|
raise "file argument required" unless args[:file]
|
|
20
20
|
db_config = WCC::RakeHelpers.db_config
|
|
21
21
|
command = [
|
|
@@ -29,7 +29,7 @@ namespace :db do
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
desc 'Restore the pg datbase from the specified file'
|
|
32
|
-
task :restore, :file do |t, args|
|
|
32
|
+
task :restore, [:file] => :environment do |t, args|
|
|
33
33
|
raise "file argument required" unless File.exists?(args[:file])
|
|
34
34
|
db_config = WCC::RakeHelpers.db_config
|
|
35
35
|
case File.extname(args[:file])
|
data/lib/wcc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wcc-base
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Watermark Community Church
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|