barge 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ee7f58932c6fee20360c6937a8c8738b3b1200b
4
- data.tar.gz: 0f825d3a91b3fca450f7d3175b4eac647282ed75
3
+ metadata.gz: a6dd8b82beeebd5c15f3ed1bd895b94d2f532fae
4
+ data.tar.gz: 91a31a6bb2f8dc9da9de427759452bb92b695c12
5
5
  SHA512:
6
- metadata.gz: b06032d698df9aabc99379f58dcdb97a0c083c0358b792c1aa402f22854f5b31579564ddb7439211b568983955a287bd3082b23b8202a5af5cfbc1d6d0c81d7b
7
- data.tar.gz: aaf2e91f3c4048dd8fd04080fc69cf0a701abacd52c257ca7de1b5a5655a67e81060e5a62f1585147b534d4c34d7dbafbf241cff49216386622175ad254bc8a5
6
+ metadata.gz: 1b7300265b5b0f8cb5fafa1b50a6906892a72eb91085e28d412a515b4a1b3dd66e0e5e80d09ac0866ac3890363b3053b1aefbbdee92893e4a1f4d6429bb06cb7
7
+ data.tar.gz: 01fda3a760269bbc0d8c7eb1c9e2987cd7e3a5e7139de15c2d033d1da1febdc3a9d3c34ce4be43e8fec465edd75fabb27e73d8af57c4d4364c423c4ec3f529a3
data/README.md CHANGED
@@ -14,7 +14,7 @@ Barge
14
14
  [gemnasium]: https://gemnasium.com/boats/barge
15
15
 
16
16
  Ruby library for [version 2 of DigitalOcean's
17
- API](https://github.com/digitaloceancloud/api-v2-docs).
17
+ API](https://developers.digitalocean.com/v2/).
18
18
 
19
19
  **Please note that version 2 of DigitalOcean's API is in beta, and is still
20
20
  being developed. Everything is subject to change.**
@@ -77,6 +77,21 @@ You can use `success?` to check if a successful HTTP status code was returned:
77
77
  barge.droplet.create(options).success? # => true
78
78
  ```
79
79
 
80
+ Action
81
+ ------
82
+
83
+ ### Show all actions
84
+
85
+ ``` ruby
86
+ barge.action.all
87
+ ```
88
+
89
+ ### Show action
90
+
91
+ ``` ruby
92
+ barge.action.show(action_id)
93
+ ```
94
+
80
95
  Droplet
81
96
  -------
82
97
 
data/lib/barge/client.rb CHANGED
@@ -5,6 +5,7 @@ module Barge
5
5
  class Client
6
6
  attr_accessor :access_token
7
7
 
8
+ attr_reader :action
8
9
  attr_reader :domain
9
10
  attr_reader :droplet
10
11
  attr_reader :image
@@ -26,6 +27,7 @@ module Barge
26
27
  private
27
28
 
28
29
  def initialize_resources
30
+ @action = Resource::Action.new(faraday)
29
31
  @domain = Resource::Domain.new(faraday)
30
32
  @droplet = Resource::Droplet.new(faraday)
31
33
  @image = Resource::Image.new(faraday)
@@ -0,0 +1,15 @@
1
+ module Barge
2
+ module Resource
3
+ class Action
4
+ include Resource::Base
5
+
6
+ def all
7
+ get('actions')
8
+ end
9
+
10
+ def show(action_id)
11
+ get("actions/#{action_id}")
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,6 @@
1
1
  require 'barge/resource/base'
2
2
 
3
+ require 'barge/resource/action'
3
4
  require 'barge/resource/domain'
4
5
  require 'barge/resource/droplet'
5
6
  require 'barge/resource/image'
data/lib/barge/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Barge
2
2
  class Version
3
3
  MAJOR = 0
4
- MINOR = 3
4
+ MINOR = 4
5
5
  PATCH = 0
6
6
 
7
7
  def self.to_s
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Ørjan Blom"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-10 00:00:00.000000000 Z
11
+ date: 2014-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -65,6 +65,7 @@ files:
65
65
  - lib/barge.rb
66
66
  - lib/barge/client.rb
67
67
  - lib/barge/resource.rb
68
+ - lib/barge/resource/action.rb
68
69
  - lib/barge/resource/base.rb
69
70
  - lib/barge/resource/domain.rb
70
71
  - lib/barge/resource/droplet.rb