survey-gizmo-ruby 7.0.0 → 7.1.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: 2a08475717245ba2f53f58bf497f7b18fd8bab1f61554e73862c83fafb8fa8c6
4
- data.tar.gz: eb9c8b9f1591d2a381bd926fe61d8649290aeee8ea22a1c879d37c845610e132
3
+ metadata.gz: abb1fc732914368016f3957ab6656bdae5a26d2c244ed74e63918e1e1ffe2121
4
+ data.tar.gz: ee4d9d163be112583890f73c6584ed3561c8c2aa0fc23006582a58c6ed8a4686
5
5
  SHA512:
6
- metadata.gz: 75a62b2a9af99e373beca17f5f2c4bef2ff9ee1a1b047b01a2110fc22109bcf5bf63fc50d11b0760c939c84c7475bd2d3a69956d49913ecbe3dc4c7961247db6
7
- data.tar.gz: 718d88e0d421b56ae97467cb078f69bf5230337db62e387bf42dddb5c2aa2d308c4c4a5fd2e39834323658898ad5b5f43cd589e0f616c4e47eb83c168c813bf4
6
+ metadata.gz: 63db1d1135d179a1e2b87dba812e367ef9dbca6817071333a82cc623946a45228a07f1daa3f7fdf55152661d365575caf6b944a100815c9d443d4a3ac129c733
7
+ data.tar.gz: ce48bf573258b3efb6e2bf8600246ffab48669c0de69c4e95128bacf4bcd3eee658b9d330615b81cf792b37574b53766c21211d68ee0639ca57cf5083648bf4f
@@ -1,5 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.8
4
- - 2.2.4
5
- - 2.3.0
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
@@ -1,4 +1,10 @@
1
1
  # Versions
2
+
3
+ ## 7.1.0
4
+ * Loosen dependencies on ActiveSupport and other gems to support Rails 6
5
+ * Minor fix to `SurveyGizmo::Configuration#region=` to raise proper error when region is invalid
6
+ * Update some development dependencies
7
+
2
8
  ## 7.0.0
3
9
  * Makes configuration thread safe. When a new thread is created, the last configuration set through `SurveyGizmo.configure` will be used.
4
10
 
@@ -41,7 +41,7 @@ module SurveyGizmo::API
41
41
 
42
42
  self.question_id = question_id.to_i
43
43
 
44
- if option_id && !option_id.is_a?(Fixnum)
44
+ if option_id && !option_id.is_a?(Integer)
45
45
  fail "Bad option_id #{option_id} (class: #{option_id.class}) for #{attrs}!" if option_id.to_i == 0
46
46
  self.option_id = option_id.to_i
47
47
  end
@@ -108,7 +108,7 @@ module SurveyGizmo
108
108
 
109
109
  def region=(region)
110
110
  region_infos = REGION_INFO[region]
111
- ArgumentError.new("Unknown region: #{region}") unless region_infos
111
+ raise ArgumentError.new("Unknown region: #{region}") unless region_infos
112
112
 
113
113
  @api_url = region_infos[:url]
114
114
  @api_time_zone = region_infos[:locale]
@@ -1,3 +1,3 @@
1
1
  module SurveyGizmo
2
- VERSION = '7.0.0'
2
+ VERSION = '7.1.0'
3
3
  end
@@ -133,7 +133,7 @@ describe SurveyGizmo::Configuration do
133
133
  SurveyGizmo.configure do |config|
134
134
  config.region = :cz
135
135
  end
136
- }.to raise_error
136
+ }.to raise_error(ArgumentError, "Unknown region: cz")
137
137
  end
138
138
  end
139
139
 
@@ -306,8 +306,5 @@ describe 'Survey Gizmo Resource' do
306
306
  h.default = '/account_teams/1234'
307
307
  h
308
308
  end
309
-
310
- #it_should_behave_like 'an API object'
311
- #it_should_behave_like 'an object with errors'
312
309
  end
313
310
  end
@@ -1,6 +1,6 @@
1
1
  shared_examples_for 'an API object' do
2
2
  it "should be descendant of SurveyGizmo::Resource" do
3
- SurveyGizmo::Resource.descendants.should include(described_class)
3
+ expect(SurveyGizmo::Resource.descendants).to include(described_class)
4
4
  end
5
5
 
6
6
  context "#create" do
@@ -9,7 +9,7 @@ shared_examples_for 'an API object' do
9
9
  obj = described_class.create(create_attributes)
