tag_columns 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: defa7c70b8eab8d413f513c5b9941b1e5511ae49
4
- data.tar.gz: e4beea230867f5bacb9c7ead7ab372bc323ee18c
3
+ metadata.gz: 24f11ec231a99f562784740d0fac6e7cff7c5d83
4
+ data.tar.gz: 07711c4b518ebc23d2204745a10612f4b2ffa7a5
5
5
  SHA512:
6
- metadata.gz: cc061350f163cb0b9ba87ac398c48dbbf676acf6e7d8dd737e71848d3ed7e6072aa107d4c1c4990c90d150f9af6999f5b50c2481d1caaf1ec5fa9e402c8b7bfe
7
- data.tar.gz: 61f90575de2bf67f1d252bf4b6f94d109c504434a03c1f8ec5a345e8eb53f6fc9f2780204105970a6a028e7cf9d008f3e79c07e7d466cef178f500fb241bfbec
6
+ metadata.gz: 31d75863702077cfd2d87cd1ebd96feaab89beafbc3057b527196c8f3c1a2f106de80deb9c0a79581ad28df849a0bf3d2054f0a10178c466a877949718264449
7
+ data.tar.gz: 4bc98eab66d115fb8caf0f91c9a892d1c539f28e7f0c9a7b22763d2948b3bd01940bd1c4cdfff76a7f43f08cfc1ddd6156ba353cacc44001a76457089f2b04d4
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tag_columns (0.1.4)
4
+ tag_columns (0.1.5)
5
5
  activesupport
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (5.1.2)
10
+ activesupport (5.1.4)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (~> 0.7)
13
13
  minitest (~> 5.1)
@@ -89,4 +89,4 @@ DEPENDENCIES
89
89
  tag_columns!
90
90
 
91
91
  BUNDLED WITH
92
- 1.14.6
92
+ 1.15.4
data/README.md CHANGED
@@ -33,7 +33,7 @@ gem "tag_columns"
33
33
  # db/migrate/TIMESTAMP_add_groups_to_user.rb
34
34
  class AddGroupsToUser < ActiveRecord::Migration[5.0]
35
35
  def change
36
- add_column :users, :groups, :string, array: true, default: "{}", null: false
36
+ add_column :users, :groups, :string, array: true, default: [], null: false
37
37
  add_index :users, :groups, using: "gin"
38
38
  end
39
39
  end
data/lib/tag_columns.rb CHANGED
@@ -35,10 +35,10 @@ module TagColumns
35
35
  result.values.flatten
36
36
  end
37
37
 
38
- scope :"with_any_#{method_name}", ->(*tags) { where "#{quoted_column_name} && ARRAY[?]::varchar[]", tag_columns_sanitize_list(tags) }
39
- scope :"with_all_#{method_name}", ->(*tags) { where "#{quoted_column_name} @> ARRAY[?]::varchar[]", tag_columns_sanitize_list(tags) }
40
- scope :"without_any_#{method_name}", ->(*tags) { where.not "#{quoted_column_name} && ARRAY[?]::varchar[]", tag_columns_sanitize_list(tags) }
41
- scope :"without_all_#{method_name}", ->(*tags) { where.not "#{quoted_column_name} @> ARRAY[?]::varchar[]", tag_columns_sanitize_list(tags) }
38
+ scope :"with_any_#{method_name}", ->(*tags) { where "#{quoted_column_name}::text[] && ARRAY[?]::text[]", tag_columns_sanitize_list(tags) }
39
+ scope :"with_all_#{method_name}", ->(*tags) { where "#{quoted_column_name}::text[] @> ARRAY[?]::text[]", tag_columns_sanitize_list(tags) }
40
+ scope :"without_any_#{method_name}", ->(*tags) { where.not "#{quoted_column_name}::text[] && ARRAY[?]::text[]", tag_columns_sanitize_list(tags) }
41
+ scope :"without_all_#{method_name}", ->(*tags) { where.not "#{quoted_column_name}::text[] @> ARRAY[?]::text[]", tag_columns_sanitize_list(tags) }
42
42
 
43
43
  before_validation Proc.new { self[column_name] = self.class.tag_columns_sanitize_list(self[column_name]) }
44
44
 
@@ -1,3 +1,3 @@
1
1
  module TagColumns
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tag_columns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-01 00:00:00.000000000 Z
11
+ date: 2017-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.6.11
120
+ rubygems_version: 2.6.13
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Fast & simple Rails ActiveRecord model tagging using PostgreSQL's Array datatype