colombo 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - ruby-head
8
+ script: bundle exec rake
9
+ env:
10
+ global:
11
+ - secure: UONHIMkNeiFe+PXjoDV0p8eTRf94Pw0G+ijp5CcFJ/9JzX7tDUg1MHLI7Q2ycJWBcxojsOdpqceS9U0ZDK5Yx+AqDqAF65/ug4rFU0XLqNOw9dCK18tOKSiNqc7GhpR15yd5w6SQODO9z4Pe50eVNs8KpaaY2r/XnFWjX60DSGQ=
12
+ - secure: VDOAqNhAO73mL4OVyg65BCIqHC05sTMDfxajO9cMPtfGhdSlNed44Uc5KKtRcVT6xomcCHj0WIaAqjE2pm31kw0EJYxsZJbUR6g83qfK+S6pRQ6Dk7pP3dEEQIlTuP36o94o/gfhBJUwqii345PQBgbrjfI7ys8pjMpE6zqm8ak=
data/README.md CHANGED
@@ -3,8 +3,6 @@
3
3
 
4
4
  A simple Digital Ocean (http://digitalocean.com) API wrapper
5
5
 
6
- NOTE: This version is an experimental version not ready for usage.
7
-
8
6
  ## Install
9
7
 
10
8
  ```
@@ -78,7 +76,9 @@ new_droplet = droplets.create({
78
76
 
79
77
  # This method allows you to destroy an image. There is no way to restore a
80
78
  # deleted image so be careful and ensure your data is properly backed up.
81
- @client.images.find( image_id ).destroy
79
+ # NOTE: You need to pass true to the destroy method to ensure that you know
80
+ # what you are doing.
81
+ @client.images.find( image_id ).destroy(true)
82
82
  ```
83
83
 
84
84
  ### SSH Keys
@@ -19,14 +19,14 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- # specify any dependencies here; for example:
23
- # s.add_development_dependency "rspec"
22
+ s.license = 'MIT'
24
23
 
24
+ s.add_runtime_dependency "json", "~> 1.8.0"
25
25
  s.add_runtime_dependency "rest-client", "~> 1.6.7"
26
26
 
27
- s.add_development_dependency "minitest"
28
- s.add_development_dependency "webmock"
29
- s.add_development_dependency "vcr"
27
+ s.add_development_dependency "minitest","~> 5.0.6"
28
+ s.add_development_dependency "webmock", "1.8.0"
29
+ s.add_development_dependency "vcr", "2.5.0"
30
30
  s.add_development_dependency "turn"
31
31
  s.add_development_dependency "rake"
32
32
 
@@ -25,6 +25,7 @@ module Colombo
25
25
  extend Configuration
26
26
 
27
27
 
28
+ # @param [Object] options
28
29
  def self.new(options={})
29
30
  Client.new(options)
30
31
  end
@@ -3,25 +3,8 @@
3
3
  module Colombo
4
4
  class Container < Array
5
5
 
6
- def find(image_id)
7
-
8
- image = self.select{ |i| i.id == image_id }.first
9
-
10
- return image if not image.nil?
11
-
12
- response = @client.request(:get, "/images/#{image_id}") do |response|
13
- image = Image.new(@client, self, response['image'])
14
- self << image
15
- end
16
-
17
- return image
18
- end
19
-
20
-
21
6
  def method_missing(method, *args, &block)
22
7
  if method.to_s =~ /^find_by_(.*)/
23
- p "found: #{method} - #{$1}"
24
- p "args: #{args[0]}"
25
8
  run_find_by_attr($1, *args)
26
9
  else
27
10
  super
@@ -64,7 +64,7 @@ module Colombo
64
64
  end
65
65
 
66
66
  def destroy(confirm=false)
67
- return false unless confirm
67
+ raise 'must pass true for confirm' unless confirm
68
68
  @client.request(:get, "/droplets/#{self.id}/destroy/") do |response|
69
69
  return response['event_id']
70
70
  end
@@ -5,7 +5,7 @@ module Colombo
5
5
  attr_accessor :id, :name, :distribution
6
6
 
7
7
  def destroy(confirm=false)
8
- return unless confirm
8
+ raise 'must pass true for confirm' unless confirm
9
9
  @client.request(:get, "/images/#{self.id}/destroy/") do |response|
10
10
  return response['event_id']
11
11
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Colombo
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.5"
5
5
  end
@@ -7,14 +7,14 @@ require 'minitest/pride'
7
7
  require 'vcr'
8
8
 
9
9
  VCR.configure do |c|
10
- c.cassette_library_dir = File.join( File.dirname(__FILE__), 'fixtures/vcr_cassettes')
10
+ c.cassette_library_dir = File.join( File.dirname(__FILE__), 'fixtures/vcr/cassettes')
11
11
  c.hook_into :webmock
12
12
  end
13
13
 
14
14
  COLOMBO_DROPLET_NAME = 'colombo'
15
- COLOMBO_REGION_ID = 1 # NY
16
- COLOMBO_IMAGE_ID = 42735 # Ubuntu
17
- COLOMBO_SIZE_ID = 63 # 1GB
15
+ COLOMBO_REGION_ID = 1 # NY
16
+ COLOMBO_IMAGE_ID = 345791 # Ubuntu 13.04 x32
17
+ COLOMBO_SIZE_ID = 63 # 1GB
18
18
  COLOMBO_SSH_KEY_NAME = 'colombo gem'
19
19
  COLOMBO_SSH_KEY = 'ssh-dss AAAAB3NzaC1kc3MAAACBAK5uLwicCrFEpaVKBzkWxC7RQn+smg5ZQb5keh9RQKo8AszFTol5npgUAr0JWmqKIHv7nof0HndO86x9iIqNjq3vrz9CIVcFfZM7poKBJZ27Hv3v0fmSKfAc6eGdx8eM9UkZe1gzcLXK8UP2HaeY1Y4LlaHXS5tPi/dXooFVgiA7AAAAFQCQl6LZo/VYB9VgPEZzOmsmQevnswBBBIBCNKGsVP5eZ+IJklXheUyzxuL75i04OOtEGW6MO5TymKMwTZlU9r4ukuwxty+T9Ot2LqlNRnLSPQAjb0vplasZ8Ix45JOpRbuSvPovryn7rvS7//klu9hIkFAAQ/AZfGTw+696EjFBg4F5tN6MGMA6KrTQVLXeuYcZeRXwE5t5lwAAAIEAl2xYh098bozJUANQ82DiZznjHc5FW76Xm1apEqsZtVRFuh3V9nc7QNcBekhmHp5Z0sHthXCm1XqnFbkRCdFlX02NpgtNs7OcKpaJP47N8C+C/Yrf8qK/Wt3fExrL2ZLX5XD2tiotugSkwZJMW5Bv0mtjrNt0Q7P45rZjNNTag2c= user@host'
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colombo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -36,11 +36,22 @@ cert_chain:
36
36
  TGVnalVadkdRSEdmSHN0bDdkd2lCVWluZ1UvMldOTFIKMXBIQThXeGsxVVJi
37
37
  Nmxxa2NRdERZbDkyU3FTSk1FY0s0Wk0zRmwrRFM0RXBtM1BINTZlWjR3Qlha
38
38
  REhMRUNuTwpubjhCMXUyKwotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
39
- date: 2013-04-15 00:00:00.000000000 Z
39
+ date: 2013-07-30 00:00:00.000000000 Z
40
40
  dependencies:
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: &70314675746380 !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: 1.8.0
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: *70314675746380
41
52
  - !ruby/object:Gem::Dependency
42
53
  name: rest-client
43
- requirement: &70219260478960 !ruby/object:Gem::Requirement
54
+ requirement: &70314675777760 !ruby/object:Gem::Requirement
44
55
  none: false
45
56
  requirements:
46
57
  - - ~>
@@ -48,43 +59,43 @@ dependencies:
48
59
  version: 1.6.7
49
60
  type: :runtime
50
61
  prerelease: false
51
- version_requirements: *70219260478960
62
+ version_requirements: *70314675777760
52
63
  - !ruby/object:Gem::Dependency
53
64
  name: minitest
54
- requirement: &70219260478060 !ruby/object:Gem::Requirement
65
+ requirement: &70314675776940 !ruby/object:Gem::Requirement
55
66
  none: false
56
67
  requirements:
57
- - - ! '>='
68
+ - - ~>
58
69
  - !ruby/object:Gem::Version
59
- version: '0'
70
+ version: 5.0.6
60
71
  type: :development
61
72
  prerelease: false
62
- version_requirements: *70219260478060
73
+ version_requirements: *70314675776940
63
74
  - !ruby/object:Gem::Dependency
64
75
  name: webmock
65
- requirement: &70219260476820 !ruby/object:Gem::Requirement
76
+ requirement: &70314675775580 !ruby/object:Gem::Requirement
66
77
  none: false
67
78
  requirements:
68
- - - ! '>='
79
+ - - =
69
80
  - !ruby/object:Gem::Version
70
- version: '0'
81
+ version: 1.8.0
71
82
  type: :development
72
83
  prerelease: false
73
- version_requirements: *70219260476820
84
+ version_requirements: *70314675775580
74
85
  - !ruby/object:Gem::Dependency
75
86
  name: vcr
76
- requirement: &70219260476160 !ruby/object:Gem::Requirement
87
+ requirement: &70314675774200 !ruby/object:Gem::Requirement
77
88
  none: false
78
89
  requirements:
79
- - - ! '>='
90
+ - - =
80
91
  - !ruby/object:Gem::Version
81
- version: '0'
92
+ version: 2.5.0
82
93
  type: :development
83
94
  prerelease: false
84
- version_requirements: *70219260476160
95
+ version_requirements: *70314675774200
85
96
  - !ruby/object:Gem::Dependency
86
97
  name: turn
87
- requirement: &70219260159900 !ruby/object:Gem::Requirement
98
+ requirement: &70314675772880 !ruby/object:Gem::Requirement
88
99
  none: false
89
100
  requirements:
90
101
  - - ! '>='
@@ -92,10 +103,10 @@ dependencies:
92
103
  version: '0'
93
104
  type: :development
94
105
  prerelease: false
95
- version_requirements: *70219260159900
106
+ version_requirements: *70314675772880
96
107
  - !ruby/object:Gem::Dependency
97
108
  name: rake
98
- requirement: &70219260159320 !ruby/object:Gem::Requirement
109
+ requirement: &70314675771400 !ruby/object:Gem::Requirement
99
110
  none: false
100
111
  requirements:
101
112
  - - ! '>='
@@ -103,7 +114,7 @@ dependencies:
103
114
  version: '0'
104
115
  type: :development
105
116
  prerelease: false
106
- version_requirements: *70219260159320
117
+ version_requirements: *70314675771400
107
118
  description: A simple ruby client for Digital Ocean API
108
119
  email:
109
120
  - lmmendes@gmail.com
@@ -112,6 +123,7 @@ extensions: []
112
123
  extra_rdoc_files: []
113
124
  files:
114
125
  - .gitignore
126
+ - .travis.yml
115
127
  - Gemfile
116
128
  - README.md
117
129
  - Rakefile
@@ -145,7 +157,8 @@ files:
145
157
  - test/colombo/ssh_keys_test.rb
146
158
  - test/colombo/test_helper.rb
147
159
  homepage: http://github.com/lmmendes/colombo
148
- licenses: []
160
+ licenses:
161
+ - MIT
149
162
  post_install_message:
150
163
  rdoc_options: []
151
164
  require_paths:
metadata.gz.sig CHANGED
Binary file