survey-gizmo-ruby 7.1.0 → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abb1fc732914368016f3957ab6656bdae5a26d2c244ed74e63918e1e1ffe2121
4
- data.tar.gz: ee4d9d163be112583890f73c6584ed3561c8c2aa0fc23006582a58c6ed8a4686
3
+ metadata.gz: 52a117d657f95e13930b39d1df1304eb05e46432d896587a6da45a21d813b5db
4
+ data.tar.gz: 8c8fa64911c98668f44ff4e69a4622f3d93af804c8330d55d7008fec1d375518
5
5
  SHA512:
6
- metadata.gz: 63db1d1135d179a1e2b87dba812e367ef9dbca6817071333a82cc623946a45228a07f1daa3f7fdf55152661d365575caf6b944a100815c9d443d4a3ac129c733
7
- data.tar.gz: ce48bf573258b3efb6e2bf8600246ffab48669c0de69c4e95128bacf4bcd3eee658b9d330615b81cf792b37574b53766c21211d68ee0639ca57cf5083648bf4f
6
+ metadata.gz: c2eba67b9fe4060d7ddf0a440c1ff7c46b8ed17f12744c720d8d111eedac6e2f75912fcec7b02b9f767be4d77cb967a645bf0841017bfff772a2187120ec8067
7
+ data.tar.gz: '080cd24a8f6efd9253ac4a07614c0473fe08a054e3005e4e1b24449e512ba6a53fd4bc58c5607bb1ec75b4a68753dbf0c81a01609864c8072602107f55736f7e'
@@ -0,0 +1,28 @@
1
+ name: Test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ name: on ruby ${{matrix.ruby}}
8
+ runs-on: ubuntu-latest
9
+
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ ruby: [2.4, 2.5, 2.6, 2.7, 3.0, head]
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v2
18
+
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: ${{matrix.ruby}}
23
+
24
+ - name: Install dependencies
25
+ run: bundle install --jobs 4 --retry 3
26
+
27
+ - name: RSpec
28
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Versions
2
2
 
