oceanarium 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -6
- data/lib/oceanarium/resources/region.rb +2 -1
- data/lib/oceanarium/version.rb +1 -1
- data/oceanarium.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4b32f0940005c2be645d5a3d1c484bb4ccf5d1b
|
4
|
+
data.tar.gz: b0ccc326251d4aaf6745c7908e6fdd16e38ec2e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80ddc350fb123972558594b31dc1753c6c22e47854549f9b59df2f401a9d33dae5b5e5552b2c22b36222fad7527c8c4431eb80b6514065d9bd1935071a63ee4c
|
7
|
+
data.tar.gz: 488d9ebda15d936246d26378297af84842f264dbc0f6bc52e0889728821b6086465a28a569c958397370036ef2fbfcc097a0af50bf396ba96671fe7a12a2f923
|
data/README.md
CHANGED
@@ -2,27 +2,56 @@
|
|
2
2
|
|
3
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
4
|
|
5
|
-
Warning: there is much work in progress...
|
6
|
-
|
7
5
|
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
6
|
|
9
7
|
## Installation
|
10
8
|
|
11
9
|
Add this line to your application's Gemfile:
|
12
10
|
|
13
|
-
|
11
|
+
~~~ruby
|
12
|
+
gem 'oceanarium'
|
13
|
+
~~~
|
14
14
|
|
15
15
|
And then execute:
|
16
16
|
|
17
|
-
|
17
|
+
~~~bash
|
18
|
+
$ bundle
|
19
|
+
~~~
|
18
20
|
|
19
21
|
Or install it yourself as:
|
20
22
|
|
21
|
-
|
23
|
+
~~~bash
|
24
|
+
$ gem install oceanarium
|
25
|
+
~~~
|
22
26
|
|
23
27
|
## Usage
|
24
28
|
|
25
|
-
|
29
|
+
DigitalOcean uses for authentication two keys: API key and Client ID. Before any action you must provide it to current ruby process. In command line you must enter this:
|
30
|
+
|
31
|
+
~~~ruby
|
32
|
+
Oceanarium::Config.api_key = "your_api_key"
|
33
|
+
Oceanarium::Config.client_id = "your_client_id"
|
34
|
+
~~~
|
35
|
+
|
36
|
+
Now you're ready to use Digital Ocean API. If you using Oceanarium with Rails, you must add file config/initializers/oceanarium.rb with same two lines, as above.
|
37
|
+
|
38
|
+
After this, you can use any Digital Ocean API with this gem. All API callers are mnemonic, so you don't need to remember anything -- official Digital Ocean API will be your friend.
|
39
|
+
|
40
|
+
For example:
|
41
|
+
|
42
|
+
~~~ruby
|
43
|
+
Oceanarium::droplet(100500)
|
44
|
+
~~~
|
45
|
+
|
46
|
+
will return you all droplet information, and
|
47
|
+
|
48
|
+
~~~ruby
|
49
|
+
Oceanarium::droplet(100500).reboot
|
50
|
+
~~~
|
51
|
+
|
52
|
+
will reboot it.
|
53
|
+
|
54
|
+
And so on, and so on, and so on, and... read the official gem documentation at http://oceanarium.so for more verbose help.
|
26
55
|
|
27
56
|
## Contributing
|
28
57
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Oceanarium
|
2
2
|
class Region
|
3
|
-
attr_accessor :id, :name
|
3
|
+
attr_accessor :id, :name, :slug
|
4
4
|
|
5
5
|
def initialize(option, api_key, client_id)
|
6
6
|
if api_key.nil? || client_id.nil?
|
@@ -14,6 +14,7 @@ module Oceanarium
|
|
14
14
|
else
|
15
15
|
self.id = @object['id']
|
16
16
|
self.name = @object['name']
|
17
|
+
self.slug = @object['slug']
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
data/lib/oceanarium/version.rb
CHANGED
data/oceanarium.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["iam@toofat.ru"]
|
11
11
|
spec.description = %q{Digital Ocean API wrapper for Ruby/Rails applications}
|
12
12
|
spec.summary = %q{Smart and tiny Digital Ocean API wrapper for Ruby/Rails. For all dirty work used httparty.}
|
13
|
-
spec.homepage = "http://
|
13
|
+
spec.homepage = "http://oceanarium.so"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oceanarium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valdos Sine
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -92,7 +92,7 @@ files:
|
|
92
92
|
- lib/oceanarium/resources/sshkey.rb
|
93
93
|
- lib/oceanarium/version.rb
|
94
94
|
- oceanarium.gemspec
|
95
|
-
homepage: http://
|
95
|
+
homepage: http://oceanarium.so
|
96
96
|
licenses:
|
97
97
|
- MIT
|
98
98
|
metadata: {}
|