workarea-testing 3.4.31 → 3.4.32

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 +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d47ef53e6b761170ee760651c144e0bf135cec8f717ad37d523e3988fe71e5c
4
- data.tar.gz: ca604b94d4174c43b4abcaf673e5a994281e82a518f9e3126f9e84fd1c43f06e
3
+ metadata.gz: b641da772201c70be13c3bbbac8f5bd401161976081b1333704f3670a44e9ef5
4
+ data.tar.gz: 1e2c398cc18464f1ba2889f05c32730c1c640a78335cb347d7b0b8aebdf27ea0
5
5
  SHA512:
6
- metadata.gz: 253b5fe6058a9fccec204cac342e9d363f471a9af0619e3bb447ac5fcb383bb764198593eaee8ade32454a386728a1651219978aa7f1c0a9c045dce7c08302be
7
- data.tar.gz: 13ab4f543d2e946f4bdd7c303ef7843ad69b94332ad0bbd65484cf986216aeca79a7656c1414cb9c5d16334dfd7a00d6bc70cb0c6aa1d73696f14de2dde0d39d
6
+ metadata.gz: dec3144751128ab30bd4640cf764d3a8f6131babbf8e9c126c9ebf6bedfb76f497ef537c36a88c18b39d8ffeceaee879726bbe9dc7bd08cd3a3940300ff28bbd
7
+ data.tar.gz: 3c9d6a68c6fa86ee763c966a2ade7254c41fa396e10487aa410e64b2ca769afe350754c221d7bef7f906b8172b6d7c488f299a759943b7d20cf5c23ca71f020c
@@ -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.31
4
+ version: 3.4.32
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-04-15 00:00:00.000000000 Z
11
+ date: 2020-04-28 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.31
19
+ version: 3.4.32
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.31
26
+ version: 3.4.32
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: capybara
29
29
  requirement: !ruby/object:Gem::Requirement