aptible-api 0.5.2 → 0.5.3

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: 7af9e26434142d29a9d60a3b2fb6180183b11699
4
- data.tar.gz: b01f75ca042fceab192717190c9933edc4c586de
3
+ metadata.gz: 9947637e8d473aeb14e1d92072c2af99946f3ad0
4
+ data.tar.gz: 9b123528db9fc6b99da8b351e7326292d9dd5bdd
5
5
  SHA512:
6
- metadata.gz: d222f0a47825c0e5e7a63573b1cbb64d371e3bde7ec12e26625cf0b611707c09154e7bd744121310d50acf2108b842fb3e1feb62d07ac370d032060fbdd2d5bf
7
- data.tar.gz: bcf71e5f820e0f143d9a0cfd9a29ea45931129b9ec72148701b78878ca83df0ebf9672ba6618ac6111ee0a3a99effb2db50dc235dca42545c47ca8624cbf29a2
6
+ metadata.gz: 825469592ce3e4f67bb8d45db134cd295d8a69cfd5a8743c28e2c3ad4c6c38f58a6cb4a3372e8e5115a8e2073ae940cb17d2b01a4b3b9573f9e6ef4e0f2b30f8
7
+ data.tar.gz: 3cd485e58b37eb129345465347c40dd3c6f308181d4d65bfc3e84586e1223cdea6020657930f95c94b303a480ac4a8ccf5b1d32d71ba8c6ab870973dbae395d9
data/aptible-api.gemspec CHANGED
@@ -20,11 +20,11 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'aptible-resource', '>= 0.2.1'
23
+ spec.add_dependency 'aptible-auth', '>= 0.5.0'
23
24
  spec.add_dependency 'gem_config'
24
25
 
25
26
  spec.add_development_dependency 'bundler', '~> 1.3'
26
27
  spec.add_development_dependency 'aptible-tasks', '>= 0.2.0'
27
- spec.add_development_dependency 'aptible-auth', '>= 0.5.0'
28
28
  spec.add_development_dependency 'activesupport'
29
29
  spec.add_development_dependency 'rake'
30
30
  spec.add_development_dependency 'rspec', '~> 2.0'
data/lib/aptible/api.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'aptible/auth'
1
2
  require 'gem_config'
2
3
 
3
4
  module Aptible
@@ -1,3 +1,5 @@
1
+ require 'aptible/auth'
2
+
1
3
  module Aptible
2
4
  module Api
3
5
  class Account < Resource
@@ -28,8 +30,6 @@ module Aptible
28
30
  end
29
31
 
30
32
  def organization
31
- require 'aptible/auth'
32
-
33
33
  auth = Aptible::Auth::Organization.new(token: token, headers: headers)
34
34
  auth.find_by_url(links['organization'].href)
35
35
  end
@@ -1,3 +1,5 @@
1
+ require 'aptible/auth'
2
+
1
3
  module Aptible
2
4
  module Api
3
5
  class Operation < Resource
@@ -16,8 +18,6 @@ module Aptible
16
18
  field :updated_at, type: Time
17
19
 
18
20
  def user
19
- require 'aptible/auth'
20
-
21
21
  auth = Aptible::Auth::User.new(token: token, headers: headers)
22
22
  auth.find_by_url(links['user'].href)
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module Api
3
- VERSION = '0.5.2'
3
+ VERSION = '0.5.3'
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ describe Aptible::Api do
11
11
 
12
12
  pending 'uses ENV["APTIBLE_API_ROOT_URL"] if defined' do
13
13
  config = described_class.configuration
14
- set_env 'APTIBLE_API_ROOT_URL', 'http://foobar.com' do
14
+ with_env 'APTIBLE_API_ROOT_URL', 'http://foobar.com' do
15
15
  config.reset
16
16
  expect(config.root_url).to eq 'http://foobar.com'
17
17
  end
@@ -1,6 +1,6 @@
1
- def set_env(*args, &block)
1
+ def with_env(*args)
2
2
  hash = args.first.is_a?(Hash) ? args.first : Hash[*args]
3
- old_values = Hash[hash.map { |k, v| [k, ENV[k]] }]
3
+ old_values = Hash[hash.map { |k, _| [k, ENV[k]] }]
4
4
  begin
5
5
  hash.each { |k, v| ENV[k] = v }
6
6
  yield
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-resource
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.2.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: aptible-auth
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.5.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.5.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: gem_config
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +80,6 @@ dependencies:
66
80
  - - '>='
67
81
  - !ruby/object:Gem::Version
68
82
  version: 0.2.0
69
- - !ruby/object:Gem::Dependency
70
- name: aptible-auth
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: 0.5.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: 0.5.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: activesupport
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -185,7 +185,7 @@ files:
185
185
  - spec/aptible/api/agent_spec.rb
186
186
  - spec/aptible/api/resource_spec.rb
187
187
  - spec/aptible/api_spec.rb
188
- - spec/shared/set_env.rb
188
+ - spec/shared/with_env.rb
189
189
  - spec/spec_helper.rb
190
190
  homepage: https://github.com/aptible/aptible-api
191
191
  licenses:
@@ -215,5 +215,5 @@ test_files:
215
215
  - spec/aptible/api/agent_spec.rb
216
216
  - spec/aptible/api/resource_spec.rb
217
217
  - spec/aptible/api_spec.rb
218
- - spec/shared/set_env.rb
218
+ - spec/shared/with_env.rb
219
219
  - spec/spec_helper.rb