workarea-testing 3.4.29 → 3.4.34
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/workarea/test_case.rb +13 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f2b54af0882dd9461d25592925df91d68ad7f6582ff1f83c60a27a79bd7acbe
|
4
|
+
data.tar.gz: 2b8c67846eb1b6dc14861a943fe4fce5cdf8e785ddaf91101833e5f642a24f44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8904b9a68ee8706ed2352b938974804272616c6685c0a69fa0965a331a48521ed2070c8d318aedeaca81c3a964c24cd1ba7f44a2ef1798cb20eea41c198c52a5
|
7
|
+
data.tar.gz: 02e72ff8587dcad81a01f597799151a66571c7ad77ff10381b4bf2317dc7e31abf9a8558c12013a0407df64c96e8aafefcafbbe540ae0e89a8b77e5b6d80777b
|
data/lib/workarea/test_case.rb
CHANGED
@@ -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.
|
4
|
+
version: 3.4.34
|
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-
|
11
|
+
date: 2020-06-11 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.
|
19
|
+
version: 3.4.34
|
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.
|
26
|
+
version: 3.4.34
|
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.
|
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
|