wcc-base 0.3.4 → 0.3.6

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
2
  SHA256:
3
- metadata.gz: 0d4f43e1d2dd495787d0391f76e8302765ee0ca20f1e9814326292be005c584a
4
- data.tar.gz: 04033a501fd1407a9050b468a00b08d5c666e7d549679722c9986e92b92bc2d4
3
+ metadata.gz: 99b81e4e0a19a74940cfbd2f355a8e09f439db4a627985e63a9f9506fb121bd4
4
+ data.tar.gz: cf7a1d76355474ca9ec0bdb0a81c074156a48a4db4cdb9d5a9baa40d429608aa
5
5
  SHA512:
6
- metadata.gz: ffdfe25ab21fd0f7309aad7a5880c1b11cdaed001a581fb4fcdb28270180e5ce0c0e7e0fe2219a53c967fcd0dacca69e62063a65eaf244dda8fd4aa708f66699
7
- data.tar.gz: b4f4af41123fcac02ddc986234a5de550b8efb7d0f21e01dd93ca61dd87b2d6c43f0166c1d80eb769baf7e303f17b75e7e4f2db02f9b7ecfc867ab5d24bd0611
6
+ metadata.gz: b76659fd84f91ed2951aa070cdb17fef3ab17a2c25ec8326f350eddcadff6e7f180c9f01c96bbb583669c8e2dedc27ab25a4046e41ecb57a47b46ea26446ccba
7
+ data.tar.gz: a5ffe0dbf6b361061e1b263985a44c20d9f14798b50487db0ded97ded7bb4fa9260cc4f2d9fd11d857e9920df1e6edc924db95ff070bbcc7cd5382d48d9ec0bb
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
- if Rails::VERSION::MAJOR >= 7
5
+ if db_config_file_data.respond_to?(:configs_for)
6
6
  configs = db_config_file_data.configs_for(env_name: ENV['RAILS_ENV'] || 'development')
7
7
  configs.any? ? configs[0].configuration_hash : {}
8
8
  else
@@ -30,7 +30,10 @@ module WCC
30
30
  if defined?(ActiveRecord::Base) && ActiveRecord::Base.configurations.present?
31
31
  ActiveRecord::Base.configurations
32
32
  else
33
- @yaml_file ||= YAML.load(ERB.new(File.read('config/database.yml' )).result)
33
+ # We only go down this path if DATABASE_URL is not set, otherwise we would lode the config via ActiveRecord.
34
+ # In psych 3.1 they changed the "aliases" param to be a kwarg instead of a positional argument.
35
+ raise 'Psych version < 3.1.0 not supported' if Psych::Version < '3.1.0'
36
+ @yaml_file ||= YAML.safe_load(ERB.new(File.read('config/database.yml' )).result, aliases: true)
34
37
  end
35
38
  rescue SystemCallError
36
39
  {}
data/lib/wcc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module WCC
2
- VERSION = '0.3.4'
2
+ VERSION = '0.3.6'
3
3
  end
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.3.4
4
+ version: 0.3.6
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: 2024-05-07 00:00:00.000000000 Z
11
+ date: 2024-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake