daddy 0.9.14 → 0.9.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08a683e91f1863f8f0f5effad040d53352232fc49df964cf0f35733d8ea0ba78'
4
- data.tar.gz: 436e4e02ff4609b9b94216c1d277bb5e3a6d6d9016fca3d79fd0cf43b8e14838
3
+ metadata.gz: 83f26abfad4548e521a75c8739d373be17e949ecefdd24ee5ae6720345cfb657
4
+ data.tar.gz: 4e7e951bcedf7df58de4bc9cb31e95351b7641eff3dfb593455d9adc0adac63d
5
5
  SHA512:
6
- metadata.gz: e91c52a247f2e8b772cb088db3c603174e05faf2078812b2025957551d7da42539a9c72f8453e83162b119b5ec3a56a5a3179c93f63d3ce0140206340bc6e7ea
7
- data.tar.gz: 313ae2396d6d8a23a0484322e8e729cd89458df0837af44204ba1f12b1b29852ab685c80137a1f0503a8c40160ff9733d9d459396f31558e5e64bd47c38551fc
6
+ metadata.gz: 692b8c969023e967bd64d2c4153797b938fa16a432a8b21866a757d12aef468febd0a0ab940ccd84c4640d689f2ca5a5ad0e777ef5de56b224f9caf0327a2f1f
7
+ data.tar.gz: 2f0f3343079e1471b435d69621f29b421ecb3cfcffbb5ade14c490857af148634f40235d698085a4eaac7a9fb96a04dc49958c1935c9739117c99dd1219d8a32
@@ -8,15 +8,15 @@ CarrierWave.configure do |config|
8
8
  "/data/#{::Rails.application.class.module_parent_name.underscore}/#{::Rails.env}"
9
9
  end
10
10
 
11
- unless ::Rails.env.test?
12
- if File.exists?('config/aws.yml')
11
+ if File.exists?('config/aws.yml')
12
+ aws = YAML.safe_load(ERB.new(File.read('config/aws.yml'), 0, '-').result)
13
+
14
+ if aws.dig('s3', 'enabled')
13
15
  require 'carrierwave/storage/fog'
14
16
  config.storage :fog
15
17
  config.cache_storage :fog
16
-
17
18
  config.fog_provider = 'fog/aws'
18
- aws = YAML.load_file('config/aws.yml')
19
-
19
+
20
20
  config.fog_credentials = {
21
21
  provider: 'AWS',
22
22
  aws_access_key_id: aws['s3']['access_key_id'],
@@ -18,14 +18,14 @@ module Daddy
18
18
 
19
19
  initializer 'carrierwave' do
20
20
  if defined?(CarrierWave)
21
- ::Rails.logger.info '[daddy] loading carrierwave uploader'
22
- require 'daddy/uploader'
21
+ puts '[daddy] loading carrierwave configuration'
22
+ require 'daddy/carrierwave'
23
23
  end
24
24
  end
25
25
 
26
26
  initializer 'sidekiq' do
27
27
  if defined?(Sidekiq)
28
- ::Rails.logger.info '[daddy] loading sidekiq configuration'
28
+ puts '[daddy] loading sidekiq configuration'
29
29
  require 'daddy/sidekiq'
30
30
  end
31
31
  end
data/lib/daddy/version.rb CHANGED
@@ -2,6 +2,6 @@ module Daddy
2
2
  VERSION = [
3
3
  VERSION_MAJOR = '0',
4
4
  VERSION_MINOR = '9',
5
- VERSION_REVISION = '14'
5
+ VERSION_REVISION = '15'
6
6
  ].join('.')
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.14
4
+ version: 0.9.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
@@ -353,6 +353,7 @@ files:
353
353
  - lib/capistrano/tasks/clear_cache.rake
354
354
  - lib/capistrano/tasks/update_linked_files.rake
355
355
  - lib/daddy.rb
356
+ - lib/daddy/carrierwave.rb
356
357
  - lib/daddy/cucumber.rb
357
358
  - lib/daddy/cucumber/helpers.rb
358
359
  - lib/daddy/cucumber/helpers/assert.rb
@@ -383,7 +384,6 @@ files:
383
384
  - lib/daddy/sidekiq.rb
384
385
  - lib/daddy/tasks.rb
385
386
  - lib/daddy/test_help.rb
386
- - lib/daddy/uploader.rb
387
387
  - lib/daddy/utils/config.rb
388
388
  - lib/daddy/utils/sql_utils.rb
389
389
  - lib/daddy/utils/string_utils.rb