activerecord-postgres-json 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/activerecord-postgres-json.gemspec +3 -3
- data/lib/activerecord-postgres-json.rb +3 -1
- data/lib/activerecord-postgres-json/activerecord.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c71a68110de2bf3c602f747ca916b1b9e0f92a33
|
4
|
+
data.tar.gz: 1e6fa6249409434a3d5bf925b91ca3108f7f9a5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6b67d07b0e864521f2bf846964b6789a3215da69335b464b4a96a8fc7395b020db66410603708f7e78251a8815eb31b7f71ce1991688048285e2142016962ea
|
7
|
+
data.tar.gz: 16489382cf0a757c2bdc999cc3744e453a261a468fe9dff5dac52131f4f606c2981a0a38c8ef058c45a1980233be0967aec27c955a4491d515ed238b83e047d5
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: activerecord-postgres-json 0.1.
|
5
|
+
# stub: activerecord-postgres-json 0.1.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "activerecord-postgres-json"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Roman Shterenzon"]
|
14
|
-
s.date = "2014-06-
|
14
|
+
s.date = "2014-06-11"
|
15
15
|
s.description = "Active Record support for PostgreSQL JSON type"
|
16
16
|
s.email = "romanbsd@yahoo.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -13,6 +13,20 @@ module ActiveRecord
|
|
13
13
|
end
|
14
14
|
|
15
15
|
alias_method_chain :simplified_type, :json
|
16
|
+
|
17
|
+
class << self
|
18
|
+
def extract_value_from_default_with_json(default)
|
19
|
+
case default
|
20
|
+
when "'{}'::json"
|
21
|
+
{}
|
22
|
+
when "'[]'::json"
|
23
|
+
[]
|
24
|
+
else
|
25
|
+
extract_value_from_default_without_json(default)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
alias_method_chain :extract_value_from_default, :json
|
29
|
+
end
|
16
30
|
end
|
17
31
|
end
|
18
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-postgres-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Shterenzon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|