survey-gizmo-ruby 6.5.0 → 6.5.1
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/CHANGELOG.md +3 -0
- data/README.md +3 -0
- data/lib/survey_gizmo/configuration.rb +3 -1
- data/lib/survey_gizmo/multilingual_title.rb +1 -1
- data/lib/survey_gizmo/version.rb +1 -1
- data/spec/configuration_spec.rb +14 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '04916024e8381ac6d6cc8717e4fa4fa66360ce29'
|
4
|
+
data.tar.gz: a8c9ce7f8d64768ccb29afbfe429693c93b0ccfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc5c7b798d0df953d5b1b6434389a5e76919fe42f31c449141a9e62d5a14d857f609ded3706fa3492a40177c3bace5a040664c37bf0356955406ee566badd35a
|
7
|
+
data.tar.gz: 3673f9b1def4d57d9a55763c4e872008dbc160fbb02013e61cc3b24b2026f7d1bda7f2351e4bc7c573e6f15603c56f9c629488f964d9a3d1eb6dfc9f408d7b79
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -38,6 +38,9 @@ SurveyGizmo.configure do |config|
|
|
38
38
|
# Optional - Defaults to 300 seconds
|
39
39
|
config.timeout_seconds = 600
|
40
40
|
|
41
|
+
# Optional - Defaults to English. If the survey has just one translation in languages different than English, with this option methods always return the proper locale.
|
42
|
+
config.locale = 'Italian'
|
43
|
+
|
41
44
|
# Optional - Configure arguments to the Retriable gem directly that will be merged into the defaults
|
42
45
|
config.retriable_params = { tries: 30, max_elapsed_time: 3600 }
|
43
46
|
end
|
@@ -37,6 +37,7 @@ module SurveyGizmo
|
|
37
37
|
DEFAULT_RESULTS_PER_PAGE = 50
|
38
38
|
DEFAULT_TIMEOUT_SECONDS = 300
|
39
39
|
DEFAULT_REGION = :us
|
40
|
+
DEFAULT_LOCALE = 'English'
|
40
41
|
|
41
42
|
REGION_INFO = {
|
42
43
|
us: {
|
@@ -77,7 +78,7 @@ module SurveyGizmo
|
|
77
78
|
attr_accessor :results_per_page
|
78
79
|
attr_accessor :timeout_seconds
|
79
80
|
attr_accessor :retriable_params
|
80
|
-
|
81
|
+
attr_accessor :locale
|
81
82
|
# TODO Deprecated; remove in 7.0
|
82
83
|
attr_accessor :retry_attempts
|
83
84
|
attr_accessor :retry_interval
|
@@ -90,6 +91,7 @@ module SurveyGizmo
|
|
90
91
|
@results_per_page = DEFAULT_RESULTS_PER_PAGE
|
91
92
|
@timeout_seconds = DEFAULT_TIMEOUT_SECONDS
|
92
93
|
@retriable_params = DEFAULT_RETRIABLE_PARAMS
|
94
|
+
@locale = DEFAULT_LOCALE
|
93
95
|
self.region = DEFAULT_REGION
|
94
96
|
|
95
97
|
@logger = SurveyGizmo::Logger.new(STDOUT)
|
data/lib/survey_gizmo/version.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
@@ -57,6 +57,20 @@ describe SurveyGizmo::Configuration do
|
|
57
57
|
end
|
58
58
|
}.to raise_error
|
59
59
|
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe 'locale' do
|
63
|
+
it 'should set English locale by default' do
|
64
|
+
SurveyGizmo.configure
|
65
|
+
expect(SurveyGizmo.configuration.locale).to eq('English')
|
66
|
+
end
|
60
67
|
|
68
|
+
it 'should set Italian locale with Italian specified' do
|
69
|
+
SurveyGizmo.configure do |config|
|
70
|
+
config.locale = 'Italian'
|
71
|
+
end
|
72
|
+
|
73
|
+
expect(SurveyGizmo.configuration.locale).to eq('Italian')
|
74
|
+
end
|
61
75
|
end
|
62
76
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: survey-gizmo-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.5.
|
4
|
+
version: 6.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kabari Hendrick
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-12-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -265,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
265
265
|
version: '0'
|
266
266
|
requirements: []
|
267
267
|
rubyforge_project:
|
268
|
-
rubygems_version: 2.
|
268
|
+
rubygems_version: 2.6.8
|
269
269
|
signing_key:
|
270
270
|
specification_version: 4
|
271
271
|
summary: Gem to use the SurveyGizmo.com REST API, v3+
|
@@ -281,3 +281,4 @@ test_files:
|
|
281
281
|
- spec/test_json/page.json
|
282
282
|
- spec/test_json/question.json
|
283
283
|
- spec/test_json/survey.json
|
284
|
+
has_rdoc:
|