workarea-testing 3.4.30 → 3.4.35
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 +4 -4
- data/lib/workarea/integration_test.rb +1 -0
- data/lib/workarea/performance_test.rb +1 -0
- data/lib/workarea/system_test.rb +1 -0
- data/lib/workarea/test_case.rb +31 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f2512eb7b4e2327dbba1a77a046383329d348e299a00a21ba56e9cf5b347a3
|
4
|
+
data.tar.gz: 553581b974c5c35879eae08ac71ab937d9463c8ece0365f4c5d8168fdea253b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acb637bb1b31f09e0e83bbbe979be29aef5b6f009740d0c30817a08fb1fd534f42a0a56aab8a9c5d3b96df9af2b2b4816dc4076d7b1022e63b8e7952fb8f3dc2
|
7
|
+
data.tar.gz: 5591793d8e7b9103b98ef6ba011966f594f276d3a04c07c29c50534f86b6591c90adfcd9a198811af59e35f4cfcd0197b1f6cf43e39ce2d4d0f7cfdd9f52d34c
|
data/lib/workarea/system_test.rb
CHANGED
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,37 @@ 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
|
181
|
+
end
|
182
|
+
|
183
|
+
module Geocoder
|
184
|
+
extend ActiveSupport::Concern
|
185
|
+
|
186
|
+
included do
|
187
|
+
setup :save_geocoder_config
|
188
|
+
teardown :restore_geocoder_config
|
189
|
+
end
|
190
|
+
|
191
|
+
def save_geocoder_config
|
192
|
+
@original_geocoder_config = ::Geocoder.config.deep_dup
|
193
|
+
end
|
194
|
+
|
195
|
+
def restore_geocoder_config
|
196
|
+
::Geocoder.configure(@original_geocoder_config)
|
197
|
+
end
|
170
198
|
end
|
171
199
|
|
172
200
|
extend Decoration
|
@@ -176,6 +204,7 @@ module Workarea
|
|
176
204
|
include RunnerLocation
|
177
205
|
include Locales
|
178
206
|
include S3
|
207
|
+
include Geocoder
|
179
208
|
|
180
209
|
setup do
|
181
210
|
Mongoid.truncate!
|
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.35
|
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-25 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.35
|
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.35
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|