kubeclient 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kubeclient might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbba708e9cb9c3075c713fbbeb857f1d40862e74
4
- data.tar.gz: 6ae82fd5ed84ca5c8cb0cf4b5dc75f469673b8b7
3
+ metadata.gz: 9172bf5d56e7437d23e93ba1e6280af446e87282
4
+ data.tar.gz: 271517b25926b62222e193e3d722f18a24e1df6b
5
5
  SHA512:
6
- metadata.gz: 27c5a0e7b4ffb85ba71fe6e5400dd4a31daba72dbe4448df99477268f73d1903bdcd6ff57f34cf04ec896849286e3cc7cc552833e5d3e376f97cde78469491f6
7
- data.tar.gz: 40c6d213114e6e07605132dc8e012886c68e191319e08c5ad9016a18494f0e9f474e32fa02ed0dc839c9ede26fbb505b4338f4bfa4a5ad93ea95914fc2f2f790
6
+ metadata.gz: 3dca5eb07416265317c30e4e2e35578bdb1d2dc7ea2971df475e295b685dc935e82ea643fdfa503b0d3f30fb0dc9ce0f1983f1bdbe59c912fc097680de52e560
7
+ data.tar.gz: 5bdc07a1ed661cb51c5cdf37ef7e410416f44a319707654660d639ab64b1d5c462d483ae4f0152471a9e7be08b11a3151761238cb66b346635f3d9be4a6202a2
@@ -2,15 +2,9 @@ require 'kubeclient/version'
2
2
  require 'json'
3
3
  require 'rest-client'
4
4
  require 'active_support/inflector'
5
- require 'kubeclient/event'
6
- require 'kubeclient/pod'
7
- require 'kubeclient/node'
8
- require 'kubeclient/service'
9
- require 'kubeclient/replication_controller'
10
- require 'kubeclient/endpoint'
11
5
  require 'kubeclient/entity_list'
12
6
  require 'kubeclient/kube_exception'
13
- require 'kubeclient/watch'
7
+ require 'kubeclient/watch_notice'
14
8
  require 'kubeclient/watch_stream'
15
9
 
16
10
  module Kubeclient
@@ -21,6 +15,15 @@ module Kubeclient
21
15
  ENTITY_TYPES = %w(Pod Service ReplicationController Node Event Endpoint
22
16
  Namespace)
23
17
 
18
+ # Dynamically creating classes definitions (class Pod, class Service, etc.),
19
+ # The classes are extending RecursiveOpenStruct.
20
+ # This cancels the need to define the classes
21
+ # manually on every new entity addition,
22
+ # and especially since currently the class body is empty
23
+ ENTITY_TYPES.each do |entity_type|
24
+ Object.const_set(entity_type, Class.new(RecursiveOpenStruct))
25
+ end
26
+
24
27
  def initialize(uri, version)
25
28
  @api_endpoint = (uri.is_a? URI) ? uri : URI.parse(uri)
26
29
  @api_endpoint.merge!(File.join(@api_endpoint.path, version))
@@ -1,4 +1,4 @@
1
1
  # Kubernetes REST-API Client
2
2
  module Kubeclient
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
@@ -1,6 +1,5 @@
1
1
  require 'minitest/autorun'
2
2
  require 'webmock/minitest'
3
- require 'kubeclient/namespace'
4
3
  require 'json'
5
4
  require './lib/kubeclient'
6
5
 
@@ -1,6 +1,5 @@
1
1
  require 'minitest/autorun'
2
2
  require 'webmock/minitest'
3
- require 'kubeclient/node'
4
3
  require 'json'
5
4
  require './lib/kubeclient'
6
5
 
@@ -1,6 +1,5 @@
1
1
  require 'minitest/autorun'
2
2
  require 'webmock/minitest'
3
- require 'kubeclient/pod'
4
3
  require 'json'
5
4
  require './lib/kubeclient'
6
5
 
@@ -1,7 +1,6 @@
1
1
  require 'minitest/autorun'
2
2
  require 'webmock/minitest'
3
3
  require './lib/kubeclient'
4
- require 'kubeclient/replication_controller'
5
4
  require 'json'
6
5
 
7
6
  # Replication Controller entity tests
@@ -1,6 +1,5 @@
1
1
  require 'minitest/autorun'
2
2
  require 'webmock/minitest'
3
- require 'kubeclient/service'
4
3
  require 'json'
5
4
  require './lib/kubeclient'
6
5
 
@@ -1,6 +1,5 @@
1
1
  require 'minitest/autorun'
2
2
  require 'webmock/minitest'
3
- require 'kubeclient/node'
4
3
  require 'json'
5
4
  require './lib/kubeclient'
6
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kubeclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alissa Bonas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-04 00:00:00.000000000 Z
11
+ date: 2015-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -152,17 +152,10 @@ files:
152
152
  - Rakefile
153
153
  - kubeclient.gemspec
154
154
  - lib/kubeclient.rb
155
- - lib/kubeclient/endpoint.rb
156
155
  - lib/kubeclient/entity_list.rb
157
- - lib/kubeclient/event.rb
158
156
  - lib/kubeclient/kube_exception.rb
159
- - lib/kubeclient/namespace.rb
160
- - lib/kubeclient/node.rb
161
- - lib/kubeclient/pod.rb
162
- - lib/kubeclient/replication_controller.rb
163
- - lib/kubeclient/service.rb
164
157
  - lib/kubeclient/version.rb
165
- - lib/kubeclient/watch.rb
158
+ - lib/kubeclient/watch_notice.rb
166
159
  - lib/kubeclient/watch_stream.rb
167
160
  - test/json/endpoint_list_b3.json
168
161
  - test/json/entity_list_b1.json
@@ -1,4 +0,0 @@
1
- require 'recursive_open_struct'
2
-
3
- class Endpoint < RecursiveOpenStruct
4
- end
@@ -1,4 +0,0 @@
1
- require 'recursive_open_struct'
2
-
3
- class Event < RecursiveOpenStruct
4
- end
@@ -1,4 +0,0 @@
1
- require 'recursive_open_struct'
2
-
3
- class Namespace < RecursiveOpenStruct
4
- end
@@ -1,4 +0,0 @@
1
- require 'recursive_open_struct'
2
-
3
- class Node < RecursiveOpenStruct
4
- end
@@ -1,4 +0,0 @@
1
- require 'recursive_open_struct'
2
-
3
- class Pod < RecursiveOpenStruct
4
- end
@@ -1,4 +0,0 @@
1
- require 'recursive_open_struct'
2
-
3
- class ReplicationController < RecursiveOpenStruct
4
- end
@@ -1,4 +0,0 @@
1
- require 'recursive_open_struct'
2
-
3
- class Service < RecursiveOpenStruct
4
- end