aptible-resource 0.3.1 → 0.3.2

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
  SHA1:
3
- metadata.gz: 39da6d96a385990401dc84fbd1d3945fa6a0304f
4
- data.tar.gz: b079dcebb87c18ceb9275506104b8d8a840366ed
3
+ metadata.gz: 4ebc980a43019d6617b3a8ad2bbc708e50312a3b
4
+ data.tar.gz: 835815cf5b0dae9dc5ba9cecb2e9036458dbfdd4
5
5
  SHA512:
6
- metadata.gz: ff64a8c7d5fa668ba2c2b55d54a81105d69093e24d1027eba6725bd8dbfc94855827284fa6b290d4ca993fef331cabacf5d4b4d48e365cf269ac0c6d8384bc39
7
- data.tar.gz: 6657a3e298f1ea7db88a2a113cc1e99fed807db98a403749f9295be0e37e43847e73616574e12d4a3c89e4e5de4dc0b1b8ad4c471e1644ba04c7e80fbd0d7ba2
6
+ metadata.gz: 6adfaf1bd9675d2905c4b5944470f4fe496582b6b1b5e3a3de33d3f5d72d498ea1883ead712930a52735ea3fa1aa46ea20c9272700bf418f1f96cd364cfcd8ea
7
+ data.tar.gz: 52e13d6eeb6538dff24b3ee490b1308ed80951ec5d0059a1c4860e877ed50537b149d35dc37c6a1f4d08f76d2745907dff4c8c393ffeedaef69387dea8a82ec8
data/.travis.yml CHANGED
@@ -1,3 +1,5 @@
1
+ sudo: false
2
+
1
3
  rvm:
2
4
  - 2.0.0
3
5
  - jruby
@@ -183,6 +183,16 @@ module Aptible
183
183
  end
184
184
  end
185
185
 
186
+ def self.faraday_options
187
+ # Default Faraday options. May be overridden by passing
188
+ # faraday_options to the initializer.
189
+ {
190
+ request: {
191
+ open_timeout: 10
192
+ }
193
+ }
194
+ end
195
+
186
196
  # rubocop:disable MethodLength
187
197
  def initialize(options = {})
188
198
  if options.is_a?(Hash)
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Resource
3
- VERSION = '0.3.1'
3
+ VERSION = '0.3.2'
4
4
  end
5
5
  end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ describe Aptible::Resource::Base, slow: true do
4
+ subject { Api.new(root: 'http://10.255.255.1/') }
5
+
6
+ it 'should time out by default after a reasonable delay' do
7
+ # Faraday throws different kinds of errors depending on whether
8
+ # Net::OpenTimeout is defined, so let's check for this
9
+ # https://github.com/lostisland/faraday/issues/561
10
+ e = Faraday::Error::TimeoutError
11
+ e = Faraday::Error::ConnectionFailed if defined? Net::OpenTimeout
12
+
13
+ expect do
14
+ Timeout.timeout(15) { subject.all }
15
+ end.to raise_error(e, 'execution expired')
16
+ end
17
+ end
metadata CHANGED
@@ -1,153 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-21 00:00:00.000000000 Z
11
+ date: 2016-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uri_template
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.5.2
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
26
  version: 0.5.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.8.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.8.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: fridge
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activesupport
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: aptible-tasks
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '2.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '2.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: pry
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  description: Foundation classes for Aptible resource server gems
@@ -157,10 +157,10 @@ executables: []
157
157
  extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
- - .gitignore
161
- - .rspec
162
- - .rubocop.yml
163
- - .travis.yml
160
+ - ".gitignore"
161
+ - ".rspec"
162
+ - ".rubocop.yml"
163
+ - ".travis.yml"
164
164
  - Gemfile
165
165
  - LICENSE.md
166
166
  - README.md
@@ -185,6 +185,7 @@ files:
185
185
  - lib/hyper_resource/response.rb
186
186
  - lib/hyper_resource/version.rb
187
187
  - spec/aptible/resource/base_spec.rb
188
+ - spec/aptible/resource/network_spec.rb
188
189
  - spec/fixtures/api.rb
189
190
  - spec/fixtures/mainframe.rb
190
191
  - spec/fixtures/token.rb
@@ -199,12 +200,12 @@ require_paths:
199
200
  - lib
200
201
  required_ruby_version: !ruby/object:Gem::Requirement
201
202
  requirements:
202
- - - '>='
203
+ - - ">="
203
204
  - !ruby/object:Gem::Version
204
205
  version: '0'
205
206
  required_rubygems_version: !ruby/object:Gem::Requirement
206
207
  requirements:
207
- - - '>='
208
+ - - ">="
208
209
  - !ruby/object:Gem::Version
209
210
  version: '0'
210
211
  requirements: []
@@ -215,6 +216,7 @@ specification_version: 4
215
216
  summary: Foundation classes for Aptible resource server gems
216
217
  test_files:
217
218
  - spec/aptible/resource/base_spec.rb
219
+ - spec/aptible/resource/network_spec.rb
218
220
  - spec/fixtures/api.rb
219
221
  - spec/fixtures/mainframe.rb
220
222
  - spec/fixtures/token.rb