squall 1.1.0 → 1.2.0beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +1 -1
  3. data/lib/squall/support/base.rb +12 -37
  4. data/lib/squall/support/exception.rb +8 -8
  5. data/lib/squall/support/on_app_errors.rb +23 -0
  6. data/lib/squall/support/version.rb +1 -1
  7. data/lib/squall.rb +3 -1
  8. data/spec/squall/data_store_zone_spec.rb +3 -3
  9. data/spec/squall/firewall_rule_spec.rb +3 -3
  10. data/spec/squall/hypervisor_spec.rb +3 -3
  11. data/spec/squall/hypervisor_zone_spec.rb +3 -3
  12. data/spec/squall/ip_address_join_spec.rb +3 -3
  13. data/spec/squall/ip_address_spec.rb +1 -1
  14. data/spec/squall/network_spec.rb +3 -3
  15. data/spec/squall/network_zone_spec.rb +7 -7
  16. data/spec/squall/payment_spec.rb +3 -3
  17. data/spec/squall/role_spec.rb +3 -3
  18. data/spec/squall/support/base_spec.rb +2 -34
  19. data/spec/squall/template_spec.rb +1 -1
  20. data/spec/squall/transaction_spec.rb +1 -1
  21. data/spec/squall/user_group_spec.rb +2 -2
  22. data/spec/squall/user_spec.rb +7 -7
  23. data/spec/squall/virtual_machine_spec.rb +22 -22
  24. data/spec/squall/whitelist_spec.rb +4 -4
  25. data/spec/vcr_cassettes/data_store_zone/create.yml +1 -1
  26. data/spec/vcr_cassettes/data_store_zone/edit.yml +2 -2
  27. data/spec/vcr_cassettes/firewall_rule/create.yml +2 -2
  28. data/spec/vcr_cassettes/firewall_rule/edit.yml +2 -2
  29. data/spec/vcr_cassettes/hypervisor/add_network_join.yml +1 -1
  30. data/spec/vcr_cassettes/hypervisor/create.yml +1 -1
  31. data/spec/vcr_cassettes/hypervisor/edit.yml +1 -1
  32. data/spec/vcr_cassettes/hypervisor_zones/add_network_join.yml +1 -1
  33. data/spec/vcr_cassettes/hypervisor_zones/create.yml +1 -1
  34. data/spec/vcr_cassettes/hypervisor_zones/edit.yml +2 -2
  35. data/spec/vcr_cassettes/ipaddress/create.yml +1 -1
  36. data/spec/vcr_cassettes/ipaddress/edit.yml +1 -1
  37. data/spec/vcr_cassettes/ipaddress_join/assign.yml +2 -2
  38. data/spec/vcr_cassettes/network/create.yml +5 -5
  39. data/spec/vcr_cassettes/network/edit.yml +5 -5
  40. data/spec/vcr_cassettes/network_zones/create.yml +1 -1
  41. data/spec/vcr_cassettes/network_zones/edit.yml +2 -2
  42. data/spec/vcr_cassettes/payment/create.yml +2 -2
  43. data/spec/vcr_cassettes/payment/edit.yml +2 -2
  44. data/spec/vcr_cassettes/role/create.yml +1 -1
  45. data/spec/vcr_cassettes/role/edit.yml +1 -1
  46. data/spec/vcr_cassettes/user/create.yml +1 -1
  47. data/spec/vcr_cassettes/user/edit.yml +1 -1
  48. data/spec/vcr_cassettes/user/edit_role.yml +3 -3
  49. data/spec/vcr_cassettes/user_group/create.yml +1 -1
  50. data/spec/vcr_cassettes/user_group/edit.yml +2 -2
  51. data/spec/vcr_cassettes/virtual_machine/build.yml +2 -2
  52. data/spec/vcr_cassettes/virtual_machine/create.yml +1 -1
  53. data/spec/vcr_cassettes/virtual_machine/edit.yml +2 -2
  54. data/spec/vcr_cassettes/virtual_machine/migrate.yml +3 -3
  55. data/spec/vcr_cassettes/virtual_machine/resize.yml +2 -2
  56. data/spec/vcr_cassettes/virtual_machine/segregate.yml +3 -3
  57. data/spec/vcr_cassettes/whitelist/create.yml +2 -2
  58. data/spec/vcr_cassettes/whitelist/edit.yml +2 -2
  59. data/squall.gemspec +4 -2
  60. metadata +41 -26
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/build.json?virtual_machine[template_id]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/build.json?virtual_machine%5Btemplate_id%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/72/build.json?virtual_machine[template_id]=1
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/72/build.json?virtual_machine%5Btemplate_id%5D=1
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines.json?virtual_machine[cpu_shares]=10&virtual_machine[primary_disk_size]=10&virtual_machine[template_id]=1&virtual_machine[label]=testmachine&virtual_machine[hostname]=testmachine&virtual_machine[memory]=512&virtual_machine[cpus]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines.json?virtual_machine%5Bcpu_shares%5D=10&virtual_machine%5Bprimary_disk_size%5D=10&virtual_machine%5Btemplate_id%5D=1&virtual_machine%5Blabel%5D=testmachine&virtual_machine%5Bhostname%5D=testmachine&virtual_machine%5Bmemory%5D=512&virtual_machine%5Bcpus%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404.json?virtual_machine[label]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404.json?virtual_machine%5Blabel%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :put
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1.json?virtual_machine[label]=testing
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1.json?virtual_machine%5Blabel%5D=testing
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/migrate.json?virtual_machine[destination]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/migrate.json?virtual_machine%5Bdestination%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/migrate.json?virtual_machine[destination]=404
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/migrate.json?virtual_machine%5Bdestination%5D=404
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -76,7 +76,7 @@
76
76
  - !ruby/struct:VCR::HTTPInteraction
