activerecord-postgres-json 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c71a68110de2bf3c602f747ca916b1b9e0f92a33
4
- data.tar.gz: 1e6fa6249409434a3d5bf925b91ca3108f7f9a5d
3
+ metadata.gz: 805b94f4d910fc64b531ccfc98bf0ba9394d5b59
4
+ data.tar.gz: b6615bedfb5ba1c479dfe16058ee7ff0ce070508
5
5
  SHA512:
6
- metadata.gz: a6b67d07b0e864521f2bf846964b6789a3215da69335b464b4a96a8fc7395b020db66410603708f7e78251a8815eb31b7f71ce1991688048285e2142016962ea
7
- data.tar.gz: 16489382cf0a757c2bdc999cc3744e453a261a468fe9dff5dac52131f4f606c2981a0a38c8ef058c45a1980233be0967aec27c955a4491d515ed238b83e047d5
6
+ metadata.gz: ca014d4c22084bcd77590f5013c7a306cfc300810da5ad3fa09d2a69c741e7bf8cc40d2312698042dc5d961786b5d6ff514423bb451011eee00ce7f4529176f7
7
+ data.tar.gz: 006e6e22717445da67a7f5422bc5a82a1da5b789f530983f29ed58fe02f236a70e053f03aa875c74733071fc5911c17e7bcc2b085bbe3398e0b3dc48b187ede9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -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.1 ruby lib
5
+ # stub: activerecord-postgres-json 0.1.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "activerecord-postgres-json"
9
- s.version = "0.1.1"
9
+ s.version = "0.1.2"
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-11"
14
+ s.date = "2014-06-13"
15
15
  s.description = "Active Record support for PostgreSQL JSON type"
16
16
  s.email = "romanbsd@yahoo.com"
17
17
  s.extra_rdoc_files = [
@@ -18,9 +18,9 @@ module ActiveRecord
18
18
  def extract_value_from_default_with_json(default)
19
19
  case default
20
20
  when "'{}'::json"
21
- {}
21
+ '{}'
22
22
  when "'[]'::json"
23
- []
23
+ '[]'
24
24
  else
25
25
  extract_value_from_default_without_json(default)
26
26
  end
@@ -28,37 +28,36 @@ module ActiveRecord
28
28
  alias_method_chain :extract_value_from_default, :json
29
29
  end
30
30
  end
31
- end
32
31
 
33
- class TableDefinition
32
+ class TableDefinition
33
+
34
+ # Adds json type for migrations. So you can add columns to a table like:
35
+ # create_table :people do |t|
36
+ # ...
37
+ # t.json :info
38
+ # ...
39
+ # end
40
+ def json(*args)
41
+ options = args.extract_options!
42
+ column_names = args
43
+ column_names.each { |name| column(name, 'json', options) }
44
+ end
34
45
 
35
- # Adds json type for migrations. So you can add columns to a table like:
36
- # create_table :people do |t|
37
- # ...
38
- # t.json :info
39
- # ...
40
- # end
41
- def json(*args)
42
- options = args.extract_options!
43
- column_names = args
44
- column_names.each { |name| column(name, 'json', options) }
45
46
  end
46
47
 
47
- end
48
-
49
- class Table
50
-
51
- # Adds json type for migrations. So you can add columns to a table like:
52
- # change_table :people do |t|
53
- # ...
54
- # t.json :info
55
- # ...
56
- # end
57
- def json(*args)
58
- options = args.extract_options!
59
- column_names = args
60
- column_names.each { |name| column(name, 'json', options) }
48
+ class Table
49
+
50
+ # Adds json type for migrations. So you can add columns to a table like:
51
+ # change_table :people do |t|
52
+ # ...
53
+ # t.json :info
54
+ # ...
55
+ # end
56
+ def json(*args)
57
+ options = args.extract_options!
58
+ column_names = args
59
+ column_names.each { |name| column(name, 'json', options) }
60
+ end
61
61
  end
62
62
  end
63
-
64
63
  end
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.1
4
+ version: 0.1.2
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 00:00:00.000000000 Z
11
+ date: 2014-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord