linode 0.7.8 → 0.7.9
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.
- data/CHANGELOG +12 -0
- data/Gemfile +1 -1
- data/README.md +118 -249
- data/VERSION +1 -1
- data/lib/linode.rb +12 -9
- data/linode.gemspec +5 -7
- data/spec/spec_helper.rb +1 -1
- metadata +5 -7
- data/Gemfile.lock +0 -27
- data/lib/ostruct_tweak.rb +0 -8
data/CHANGELOG
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
|
|
2
|
+
0.7.9 / 2012-05-01
|
|
3
|
+
==================
|
|
4
|
+
|
|
5
|
+
* Version bump to 0.7.9
|
|
6
|
+
* update README to thank Kenn Ejima
|
|
7
|
+
* Improved ruby language highlighting in README. (kenn)
|
|
8
|
+
* Fixed broken error messages in README. (kenn)
|
|
9
|
+
* Switch from Crack to JSON. Do not mutate yamler. (kenn)
|
|
10
|
+
* Remove and ignore Gemfile.lock. (kenn)
|
|
11
|
+
* Do not pollute OpenStruct globally. (kenn)
|
|
12
|
+
* Rspec is now deprecated, use RSpec instead. (kenn)
|
|
13
|
+
|
|
2
14
|
0.7.8 / 2012-04-26
|
|
3
15
|
==================
|
|
4
16
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -15,258 +15,127 @@ You will need to get an API key (check your account profile).
|
|
|
15
15
|
|
|
16
16
|
Here is an annoyingly exhaustive IRB session where I play around with the API:
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
RuntimeError: Error completing request [domain.resource.list] @ [https://api.linode.com/] with data [{}]:
|
|
136
|
-
ERRORCODE6ERRORMESSAGEDOMAINID is required but was not passed in
|
|
137
|
-
from ./lib/linode.rb:31:in `send_request'
|
|
138
|
-
from ./lib/linode.rb:13:in `list'
|
|
139
|
-
from (irb):3
|
|
140
|
-
irb> l.domain.resource.list(:DomainId => '1')
|
|
141
|
-
RuntimeError: Error completing request [domain.resource.list] @ [https://api.linode.com/] with data
|
|
142
|
-
[{:DomainId=>"1"}]: ERRORCODE5ERRORMESSAGEObject not found
|
|
143
|
-
from ./lib/linode.rb:31:in `send_request'
|
|
144
|
-
from ./lib/linode.rb:13:in `list'
|
|
145
|
-
from (irb):5
|
|
146
|
-
irb> l.domain.resource.list(:DomainId => '1', :ResourceId => '2')
|
|
147
|
-
RuntimeError: Error completing request [domain.resource.list] @ [https://api.linode.com/] with data
|
|
148
|
-
[{:DomainId=>"1", :ResourceId=>"2"}]: ERRORCODE5ERRORMESSAGEObject not found
|
|
149
|
-
from ./lib/linode.rb:31:in `send_request'
|
|
150
|
-
from ./lib/linode.rb:13:in `list'
|
|
151
|
-
from (irb):7
|
|
152
|
-
|
|
153
|
-
irb> l.linode
|
|
154
|
-
=> #<Linode::Linode:0x10056e4 @api_url="https://api.linode.com/", @api_key="TOPSECRETAPIKEY">
|
|
155
|
-
irb> l.linode.list
|
|
156
|
-
=> [#<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1,
|
|
157
|
-
alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0,
|
|
158
|
-
backupweeklyday="", status=1, alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0,
|
|
159
|
-
alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152,
|
|
160
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=4, lpm_displaygroup="", totalxfer=200,
|
|
161
|
-
alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5,
|
|
162
|
-
backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="bragi", totalram=360, backupwindow=0,
|
|
163
|
-
alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15418, totalhd=16384,
|
|
164
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=2, lpm_displaygroup="", totalxfer=200,
|
|
165
|
-
alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5,
|
|
166
|
-
backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="nerthus", totalram=360, backupwindow=0,
|
|
167
|
-
alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15419, totalhd=16384,
|
|
168
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=3, lpm_displaygroup="", totalxfer=200,
|
|
169
|
-
alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5,
|
|
170
|
-
backupsenabled=0, backupweeklyday=0, status=1, alert_cpu_enabled=1, label="hoenir", totalram=360, backupwindow=0,
|
|
171
|
-
alert_diskio_threshold=500, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=24405, totalhd=16384,
|
|
172
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>]
|
|
173
|
-
irb> l.linode.list.size
|
|
174
|
-
=> 4
|
|
175
|
-
irb> l.linode.list.first
|
|
176
|
-
=> #<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1, alert_diskio_enabled=1,
|
|
177
|
-
watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1,
|
|
178
|
-
alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0, alert_diskio_threshold=300,
|
|
179
|
-
alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152, alert_bwin_enabled=1,
|
|
180
|
-
alert_bwout_enabled=1>
|
|
181
|
-
irb> l.linode.list.first.datacenterid
|
|
182
|
-
=> 6
|
|
183
|
-
irb> l.linode.list.first.label
|
|
184
|
-
=> "byggvir"
|
|
185
|
-
|
|
186
|
-
irb(main):003:0* l.linode.config.list
|
|
187
|
-
RuntimeError: Error completing request [linode.config.list] @ [https://api.linode.com/] with data [{}]:
|
|
188
|
-
ERRORCODE6ERRORMESSAGELINODEID is required but was not passed in
|
|
189
|
-
from ./lib/linode.rb:45:in `send_request'
|
|
190
|
-
from ./lib/linode.rb:13:in `list'
|
|
191
|
-
from (irb):3
|
|
192
|
-
irb> l.linode.list
|
|
193
|
-
=> [#<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1,
|
|
194
|
-
alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0,
|
|
195
|
-
backupweeklyday="", status=1, alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0,
|
|
196
|
-
alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152,
|
|
197
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=4, lpm_displaygroup="", totalxfer=200,
|
|
198
|
-
alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5,
|
|
199
|
-
backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="bragi", totalram=360, backupwindow=0,
|
|
200
|
-
alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15418, totalhd=16384,
|
|
201
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=2, lpm_displaygroup="", totalxfer=200,
|
|
202
|
-
alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5,
|
|
203
|
-
backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="nerthus", totalram=360, backupwindow=0,
|
|
204
|
-
alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15419, totalhd=16384,
|
|
205
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=3, lpm_displaygroup="", totalxfer=200,
|
|
206
|
-
alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5,
|
|
207
|
-
backupsenabled=0, backupweeklyday=0, status=1, alert_cpu_enabled=1, label="hoenir", totalram=360, backupwindow=0,
|
|
208
|
-
alert_diskio_threshold=500, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=24405, totalhd=16384,
|
|
209
|
-
alert_bwin_enabled=1, alert_bwout_enabled=1>]
|
|
210
|
-
irb> l.linode.list.first
|
|
211
|
-
=> #<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1, alert_diskio_enabled=1,
|
|
212
|
-
watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1,
|
|
213
|
-
alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0, alert_diskio_threshold=300,
|
|
214
|
-
alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152, alert_bwin_enabled=1,
|
|
215
|
-
alert_bwout_enabled=1>
|
|
216
|
-
irb> l.linode.list.first.linodeid
|
|
217
|
-
=> 12446
|
|
218
|
-
irb> l.linode.config.list(:LinodeId => 12446)
|
|
219
|
-
=> [#<OpenStruct helper_disableupdatedb=1, ramlimit=0, kernelid=60, helper_depmod=1, rootdevicecustom="",
|
|
220
|
-
disklist="79850,79851,79854,,,,,,", label="byggvir", runlevel="default", rootdevicero=true, configid=43615,
|
|
221
|
-
rootdevicenum=1, linodeid=12446, helper_libtls=false, helper_xen=1, comments="">]
|
|
222
|
-
irb> l.linode.config.list(:LinodeId => 12446).first.disklist
|
|
223
|
-
=> "79850,79851,79854,,,,,,"
|
|
224
|
-
|
|
225
|
-
irb> l.linode.job.list
|
|
226
|
-
RuntimeError: Error completing request [linode.job.list] @ [https://api.linode.com/] with data [{}]:
|
|
227
|
-
ERRORCODE6ERRORMESSAGELINODEID is required but was not passed in
|
|
228
|
-
from ./lib/linode.rb:45:in `send_request'
|
|
229
|
-
from ./lib/linode.rb:13:in `list'
|
|
230
|
-
from (irb):7
|
|
231
|
-
|
|
232
|
-
irb> l.linode.job.list(:LinodeId => 12446)
|
|
233
|
-
=> [#<OpenStruct action="linode.boot", jobid=1241724, duration=8, host_finish_dt="2009-07-14 17:07:29.0",
|
|
234
|
-
host_message="", linodeid=12446, host_success=1, host_start_dt="2009-07-14 17:07:21.0",
|
|
235
|
-
entered_dt="2009-07-14 17:06:25.0", label="System Boot - byggvir">, #<OpenStruct action="linode.shutdown",
|
|
236
|
-
jobid=1241723, duration=14, host_finish_dt="2009-07-14 17:07:20.0", host_message="", linodeid=12446, host_success=1,
|
|
237
|
-
host_start_dt="2009-07-14 17:07:06.0", entered_dt="2009-07-14 17:06:25.0", label="System Shutdown">,
|
|
238
|
-
#<OpenStruct action="linode.boot", jobid=1182441, duration=0, host_finish_dt="2009-06-10 04:27:49.0",
|
|
239
|
-
host_message="Linode already running", linodeid=12446, host_success=0, host_start_dt="2009-06-10 04:27:49.0",
|
|
240
|
-
entered_dt="2009-06-10 04:26:05.0", label="Lassie initiated boot">, #<OpenStruct action="linode.boot",
|
|
241
|
-
jobid=1182436, duration=8, host_finish_dt="2009-06-10 04:27:49.0", host_message="", linodeid=12446, host_success=1,
|
|
242
|
-
host_start_dt="2009-06-10 04:27:41.0", entered_dt="1974-01-04 00:00:00.0", label="Host initiated restart">,
|
|
243
|
-
#<OpenStruct action="linode.boot", jobid=1182273, duration=0, host_finish_dt="2009-06-10 03:02:31.0",
|
|
244
|
-
host_message="Linode already running", linodeid=12446, host_success=0, host_start_dt="2009-06-10 03:02:31.0",
|
|
245
|
-
entered_dt="2009-06-10 02:59:49.0", label="Lassie initiated boot">, #<OpenStruct action="linode.boot",
|
|
246
|
-
jobid=1182268, duration=8, host_finish_dt="2009-06-10 03:02:31.0", host_message="", linodeid=12446, host_success=1,
|
|
247
|
-
host_start_dt="2009-06-10 03:02:23.0", entered_dt="1974-01-04 00:00:00.0", label="Host initiated restart">,
|
|
248
|
-
#<OpenStruct action="linode.boot", jobid=1182150, duration=1, host_finish_dt="2009-06-10 01:28:40.0",
|
|
249
|
-
host_message="Linode already running", linodeid=12446, host_success=0, host_start_dt="2009-06-10 01:28:39.0",
|
|
250
|
-
entered_dt="2009-06-10 01:26:55.0", label="Lassie initiated boot">, #<OpenStruct action="linode.boot",
|
|
251
|
-
jobid=1182145, duration=8, host_finish_dt="2009-06-10 01:28:39.0", host_message="", linodeid=12446, host_success=1,
|
|
252
|
-
host_start_dt="2009-06-10 01:28:31.0", entered_dt="1974-01-04 00:00:00.0", label="Host initiated restart">]
|
|
253
|
-
irb> l.linode.job.list(:LinodeId => 12446).size
|
|
254
|
-
=> 8
|
|
255
|
-
|
|
256
|
-
irb> l.linode.ip.list
|
|
257
|
-
RuntimeError: Error completing request [linode.ip.list] @ [https://api.linode.com/] with data [{}]:
|
|
258
|
-
ERRORCODE6ERRORMESSAGELINODEID is required but was not passed in
|
|
259
|
-
from ./lib/linode.rb:45:in `send_request'
|
|
260
|
-
from ./lib/linode.rb:13:in `list'
|
|
261
|
-
from (irb):10
|
|
262
|
-
irb> l.linode.ip.list(:LinodeId => 12446)
|
|
263
|
-
=> [#<OpenStruct rdns_name="byggvir.websages.com", ipaddressid=12286, linodeid=12446, ispublic=1,
|
|
264
|
-
ipaddress="209.123.234.161">, #<OpenStruct rdns_name="li101-51.members.linode.com", ipaddressid=23981,
|
|
265
|
-
linodeid=12446, ispublic=1, ipaddress="97.107.140.51">]
|
|
266
|
-
irb> ^D@ Wed Aug 05 01:50:52 rick@Yer-Moms-Computer
|
|
18
|
+
```ruby
|
|
19
|
+
irb> require 'rubygems'
|
|
20
|
+
irb> require 'linode'
|
|
21
|
+
irb> api_key = 'TOPSECRETAPIKEY'
|
|
22
|
+
irb> l = Linode.new(:api_key => api_key)
|
|
23
|
+
=> #<Linode:0x100e03c @api_key="TOPSECRETAPIKEY">
|
|
24
|
+
|
|
25
|
+
irb> result = l.test.echo(:foo => 'bar', :baz => 'xyzzy')
|
|
26
|
+
=> #<OpenStruct baz="xyzzy", foo="bar">
|
|
27
|
+
irb> result.foo
|
|
28
|
+
=> "bar"
|
|
29
|
+
|
|
30
|
+
irb> result.baz
|
|
31
|
+
=> "xyzzy"
|
|
32
|
+
|
|
33
|
+
irb> result = l.avail.datacenters
|
|
34
|
+
=> [#<OpenStruct datacenterid=2, location="Dallas, TX, USA">, #<OpenStruct datacenterid=3, location="Fremont, CA, USA">, #<OpenStruct datacenterid=4, location="Atlanta, GA, USA">, #<OpenStruct datacenterid=6, location="Newark, NJ, USA">]
|
|
35
|
+
irb> s = _
|
|
36
|
+
=> [#<OpenStruct datacenterid=2, location="Dallas, TX, USA">, #<OpenStruct datacenterid=3, location="Fremont, CA, USA">, #<OpenStruct datacenterid=4, location="Atlanta, GA, USA">, #<OpenStruct datacenterid=6, location="Newark, NJ, USA">]
|
|
37
|
+
irb> result.first
|
|
38
|
+
=> #<OpenStruct datacenterid=2, location="Dallas, TX, USA">
|
|
39
|
+
irb> result.first.location
|
|
40
|
+
=> "Dallas, TX, USA"
|
|
41
|
+
irb> l.avail.datacenters.collect {|i| i.location }
|
|
42
|
+
=> ["Dallas, TX, USA", "Fremont, CA, USA", "Atlanta, GA, USA", "Newark, NJ, USA"]
|
|
43
|
+
irb> l.avail.datacenters.collect {|i| i.datacenterid }
|
|
44
|
+
=> [2, 3, 4, 6]
|
|
45
|
+
|
|
46
|
+
irb> l.user.getapikey(:username => 'me', :password => 'SECKRIT')
|
|
47
|
+
=> #<OpenStruct api_key="TOPSECRETAPIKEY", username="me">
|
|
48
|
+
irb> l.user.getapikey(:username => 'me', :password => 'SECKRIT').api_key
|
|
49
|
+
=> "TOPSECRETAPIKEY"
|
|
50
|
+
irb> l.user.getapikey(:username => 'me', :password => 'SECKRIT').username
|
|
51
|
+
=> "me"
|
|
52
|
+
|
|
53
|
+
irb> l.avail.kernels
|
|
54
|
+
=> [#<OpenStruct isxen=1, label="2.6.16.38-x86_64-linode2", kernelid=85>, #<OpenStruct isxen=1, label="2.6.18.8-domU-linode7", kernelid=81>, #<OpenStruct isxen=1, label="2.6.18.8-linode10", kernelid=89>, #<OpenStruct isxen=1, label="2.6.18.8-linode16", kernelid=98>, #<OpenStruct isxen=1, label="2.6.18.8-x86_64-linode1", kernelid=86>, #<OpenStruct isxen=1, label="2.6.24.4-linode8", kernelid=84>, #<OpenStruct isxen=1, label="2.6.25-linode9", kernelid=88>, #<OpenStruct isxen=1, label="2.6.25.10-linode12", kernelid=90>, #<OpenStruct isxen=1, label="2.6.26-linode13", kernelid=91>, #<OpenStruct isxen=1, label="2.6.27.4-linode14", kernelid=93>, #<OpenStruct isxen=1, label="2.6.27.4-x86_64-linode3", kernelid=94>, #<OpenStruct isxen=1, label="2.6.28-linode15", kernelid=96>, #<OpenStruct isxen=1, label="2.6.28-x86_64-linode4", kernelid=97>, #<OpenStruct isxen=1, label="2.6.28.3-linode17", kernelid=99>, #<OpenStruct isxen=1, label="2.6.28.3-x86_64-linode5", kernelid=100>, #<OpenStruct isxen=1, label="2.6.29-linode18", kernelid=101>, #<OpenStruct isxen=1, label="2.6.29-x86_64-linode6", kernelid=102>, #<OpenStruct isxen=1, label="Latest 2.6 Series (2.6.18.8-linode16)", kernelid=60>, #<OpenStruct isxen=1, label="pv-grub-x86_32", kernelid=92>, #<OpenStruct isxen=1, label="pv-grub-x86_64", kernelid=95>, #<OpenStruct isxen=1, label="Recovery - Finnix (kernel)", kernelid=61>]
|
|
55
|
+
irb> l.avail.kernels.size
|
|
56
|
+
=> 21
|
|
57
|
+
irb> l.avail.kernels.first
|
|
58
|
+
=> #<OpenStruct isxen=1, label="2.6.16.38-x86_64-linode2", kernelid=85>
|
|
59
|
+
irb> l.avail.kernels.first.label
|
|
60
|
+
=> "2.6.16.38-x86_64-linode2"
|
|
61
|
+
|
|
62
|
+
irb> l.avail.linodeplans
|
|
63
|
+
=> [#<OpenStruct ram=360, label="Linode 360", avail={"6"=>26, "2"=>57, "3"=>20, "4"=>39}, price=19.95, planid=1, xfer=200, disk=16>, #<OpenStruct ram=540, label="Linode 540", avail={"6"=>11, "2"=>38, "3"=>14, "4"=>28}, price=29.95, planid=2, xfer=300, disk=24>, #<OpenStruct ram=720, label="Linode 720", avail={"6"=>13, "2"=>27, "3"=>18, "4"=>30}, price=39.95, planid=3, xfer=400, disk=32>, #<OpenStruct ram=1080, label="Linode 1080", avail={"6"=>18, "2"=>7, "3"=>9, "4"=>4}, price=59.95, planid=4, xfer=600, disk=48>, #<OpenStruct ram=1440, label="Linode 1440", avail={"6"=>14, "2"=>5, "3"=>7, "4"=>3}, price=79.95, planid=5, xfer=800, disk=64>, #<OpenStruct ram=2880, label="Linode 2880", avail={"6"=>3, "2"=>3, "3"=>3, "4"=>3}, price=159.95, planid=6, xfer=1600, disk=128>, #<OpenStruct ram=5760, label="Linode 5760", avail={"6"=>5, "2"=>6, "3"=>5, "4"=>5}, price=319.95, planid=7, xfer=2000, disk=256>, #<OpenStruct ram=8640, label="Linode 8640", avail={"6"=>5, "2"=>6, "3"=>5, "4"=>5}, price=479.95, planid=8, xfer=2000, disk=384>, #<OpenStruct ram=11520, label="Linode 11520", avail={"6"=>5, "2"=>6, "3"=>5, "4"=>5}, price=639.95, planid=9, xfer=2000, disk=512>, #<OpenStruct ram=14400, label="Linode 14400", avail={"6"=>5, "2"=>6, "3"=>5, "4"=>5}, price=799.95, planid=10, xfer=2000, disk=640>]
|
|
64
|
+
irb> l.avail.linodeplans.size
|
|
65
|
+
=> 10
|
|
66
|
+
irb> l.avail.linodeplans.first
|
|
67
|
+
=> #<OpenStruct ram=360, label="Linode 360", avail={"6"=>26, "2"=>57, "3"=>20, "4"=>39}, price=19.95, planid=1,
|
|
68
|
+
xfer=200, disk=16>
|
|
69
|
+
irb> l.avail.linodeplans.first.avail
|
|
70
|
+
=> {"6"=>26, "2"=>57, "3"=>20, "4"=>39}
|
|
71
|
+
|
|
72
|
+
irb> l.avail.distributions
|
|
73
|
+
=> [#<OpenStruct label="Arch Linux 2007.08", minimagesize=436, create_dt="2007-10-24 00:00:00.0", is64bit=0, distributionid=38>, #<OpenStruct label="Centos 5.0", minimagesize=594, create_dt="2007-04-27 00:00:00.0", is64bit=0, distributionid=32>, #<OpenStruct label="Centos 5.2", minimagesize=950, create_dt="2008-11-30 00:00:00.0", is64bit=0, distributionid=46>, #<OpenStruct label="Centos 5.2 64bit", minimagesize=980, create_dt="2008-11-30 00:00:00.0", is64bit=1, distributionid=47>, #<OpenStruct label="Debian 4.0", minimagesize=200, create_dt="2007-04-18 00:00:00.0", is64bit=0, distributionid=28>, #<OpenStruct label="Debian 4.0 64bit", minimagesize=220, create_dt="2008-12-02 00:00:00.0", is64bit=1, distributionid=48>, #<OpenStruct label="Debian 5.0", minimagesize=200, create_dt="2009-02-19 00:00:00.0", is64bit=0, distributionid=50>, #<OpenStruct label="Debian 5.0 64bit", minimagesize=300, create_dt="2009-02-19 00:00:00.0", is64bit=1, distributionid=51>, #<OpenStruct label="Fedora 8", minimagesize=740, create_dt="2007-11-09 00:00:00.0", is64bit=0, distributionid=40>, #<OpenStruct label="Fedora 9", minimagesize=1175, create_dt="2008-06-09 15:15:21.0", is64bit=0, distributionid=43>, #<OpenStruct label="Gentoo 2007.0", minimagesize=1800, create_dt="2007-08-29 00:00:00.0", is64bit=0, distributionid=35>, #<OpenStruct label="Gentoo 2008.0", minimagesize=1500, create_dt="2009-03-20 00:00:00.0", is64bit=0, distributionid=52>, #<OpenStruct label="Gentoo 2008.0 64bit", minimagesize=2500, create_dt="2009-04-04 00:00:00.0", is64bit=1, distributionid=53>, #<OpenStruct label="OpenSUSE 11.0", minimagesize=850, create_dt="2008-08-21 08:32:16.0", is64bit=0, distributionid=44>, #<OpenStruct label="Slackware 12.0", minimagesize=315, create_dt="2007-07-16 00:00:00.0", is64bit=0, distributionid=34>, #<OpenStruct label="Slackware 12.2", minimagesize=500, create_dt="2009-04-04 00:00:00.0", is64bit=0, distributionid=54>, #<OpenStruct label="Ubuntu 8.04 LTS", minimagesize=400, create_dt="2008-04-23 15:11:29.0", is64bit=0, distributionid=41>, #<OpenStruct label="Ubuntu 8.04 LTS 64bit", minimagesize=350, create_dt="2008-06-03 12:51:11.0", is64bit=1, distributionid=42>, #<OpenStruct label="Ubuntu 8.10", minimagesize=220, create_dt="2008-10-30 23:23:03.0", is64bit=0, distributionid=45>, #<OpenStruct label="Ubuntu 8.10 64bit", minimagesize=230, create_dt="2008-12-02 00:00:00.0", is64bit=1, distributionid=49>, #<OpenStruct label="Ubuntu 9.04", minimagesize=350, create_dt="2009-04-23 00:00:00.0", is64bit=0, distributionid=55>, #<OpenStruct label="Ubuntu 9.04 64bit", minimagesize=350, create_dt="2009-04-23 00:00:00.0", is64bit=1, distributionid=56>]
|
|
74
|
+
irb> l.avail.distributions.size
|
|
75
|
+
=> 22
|
|
76
|
+
irb> l.avail.distributions.first
|
|
77
|
+
=> #<OpenStruct label="Arch Linux 2007.08", minimagesize=436, create_dt="2007-10-24 00:00:00.0", is64bit=0,
|
|
78
|
+
distributionid=38>
|
|
79
|
+
irb> l.avail.distributions.first.label
|
|
80
|
+
=> "Arch Linux 2007.08"
|
|
81
|
+
|
|
82
|
+
irb> l.domain.resource.list
|
|
83
|
+
RuntimeError: Errors completing request [domain.resource.list] @ [https://api.linode.com/] with data [{}]:
|
|
84
|
+
- Error #6 - DOMAINID is required but was not passed in. (Please consult http://www.linode.com/api/dns/domain.resource.list)
|
|
85
|
+
irb> l.domain.resource.list(:DomainId => '1')
|
|
86
|
+
RuntimeError: Errors completing request [domain.resource.list] @ [https://api.linode.com/] with data [{:DomainId=>"1"}]:
|
|
87
|
+
- Error #5 - Object not found. (Please consult http://www.linode.com/api/dns/domain.resource.list)
|
|
88
|
+
irb> l.domain.resource.list(:DomainId => '1', :ResourceId => '2')
|
|
89
|
+
RuntimeError: Errors completing request [domain.resource.list] @ [https://api.linode.com/] with data [{:DomainId=>"1", :ResourceId=>"2"}]:
|
|
90
|
+
- Error #5 - Object not found. (Please consult http://www.linode.com/api/dns/domain.resource.list)
|
|
91
|
+
|
|
92
|
+
irb> l.linode
|
|
93
|
+
=> #<Linode::Linode:0x10056e4 @api_url="https://api.linode.com/", @api_key="TOPSECRETAPIKEY">
|
|
94
|
+
irb> l.linode.list
|
|
95
|
+
=> [#<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152, alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=4, lpm_displaygroup="", totalxfer=200, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="bragi", totalram=360, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15418, totalhd=16384, alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=2, lpm_displaygroup="", totalxfer=200, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="nerthus", totalram=360, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15419, totalhd=16384, alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=3, lpm_displaygroup="", totalxfer=200, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday=0, status=1, alert_cpu_enabled=1, label="hoenir", totalram=360, backupwindow=0, alert_diskio_threshold=500, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=24405, totalhd=16384, alert_bwin_enabled=1, alert_bwout_enabled=1>]
|
|
96
|
+
irb> l.linode.list.size
|
|
97
|
+
=> 4
|
|
98
|
+
irb> l.linode.list.first
|
|
99
|
+
=> #<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152, alert_bwin_enabled=1, alert_bwout_enabled=1>
|
|
100
|
+
irb> l.linode.list.first.datacenterid
|
|
101
|
+
=> 6
|
|
102
|
+
irb> l.linode.list.first.label
|
|
103
|
+
=> "byggvir"
|
|
104
|
+
|
|
105
|
+
irb> l.linode.config.list
|
|
106
|
+
RuntimeError: Errors completing request [linode.config.list] @ [https://api.linode.com/] with data [{}]:
|
|
107
|
+
- Error #6 - LINODEID is required but was not passed in. (Please consult http://www.linode.com/api/linode/linode.config.list)
|
|
108
|
+
irb> l.linode.list
|
|
109
|
+
=> [#<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152, alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=4, lpm_displaygroup="", totalxfer=200, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="bragi", totalram=360, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15418, totalhd=16384, alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=2, lpm_displaygroup="", totalxfer=200, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="nerthus", totalram=360, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=15419, totalhd=16384, alert_bwin_enabled=1, alert_bwout_enabled=1>, #<OpenStruct datacenterid=3, lpm_displaygroup="", totalxfer=200, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday=0, status=1, alert_cpu_enabled=1, label="hoenir", totalram=360, backupwindow=0, alert_diskio_threshold=500, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=24405, totalhd=16384,alert_bwin_enabled=1, alert_bwout_enabled=1>]
|
|
110
|
+
irb> l.linode.list.first
|
|
111
|
+
=> #<OpenStruct datacenterid=6, lpm_displaygroup="", totalxfer=600, alert_bwquota_enabled=1, alert_diskio_enabled=1, watchdog=1, alert_cpu_threshold=90, alert_bwout_threshold=5, backupsenabled=0, backupweeklyday="", status=1, alert_cpu_enabled=1, label="byggvir", totalram=1080, backupwindow=0, alert_diskio_threshold=300, alert_bwin_threshold=5, alert_bwquota_threshold=80, linodeid=12446, totalhd=49152, alert_bwin_enabled=1, alert_bwout_enabled=1>
|
|
112
|
+
irb> l.linode.list.first.linodeid
|
|
113
|
+
=> 12446
|
|
114
|
+
irb> l.linode.config.list(:LinodeId => 12446)
|
|
115
|
+
=> [#<OpenStruct helper_disableupdatedb=1, ramlimit=0, kernelid=60, helper_depmod=1, rootdevicecustom="", disklist="79850,79851,79854,,,,,,", label="byggvir", runlevel="default", rootdevicero=true, configid=43615, rootdevicenum=1, linodeid=12446, helper_libtls=false, helper_xen=1, comments="">]
|
|
116
|
+
irb> l.linode.config.list(:LinodeId => 12446).first.disklist
|
|
117
|
+
=> "79850,79851,79854,,,,,,"
|
|
118
|
+
|
|
119
|
+
irb> l.linode.job.list
|
|
120
|
+
RuntimeError: Errors completing request [linode.job.list] @ [https://api.linode.com/] with data [{}]:
|
|
121
|
+
- Error #6 - LINODEID is required but was not passed in. (Please consult http://www.linode.com/api/linode/linode.job.list)
|
|
122
|
+
|
|
123
|
+
irb> l.linode.job.list(:LinodeId => 12446)
|
|
124
|
+
=> [#<OpenStruct action="linode.boot", jobid=1241724, duration=8, host_finish_dt="2009-07-14 17:07:29.0", host_message="", linodeid=12446, host_success=1, host_start_dt="2009-07-14 17:07:21.0", entered_dt="2009-07-14 17:06:25.0", label="System Boot - byggvir">, #<OpenStruct action="linode.shutdown", jobid=1241723, duration=14, host_finish_dt="2009-07-14 17:07:20.0", host_message="", linodeid=12446, host_success=1, host_start_dt="2009-07-14 17:07:06.0", entered_dt="2009-07-14 17:06:25.0", label="System Shutdown">, #<OpenStruct action="linode.boot", jobid=1182441, duration=0, host_finish_dt="2009-06-10 04:27:49.0", host_message="Linode already running", linodeid=12446, host_success=0, host_start_dt="2009-06-10 04:27:49.0", entered_dt="2009-06-10 04:26:05.0", label="Lassie initiated boot">, #<OpenStruct action="linode.boot", jobid=1182436, duration=8, host_finish_dt="2009-06-10 04:27:49.0", host_message="", linodeid=12446, host_success=1, host_start_dt="2009-06-10 04:27:41.0", entered_dt="1974-01-04 00:00:00.0", label="Host initiated restart">, #<OpenStruct action="linode.boot", jobid=1182273, duration=0, host_finish_dt="2009-06-10 03:02:31.0", host_message="Linode already running", linodeid=12446, host_success=0, host_start_dt="2009-06-10 03:02:31.0", entered_dt="2009-06-10 02:59:49.0", label="Lassie initiated boot">, #<OpenStruct action="linode.boot", jobid=1182268, duration=8, host_finish_dt="2009-06-10 03:02:31.0", host_message="", linodeid=12446, host_success=1, host_start_dt="2009-06-10 03:02:23.0", entered_dt="1974-01-04 00:00:00.0", label="Host initiated restart">, #<OpenStruct action="linode.boot", jobid=1182150, duration=1, host_finish_dt="2009-06-10 01:28:40.0", host_message="Linode already running", linodeid=12446, host_success=0, host_start_dt="2009-06-10 01:28:39.0", entered_dt="2009-06-10 01:26:55.0", label="Lassie initiated boot">, #<OpenStruct action="linode.boot", jobid=1182145, duration=8, host_finish_dt="2009-06-10 01:28:39.0", host_message="", linodeid=12446, host_success=1, host_start_dt="2009-06-10 01:28:31.0", entered_dt="1974-01-04 00:00:00.0", label="Host initiated restart">]
|
|
125
|
+
irb> l.linode.job.list(:LinodeId => 12446).size
|
|
126
|
+
=> 8
|
|
127
|
+
|
|
128
|
+
irb> l.linode.ip.list
|
|
129
|
+
RuntimeError: Errors completing request [linode.ip.list] @ [https://api.linode.com/] with data [{}]:
|
|
130
|
+
- Error #6 - LINODEID is required but was not passed in. (Please consult http://www.linode.com/api/linode/linode.ip.list)
|
|
131
|
+
irb> l.linode.ip.list(:LinodeId => 12446)
|
|
132
|
+
=> [#<OpenStruct rdns_name="byggvir.websages.com", ipaddressid=12286, linodeid=12446, ispublic=1, ipaddress="209.123.234.161">, #<OpenStruct rdns_name="li101-51.members.linode.com", ipaddressid=23981, linodeid=12446, ispublic=1, ipaddress="97.107.140.51">]
|
|
133
|
+
irb> ^D@ Wed Aug 05 01:50:52 rick@Yer-Moms-Computer
|
|
134
|
+
```
|
|
267
135
|
|
|
268
136
|
## CREDITS:
|
|
269
137
|
|
|
138
|
+
* Thanks to Kenn Ejima ([kenn](http://github.com/kenn)) for json library improvements, OStruct cleanups, README improvements, etc.
|
|
270
139
|
* Thanks to Aditya Sanghi ([asanghi](http://github.com/asanghi)) for a patch to properly namespace stackscripts functionality.
|
|
271
140
|
* Thanks to Dan Hodos ([danhodos](http://github.com/danhodos)) for diagnosing and fixing an issue with sending GET requests instead of POST request.
|
|
272
141
|
* Thanks to Aaron Hamid for updates for RSpec 2 and work on user.getapikey + username/password initialization.
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.7.
|
|
1
|
+
0.7.9
|
data/lib/linode.rb
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
require 'rubygems'
|
|
2
2
|
require 'ostruct'
|
|
3
|
-
require 'ostruct_tweak'
|
|
4
3
|
require 'httparty'
|
|
5
|
-
require '
|
|
6
|
-
|
|
7
|
-
begin
|
|
8
|
-
YAML::ENGINE.yamler = 'syck'
|
|
9
|
-
rescue # see: https://github.com/rick/linode/issues/12
|
|
10
|
-
end
|
|
4
|
+
require 'json'
|
|
11
5
|
|
|
12
6
|
class Linode
|
|
13
7
|
attr_reader :username, :password
|
|
@@ -96,7 +90,7 @@ class Linode
|
|
|
96
90
|
end
|
|
97
91
|
|
|
98
92
|
def post(data)
|
|
99
|
-
|
|
93
|
+
JSON.parse(HTTParty.post(api_url, :body => data))
|
|
100
94
|
end
|
|
101
95
|
|
|
102
96
|
def error?(response)
|
|
@@ -122,7 +116,16 @@ class Linode
|
|
|
122
116
|
item[k.downcase] = item[k]
|
|
123
117
|
item.delete(k) if k != k.downcase
|
|
124
118
|
end
|
|
125
|
-
::OpenStruct.new(item)
|
|
119
|
+
Linode::OpenStruct.new(item)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# some of our Linode API data results include a 'type' data member.
|
|
123
|
+
# OpenStruct will have problems providing a .type method, so we special-case this.
|
|
124
|
+
#
|
|
125
|
+
class OpenStruct < ::OpenStruct
|
|
126
|
+
def type
|
|
127
|
+
@table[:type]
|
|
128
|
+
end
|
|
126
129
|
end
|
|
127
130
|
end
|
|
128
131
|
|
data/linode.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "linode"
|
|
8
|
-
s.version = "0.7.
|
|
8
|
+
s.version = "0.7.9"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Rick Bradley"]
|
|
12
|
-
s.date = "2012-
|
|
12
|
+
s.date = "2012-05-01"
|
|
13
13
|
s.description = "This is a wrapper around Linode's automation facilities."
|
|
14
14
|
s.email = "rick@rickbradley.com"
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
|
|
|
19
19
|
".rspec",
|
|
20
20
|
"CHANGELOG",
|
|
21
21
|
"Gemfile",
|
|
22
|
-
"Gemfile.lock",
|
|
23
22
|
"MIT-LICENSE",
|
|
24
23
|
"README.md",
|
|
25
24
|
"Rakefile",
|
|
@@ -40,7 +39,6 @@ Gem::Specification.new do |s|
|
|
|
40
39
|
"lib/linode/stackscript.rb",
|
|
41
40
|
"lib/linode/test.rb",
|
|
42
41
|
"lib/linode/user.rb",
|
|
43
|
-
"lib/ostruct_tweak.rb",
|
|
44
42
|
"linode.gemspec",
|
|
45
43
|
"spec/linode/avail_spec.rb",
|
|
46
44
|
"spec/linode/domain/resource_spec.rb",
|
|
@@ -69,18 +67,18 @@ Gem::Specification.new do |s|
|
|
|
69
67
|
|
|
70
68
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
71
69
|
s.add_runtime_dependency(%q<httparty>, [">= 0"])
|
|
72
|
-
s.add_runtime_dependency(%q<
|
|
70
|
+
s.add_runtime_dependency(%q<json>, [">= 0"])
|
|
73
71
|
s.add_runtime_dependency(%q<httparty>, [">= 0.4.4"])
|
|
74
72
|
s.add_runtime_dependency(%q<crack>, [">= 0.3.1"])
|
|
75
73
|
else
|
|
76
74
|
s.add_dependency(%q<httparty>, [">= 0"])
|
|
77
|
-
s.add_dependency(%q<
|
|
75
|
+
s.add_dependency(%q<json>, [">= 0"])
|
|
78
76
|
s.add_dependency(%q<httparty>, [">= 0.4.4"])
|
|
79
77
|
s.add_dependency(%q<crack>, [">= 0.3.1"])
|
|
80
78
|
end
|
|
81
79
|
else
|
|
82
80
|
s.add_dependency(%q<httparty>, [">= 0"])
|
|
83
|
-
s.add_dependency(%q<
|
|
81
|
+
s.add_dependency(%q<json>, [">= 0"])
|
|
84
82
|
s.add_dependency(%q<httparty>, [">= 0.4.4"])
|
|
85
83
|
s.add_dependency(%q<crack>, [">= 0.3.1"])
|
|
86
84
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: linode
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 17
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 7
|
|
9
|
-
-
|
|
10
|
-
version: 0.7.
|
|
9
|
+
- 9
|
|
10
|
+
version: 0.7.9
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Rick Bradley
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2012-
|
|
18
|
+
date: 2012-05-01 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
requirement: &id001 !ruby/object:Gem::Requirement
|
|
@@ -42,7 +42,7 @@ dependencies:
|
|
|
42
42
|
- 0
|
|
43
43
|
version: "0"
|
|
44
44
|
version_requirements: *id002
|
|
45
|
-
name:
|
|
45
|
+
name: json
|
|
46
46
|
prerelease: false
|
|
47
47
|
type: :runtime
|
|
48
48
|
- !ruby/object:Gem::Dependency
|
|
@@ -89,7 +89,6 @@ files:
|
|
|
89
89
|
- .rspec
|
|
90
90
|
- CHANGELOG
|
|
91
91
|
- Gemfile
|
|
92
|
-
- Gemfile.lock
|
|
93
92
|
- MIT-LICENSE
|
|
94
93
|
- README.md
|
|
95
94
|
- Rakefile
|
|
@@ -110,7 +109,6 @@ files:
|
|
|
110
109
|
- lib/linode/stackscript.rb
|
|
111
110
|
- lib/linode/test.rb
|
|
112
111
|
- lib/linode/user.rb
|
|
113
|
-
- lib/ostruct_tweak.rb
|
|
114
112
|
- linode.gemspec
|
|
115
113
|
- spec/linode/avail_spec.rb
|
|
116
114
|
- spec/linode/domain/resource_spec.rb
|
data/Gemfile.lock
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
GEM
|
|
2
|
-
remote: http://rubygems.org/
|
|
3
|
-
specs:
|
|
4
|
-
crack (0.1.8)
|
|
5
|
-
diff-lcs (1.1.2)
|
|
6
|
-
httparty (0.7.8)
|
|
7
|
-
crack (= 0.1.8)
|
|
8
|
-
mocha (0.9.12)
|
|
9
|
-
rake (0.8.7)
|
|
10
|
-
rspec (2.4.0)
|
|
11
|
-
rspec-core (~> 2.4.0)
|
|
12
|
-
rspec-expectations (~> 2.4.0)
|
|
13
|
-
rspec-mocks (~> 2.4.0)
|
|
14
|
-
rspec-core (2.4.0)
|
|
15
|
-
rspec-expectations (2.4.0)
|
|
16
|
-
diff-lcs (~> 1.1.2)
|
|
17
|
-
rspec-mocks (2.4.0)
|
|
18
|
-
|
|
19
|
-
PLATFORMS
|
|
20
|
-
ruby
|
|
21
|
-
|
|
22
|
-
DEPENDENCIES
|
|
23
|
-
crack
|
|
24
|
-
httparty
|
|
25
|
-
mocha
|
|
26
|
-
rake (= 0.8.7)
|
|
27
|
-
rspec (= 2.4.0)
|