pg_tags_on 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -2
- data/LICENSE.txt +1 -1
- data/README.md +22 -16
- data/lib/pg_tags_on/repositories/array_jsonb_repository.rb +14 -8
- data/lib/pg_tags_on/repositories/array_repository.rb +44 -12
- data/lib/pg_tags_on/version.rb +1 -1
- metadata +17 -133
- data/.gitignore +0 -12
- data/.rspec +0 -3
- data/.rubocop.yml +0 -9
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -91
- data/Rakefile +0 -16
- data/bin/console +0 -16
- data/bin/setup +0 -8
- data/pg_tags_on.gemspec +0 -38
- data/spec/array_integers/records_spec.rb +0 -47
- data/spec/array_integers/tag_ops_spec.rb +0 -65
- data/spec/array_integers/taggings_spec.rb +0 -27
- data/spec/array_integers/tags_spec.rb +0 -53
- data/spec/array_jsonb/records_spec.rb +0 -89
- data/spec/array_jsonb/tag_ops_spec.rb +0 -115
- data/spec/array_jsonb/taggings_spec.rb +0 -27
- data/spec/array_jsonb/tags_spec.rb +0 -41
- data/spec/array_strings/records_spec.rb +0 -61
- data/spec/array_strings/tag_ops_spec.rb +0 -65
- data/spec/array_strings/taggings_spec.rb +0 -27
- data/spec/array_strings/tags_spec.rb +0 -54
- data/spec/config/database.yml +0 -6
- data/spec/configuration_spec.rb +0 -48
- data/spec/helpers/database_helpers.rb +0 -46
- data/spec/spec_helper.rb +0 -39
- data/spec/support/factory.rb +0 -47
- data/spec/tags_query_spec.rb +0 -31
- data/spec/validator_spec.rb +0 -40
- data/tasks/benchmark.rake +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aac909ac252ee49fd469857036866fb22fbc78db87e19f84f8448637a780af6c
|
4
|
+
data.tar.gz: 4ba45da54dc2782a11ce1cb67b5e61077447f544fcac29c0620c4e261d572ee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19090081b0fe790204a5384bc85c9e90d29ea824eeb0ace2b103e6a68010379f65fd05e0deef79474a7bbfaa6fdb01b59aaf62d151af2f48317f502a70b43a4c
|
7
|
+
data.tar.gz: 0d2da6a30730fc639b915ceaf88a47bc6219d9ef111188a8f935f39aae936f6afbb36afbbef624ba6fb4b7f35eede5c89c3d0b3b917e526794c73cc16fa988a0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
1
|
+
## 0.1.0 ( 2020-03-11 ) ##
|
2
2
|
|
3
|
-
First release
|
3
|
+
* First release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -42,7 +42,7 @@ Or install it yourself as:
|
|
42
42
|
## Usage
|
43
43
|
### ActiveRecord model setup
|
44
44
|
|
45
|
-
One or multiple columns
|
45
|
+
One or multiple columns can be specified:
|
46
46
|
|
47
47
|
```ruby
|
48
48
|
class Entity < ActiveRecord::Base
|
@@ -51,26 +51,26 @@ class Entity < ActiveRecord::Base
|
|
51
51
|
end
|
52
52
|
```
|
53
53
|
|
54
|
-
|
55
|
-
|
54
|
+
For ```jsonb[]``` columns you'll have to specify the key for the tag value. If you store multiple attributes in the objects then you must set also ```has_attributes: true```.
|
56
55
|
|
57
56
|
```ruby
|
58
57
|
class Entity < ActiveRecord::Base
|
59
|
-
pg_tags_on :tags,
|
58
|
+
pg_tags_on :tags, key: :tag # => [{tag: 'alpha'}, {tag: 'beta'}]
|
59
|
+
pg_tags_on :other_tags, key: :tag, has_attributes: true # => [{tag: 'alpha', created_by: 'mike', ...}, {tag: 'beta', created_by: 'john', ...}]
|
60
60
|
end
|
61
61
|
```
|
62
62
|
|
63
|
-
|
63
|
+
##### Validations
|
64
|
+
Maximum number of tags and maximum tag length can be validated. Errors will be injected into model's ```errors``` object.
|
64
65
|
|
65
66
|
```ruby
|
66
67
|
class Entity < ActiveRecord::Base
|
67
|
-
pg_tags_on :tags,
|
68
|
-
pg_tags_on :other_tags, key: :tag, has_attributes: true # => [{tag: 'alpha', created_by: 'mike', ...}, {tag: 'beta', created_by: 'john', ...}]
|
68
|
+
pg_tags_on :tags, limit: 10, tag_length: 50 # limit to 10 tags and 50 chars. per tag.
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
-
###
|
73
|
-
```pg_tags_on``` registers ```Tags``` class in model's predicate builder, so
|
72
|
+
### Queries
|
73
|
+
```pg_tags_on``` registers ```Tags``` class in model's predicate builder, so records can be filtered using ActiveRecord's DSL. Class name can be changed if you have conflicts or you don't like it, see the [configuration](#configuration) section.
|
74
74
|
|
75
75
|
* Find records by tag:
|
76
76
|
|
@@ -81,25 +81,25 @@ Entity.where(tags: Tags.one('alpha'))
|
|
81
81
|
* Find records that have exact same tags as the list, order is not important:
|
82
82
|
|
83
83
|
```ruby
|
84
|
-
Entity.where(tags: Tags.eq('alpha', 'beta', 'gamma')) # Array argument is allowed
|
84
|
+
Entity.where(tags: Tags.eq('alpha', 'beta', 'gamma')) # Array argument is allowed too for every method.
|
85
85
|
```
|
86
86
|
|
87
87
|
* Find records that includes all the tags from the list:
|
88
88
|
|
89
89
|
```ruby
|
90
|
-
Entity.where(tags: Tags.all('alpha', 'beta', 'gamma'))
|
90
|
+
Entity.where(tags: Tags.all('alpha', 'beta', 'gamma'))
|
91
91
|
```
|
92
92
|
|
93
93
|
* Find records that includes any tag from the list:
|
94
94
|
|
95
95
|
```ruby
|
96
|
-
Entity.where(tags: Tags.any('alpha', 'beta', 'gamma'))
|
96
|
+
Entity.where(tags: Tags.any('alpha', 'beta', 'gamma'))
|
97
97
|
```
|
98
98
|
|
99
99
|
* Find records that have all the tags included in the list:
|
100
100
|
|
101
101
|
```ruby
|
102
|
-
Entity.where(tags: Tags.in('alpha', 'beta', 'gamma'))
|
102
|
+
Entity.where(tags: Tags.in('alpha', 'beta', 'gamma'))
|
103
103
|
```
|
104
104
|
|
105
105
|
All the above queries supports negation operator. Example:
|
@@ -140,7 +140,7 @@ Entity.tags.taggings
|
|
140
140
|
=> [#<PgTagsOn::Tag name: "alpha", entity_id: 1>, #<PgTagsOn::Tag name: "beta", entity_id: 1>, #<PgTagsOn::Tag name: "alpha", entity_id: 2>, ... ]
|
141
141
|
```
|
142
142
|
|
143
|
-
Create, update and delete methods are using, for performance reasons, Postgresql functions to manipulate the arrays, so ActiveRecord models are not instantiated. A frequent problem is to ensure uniqueness of the tags for a record,
|
143
|
+
Create, update and delete methods are using, for performance reasons, Postgresql functions to manipulate the arrays, so ActiveRecord models are not instantiated. A frequent problem is to ensure uniqueness of the tags for a record, but this can be achieved at the database level by creating a before create/update row trigger.
|
144
144
|
|
145
145
|
```ruby
|
146
146
|
# create
|
@@ -154,10 +154,16 @@ Entity.where(...).tags.update('alpha', 'a') # rename tag for filtered records
|
|
154
154
|
# delete
|
155
155
|
Entity.tags.delete('alpha') # delete tag from all records
|
156
156
|
Entity.where(...).tags.delete('alpha') # delete tag from filtered records
|
157
|
+
|
158
|
+
# any of these methods accepts :returning option
|
159
|
+
Entity.tags.update('alpha', 'a', returning: %w[id tags])
|
160
|
+
=> [[1, '{a}'], ...]
|
157
161
|
```
|
158
162
|
|
163
|
+
|
164
|
+
|
159
165
|
### Set record's tags
|
160
|
-
By default ```pg_tags_on``` does not add any logic in the way that the tags are set and saved in database. It'll let all the transformations, like lowercase, strip spaces, unique etc..., at the programmer choice.
|
166
|
+
By default ```pg_tags_on``` does not add any logic in the way that the tags are set for the model and saved in database. It'll let all the transformations, like lowercase, strip spaces, unique etc..., at the programmer choice. Specific setters can be implemented.
|
161
167
|
|
162
168
|
|
163
169
|
### Configuration
|
@@ -181,7 +187,7 @@ rake pg_tags_on:benchmark
|
|
181
187
|
1. Fork it ( http://github.com/cata-m/pg_tags_on/fork )
|
182
188
|
2. Install gem dependencies: ```bundle install```
|
183
189
|
3. Create a new feature or fix branch like: 'feature/new-feature' or 'fix/fix-some-issues'
|
184
|
-
4.
|
190
|
+
4. Write your modifications and make sure all tests pass: ```bundle exec rake spec```
|
185
191
|
5. Commit your changes: git commit -am 'your changes'
|
186
192
|
6. Push to the branch
|
187
193
|
7. Create new pull request
|
@@ -4,29 +4,32 @@ module PgTagsOn
|
|
4
4
|
module Repositories
|
5
5
|
# Operatons for 'jsonb[]' column type
|
6
6
|
class ArrayJsonbRepository < ArrayRepository
|
7
|
-
def create(tag)
|
7
|
+
def create(tag, returning: nil)
|
8
8
|
with_normalized_tags(tag) do |n_tag|
|
9
|
-
super(n_tag)
|
9
|
+
super(n_tag, returning: returning)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def update(tag, new_tag)
|
13
|
+
def update(tag, new_tag, returning: nil)
|
14
14
|
with_normalized_tags(tag, new_tag) do |n_tag, n_new_tag|
|
15
15
|
sql_set = <<-SQL.strip
|
16
16
|
#{column_name}[index] = #{column_name}[index] || $2
|
17
17
|
SQL
|
18
18
|
|
19
|
-
update_tag(n_tag,
|
19
|
+
update_tag(n_tag,
|
20
|
+
sql_set,
|
21
|
+
bindings: [query_attribute(n_new_tag.to_json)],
|
22
|
+
returning: returning)
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
23
|
-
def delete(tag)
|
26
|
+
def delete(tag, returning: nil)
|
24
27
|
with_normalized_tags(tag) do |n_tag|
|
25
28
|
sql_set = <<-SQL.strip
|
26
29
|
#{column_name} = #{column_name}[1:index-1] || #{column_name}[index+1:2147483647]
|
27
30
|
SQL
|
28
31
|
|
29
|
-
update_tag(n_tag, sql_set)
|
32
|
+
update_tag(n_tag, sql_set, returning: returning)
|
30
33
|
end
|
31
34
|
end
|
32
35
|
|
@@ -68,7 +71,7 @@ module PgTagsOn
|
|
68
71
|
.where(arel_infix_operation('@>', column, value))
|
69
72
|
end
|
70
73
|
|
71
|
-
def update_tag(tag, set_sql, bindings
|
74
|
+
def update_tag(tag, set_sql, bindings: [], returning: nil)
|
72
75
|
subquery = taggings_with_ordinality_query(tag)
|
73
76
|
.where(arel_table[:id].in(arel_sql(klass.reselect('id').to_sql)))
|
74
77
|
|
@@ -79,9 +82,12 @@ module PgTagsOn
|
|
79
82
|
FROM records
|
80
83
|
WHERE #{table_name}.id = records.id
|
81
84
|
SQL
|
85
|
+
sql += " RETURNING #{Array.wrap(returning).join(', ')}" if returning.present?
|
82
86
|
|
83
87
|
bindings = [query_attribute(tag.to_json)] + Array.wrap(bindings)
|
84
|
-
klass.connection.exec_query(sql, 'SQL', bindings)
|
88
|
+
result = klass.connection.exec_query(sql, 'SQL', bindings).rows
|
89
|
+
|
90
|
+
returning ? result : true
|
85
91
|
end
|
86
92
|
end
|
87
93
|
end
|
@@ -42,28 +42,60 @@ module PgTagsOn
|
|
42
42
|
all.count
|
43
43
|
end
|
44
44
|
|
45
|
-
def create(tag)
|
46
|
-
|
45
|
+
def create(tag, returning: nil)
|
46
|
+
raise 'Tag cannot be blank' if tag.blank?
|
47
47
|
|
48
|
-
klass
|
48
|
+
perform_update(klass,
|
49
|
+
{ column_name => arel_array_cat(arel_column, bind_for(Array.wrap(tag))) },
|
50
|
+
returning: returning)
|
49
51
|
end
|
50
52
|
|
51
|
-
def update(tag, new_tag)
|
52
|
-
|
53
|
+
def update(tag, new_tag, returning: nil)
|
54
|
+
raise 'Tag cannot be blank' if tag.blank? || new_tag.blank?
|
53
55
|
|
54
|
-
klass
|
55
|
-
|
56
|
-
|
56
|
+
rel = klass.where(column_name => PgTagsOn.query_class.one(tag))
|
57
|
+
|
58
|
+
perform_update(rel,
|
59
|
+
{ column_name => arel_array_replace(arel_column, bind_for(tag), bind_for(new_tag)) },
|
60
|
+
returning: returning)
|
57
61
|
end
|
58
62
|
|
59
|
-
def delete(tag)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
+
def delete(tag, returning: nil)
|
64
|
+
raise 'Tag cannot be blank' if tag.blank?
|
65
|
+
|
66
|
+
rel = klass.where(column_name => PgTagsOn.query_class.one(tag))
|
67
|
+
|
68
|
+
perform_update(rel, { column_name => arel_array_remove(arel_column, bind_for(tag)) }, returning: returning)
|
63
69
|
end
|
64
70
|
|
65
71
|
private
|
66
72
|
|
73
|
+
def perform_update(rel, updates, returning: nil)
|
74
|
+
updater = update_manager(rel, updates)
|
75
|
+
sql, binds = klass.connection.send :to_sql_and_binds, updater
|
76
|
+
sql += " RETURNING #{Array.wrap(returning).join(', ')}" if returning.present?
|
77
|
+
|
78
|
+
result = klass.connection.exec_query(sql, 'SQL', binds).rows
|
79
|
+
|
80
|
+
returning ? result : true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Method copied from ActiveRecord as there is no way to inject sql into update manager.
|
84
|
+
def update_manager(rel, updates)
|
85
|
+
raise ArgumentError, 'Empty list of attributes to change' if updates.blank?
|
86
|
+
|
87
|
+
stmt = ::Arel::UpdateManager.new
|
88
|
+
stmt.table(arel_table)
|
89
|
+
stmt.key = klass.arel_attribute(klass.primary_key)
|
90
|
+
stmt.take(rel.arel.limit)
|
91
|
+
stmt.offset(rel.arel.offset)
|
92
|
+
stmt.order(*rel.arel.orders)
|
93
|
+
stmt.wheres = rel.arel.constraints
|
94
|
+
stmt.set rel.send(:_substitute_values, updates)
|
95
|
+
|
96
|
+
stmt
|
97
|
+
end
|
98
|
+
|
67
99
|
def array_to_recordset
|
68
100
|
unnest
|
69
101
|
end
|
data/lib/pg_tags_on/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_tags_on
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Catalin Marinescu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -38,34 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '6.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: bundler
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '2.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: faker
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '2.10'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.10'
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: pg
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +52,6 @@ dependencies:
|
|
80
52
|
- - "~>"
|
81
53
|
- !ruby/object:Gem::Version
|
82
54
|
version: '1.2'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: pry
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.12'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0.12'
|
97
55
|
- !ruby/object:Gem::Dependency
|
98
56
|
name: rake
|
99
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,56 +80,21 @@ dependencies:
|
|
122
80
|
- - "~>"
|
123
81
|
- !ruby/object:Gem::Version
|
124
82
|
version: '3.9'
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0.80'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0.80'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: simplecov
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0.18'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0.18'
|
153
|
-
description: A gem that makes working with tags stored in a Postgresql column easy.Support
|
154
|
-
for array of string, integer and jsonb values.
|
83
|
+
description: |-
|
84
|
+
A gem that makes working with tags stored in a Postgresql column easy.
|
85
|
+
Support for array of string, integer and jsonb values.
|
155
86
|
email:
|
156
|
-
-
|
157
|
-
executables:
|
158
|
-
- console
|
159
|
-
- setup
|
87
|
+
- cata.marinesq@gmail.com
|
88
|
+
executables: []
|
160
89
|
extensions: []
|
161
|
-
extra_rdoc_files:
|
90
|
+
extra_rdoc_files:
|
91
|
+
- README.md
|
92
|
+
- CHANGELOG.md
|
93
|
+
- LICENSE.txt
|
162
94
|
files:
|
163
|
-
- ".gitignore"
|
164
|
-
- ".rspec"
|
165
|
-
- ".rubocop.yml"
|
166
95
|
- CHANGELOG.md
|
167
|
-
- CODE_OF_CONDUCT.md
|
168
|
-
- Gemfile
|
169
|
-
- Gemfile.lock
|
170
96
|
- LICENSE.txt
|
171
97
|
- README.md
|
172
|
-
- Rakefile
|
173
|
-
- bin/console
|
174
|
-
- bin/setup
|
175
98
|
- lib/pg_tags_on.rb
|
176
99
|
- lib/pg_tags_on/active_record/arel.rb
|
177
100
|
- lib/pg_tags_on/active_record/base.rb
|
@@ -191,34 +114,14 @@ files:
|
|
191
114
|
- lib/pg_tags_on/tags_query.rb
|
192
115
|
- lib/pg_tags_on/validations/validator.rb
|
193
116
|
- lib/pg_tags_on/version.rb
|
194
|
-
- pg_tags_on.gemspec
|
195
|
-
- spec/array_integers/records_spec.rb
|
196
|
-
- spec/array_integers/tag_ops_spec.rb
|
197
|
-
- spec/array_integers/taggings_spec.rb
|
198
|
-
- spec/array_integers/tags_spec.rb
|
199
|
-
- spec/array_jsonb/records_spec.rb
|
200
|
-
- spec/array_jsonb/tag_ops_spec.rb
|
201
|
-
- spec/array_jsonb/taggings_spec.rb
|
202
|
-
- spec/array_jsonb/tags_spec.rb
|
203
|
-
- spec/array_strings/records_spec.rb
|
204
|
-
- spec/array_strings/tag_ops_spec.rb
|
205
|
-
- spec/array_strings/taggings_spec.rb
|
206
|
-
- spec/array_strings/tags_spec.rb
|
207
|
-
- spec/config/database.yml
|
208
|
-
- spec/configuration_spec.rb
|
209
|
-
- spec/helpers/database_helpers.rb
|
210
|
-
- spec/spec_helper.rb
|
211
|
-
- spec/support/factory.rb
|
212
|
-
- spec/tags_query_spec.rb
|
213
|
-
- spec/validator_spec.rb
|
214
|
-
- tasks/benchmark.rake
|
215
117
|
homepage: http://github.com/cata-m/pg_tags_on
|
216
118
|
licenses:
|
217
119
|
- MIT
|
218
120
|
metadata:
|
121
|
+
bug_tracker_uri: https://github.com/cata-m/pg_tags_on/issues
|
122
|
+
changelog_uri: https://github.com/cata-m/pg_tags_on/blob/master/CHANGELOG.md
|
219
123
|
homepage_uri: http://github.com/cata-m/pg_tags_on
|
220
|
-
source_code_uri:
|
221
|
-
changelog_uri: http://github.com/cata-m/pg_tags_on/blob/master/CHANGELOG.md
|
124
|
+
source_code_uri: https://github.com/cata-m/pg_tags_on
|
222
125
|
post_install_message:
|
223
126
|
rdoc_options: []
|
224
127
|
require_paths:
|
@@ -227,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
227
130
|
requirements:
|
228
131
|
- - ">="
|
229
132
|
- !ruby/object:Gem::Version
|
230
|
-
version:
|
133
|
+
version: 2.3.0
|
231
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
232
135
|
requirements:
|
233
136
|
- - ">="
|
@@ -237,24 +140,5 @@ requirements: []
|
|
237
140
|
rubygems_version: 3.0.6
|
238
141
|
signing_key:
|
239
142
|
specification_version: 4
|
240
|
-
summary:
|
241
|
-
test_files:
|
242
|
-
- spec/array_integers/records_spec.rb
|
243
|
-
- spec/array_integers/tag_ops_spec.rb
|
244
|
-
- spec/array_integers/taggings_spec.rb
|
245
|
-
- spec/array_integers/tags_spec.rb
|
246
|
-
- spec/array_jsonb/records_spec.rb
|
247
|
-
- spec/array_jsonb/tag_ops_spec.rb
|
248
|
-
- spec/array_jsonb/taggings_spec.rb
|
249
|
-
- spec/array_jsonb/tags_spec.rb
|
250
|
-
- spec/array_strings/records_spec.rb
|
251
|
-
- spec/array_strings/tag_ops_spec.rb
|
252
|
-
- spec/array_strings/taggings_spec.rb
|
253
|
-
- spec/array_strings/tags_spec.rb
|
254
|
-
- spec/config/database.yml
|
255
|
-
- spec/configuration_spec.rb
|
256
|
-
- spec/helpers/database_helpers.rb
|
257
|
-
- spec/spec_helper.rb
|
258
|
-
- spec/support/factory.rb
|
259
|
-
- spec/tags_query_spec.rb
|
260
|
-
- spec/validator_spec.rb
|
143
|
+
summary: Query and manage tags stored in a Postgresql column.
|
144
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at catalin.marinescu@gmail.com. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|