10
10
 
11
11
  expect(obj).to be_instance_of(described_class)
12
- a_request(:put, /#{@base}#{uri_paths[:create]}/).should have_been_made
12
+ expect(a_request(:put, /#{@base}#{uri_paths[:create]}/)).to have_been_made
13
13
  end
14
14
 
15
15
  it "should set the attributes" do
@@ -30,7 +30,7 @@ shared_examples_for 'an API object' do
30
30
 
31
31
  it "should return false if the request fails" do
32
32
  stub_request(:get, /#{@base}/).to_return(json_response(false, "something is wrong"))
33
- expect { described_class.first(first_params) }.to raise_error
33
+ expect { described_class.first(first_params) }.to raise_error(SurveyGizmo::BadResponseError, "something is wrong")
34
34
  end
35
35
  end
36
36
 
@@ -47,7 +47,7 @@ shared_examples_for 'an API object' do
47
47
 
48
48
  it "cannot be destroyed if new" do
49
49
  @obj.id = nil
50
- expect { @obj.destroy }.to raise_error
50
+ expect { @obj.destroy }.to raise_error(RuntimeError, /No id; can't delete/)
51
51
  end
52
52
  end
53
53
 
@@ -5,8 +5,8 @@ shared_examples_for 'an object with errors' do
5
5
 
6
6
  context 'class methods' do
7
7
  it 'should raise errors' do
8
- expect { described_class.first(get_attributes) }.to raise_error
9
- expect { described_class.all(get_attributes.merge(page: 1)).to_a }.to raise_error
8
+ expect { described_class.first(get_attributes) }.to raise_error(SurveyGizmo::BadResponseError, "There was an error!")
9
+ expect { described_class.all(get_attributes.merge(page: 1)).to_a }.to raise_error(SurveyGizmo::BadResponseError, "There was an error!")
10
10
  end
11
11
  end
12
12
  end
@@ -15,17 +15,17 @@ Gem::Specification.new do |gem|
15
15
  gem.licenses = ['MIT']
16
16
  gem.required_ruby_version = '>= 2.1'
17
17
 
18
- gem.add_dependency 'activesupport', '>= 3.0', '< 6.0'
19
- gem.add_dependency 'addressable', '~> 2'
20
- gem.add_dependency 'awesome_print', '~> 1'
21
- gem.add_dependency 'faraday', '>= 0.9.1', '~> 0.9'
22
- gem.add_dependency 'faraday_middleware', '~> 0.9'
23
- gem.add_dependency 'retriable', '>= 2.0', '< 4.0'
18
+ gem.add_dependency 'activesupport', '>= 3.0'
19
+ gem.add_dependency 'addressable', '>= 2'
20
+ gem.add_dependency 'awesome_print', '>= 1'
21
+ gem.add_dependency 'faraday', '>= 0.9.1'
22
+ gem.add_dependency 'faraday_middleware'
23
+ gem.add_dependency 'retriable', '>= 2.0'
24
24
  gem.add_dependency 'i18n'
25
25
  gem.add_dependency 'virtus', '>= 1.0.0'
26
26
 
27
- gem.add_development_dependency 'rspec', '~> 3.4.0'
28
- gem.add_development_dependency 'rake', '~> 12.0.0'
27
+ gem.add_development_dependency 'rspec', '~> 3.4'
28
+ gem.add_development_dependency 'rake'
29
29
  gem.add_development_dependency 'webmock'
30
30
  gem.add_development_dependency 'yard'
31
31
 
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.0.0
4
+ version: 7.1.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-09-23 00:00:00.000000000 Z
14
+ date: 2019-12-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -20,9 +20,6 @@ dependencies:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: '3.0'
23
- - - "<"
24
- - !ruby/object:Gem::Version
25
- version: '6.0'
26
23
  type: :runtime
27
24
  prerelease: false
28
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,35 +27,32 @@ dependencies:
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: '3.0'
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: '6.0'
36
30
  - !ruby/object:Gem::Dependency
37
31
  name: addressable
38
32
  requirement: !ruby/object:Gem::Requirement
39
33
  requirements:
40
- - - "~>"
34
+ - - ">="
41
35
  - !ruby/object:Gem::Version
42
36
  version: '2'
43
37
  type: :runtime
44
38
  prerelease: false
45
39
  version_requirements: !ruby/object:Gem::Requirement
46
40
  requirements:
47
- - - "~>"
41
+ - - ">="
48
42
  - !ruby/object:Gem::Version
49
43
  version: '2'
50
44
  - !ruby/object:Gem::Dependency
51
45
  name: awesome_print
52
46
  requirement: !ruby/object:Gem::Requirement
53
47
  requirements:
54
- - - "~>"
48
+ - - ">="
55
49
  - !ruby/object:Gem::Version
56
50
  version: '1'
57
51
  type: :runtime
58
52
  prerelease: false
59
53
  version_requirements: !ruby/object:Gem::Requirement
60
54
  requirements:
61
- - - "~>"
55
+ - - ">="
62
56
  - !ruby/object:Gem::Version
63
57
  version: '1'
64
58
  - !ruby/object:Gem::Dependency
@@ -68,9 +62,6 @@ dependencies:
68
62
  - - ">="
69
63
  - !ruby/object:Gem::Version
70
64
  version: 0.9.1
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '0.9'
74
65
  type: :runtime
75
66
  prerelease: false
76
67
  version_requirements: !ruby/object:Gem::Requirement
@@ -78,23 +69,20 @@ dependencies:
78
69
  - - ">="
79
70
  - !ruby/object:Gem::Version
80
71
  version: 0.9.1
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '0.9'
84
72
  - !ruby/object:Gem::Dependency
85
73
  name: faraday_middleware
86
74
  requirement: !ruby/object:Gem::Requirement
87
75
  requirements:
88
- - - "~>"
76
+ - - ">="
89
77
  - !ruby/object:Gem::Version
90
- version: '0.9'
78
+ version: '0'
91
79
  type: :runtime
92
80
  prerelease: false
93
81
  version_requirements: !ruby/object:Gem::Requirement
94
82
  requirements:
95
- - - "~>"
83
+ - - ">="
96
84
  - !ruby/object:Gem::Version
97
- version: '0.9'
85
+ version: '0'
98
86
  - !ruby/object:Gem::Dependency
99
87
  name: retriable
100
88
  requirement: !ruby/object:Gem::Requirement
@@ -102,9 +90,6 @@ dependencies:
102
90
  - - ">="
103
91
  - !ruby/object:Gem::Version
104
92
  version: '2.0'
105
- - - "<"
106
- - !ruby/object:Gem::Version
107
- version: '4.0'
108
93
  type: :runtime
109
94
  prerelease: false
110
95
  version_requirements: !ruby/object:Gem::Requirement
@@ -112,9 +97,6 @@ dependencies:
112
97
  - - ">="
113
98
  - !ruby/object:Gem::Version
114
99
  version: '2.0'
115
- - - "<"
116
- - !ruby/object:Gem::Version
117
- version: '4.0'
118
100
  - !ruby/object:Gem::Dependency
119
101
  name: i18n
120
102
  requirement: !ruby/object:Gem::Requirement
@@ -149,28 +131,28 @@ dependencies:
149
131
  requirements:
150
132
  - - "~>"
151
133
  - !ruby/object:Gem::Version
152
- version: 3.4.0
134
+ version: '3.4'
153
135
  type: :development
154
136
  prerelease: false
155
137
  version_requirements: !ruby/object:Gem::Requirement
156
138
  requirements:
157
139
  - - "~>"
158
140
  - !ruby/object:Gem::Version
159
- version: 3.4.0
141
+ version: '3.4'
160
142
  - !ruby/object:Gem::Dependency
161
143
  name: rake
162
144
  requirement: !ruby/object:Gem::Requirement
163
145
  requirements:
164
- - - "~>"
146
+ - - ">="
165
147
  - !ruby/object:Gem::Version
166
- version: 12.0.0
148
+ version: '0'
167
149
  type: :development
168
150
  prerelease: false
169
151
  version_requirements: !ruby/object:Gem::Requirement
170
152
  requirements:
171
- - - "~>"
153
+ - - ">="
172
154
  - !ruby/object:Gem::Version
173
- version: 12.0.0
155
+ version: '0'
174
156
  - !ruby/object:Gem::Dependency
175
157
  name: webmock
176
158
  requirement: !ruby/object:Gem::Requirement
@@ -264,8 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
246
  - !ruby/object:Gem::Version
265
247
  version: '0'
266
248
  requirements: []
267
- rubyforge_project:
268
- rubygems_version: 2.7.6
249
+ rubygems_version: 3.0.3
269
250
  signing_key:
270
251
  specification_version: 4
271
252
  summary: Gem to use the SurveyGizmo.com REST API, v3+