shopapp 0.2.57 → 0.2.58

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: ce88c035e3b496936b79308849738967920b6736ace4368dddce41bbaefc9b0f
4
- data.tar.gz: 3d39762c99b4bf5df9104175ffb8dcb3e068f026216e9b01937fe9b77d1cd83d
3
+ metadata.gz: 2a5642e3de1bfc4b78908970794bb1bdbcd67f114ea2371f4d3a14b621aff072
4
+ data.tar.gz: 41fd31d1439768e50a56dab7fa2eb11ee0b836d95d0c9640f33eb74d64ca261a
5
5
  SHA512:
6
- metadata.gz: 4afc78acc15fe8e1ff0c07f29efae0cacb0171cd9bf8f85cc092f8e8cf0d8ba2d9d67d55aa6f9cc1ca7c4427048fb03e1156569ce5067b757164ccd6983d60d1
7
- data.tar.gz: '0128fc61caeef6d2308010831dba634d55321433b8ec578e8c70546fcfc841fc15554963e6e9cdc5c0fedde18437703deffac5a1e1abae62f06e688460c00a35'
6
+ metadata.gz: e7d1d3e32ce3db851986bbad5f8c3934bc627d39966a569391069bc5246a0931756cb04cd349d5a6f3d657c4099e36215ceeb20dcd29432da15e62d856783aa3
7
+ data.tar.gz: b5dae765cce80eb8531df0c882873df4358e8bd790564cd70e34a747173d2002eabeeb21ac8ac62d72b6e7b4b52837939477fc2ff33973a14f6046096454fbae
data/README.md CHANGED
@@ -77,4 +77,4 @@ else regarding favicons:
77
77
 
78
78
  To build new version of this gem, change the version in shopapp.gemspec and run:
79
79
 
80
- git push; gem build shopapp.gemspec ; gem push shopapp-0.2.57.gem; gem install shopapp
80
+ git push; gem build shopapp.gemspec ; gem push shopapp-0.2.58.gem; gem install shopapp
@@ -0,0 +1,32 @@
1
+ if (Rails.configuration.settings['shopapp_mailer_aws_key'] || Rails.configuration.settings['shopapp_aws_key']) &&
2
+ !Rails.configuration.settings['skip_aws_sdk_shopapp_initialization']
3
+ Aws::Rails.add_action_mailer_delivery_method(
4
+ :aws_sdk,
5
+ credentials: Aws::Credentials.new(
6
+ (Rails.configuration.settings['shopapp_mailer_aws_key'] || Rails.configuration.settings['shopapp_aws_key']),
7
+ (Rails.configuration.settings['shopapp_mailer_aws_secret'] || Rails.configuration.settings['shopapp_aws_secret'])
8
+ ),
9
+ region: (Rails.configuration.settings['aws_region'] || 'eu-west-1')
10
+ )
11
+ end
12
+
13
+ class ShopappEmailInterceptor
14
+ def self.delivering_email(message)
15
+ unless Rails.configuration.settings['send_email'] == true
16
+ message.perform_deliveries = false
17
+ Rails.logger.warn "Not sending email because environment doesn't allow it."
18
+ return
19
+ end
20
+
21
+ if Rails.configuration.settings['force_email_to'].present?
22
+ message.to = Rails.configuration.settings['force_email_to']
23
+ message.cc = nil
24
+ message.bcc = nil
25
+ end
26
+
27
+ message.bcc = Rails.configuration.settings['force_email_bcc'] if Rails.configuration.settings['force_email_bcc'].present?
28
+ message.from = Rails.configuration.settings['force_email_from'] if Rails.configuration.settings['force_email_from'].present?
29
+ end
30
+ end
31
+
32
+ ActionMailer::Base.register_interceptor(ShopappEmailInterceptor)
@@ -9,3 +9,4 @@ require 'audited'
9
9
 
10
10
  require 'shopapp/engine'
11
11
  require 'shopapp/routes'
12
+ require 'aws-sdk-rails'
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopapp'
3
- s.version = '0.2.57'
4
- s.date = '2019-05-21'
3
+ s.version = '0.2.58'
4
+ s.date = '2019-05-24'
5
5
  s.summary = 'Do a shoplift.'
6
6
  s.description = 'Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca\'s fatal web? Hence!\
7
7
  I am qualmish at the smell of leek.'
@@ -37,6 +37,7 @@ Gem::Specification.new do |s|
37
37
  s.add_dependency 'capistrano-rvm', '~> 0'
38
38
  s.add_dependency 'capistrano-rails', '~> 1.2'
39
39
  s.add_dependency 'capistrano-passenger', '~> 0.2.0'
40
+ s.add_dependency 'aws-sdk-rails', '~> 2'
40
41
 
41
42
  # following are only needed on OSX, but do not matter to others
42
43
  s.add_dependency 'ed25519', '~> 1.2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.57
4
+ version: 0.2.58
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-21 00:00:00.000000000 Z
11
+ date: 2019-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -254,6 +254,20 @@ dependencies:
254
254
  - - "~>"
255
255
  - !ruby/object:Gem::Version
256
256
  version: 0.2.0
257
+ - !ruby/object:Gem::Dependency
258
+ name: aws-sdk-rails
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - "~>"
262
+ - !ruby/object:Gem::Version
263
+ version: '2'
264
+ type: :runtime
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - "~>"
269
+ - !ruby/object:Gem::Version
270
+ version: '2'
257
271
  - !ruby/object:Gem::Dependency
258
272
  name: ed25519
259
273
  requirement: !ruby/object:Gem::Requirement
@@ -363,6 +377,7 @@ files:
363
377
  - bin/shopitapp
364
378
  - config/initializers/active_settings.rb
365
379
  - config/initializers/audited.rb
380
+ - config/initializers/safe_email.rb
366
381
  - lib/generators/shopapp/deploy/USAGE
367
382
  - lib/generators/shopapp/deploy/deploy_generator.rb
368
383
  - lib/shopapp.rb