lib/ruote/storage/fs_storage.rb in ruote-2.1.1 vs lib/ruote/storage/fs_storage.rb in ruote-2.1.2

- old
+ new

@@ -20,11 +20,15 @@ # THE SOFTWARE. # # Made in Japan. #++ -require 'yajl' rescue require 'json' +begin + require 'yajl' +rescue LoadError + require 'json' +end # gem install yajl-ruby OR json OR json_pure OR json-jruby require 'rufus/json' Rufus::Json.detect_backend @@ -48,10 +52,10 @@ @cloche.put(@options.merge('type' => 'configurations', '_id' => 'engine')) end def put (doc, opts={}) - @cloche.put(doc.merge!('put_at' => Ruote.now_to_utc_s)) + @cloche.put(doc.merge!('put_at' => Ruote.now_to_utc_s), opts) end def get (type, key) @cloche.get(type, key)