oceanarium 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +39 -0
- data/Rakefile +6 -0
- data/lib/oceanarium/config.rb +38 -0
- data/lib/oceanarium/request.rb +14 -0
- data/lib/oceanarium/resources/domain.rb +46 -0
- data/lib/oceanarium/resources/droplet.rb +98 -0
- data/lib/oceanarium/resources/image.rb +56 -0
- data/lib/oceanarium/resources/lists.rb +22 -0
- data/lib/oceanarium/resources/record.rb +53 -0
- data/lib/oceanarium/resources/sshkey.rb +51 -0
- data/lib/oceanarium/resources.rb +11 -0
- data/lib/oceanarium/version.rb +3 -0
- data/lib/oceanarium.rb +9 -0
- data/oceanarium.gemspec +25 -0
- metadata +119 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a4441ed289120db783c86716878983a1fe47d1e8
|
4
|
+
data.tar.gz: 14128c2fa5fe0a672434e8e002e3dd7a48546a75
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3da88d66142ac8a627ebecfab9dd654fb8bc5636421c9b2de902d9ecf3000d07c7cb910c943fce90961c075ba54947ed8574754861a1e94fec2163482757f89b
|
7
|
+
data.tar.gz: f4fb8246c0f493b1d20a4eda6fed19a9f42c5ae2cb54b1cb1cd9d45bbc965d400dcfe1f5c55825fcea157a49224790793abed67fd3ce6f987934aacf7ca195ff
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Valdos Sine, Delta-Zet LLC
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# Oceanarium - Use Digital Ocean API in your Ruby applications!
|
2
|
+
|
3
|
+
Digital Ocean is good SSD cloud hosting and we love it. So, we wrote this gem for the great justice :) It will help your Ruby/Rails application communicate with Digital Ocean's API.
|
4
|
+
|
5
|
+
Warning: there is much work in progress...
|
6
|
+
|
7
|
+
Warning: We're not affiliated with Digital Ocean, so we can't guarantee that API, used by this gem, still valid. If you experiencing errors, just ping us (and Digital Ocean).
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'oceanarium'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install oceanarium
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
1. Fork it
|
30
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
31
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
32
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
33
|
+
5. Create new Pull Request
|
34
|
+
|
35
|
+
## License
|
36
|
+
|
37
|
+
See LICENSE.txt.
|
38
|
+
|
39
|
+
Copyright 2013 Valdos Sine, Delta-Zet LLC
|
data/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
module Oceanarium
|
2
|
+
module Config
|
3
|
+
extend self
|
4
|
+
|
5
|
+
# API URL getter/setter
|
6
|
+
def api_url=(api_url)
|
7
|
+
@api_url = api_url
|
8
|
+
@api_url
|
9
|
+
end
|
10
|
+
|
11
|
+
def api_url
|
12
|
+
return @api_url if @api_url
|
13
|
+
"https://api.digitalocean.com/"
|
14
|
+
end
|
15
|
+
|
16
|
+
# API key getter/setter.
|
17
|
+
def api_key=(api_key)
|
18
|
+
@api_key = api_key
|
19
|
+
@api_key
|
20
|
+
end
|
21
|
+
|
22
|
+
def api_key
|
23
|
+
return @api_key if @api_key
|
24
|
+
"You have missed API key. Please, provide it by Oceanarium::Config.api_key = 'your_key'."
|
25
|
+
end
|
26
|
+
|
27
|
+
# Client key getter/setter.
|
28
|
+
def client_id=(client_id)
|
29
|
+
@client_id = client_id
|
30
|
+
@client_id
|
31
|
+
end
|
32
|
+
|
33
|
+
def client_id
|
34
|
+
return @client_id if @client_id
|
35
|
+
"You have missed client ID. Please, provide it by Oceanarium::Config.client_id = 'your_id'"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'pry-remote'
|
2
|
+
|
3
|
+
module Oceanarium
|
4
|
+
class Request
|
5
|
+
include HTTParty
|
6
|
+
|
7
|
+
base_uri Oceanarium::Config.api_url
|
8
|
+
|
9
|
+
def get(path, options={})
|
10
|
+
options.merge!({:client_id => Oceanarium::Config.client_id.to_s, :api_key => Oceanarium::Config.api_key.to_s})
|
11
|
+
self.class.get(path, :query => options)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Oceanarium
|
2
|
+
class Domain
|
3
|
+
|
4
|
+
def self.all
|
5
|
+
@request = Oceanarium::Request.new
|
6
|
+
@get = @request.get('/domains/')
|
7
|
+
@get.parsed_response['domains']
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.find(id)
|
11
|
+
@request = Oceanarium::Request.new
|
12
|
+
@get = @request.get("/domains/#{id}")
|
13
|
+
if @get.parsed_response['status'] == 'OK'
|
14
|
+
@get.parsed_response['domain']
|
15
|
+
else
|
16
|
+
@get.parsed_response['status']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.search_by_name(string)
|
21
|
+
# Returns Array of domains which name matching string.
|
22
|
+
self.all.select { |i| i['name'].include? string }
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.find_by_name(string)
|
26
|
+
# Returns domain which name equals string.
|
27
|
+
self.all.select { |i| i['name'] == string }
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.create(name, ip_addr)
|
31
|
+
@request = Oceanarium::Request.new
|
32
|
+
@get = @request.get("/domains/new?name=#{name}&ip_address=#{ip_addr}")
|
33
|
+
if @get.parsed_response['status'] == 'OK'
|
34
|
+
@get.parsed_response['domain']['id']
|
35
|
+
else
|
36
|
+
@get.parsed_response['status']
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.destroy(id)
|
41
|
+
@request = Oceanarium::Request.new
|
42
|
+
@get = @request.get("/domains/#{id}/destroy/")
|
43
|
+
@get.parsed_response['status']
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
|
3
|
+
module Oceanarium
|
4
|
+
class Droplet
|
5
|
+
|
6
|
+
def self.all
|
7
|
+
# Returns all Droplets in Array. Each Droplet is a Hash
|
8
|
+
@request = Oceanarium::Request.new
|
9
|
+
@get = @request.get('/droplets/')
|
10
|
+
if @get.parsed_response['status'] == 'OK'
|
11
|
+
@get.parsed_response['droplets']
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.find(id)
|
16
|
+
# Returns single Droplet Hash. Returns nil if error
|
17
|
+
@request = Oceanarium::Request.new
|
18
|
+
@get = @request.get("/droplets/#{id}")
|
19
|
+
if @get.parsed_response['status'] == 'OK'
|
20
|
+
@get.parsed_response['droplet']
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.create(name, size_id, image_id, region_id, ssh_key_ids=nil)
|
25
|
+
@request = Oceanarium::Request.new
|
26
|
+
if ssh_key_ids.nil?
|
27
|
+
@get = @request.get(URI::encode("/droplets/new?name=#{name}&size_id=#{size_id}&image_id=#{image_id}®ion_id=#{region_id}"))
|
28
|
+
else
|
29
|
+
@get = @request.get(URI::encode("/droplets/new?name=#{name}&size_id=#{size_id}&image_id=#{image_id}®ion_id=#{region_id}&ssh_key_ids=#{ssh_key_ids}"))
|
30
|
+
end
|
31
|
+
if @get.parsed_response['status'] == 'OK'
|
32
|
+
@get.parsed_response['droplet']['id']
|
33
|
+
else
|
34
|
+
@get.parsed_response['status']
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.action(id, action)
|
39
|
+
# Performs single action to a Droplet. Returns status OK or Error
|
40
|
+
@approved_actions = ['reboot', 'power_cycle', 'shutdown', 'power_off', 'power_on', 'password_reset', 'enable_backups', 'disable_backups', 'destroy']
|
41
|
+
if @approved_actions.include? action
|
42
|
+
@request = Oceanarium::Request.new
|
43
|
+
@get = @request.get("/droplets/#{id}/#{action}")
|
44
|
+
@get.parsed_response['status']
|
45
|
+
else
|
46
|
+
'ERROR'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.resize(id, size_id)
|
51
|
+
# Resizes Droplet. Returns OK or Error
|
52
|
+
@request = Oceanarium::Request.new
|
53
|
+
@sizes_request_get = @request.get("/sizes/")
|
54
|
+
@sizes = @sizes_request_get.parsed_response['sizes']
|
55
|
+
if @sizes.select { |s| s['id'] == size_id }.empty?
|
56
|
+
'Error'
|
57
|
+
else
|
58
|
+
@get = @request.get("/droplets/#{id}/resize?size_id=#{size_id}")
|
59
|
+
@get.parsed_response['status']
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.rename(id, name)
|
64
|
+
# Renames Droplet. Name must be FQDN. Returns OK or Error
|
65
|
+
@request = Oceanarium::Request.new
|
66
|
+
@get = @request.get("/droplets/#{id}/rename/?name=#{name}")
|
67
|
+
@get.parsed_response['status']
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.snapshot(id, name)
|
71
|
+
# Makes snapshot of Droplet. Returns OK or Error
|
72
|
+
@request = Oceanarium::Request.new
|
73
|
+
@get = @request.get("/droplets/#{id}/snapshot?name=#{name}")
|
74
|
+
@get.parsed_response['status']
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.restore(id, image_id)
|
78
|
+
# Restores snapshot of Droplet. Returns OK or Error
|
79
|
+
@request = Oceanarium::Request.new
|
80
|
+
@get = @request.get("/droplets/#{id}/restore/?image_id=#{image_id}")
|
81
|
+
@get.parsed_response['status']
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.rebuild(id, image_id)
|
85
|
+
# Rebuild OS image on Droplet. Returns OK or Error
|
86
|
+
@request = Oceanarium::Request.new
|
87
|
+
@get = @request.get("/droplets/#{id}/rebuild/?image_id=#{image_id}")
|
88
|
+
@get.parsed_response['status']
|
89
|
+
end
|
90
|
+
|
91
|
+
def self.destroy(id)
|
92
|
+
# Destroys Droplet
|
93
|
+
@request = Oceanarium::Request.new
|
94
|
+
@get = @request.get("/droplets/#{id}/destroy/")
|
95
|
+
@get.parsed_response['status']
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Oceanarium
|
2
|
+
class Image
|
3
|
+
|
4
|
+
def self.all
|
5
|
+
# Returns all avaliable images in Array
|
6
|
+
@request = Oceanarium::Request.new
|
7
|
+
@get = @request.get('/images/')
|
8
|
+
if @get.parsed_response['status'] == 'OK'
|
9
|
+
@get.parsed_response['images']
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.global
|
14
|
+
# Returns all global images in Array
|
15
|
+
@request = Oceanarium::Request.new
|
16
|
+
@get = @request.get('/images/?filter=global')
|
17
|
+
if @get.parsed_response['status'] == 'OK'
|
18
|
+
@get.parsed_response['images']
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.local
|
23
|
+
# Returns all user's images in Array
|
24
|
+
@request = Oceanarium::Request.new
|
25
|
+
@get = @request.get('/images/?filter=my_images')
|
26
|
+
if @get.parsed_response['status'] == 'OK'
|
27
|
+
@get.parsed_response['images']
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.find(id)
|
32
|
+
@request = Oceanarium::Request.new
|
33
|
+
@get = @request.get("/images/#{id}/")
|
34
|
+
if @get.parsed_response['status'] == 'OK'
|
35
|
+
@get.parsed_response['image']
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.find_by_name(string)
|
40
|
+
# Returns Array of images which name matching string.
|
41
|
+
self.all.select { |i| i['name'].include? string }
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.destroy(id)
|
45
|
+
@request = Oceanarium::Request.new
|
46
|
+
@get = @request.get("/images/#{id}/destroy/")
|
47
|
+
@get.parsed_response['status']
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.transfer(id, region_id)
|
51
|
+
@request = Oceanarium::Request.new
|
52
|
+
@get = @request.get("/images/#{id}/transfer/?region_id=#{region_id}")
|
53
|
+
@get.parsed_response['status']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Oceanarium
|
2
|
+
class Lists
|
3
|
+
|
4
|
+
def self.regions
|
5
|
+
# Returns all avaliable regions in Array
|
6
|
+
@request = Oceanarium::Request.new
|
7
|
+
@get = @request.get('/regions/')
|
8
|
+
if @get.parsed_response['status'] == 'OK'
|
9
|
+
@get.parsed_response['regions']
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.sizes
|
14
|
+
# Returns all avaliable sizess in Array
|
15
|
+
@request = Oceanarium::Request.new
|
16
|
+
@get = @request.get('/sizes/')
|
17
|
+
if @get.parsed_response['status'] == 'OK'
|
18
|
+
@get.parsed_response['sizes']
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module Oceanarium
|
2
|
+
class Record
|
3
|
+
|
4
|
+
def all(domain_id)
|
5
|
+
@request = Oceanarium::Request.new
|
6
|
+
@get = @request.get("/domains/#{domain_id}/records")
|
7
|
+
if @get.parsed_response['status'] == 'OK'
|
8
|
+
@get.parsed_response['records']
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def find(domain_id, id)
|
13
|
+
@request = Oceanarium::Request.new
|
14
|
+
@get = @request.get("/domains/#{domain_id}/records/#{id}/")
|
15
|
+
if @get.parsed_response['status'] == 'OK'
|
16
|
+
@get.parsed_response['record']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def create(domain_id, options={})
|
21
|
+
# There is a gotcha: too many params, so we need to pass an Hash with all params.
|
22
|
+
# For example:
|
23
|
+
#
|
24
|
+
# Oceanarium::Record.create(100500, {:record_type => 'A', :data => 'www.example.com', :name => 'example', :priority => 1, :port => 8342, :weight => 1 })
|
25
|
+
#
|
26
|
+
# Looks a lot overbloated? Yes, I know it :(
|
27
|
+
@request = Oceanarium::Request.new
|
28
|
+
@get = @request.get("/domains/#{domain_id}/records/new", options)
|
29
|
+
if @get.parsed_response['status'] == 'OK'
|
30
|
+
@get.parsed_response['domain_record']['id']
|
31
|
+
else
|
32
|
+
@get.parsed_response['status']
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def update(domain_id, options={})
|
37
|
+
# Same shit there
|
38
|
+
@request = Oceanarium::Request.new
|
39
|
+
@get = @request.get("/domains/#{domain_id}/records/new", options)
|
40
|
+
if @get.parsed_response['status'] == 'OK'
|
41
|
+
@get.parsed_response['record']
|
42
|
+
else
|
43
|
+
@get.parsed_response['status']
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def destroy(domain_id, id)
|
48
|
+
@request = Oceanarium::Request.new
|
49
|
+
@get = @request.get("/domains/#{domain_id}/records/#{id}/destroy")
|
50
|
+
@get.parsed_response['status']
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
|
3
|
+
module Oceanarium
|
4
|
+
class SSHKey
|
5
|
+
|
6
|
+
def self.all
|
7
|
+
# Returns all ssh keys in Array
|
8
|
+
@request = Oceanarium::Request.new
|
9
|
+
@get = @request.get('/ssh_keys/')
|
10
|
+
if @get.parsed_response['status'] == 'OK'
|
11
|
+
@get.parsed_response['ssh_keys']
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.create(name, key)
|
16
|
+
# Creates ssh_key
|
17
|
+
@request = Oceanarium::Request.new
|
18
|
+
@get = @request.get(URI::encode("/ssh_keys/new?name=#{name}&ssh_pub_key=#{key}"))
|
19
|
+
if @get.parsed_response['status'] == 'OK'
|
20
|
+
@get.parsed_response['ssh_key']['id']
|
21
|
+
else
|
22
|
+
@get.parsed_response['status']
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.find(id)
|
27
|
+
# Returns ssh key
|
28
|
+
@request = Oceanarium::Request.new
|
29
|
+
@get = @request.get("/ssh_keys/#{id}/")
|
30
|
+
if @get.parsed_response['status'] == 'OK'
|
31
|
+
@get.parsed_response['ssh_key']
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.update(id, key)
|
36
|
+
# Updates ssh key
|
37
|
+
@request = Oceanarium::Request.new
|
38
|
+
@get = @request.get(URI::encode("/ssh_keys/#{id}/edit?ssh_key_pub=#{key}"))
|
39
|
+
if @get.parsed_response['status'] == 'OK'
|
40
|
+
@get.parsed_response['ssh_key']
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.destroy(id)
|
45
|
+
# Destroys ssh key
|
46
|
+
@request = Oceanarium::Request.new
|
47
|
+
@get = @request.get("/ssh_keys/#{id}/destroy")
|
48
|
+
@get.parsed_response['status']
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'oceanarium/resources/droplet'
|
2
|
+
require 'oceanarium/resources/image'
|
3
|
+
require 'oceanarium/resources/sshkey'
|
4
|
+
require 'oceanarium/resources/domain'
|
5
|
+
require 'oceanarium/resources/record'
|
6
|
+
require 'oceanarium/resources/lists'
|
7
|
+
|
8
|
+
module Oceanarium
|
9
|
+
module Resources
|
10
|
+
end
|
11
|
+
end
|
data/lib/oceanarium.rb
ADDED
data/oceanarium.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'oceanarium/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "oceanarium"
|
8
|
+
spec.version = Oceanarium::VERSION
|
9
|
+
spec.authors = ["Valdos Sine", "Delta-Zet LLC"]
|
10
|
+
spec.email = ["iam@toofat.ru"]
|
11
|
+
spec.description = %q{Digital Ocean API wrapper for Ruby/Rails applications}
|
12
|
+
spec.summary = %q{Smart and tiny Digital Ocean API wrapper for Ruby/Rails. For all dirty work used httparty.}
|
13
|
+
spec.homepage = "http://delta-zet.com"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "pry-remote"
|
24
|
+
spec.add_dependency "httparty"
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: oceanarium
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Valdos Sine
|
8
|
+
- Delta-Zet LLC
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-07-04 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.3'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.3'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: pry-remote
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: httparty
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
description: Digital Ocean API wrapper for Ruby/Rails applications
|
71
|
+
email:
|
72
|
+
- iam@toofat.ru
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- .gitignore
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- lib/oceanarium.rb
|
83
|
+
- lib/oceanarium/config.rb
|
84
|
+
- lib/oceanarium/request.rb
|
85
|
+
- lib/oceanarium/resources.rb
|
86
|
+
- lib/oceanarium/resources/domain.rb
|
87
|
+
- lib/oceanarium/resources/droplet.rb
|
88
|
+
- lib/oceanarium/resources/image.rb
|
89
|
+
- lib/oceanarium/resources/lists.rb
|
90
|
+
- lib/oceanarium/resources/record.rb
|
91
|
+
- lib/oceanarium/resources/sshkey.rb
|
92
|
+
- lib/oceanarium/version.rb
|
93
|
+
- oceanarium.gemspec
|
94
|
+
homepage: http://delta-zet.com
|
95
|
+
licenses:
|
96
|
+
- MIT
|
97
|
+
metadata: {}
|
98
|
+
post_install_message:
|
99
|
+
rdoc_options: []
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
requirements: []
|
113
|
+
rubyforge_project:
|
114
|
+
rubygems_version: 2.0.3
|
115
|
+
signing_key:
|
116
|
+
specification_version: 4
|
117
|
+
summary: Smart and tiny Digital Ocean API wrapper for Ruby/Rails. For all dirty work
|
118
|
+
used httparty.
|
119
|
+
test_files: []
|