Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 49 additions & 46 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
PATH
remote: .
specs:
rancher-api (0.7.0)
rancher-api (0.8.0)
faraday_middleware
faye-websocket
her (~> 0.8.1)
her (~> 0.9.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (5.0.0.1)
activesupport (= 5.0.0.1)
activesupport (5.0.0.1)
activemodel (5.1.4)
activesupport (= 5.1.4)
activesupport (5.1.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.3.8)
awesome_print (1.7.0)
byebug (6.0.0)
coderay (1.1.0)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
awesome_print (1.8.0)
byebug (9.1.0)
coderay (1.1.2)
colorize (0.8.1)
concurrent-ruby (1.0.2)
crack (0.4.2)
concurrent-ruby (1.0.5)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.2.5)
diff-lcs (1.3)
docile (1.1.5)
eventmachine (1.2.1)
faraday (0.10.0)
eventmachine (1.2.5)
faraday (0.13.1)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.1)
faraday_middleware (0.12.2)
faraday (>= 0.7.4, < 1.0)
faye-websocket (0.10.5)
faye-websocket (0.10.7)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
ffi (1.9.10)
ffi (1.9.18)
formatador (0.2.5)
guard (2.14.0)
guard (2.14.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
Expand All @@ -46,40 +47,43 @@ GEM
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.2)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
her (0.8.2)
her (0.9.0)
activemodel (>= 3.0.0, <= 6.0.0)
activesupport (>= 3.0.0, <= 6.0.0)
faraday (>= 0.8, < 1.0)
multi_json (~> 1.7)
httplog (0.3.3)
httplog (1.0.0)
colorize
i18n (0.7.0)
json (1.8.3)
rack
i18n (0.9.1)
concurrent-ruby (~> 1.0)
json (2.1.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
lumberjack (1.0.10)
method_source (0.8.2)
minitest (5.10.1)
multi_json (1.12.1)
lumberjack (1.0.12)
method_source (0.9.0)
minitest (5.10.3)
multi_json (1.12.2)
multipart-post (2.0.0)
nenv (0.3.0)
notiffany (0.1.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.10.1)
pry (0.11.2)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rake (10.4.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
method_source (~> 0.9.0)
public_suffix (3.0.0)
rack (2.0.3)
rake (10.5.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
Expand All @@ -93,24 +97,23 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
ruby_dep (1.3.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
shellany (0.0.1)
simplecov (0.12.0)
simplecov (0.15.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
slop (3.6.0)
thor (0.19.1)
thread_safe (0.3.5)
tzinfo (1.2.2)
simplecov-html (0.10.2)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.4)
thread_safe (~> 0.1)
vcr (2.9.3)
vcr (3.0.3)
webmock (1.21.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
websocket-driver (0.6.4)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

Expand All @@ -128,8 +131,8 @@ DEPENDENCIES
rancher-api!
rspec (~> 3.3.0)
simplecov
vcr (= 2.9.3)
vcr (= 3.0.3)
webmock (= 1.21.0)

BUNDLED WITH
1.12.5
1.15.4
4 changes: 4 additions & 0 deletions lib/rancher/api/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
require 'rancher/api/models/ipaddress'
require 'rancher/api/models/registry'
require 'rancher/api/models/registrycredential'
require 'rancher/api/models/stack'
require 'rancher/api/models/auditlog'
require 'rancher/api/models/account'
require 'rancher/api/models/credential'
9 changes: 9 additions & 0 deletions lib/rancher/api/models/account.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Rancher
module Api
class Account
include Her::Model
include Helpers::Model

end
end
end
10 changes: 10 additions & 0 deletions lib/rancher/api/models/auditlog.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module Rancher
module Api
class Auditlog
include Her::Model
include Helpers::Model

attributes :resourceId
end
end
end
8 changes: 8 additions & 0 deletions lib/rancher/api/models/credential.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module Rancher
module Api
class Credential
include Her::Model
include Helpers::Model
end
end
end
1 change: 1 addition & 0 deletions lib/rancher/api/models/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Environment

belongs_to :project
has_many :services
has_many :hosts
end
end
end
1 change: 1 addition & 0 deletions lib/rancher/api/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Project
has_many :hosts
has_many :environments
has_many :services
has_many :stacks

class << self
def find_by_name(name:)
Expand Down
11 changes: 11 additions & 0 deletions lib/rancher/api/models/stack.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module Rancher
module Api
class Stack
include Her::Model
include Helpers::Model

belongs_to :project, foreign_key: :accountId
has_many :services
end
end
end
2 changes: 1 addition & 1 deletion lib/rancher/api/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Rancher
module Api
VERSION = '0.7.0'.freeze
VERSION = '0.8.0'.freeze
end
end
4 changes: 2 additions & 2 deletions rancher-api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_dependency 'her', '~> 0.8.1'
spec.add_dependency 'her', '~> 0.9.0'
spec.add_dependency 'faye-websocket'
spec.add_dependency 'faraday_middleware'

Expand All @@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry'
spec.add_development_dependency 'byebug'
spec.add_development_dependency 'webmock', '1.21.0'
spec.add_development_dependency 'vcr', '2.9.3'
spec.add_development_dependency 'vcr', '3.0.3'
spec.add_development_dependency 'awesome_print'
spec.add_development_dependency 'guard-rspec'
spec.add_development_dependency 'simplecov'
Expand Down
4 changes: 2 additions & 2 deletions spec/rancher/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
context '#configure' do
before do
subject.configure do |config|
config.url = 'test.test'
config.url = 'http://test.test'
end
end

it 'should keep configuration instance' do
expect(subject.configuration.url).to eq('test.test')
expect(subject.configuration.url).to eq('http://test.test')
end

context '#reset' do
Expand Down