77
77
  request: !ruby/struct:VCR::Request
78
78
  method: :post
79
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/migrate.json?virtual_machine[destination]=2
79
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/migrate.json?virtual_machine%5Bdestination%5D=2
80
80
  body:
81
81
  headers:
82
82
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/resize.json?virtual_machine[memory]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/resize.json?virtual_machine%5Bmemory%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/resize.json?virtual_machine[memory]=1000
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/resize.json?virtual_machine%5Bmemory%5D=1000
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/strict_vm.json?virtual_machine[strict_virtual_machine_id]=1
5
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/404/strict_vm.json?virtual_machine%5Bstrict_virtual_machine_id%5D=1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/strict_vm.json?virtual_machine[strict_virtual_machine_id]=404
42
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/strict_vm.json?virtual_machine%5Bstrict_virtual_machine_id%5D=404
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -76,7 +76,7 @@
76
76
  - !ruby/struct:VCR::HTTPInteraction
77
77
  request: !ruby/struct:VCR::Request
78
78
  method: :post
79
- uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/strict_vm.json?virtual_machine[strict_virtual_machine_id]=2
79
+ uri: http://<USER>:<PASS>@<URL>:80/virtual_machines/1/strict_vm.json?virtual_machine%5Bstrict_virtual_machine_id%5D=2
80
80
  body:
81
81
  headers:
82
82
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :post
5
- uri: http://<USER>:<PASS>@<URL>:80/users/404/user_white_lists.json?user_white_list[ip]=192.168.1.1
5
+ uri: http://<USER>:<PASS>@<URL>:80/users/404/user_white_lists.json?user_white_list%5Bip%5D=192.168.1.1
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -39,7 +39,7 @@
39
39
  - !ruby/struct:VCR::HTTPInteraction
40
40
  request: !ruby/struct:VCR::Request
41
41
  method: :post
42
- uri: http://<USER>:<PASS>@<URL>:80/users/1/user_white_lists.json?user_white_list[ip]=192.168.1.1
42
+ uri: http://<USER>:<PASS>@<URL>:80/users/1/user_white_lists.json?user_white_list%5Bip%5D=192.168.1.1
43
43
  body:
44
44
  headers:
45
45
  content-type:
@@ -2,7 +2,7 @@
2
2
  - !ruby/struct:VCR::HTTPInteraction
3
3
  request: !ruby/struct:VCR::Request
4
4
  method: :put
5
- uri: http://<USER>:<PASS>@<URL>:80/users/1/user_white_lists/1.json?user_white_list[description]=This%20is%20actually%20a%20different%20computer.
5
+ uri: http://<USER>:<PASS>@<URL>:80/users/1/user_white_lists/1.json?user_white_list%5Bdescription%5D=This+is+actually+a+different+computer.
6
6
  body:
7
7
  headers:
8
8
  content-type:
@@ -41,7 +41,7 @@
41
41
  - !ruby/struct:VCR::HTTPInteraction
42
42
  request: !ruby/struct:VCR::Request
43
43
  method: :put
44
- uri: http://<USER>:<PASS>@<URL>:80/users/1/user_white_lists/404.json?user_white_list[ip]=192.168.1.1
44
+ uri: http://<USER>:<PASS>@<URL>:80/users/1/user_white_lists/404.json?user_white_list%5Bip%5D=192.168.1.1
45
45
  body:
46
46
  headers:
47
47
  content-type:
data/squall.gemspec CHANGED
@@ -14,13 +14,15 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "squall"
16
16
 
