wcc-base 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/tasks/db.rake +12 -13
- data/lib/wcc/version.rb +1 -1
- data/wcc-base.gemspec +0 -1
- metadata +6 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f1d242e0c67ebac9ba3f5f96a40a88cb0185c9d0207b29cab52c9abcd0b0a687
|
4
|
+
data.tar.gz: f45dbdc6a425dbeb7af1b53c9185b2784f9ef2967887e9d379790460da198572
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1628357da582b78aac9d10308635381cbee83b343f2acc0714875f90e2393a9e6a045080c37a46441e31f896771e12c837bacc6e12bef108b767add474787001
|
7
|
+
data.tar.gz: ab922684f27c8d00bf284bea2c17f39b20b1730b05bf02c0f39a64662bf90624769e532805db51fb5afd639486dc9dbc67f4539f8c172ba1006863735c5bd8ff
|
data/lib/tasks/db.rake
CHANGED
@@ -2,7 +2,12 @@ module WCC
|
|
2
2
|
module RakeHelpers
|
3
3
|
|
4
4
|
def self.db_config
|
5
|
-
|
5
|
+
if Rails::VERSION::MAJOR >= 7
|
6
|
+
configs = db_config_file_data.configs_for(env_name: ENV['RAILS_ENV'] || 'development')
|
7
|
+
configs.any? ? configs[0].configuration_hash : {}
|
8
|
+
else
|
9
|
+
db_config_file_data[ENV['RAILS_ENV'] || 'development'] || {}
|
10
|
+
end
|
6
11
|
end
|
7
12
|
|
8
13
|
def self.db_cmd_with_password(cmd, pw)
|
@@ -10,36 +15,30 @@ module WCC
|
|
10
15
|
end
|
11
16
|
|
12
17
|
def self.db_cmd_with_password_string(cmd, pw)
|
13
|
-
%{PGPASSWORD=
|
18
|
+
%{PGPASSWORD='#{pw}' #{cmd.join(' ')}}
|
14
19
|
end
|
15
20
|
|
16
21
|
def self.postgresql?
|
17
|
-
db_config[
|
22
|
+
db_config['adapter'] == 'postgresql'
|
18
23
|
end
|
19
24
|
|
20
25
|
def self.mysql?
|
21
|
-
db_config[
|
26
|
+
db_config['adapter'] == 'mysql'
|
22
27
|
end
|
23
28
|
|
24
29
|
def self.db_config_file_data
|
25
30
|
if defined?(ActiveRecord::Base) && ActiveRecord::Base.configurations.present?
|
26
31
|
ActiveRecord::Base.configurations
|
27
32
|
else
|
28
|
-
@yaml_file ||= YAML.load(
|
29
|
-
ERB.new(File.read("#{app_dir}/config/database.yml" )).result
|
30
|
-
)
|
33
|
+
@yaml_file ||= YAML.load(ERB.new(File.read('config/database.yml' )).result)
|
31
34
|
end
|
32
35
|
rescue SystemCallError
|
33
36
|
{}
|
34
37
|
end
|
35
|
-
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
39
41
|
namespace :db do
|
40
|
-
|
41
|
-
|
42
|
-
task :rebuild => ["db:drop", "db:create", "db:migrate", "db:seed", "db:test:prepare"]
|
43
|
-
|
42
|
+
desc 'Drops, creates, migrates, seeds dev DB and prepares test DB'
|
43
|
+
task rebuild: %w[db:drop db:create db:migrate db:seed db:test:prepare]
|
44
44
|
end
|
45
|
-
|
data/lib/wcc/version.rb
CHANGED
data/wcc-base.gemspec
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcc-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watermark Community Church
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.6'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.6'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rake
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,7 +48,7 @@ homepage: https://github.com/watermarkchurch/wcc
|
|
62
48
|
licenses:
|
63
49
|
- MIT
|
64
50
|
metadata: {}
|
65
|
-
post_install_message:
|
51
|
+
post_install_message:
|
66
52
|
rdoc_options: []
|
67
53
|
require_paths:
|
68
54
|
- lib
|
@@ -77,9 +63,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
63
|
- !ruby/object:Gem::Version
|
78
64
|
version: '0'
|
79
65
|
requirements: []
|
80
|
-
|
81
|
-
|
82
|
-
signing_key:
|
66
|
+
rubygems_version: 3.3.7
|
67
|
+
signing_key:
|
83
68
|
specification_version: 4
|
84
69
|
summary: "# WCC This gem holds the base namespace and default configuration for Watermark
|
85
70
|
Community Church's Ruby development. This is kind of the general repository for
|