survey-gizmo-ruby 6.1.0 → 6.1.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ecb8c80ba90e28bba4741e13df3dc580149080e2
|
4
|
+
data.tar.gz: 06aaa5d1a4329a5ff21c1304d9b8bc78df9d2dbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9b1cdb3c9cf76cfd3d26f2ae91ed61810cdbfacdec900498d61bcf447470ce0e2d3e6f05857a92a3a0653c6433423a23ebc8b69ac1de37c12f6845e646532b4
|
7
|
+
data.tar.gz: 5c5a95ae7a2e38aa6bd0f88502da2d164bbffafe29828ce77730a8d32f3c05ee440182ba47988a7886bb3cfdc2efca3fecfffcc543d72a064a370fb5c8c0a34f
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Currently supports SurveyGizmo API **v4** (default) and **v3**.
|
|
10
10
|
|
11
11
|
### Major Changes in 6.x
|
12
12
|
* **BREAKING CHANGE**: SurveyGizmo changed the authentication so you need to configure `api_token` and `api_token_secret` instead of user and password.
|
13
|
-
* **BREAKING CHANGE**: Pester has been removed as the retry source in favor of
|
13
|
+
* **BREAKING CHANGE**: Pester has been removed as the retry source in favor of `Retriable`.
|
14
14
|
|
15
15
|
### Major Changes in 5.x
|
16
16
|
|
@@ -10,7 +10,7 @@ module SurveyGizmo::API
|
|
10
10
|
{
|
11
11
|
field: 'datesubmitted',
|
12
12
|
operator: '>=',
|
13
|
-
value: time.in_time_zone(
|
13
|
+
value: time.in_time_zone(SurveyGizmo::Configuration::SURVEYGIZMO_TIME_ZONE).strftime('%Y-%m-%d %H:%M:%S')
|
14
14
|
}
|
15
15
|
end
|
16
16
|
|
@@ -39,10 +39,10 @@ module SurveyGizmo
|
|
39
39
|
|
40
40
|
# Handle really crappy [] notation in SG API, so far just in SurveyResponse
|
41
41
|
Array.wrap(body['data']).compact.each do |datum|
|
42
|
-
# SurveyGizmo returns date information
|
43
|
-
# See https://
|
42
|
+
# SurveyGizmo returns date information using US/Eastern timezone but does not provide time zone information.
|
43
|
+
# See https://apihelp.surveygizmo.com/help/article/link/surveyresponse-returned-fields#examplereturns
|
44
44
|
TIME_FIELDS.each do |time_key|
|
45
|
-
datum[time_key] = datum[time_key]
|
45
|
+
datum[time_key] = ActiveSupport::TimeZone.new(SurveyGizmo::Configuration::SURVEYGIZMO_TIME_ZONE).parse(datum[time_key]) unless datum[time_key].blank?
|
46
46
|
end
|
47
47
|
|
48
48
|
datum.keys.grep(/^\[/).each do |key|
|
data/lib/survey_gizmo/version.rb
CHANGED
data/spec/resource_spec.rb
CHANGED
@@ -221,7 +221,7 @@ describe 'Survey Gizmo Resource' do
|
|
221
221
|
|
222
222
|
describe SurveyGizmo::API::Response do
|
223
223
|
let(:create_attributes) { {:survey_id => 1234, :datesubmitted => "2015-04-15 05:46:30" } }
|
224
|
-
let(:create_attributes_to_compare) { create_attributes.merge(:datesubmitted => Time.parse("2015-04-15 05:46:30
|
224
|
+
let(:create_attributes_to_compare) { create_attributes.merge(:datesubmitted => Time.parse("2015-04-15 05:46:30 -0400")) }
|
225
225
|
let(:get_attributes) { create_attributes.merge(:id => 1) }
|
226
226
|
let(:get_attributes_to_compare) { create_attributes_to_compare.merge(:id => 1) }
|
227
227
|
let(:update_attributes) { {:survey_id => 1234, :title => 'Updated'} }
|
@@ -235,6 +235,14 @@ describe 'Survey Gizmo Resource' do
|
|
235
235
|
it_should_behave_like 'an API object'
|
236
236
|
it_should_behave_like 'an object with errors'
|
237
237
|
|
238
|
+
context 'during EST' do
|
239
|
+
let(:create_attributes) { {:survey_id => 1234, :datesubmitted => "2015-01-15 05:46:30" } }
|
240
|
+
let(:create_attributes_to_compare) { create_attributes.merge(:datesubmitted => Time.parse("2015-01-15 05:46:30 -0500")) }
|
241
|
+
|
242
|
+
it_should_behave_like 'an API object'
|
243
|
+
it_should_behave_like 'an object with errors'
|
244
|
+
end
|
245
|
+
|
238
246
|
context 'answers' do
|
239
247
|
let(:survey_id) { 6 }
|
240
248
|
let(:response_id) { 7 }
|
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.1.
|
4
|
+
version: 6.1.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: 2016-03-
|
14
|
+
date: 2016-03-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|