Skip to content

Commit

Permalink
Use ActiveModel Boolean Parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmb committed Dec 15, 2017
1 parent 86c2e3a commit 79c6ff9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions kubernetes-deploy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.required_ruby_version = '>= 2.3.0'
spec.add_dependency "activerecord", ">= 5.0"
spec.add_dependency "activesupport", ">= 4.2"
spec.add_dependency "kubeclient", "~> 2.5.1"
spec.add_dependency "rest-client", ">= 1.7" # Minimum required by kubeclient. Remove when kubeclient releases v3.0.
Expand Down
6 changes: 3 additions & 3 deletions lib/kubernetes-deploy/discoverable_resource.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true
require 'kubernetes-deploy/kubernetes_resource'
require 'kubernetes-deploy/kubeclient_builder'
require "pry"
require 'jsonpath'
require "active_record"
require "jsonpath"

module KubernetesDeploy
class DiscoverableResource < KubernetesResource
Expand Down Expand Up @@ -138,7 +138,7 @@ def self.add_resource(resource_class)
end

def self.parse_bool(value)
value.to_s == "true" # value could be nil
ActiveRecord::Type::Boolean.new.cast(value)
end

def self.parse_timeout(type, timeout)
Expand Down

0 comments on commit 79c6ff9

Please sign in to comment.