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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2f9d11630c92acd1e2b18c378967c894665057f6
4
- data.tar.gz: 91bfaafff00de40d02fa6fec58292603b24d8f75
2
+ SHA256:
3
+ metadata.gz: f1d242e0c67ebac9ba3f5f96a40a88cb0185c9d0207b29cab52c9abcd0b0a687
4
+ data.tar.gz: f45dbdc6a425dbeb7af1b53c9185b2784f9ef2967887e9d379790460da198572
5
5
  SHA512:
6
- metadata.gz: 7ba2e1bbf29ada69f150a6cd31a6c4b6c6a47dddd60afd3068401f0b165b3a44a3eabdf11743e9a8ebba4ba36e82f46d7c1fa06401f06d49da1cb5b440cfbae5
7
- data.tar.gz: 0f5b94c87373d060d7eb46ed8216afb4b6272c722fb9fd78a35a26d39caa2e9babea64d81e5baa18e8880335305bf77c234f52d5d544379ef4a665974ca06a85
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
- db_config_file_data[ENV['RAILS_ENV'] || 'development'] || {}
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="#{pw}" #{cmd.join(" ")}}
18
+ %{PGPASSWORD='#{pw}' #{cmd.join(' ')}}
14
19
  end
15
20
 
16
21
  def self.postgresql?
17
- db_config["adapter"] == "postgresql"
22
+ db_config['adapter'] == 'postgresql'
18
23
  end
19
24
 
20
25
  def self.mysql?
21
- db_config["adapter"] == "mysql"
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
- desc "Drops, creates, migrates, seeds dev DB and prepares test DB"
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
@@ -1,3 +1,3 @@
1
1
  module WCC
2
- VERSION = "0.3.0"
2
+ VERSION = '0.3.2'
3
3
  end
data/wcc-base.gemspec CHANGED
@@ -18,6 +18,5 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.6"
22
21
  spec.add_development_dependency "rake"
23
22
  end
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.0
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: 2018-03-14 00:00:00.000000000 Z
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
- rubyforge_project:
81
- rubygems_version: 2.6.11
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