diff --git a/k8s-client.gemspec b/k8s-client.gemspec index 4b9333f..5eb92d7 100644 --- a/k8s-client.gemspec +++ b/k8s-client.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "k8s/client/version" Gem::Specification.new do |spec| - spec.name = "k8s-client" + spec.name = "k8s-client-renewed" spec.version = K8s::Client::VERSION spec.authors = ["Kontena, Inc."] spec.email = ["info@kontena.io"] @@ -21,18 +21,19 @@ Gem::Specification.new do |spec| spec.bindir = "bin" spec.executables = [] spec.require_paths = ["lib"] - spec.required_ruby_version = '~> 2.4' +# spec.required_ruby_version = '> 2.4' - spec.add_runtime_dependency "excon", "~> 0.66" - spec.add_runtime_dependency "recursive-open-struct", "~> 1.1.0" - spec.add_runtime_dependency 'hashdiff', '~> 1.0.0' - spec.add_runtime_dependency 'jsonpath', '~> 0.9.5' - spec.add_runtime_dependency "yaml-safe_load_stream", "~> 0.1" + spec.add_runtime_dependency "excon"#, "~> 0.66" + spec.add_runtime_dependency "recursive-open-struct"#, "~> 1.1.0" + spec.add_runtime_dependency 'hashdiff'#, '~> 1.0.0' + spec.add_runtime_dependency 'jsonpath'#, '~> 0.9.5' + spec.add_runtime_dependency "yaml-safe_load_stream-renewed"#, "~> 0.1" - spec.add_development_dependency "bundler", ">= 1.17", "< 3.0" - spec.add_development_dependency "rake", "~> 10.0" - spec.add_development_dependency "rspec", "~> 3.7" - spec.add_development_dependency "webmock", "~> 3.6.2" - spec.add_development_dependency "rubocop", "~> 0.59" - spec.add_development_dependency 'yajl-ruby', '~> 1.4.0' +# spec.add_development_dependency "bundler"#, ">= 1.17", "< 3.0" + spec.add_development_dependency "byebug"#, "~> 10.0" + spec.add_development_dependency "rake"#, "~> 10.0" + spec.add_development_dependency "rspec"#, "~> 3.7" + spec.add_development_dependency "webmock"#, "~> 3.6.2" + spec.add_development_dependency "rubocop"#, "~> 0.59" + spec.add_development_dependency 'yajl-ruby'#, '~> 1.4.0' end diff --git a/lib/k8s/client/version.rb b/lib/k8s/client/version.rb index 46f881a..71335b8 100644 --- a/lib/k8s/client/version.rb +++ b/lib/k8s/client/version.rb @@ -3,6 +3,6 @@ module K8s class Client # Updated on releases using semver. - VERSION = "0.10.3" + VERSION = "0.10.5-1" end end diff --git a/lib/k8s/resource.rb b/lib/k8s/resource.rb index 469f5da..c4370bd 100644 --- a/lib/k8s/resource.rb +++ b/lib/k8s/resource.rb @@ -37,14 +37,21 @@ def self.from_files(path) end end + def self.default_options + { + mutate_input_hash: false, + recurse_over_arrays: true, + preserve_original_keys: false + } + end + # @param hash [Hash] # @param recurse_over_arrays [Boolean] # @param options [Hash] see RecursiveOpenStruct#initialize - def initialize(hash, recurse_over_arrays: true, **options) + def initialize hash, options = {} super( hash.is_a?(Hash) ? hash : hash.to_h, - recurse_over_arrays: recurse_over_arrays, - **options + options ) end @@ -54,8 +61,8 @@ def <=>(other) # @param options [Hash] see Hash#to_json # @return [String] - def to_json(**options) - to_h.to_json(**options) + def to_json(options = {}) + to_h.to_json(options) end # merge in fields