workarea-testing 3.4.28 → 3.4.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/workarea/test_case.rb +13 -2
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed1cb2b1c074604fbc931584ffa20dfc936f30dc3065c9a3251a79b4dc2823b6
4
- data.tar.gz: 8a14a2c1cf7e6b7fad92d147df22a3bee03f28380e9298cd2163453bd0ed1a1d
3
+ metadata.gz: 2e6ecfea5aa8156c151a90219610c64886ed09c864ac937c8ab1ea29c6ce3a5d
4
+ data.tar.gz: 15c967f494b4513a56b3658bfa2d9f424fc2b36401c70981e6a56b20069a366f
5
5
  SHA512:
6
- metadata.gz: a5d40142ad1ddc390120ca472ce0252b260b01bb89f72b6cd9caa3557d34817401b5c7a8f2a3dd0a12e52e81bb6aaf2afaebecaf7fb21f825c47a38fd6662889
7
- data.tar.gz: bb55ee52170a6aaa6cfd4c55cb9c7b94594dea5b79ddd2d419eaaccc6e001392ed3312f82f7351bcd0ec4646dbd85562310184919e680cdc2481f4b95b61b135
6
+ metadata.gz: b40a88c39aa4a492ea8c9b6031ee3e82c2bc6dc347ed5f0a944819d688b4b658334548aa7a06d2061f0be1b082fe987a59b5e96e3bd212265581550f0b792b14
7
+ data.tar.gz: 75a2b1d22ef038dbb49b26bdcee2a0aaff66aa697dfa7d07144eab9885ca9fca05b97165ada7e6db7c8b8a06d9539a61e5cfdbeca4ad1c4aeb4750bf39989f86
@@ -126,10 +126,11 @@ module Workarea
126
126
  delegate :t, to: :I18n
127
127
  end
128
128
 
129
- def set_locales(available:, default:, current: nil)
129
+ def set_locales(available:, default:, current: nil, fallbacks: nil)
130
130
  Rails.application.config.i18n.available_locales = I18n.available_locales = available
131
131
  Rails.application.config.i18n.default_locale = I18n.default_locale = default
132
132
  I18n.locale = current || default
133
+ I18n.fallbacks = fallbacks if I18n.respond_to?(:fallbacks=)
133
134
  end
134
135
 
135
136
  def save_locales
@@ -139,6 +140,7 @@ module Workarea
139
140
  @current_i18n_available_locales = I18n.available_locales
140
141
  @current_i18n_default_locale = I18n.default_locale
141
142
  @current_i18n_locale = I18n.default_locale
143
+ @current_i18n_fallbacks = I18n.try(:fallbacks)
142
144
  end
143
145
 
144
146
  def restore_locales
@@ -148,6 +150,7 @@ module Workarea
148
150
  I18n.available_locales = @current_i18n_available_locales
149
151
  I18n.default_locale = @current_i18n_default_locale
150
152
  I18n.locale = @current_i18n_locale
153
+ I18n.fallbacks = @current_i18n_fallbacks if I18n.respond_to?(:fallbacks=)
151
154
  end
152
155
  end
153
156
 
@@ -161,12 +164,20 @@ module Workarea
161
164
 
162
165
  def mock_s3
163
166
  Fog.mock!
164
- Workarea.s3.directories.create(key: Configuration::S3.bucket)
167
+ Workarea.s3.directories.create(key: Workarea::Configuration::S3.bucket)
168
+ Workarea.s3.stubs(:get_bucket_cors).returns(mock_s3_cors_response)
169
+ Workarea.s3.stubs(:put_bucket_cors)
165
170
  end
166
171
 
167
172
  def reset_s3
168
173
  Fog::Mock.reset
169
174
  end
175
+
176
+ def mock_s3_cors_response
177
+ result = mock('Excon::Response')
178
+ result.stubs(data: { body: { 'CORSConfiguration' => [] } })
179
+ result
180
+ end
170
181
  end
171
182
 
172
183
  extend Decoration
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.28
4
+ version: 3.4.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-03 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.28
19
+ version: 3.4.33
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.4.28
26
+ version: 3.4.33
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: capybara
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.0.6
250
+ rubygems_version: 3.0.3
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Testing tools for the Workarea Commerce Platform