metka 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -3
- data/README.md +12 -12
- data/lib/metka/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3c0565e7e049ea911c9039ef193104c7bf7e7213a12bbd3ca804fa0f3a3ce9f
|
4
|
+
data.tar.gz: 11e33a74f78aca7fa1942702fd2dd550c232dde0bdab414ec2cbe3ddec8ffaa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76749d9965518aaacc8e592a569c9a4a57885647b99b6df4aecd7574536658c5d8e2259a9b344bb2bfe44cdd506eff95a73530f775778151253d92e3e081d531
|
7
|
+
data.tar.gz: e29dea73313396cf64d120b5cbdde93b42902442962243925ae25c541b9b7fab361d4be7b81ccc83e946d03f34c7995475d37d6c869ad54d50b2981b6544f322
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metka (1.0.
|
4
|
+
metka (1.0.3)
|
5
5
|
dry-configurable (>= 0.8)
|
6
6
|
rails (>= 5.1)
|
7
7
|
|
@@ -57,11 +57,13 @@ GEM
|
|
57
57
|
crass (1.0.5)
|
58
58
|
database_cleaner (1.7.0)
|
59
59
|
diff-lcs (1.3)
|
60
|
-
dry-configurable (0.
|
60
|
+
dry-configurable (0.11.3)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
dry-core (~> 0.4, >= 0.4.7)
|
63
|
+
dry-equalizer (~> 0.2)
|
63
64
|
dry-core (0.4.9)
|
64
65
|
concurrent-ruby (~> 1.0)
|
66
|
+
dry-equalizer (0.3.0)
|
65
67
|
erubi (1.9.0)
|
66
68
|
faker (2.8.0)
|
67
69
|
i18n (>= 1.6, < 1.8)
|
@@ -84,7 +86,7 @@ GEM
|
|
84
86
|
mini_portile2 (2.4.0)
|
85
87
|
minitest (5.13.0)
|
86
88
|
nio4r (2.5.2)
|
87
|
-
nokogiri (1.10.
|
89
|
+
nokogiri (1.10.8)
|
88
90
|
mini_portile2 (~> 2.4.0)
|
89
91
|
parallel (1.19.1)
|
90
92
|
parser (2.6.5.0)
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# Metka
|
6
6
|
|
7
|
-
Rails gem to manage tags with
|
7
|
+
Rails gem to manage tags with PostgreSQL array columns.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -47,7 +47,7 @@ class Song < ActiveRecord::Base
|
|
47
47
|
include Metka::Model(column: 'genres')
|
48
48
|
end
|
49
49
|
|
50
|
-
@song = Song.new(title: 'Migrate tags in Rails to
|
50
|
+
@song = Song.new(title: 'Migrate tags in Rails to PostgreSQL')
|
51
51
|
@song.tag_list = 'top, chill'
|
52
52
|
@song.genre_list = 'rock, jazz, pop'
|
53
53
|
@song.save
|
@@ -58,7 +58,7 @@ end
|
|
58
58
|
### .with_all_#{column_name}
|
59
59
|
```ruby
|
60
60
|
Song.with_all_tags('top')
|
61
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
61
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
62
62
|
|
63
63
|
Song.with_all_tags('top, 1990')
|
64
64
|
=> []
|
@@ -67,22 +67,22 @@ Song.with_all_tags('')
|
|
67
67
|
=> []
|
68
68
|
|
69
69
|
Song.with_all_genres('rock')
|
70
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
70
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
71
71
|
```
|
72
72
|
|
73
73
|
### .with_any_#{column_name}
|
74
74
|
```ruby
|
75
75
|
Song.with_any_tags('chill')
|
76
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
76
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
77
77
|
|
78
78
|
Song.with_any_tags('chill, 1980')
|
79
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
79
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
80
80
|
|
81
81
|
Song.with_any_tags('')
|
82
82
|
=> []
|
83
83
|
|
84
84
|
Song.with_any_genres('rock, rap')
|
85
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
85
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
86
86
|
```
|
87
87
|
### .without_all_#{column_name}
|
88
88
|
```ruby
|
@@ -90,13 +90,13 @@ Song.without_all_tags('top')
|
|
90
90
|
=> []
|
91
91
|
|
92
92
|
Song.without_all_tags('top, 1990')
|
93
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
93
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
94
94
|
|
95
95
|
Song.without_all_tags('')
|
96
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
96
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
97
97
|
|
98
98
|
Song.without_all_genres('rock, pop')
|
99
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
99
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
100
100
|
|
101
101
|
Song.without_all_genres('rock')
|
102
102
|
=> []
|
@@ -108,13 +108,13 @@ Song.without_any_tags('top, 1990')
|
|
108
108
|
=> []
|
109
109
|
|
110
110
|
Song.without_any_tags('1990, 1980')
|
111
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
111
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
112
112
|
|
113
113
|
Song.without_any_genres('rock, pop')
|
114
114
|
=> []
|
115
115
|
|
116
116
|
Song.without_any_genres('')
|
117
|
-
=> [#<Song id: 1, title: 'Migrate tags in Rails to
|
117
|
+
=> [#<Song id: 1, title: 'Migrate tags in Rails to PostgreSQL', tags: ['top', 'chill'], genres: ['rock', 'jazz', 'pop']]
|
118
118
|
```
|
119
119
|
|
120
120
|
## Custom delimiter
|
data/lib/metka/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Alexandrov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-02-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-configurable
|