17
- s.add_runtime_dependency 'httparty', '~> 0.8.1'
17
+ s.add_runtime_dependency 'faraday', '~> 0.8.0.rc2'
18
+ s.add_runtime_dependency 'faraday_middleware', '~> 0.8.4'
19
+ s.add_runtime_dependency 'json', '~> 1.6.1' if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
18
20
  s.add_runtime_dependency('jruby-openssl', '~> 0.7.3') if RUBY_PLATFORM == 'java'
19
21
 
20
22
  s.add_development_dependency 'rspec', '~> 2.5'
21
23
  s.add_development_dependency 'fakeweb', '~> 1.3'
22
24
  s.add_development_dependency 'vcr', '~> 1.8'
23
- s.add_development_dependency 'awesome_print'
25
+ s.add_development_dependency 'awesome_print', '~> 1.0.2'
24
26
  s.add_development_dependency 'rake', '~> 0.8.7'
25
27
  if !defined?(RUBY_ENGINE) || RUBY_ENGINE != 'rbx'
26
28
  s.add_development_dependency 'rcov', '~> 0.9'
metadata CHANGED
@@ -1,30 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squall
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.2.0beta1
5
+ prerelease: 5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Justin Mazzi
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-15 00:00:00.000000000Z
12
+ date: 2012-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: httparty
16
- requirement: &70349368130980 !ruby/object:Gem::Requirement
15
+ name: faraday
16
+ requirement: &13791720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.8.1
21
+ version: 0.8.0.rc2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70349368130980
24
+ version_requirements: *13791720
25
+ - !ruby/object:Gem::Dependency
26
+ name: faraday_middleware
27
+ requirement: &13807600 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.8.4
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *13807600
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: rspec
27
- requirement: &70349368130460 !ruby/object:Gem::Requirement
38
+ requirement: &13807080 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ~>
@@ -32,10 +43,10 @@ dependencies:
32
43
  version: '2.5'
33
44
  type: :development
34
45
  prerelease: false
35
- version_requirements: *70349368130460
46
+ version_requirements: *13807080
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: fakeweb
38
- requirement: &70349368130000 !ruby/object:Gem::Requirement
49
+ requirement: &13806620 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ~>
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: '1.3'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *70349368130000
57
+ version_requirements: *13806620
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: vcr
49
- requirement: &70349368129540 !ruby/object:Gem::Requirement
60
+ requirement: &13806160 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ~>
@@ -54,21 +65,21 @@ dependencies:
54
65
  version: '1.8'
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *70349368129540
68
+ version_requirements: *13806160
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: awesome_print
60
- requirement: &70349368159880 !ruby/object:Gem::Requirement
71
+ requirement: &13805700 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
- - - ! '>='
74
+ - - ~>
64
75
  - !ruby/object:Gem::Version
65
- version: '0'
76
+ version: 1.0.2
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *70349368159880
79
+ version_requirements: *13805700
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: rake
71
- requirement: &70349368159340 !ruby/object:Gem::Requirement
82
+ requirement: &13805240 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ~>
@@ -76,10 +87,10 @@ dependencies:
76
87
  version: 0.8.7
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *70349368159340
90
+ version_requirements: *13805240
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: rcov
82
- requirement: &70349368158800 !ruby/object:Gem::Requirement
93
+ requirement: &13804740 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ~>
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: '0.9'
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *70349368158800
101
+ version_requirements: *13804740
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: metric_fu
93
- requirement: &70349368158340 !ruby/object:Gem::Requirement
104
+ requirement: &13804280 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ~>
@@ -98,7 +109,7 @@ dependencies:
98
109
  version: '2.1'
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *70349368158340
112
+ version_requirements: *13804280
102
113
  description: A Ruby library for working with the OnApp REST API
103
114
  email:
104
115
  - jmazzi@site5.com
@@ -130,6 +141,7 @@ files:
130
141
  - lib/squall/support/base.rb
131
142
  - lib/squall/support/config.rb
132
143
  - lib/squall/support/exception.rb
144
+ - lib/squall/support/on_app_errors.rb
133
145
  - lib/squall/support/params.rb
134
146
  - lib/squall/support/version.rb
135
147
  - lib/squall/support/yaml.rb
@@ -287,15 +299,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
287
299
  - - ! '>='
288
300
  - !ruby/object:Gem::Version
289
301
  version: '0'
302
+ segments:
303
+ - 0
304
+ hash: 4481202589571130379
290
305
  required_rubygems_version: !ruby/object:Gem::Requirement
291
306
  none: false
292
307
  requirements:
293
- - - ! '>='
308
+ - - ! '>'
294
309
  - !ruby/object:Gem::Version
295
- version: '0'
310
+ version: 1.3.1
296
311
  requirements: []
297
312
  rubyforge_project: squall
298
- rubygems_version: 1.8.10
313
+ rubygems_version: 1.8.11
299
314
  signing_key:
300
315
  specification_version: 3
301
316
  summary: A Ruby library for working with the OnApp REST API