vuderacha-activekv 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/activekv/base.rb +6 -0
  2. metadata +1 -1
data/lib/activekv/base.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'rubygems'
2
+ require 'json' rescue nil # This prevents the json gem loading afterwards and messing up the JSON serialisation
1
3
  require 'activesupport'
2
4
 
3
5
  module ActiveKV
@@ -9,6 +11,10 @@ module ActiveKV
9
11
  apply_hash!(config)
10
12
  end
11
13
 
14
+ def to_json(options = {})
15
+ ActiveSupport::JSON.encode(instance_values, options)
16
+ end
17
+
12
18
  # Configures the ActiveKV support with the given configuration file
13
19
  def self.configure(config_file)
14
20
  # Determine our environment
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vuderacha-activekv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Jones