lib/gush/configuration.rb in gush-0.0.1 vs lib/gush/configuration.rb in gush-0.1

- old
+ new

@@ -3,11 +3,11 @@ module Gush class Configuration attr_accessor :concurrency, :namespace, :redis_url, :environment def self.from_json(json) - new(Yajl::Parser.parse(json, symbolize_keys: true)) + new(Gush::JSON.decode(json, symbolize_keys: true)) end def initialize(hash = {}) self.concurrency = hash.fetch(:concurrency, 5) self.namespace = hash.fetch(:namespace, 'gush') @@ -19,24 +19,22 @@ def gushfile=(path) @gushfile = Pathname(path) end def gushfile - raise Thor::Error, "#{@gushfile} not found, please add it to your project".colorize(:red) unless @gushfile.exist? @gushfile.realpath end def to_hash { concurrency: concurrency, namespace: namespace, redis_url: redis_url, - environment: environment, - gushfile: gushfile.to_path + environment: environment } end def to_json - Yajl::Encoder.new.encode(to_hash) + Gush::JSON.encode(to_hash) end end end