3
+ ## 8.1.0 (unreleased)
4
+
5
+ ## 8.0.0
6
+ * BREAKING CHANGE: Switch from the old Survey Gizmo API URLs (`restapi.surveygizmo.com` and `restapi.surveygizmo.eu`) to the new Alchemer API URLs (`api.alchemer.com` and `api.alchemer.eu`)
7
+ * Fix ruby 3.2 build
8
+ * Fix ruby 2.7 build and compatibility with activesupport >= 7
9
+ * Switch CI from Travis to Github actions
10
+
11
+ ## 7.1.1
12
+ * Add missing `subtype` parameter to `Campain` required at creation
13
+ * Fix use of deprecated Faraday error class (#110)
14
+
3
15
  ## 7.1.0
4
16
  * Loosen dependencies on ActiveSupport and other gems to support Rails 6
5
17
  * Minor fix to `SurveyGizmo::Configuration#region=` to raise proper error when region is invalid
data/README.md CHANGED
@@ -1,10 +1,8 @@
1
1
  # Survey Gizmo (ruby)
2
2
 
3
- [![Build Status](https://travis-ci.org/jarthod/survey-gizmo-ruby.svg?branch=master)](https://travis-ci.org/jarthod/survey-gizmo-ruby)
3
+ Integrate with the [Alchemer API](https://apihelp.alchemer.com/help) using an ActiveModel style interface.
4
4
 
5
- Integrate with the [Survey Gizmo API](https://apihelp.surveygizmo.com/help) using an ActiveModel style interface.
6
-
7
- Currently supports SurveyGizmo API **v4** (default) and **v3**.
5
+ Currently supports Alchemer API **v4** (default) and **v3**.
8
6
 
9
7
  ## Version History
10
8
 
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'active_support/concern'
2
3
  require 'active_support/core_ext/array'
3
4
  require 'active_support/core_ext/hash'
@@ -20,7 +20,7 @@ module SurveyGizmo::API
20
20
  when /\[question\((\d+)\),\s*option\((\d+|"\d+-other")\)\]/
21
21
  self.question_id, self.option_id = $1, $2
22
22
 
23
- if option_id =~ /-other/
23
+ if option_id.to_s =~ /-other/
24
24
  option_id.delete!('-other"')
25
25
  self.other_text = value
26
26
  elsif option_id == 0
@@ -6,6 +6,7 @@ module SurveyGizmo::API
6
6
  attribute :name, String
7
7
  attribute :type, String
8
8
  attribute :_type, String
9
+ attribute :subtype, String
9
10
  attribute :_subtype, String
10
11
  attribute :__subtype, String
11
12
  attribute :status, String
@@ -49,11 +49,11 @@ module SurveyGizmo
49
49
 
50
50
  REGION_INFO = {
51
51
  us: {
52
- url: 'https://restapi.surveygizmo.com',
52
+ url: 'https://api.alchemer.com',
53
53
  locale: 'Eastern Time (US & Canada)'
54
54
  },
55
55
  eu: {
56
- url: 'https://restapi.surveygizmo.eu',
56
+ url: 'https://api.alchemer.eu',
57
57
  locale: 'UTC'
58
58
  }
59
59
  }
@@ -65,7 +65,7 @@ module SurveyGizmo
65
65
  tries: 4,
66
66
  on: [
67
67
  Errno::ETIMEDOUT,
68
- Faraday::Error::ClientError,
68
+ Faraday::ClientError,
69
69
  Net::ReadTimeout,
70
70
  SurveyGizmo::BadResponseError,
71
71
  SurveyGizmo::RateLimitExceededError
@@ -1,3 +1,3 @@
1
1
  module SurveyGizmo
2
- VERSION = '7.1.0'
2
+ VERSION = '8.0.0'
3
3
  end
@@ -106,7 +106,7 @@ describe SurveyGizmo::Configuration do
106
106
  describe '#region=' do
107
107
  it 'should set US region by default' do
108
108
  SurveyGizmo.configure
109
- expect(SurveyGizmo.configuration.api_url).to eq('https://restapi.surveygizmo.com')
109
+ expect(SurveyGizmo.configuration.api_url).to eq('https://api.alchemer.com')
110
110
  expect(SurveyGizmo.configuration.api_time_zone).to eq('Eastern Time (US & Canada)')
111
111
  end
112
112
 
@@ -115,7 +115,7 @@ describe SurveyGizmo::Configuration do
115
115
  config.region = :us
116
116
  end
117
117
 
118
- expect(SurveyGizmo.configuration.api_url).to eq('https://restapi.surveygizmo.com')
118
+ expect(SurveyGizmo.configuration.api_url).to eq('https://api.alchemer.com')
119
119
  expect(SurveyGizmo.configuration.api_time_zone).to eq('Eastern Time (US & Canada)')
120
120
  end
121
121
 
@@ -124,7 +124,7 @@ describe SurveyGizmo::Configuration do
124
124
  config.region = :eu
125
125
  end
126
126
 
127
- expect(SurveyGizmo.configuration.api_url).to eq('https://restapi.surveygizmo.eu')
127
+ expect(SurveyGizmo.configuration.api_url).to eq('https://api.alchemer.eu')
128
128
  expect(SurveyGizmo.configuration.api_time_zone).to eq('UTC')
129
129
  end
130
130
 
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: 7.1.0
4
+ version: 8.0.0
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: 2019-12-05 00:00:00.000000000 Z
14
+ date: 2022-12-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -189,9 +189,9 @@ extensions: []
189
189
  extra_rdoc_files: []
190
190
  files:
191
191
  - ".document"
192
+ - ".github/workflows/test.yml"
192
193
  - ".gitignore"
193
194
  - ".rspec"
194
- - ".travis.yml"
195
195
  - CHANGELOG.md
196
196
  - Gemfile
197
197
  - LICENSE.txt
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  - !ruby/object:Gem::Version
247
247
  version: '0'
248
248
  requirements: []
249
- rubygems_version: 3.0.3
249
+ rubygems_version: 3.2.33
250
250
  signing_key:
251
251
  specification_version: 4
252
252
  summary: Gem to use the SurveyGizmo.com REST API, v3+
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.1.9
4
- - 2.2.10
5
- - 2.3.8
6
- - 2.4.9
7
- - 2.5.7
8
- - 2.6.5
9
- - ruby-head