imyou 1.4.0 → 1.4.1

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
  SHA256:
3
- metadata.gz: 4adecb189f55f9b5367a1f4dd4a892d0c1e012f7378afb5a62ba6d672428f430
4
- data.tar.gz: fb70e4b0c91015dbe1579331e17c46de46a69d94aed9d4cd520bf893ab70257b
3
+ metadata.gz: 21059c6cb4a6fe5c70f2791737d3e6185a49451a347eae8ff433d7d03b02433f
4
+ data.tar.gz: 7b48966624d49bd7869a5fee712826e4438fc4f5e2e7e1c1af83412ec52c8888
5
5
  SHA512:
6
- metadata.gz: 3dca92d69be5a902255ab00fbacaeeee914bc0c357f94efcfca0ee7d21228ed13ae4ea4425a28202a29a9c907700f472133a15cab2f9e37e69e7f15216fbd8e6
7
- data.tar.gz: 8daa0dbabcce62e125d416aff60c3e7cd347f109b7ef1727e9b4cdf8f2149019f221881c1bd99aceb9988b13aa899e0b910ab15c8432211fbf6a20c6949b612e
6
+ metadata.gz: e63922d83266f1c5f095486f7fe01c4e5b4dc824a28c06a14c9561b4970234016ebfd2b8387ca7da6e620d92327719912e1c5e0f297f921018b40c519472ba97
7
+ data.tar.gz: 6ade06e0df97fdb48b2da7df2c1ce7a2a68d5dd2f50786b2d0b555eecf64b27338d67d3954e3b0bb6b4cf88303584ce982db26d2cee166e8919c2e978420c586
data/.circleci/config.yml CHANGED
@@ -4,9 +4,9 @@ executors:
4
4
  ruby:
5
5
  parameters:
6
6
  ruby_version:
7
- default: '2.6.3'
7
+ default: '2.7.1'
8
8
  type: enum
9
- enum: ['2.4.6', '2.5.5', '2.6.3']
9
+ enum: ['2.5.8', '2.6.6', '2.7.1']
10
10
  working_directory: ~/repo
11
11
  docker:
12
12
  - image: circleci/ruby:<< parameters.ruby_version >>-node-browsers
@@ -31,11 +31,12 @@ commands:
31
31
  run_test:
32
32
  parameters:
33
33
  rails_version:
34
- default: '5.2'
34
+ default: '6.0'
35
35
  type: enum
36
- enum: ['4.2', '5.0', '5.1', '5.2', '6.0']
36
+ enum: ['5.0', '5.1', '5.2', '6.0']
37
37
  steps:
38
38
  - checkout
39
+ - run: gem install bundler --version=2.1.4 -N
39
40
  - run:
40
41
  name: bundle install
41
42
  command: |
@@ -54,10 +55,10 @@ jobs:
54
55
  parameters:
55
56
  ruby_version:
56
57
  type: enum
57
- enum: ['2.4.6', '2.5.5', '2.6.3']
58
+ enum: ['2.5.8', '2.6.6', '2.7.1']
58
59
  rails_version:
59
60
  type: enum
60
- enum: ['4.2', '5.0', '5.1', '5.2', '6.0']
61
+ enum: ['5.0', '5.1', '5.2', '6.0']
61
62
  executor:
62
63
  name: ruby
63
64
  ruby_version: << parameters.ruby_version >>
@@ -75,6 +76,7 @@ jobs:
75
76
  - add_ssh_keys:
76
77
  fingerprints:
77
78
  - "e7:e8:17:c5:03:05:fd:0c:0e:9b:3b:d3:90:53:c6:5c"
79
+ - run: gem install bundler --version=2.1.4 -N
78
80
  - run:
79
81
  name: bundle install
80
82
  command: bundle check || bundle install --jobs=4 --retry=3
@@ -115,77 +117,67 @@ workflows:
115
117
  build:
116
118
  jobs:
117
119
  - test:
118
- name: 'Ruby 2.4.6-Rails 4.2'
119
- ruby_version: '2.4.6'
120
- rails_version: '4.2'
121
- - test:
122
- name: 'Ruby 2.5.5-Rails 4.2'
123
- ruby_version: '2.5.5'
124
- rails_version: '4.2'
125
- - test:
126
- name: 'Ruby 2.6.3-Rails 4.2'
127
- ruby_version: '2.6.3'
128
- rails_version: '4.2'
129
- - test:
130
- name: 'Ruby 2.4.6-Rails 5.0'
131
- ruby_version: '2.4.6'
120
+ name: 'Ruby 2.5.8-Rails 5.0'
121
+ ruby_version: '2.5.8'
132
122
  rails_version: '5.0'
133
123
  - test:
134
- name: 'Ruby 2.5.5-Rails 5.0'
135
- ruby_version: '2.5.5'
124
+ name: 'Ruby 2.6.6-Rails 5.0'
125
+ ruby_version: '2.6.6'
136
126
  rails_version: '5.0'
137
127
  - test:
138
- name: 'Ruby 2.6.3-Rails 5.0'
139
- ruby_version: '2.6.3'
128
+ name: 'Ruby 2.7.1-Rails 5.0'
129
+ ruby_version: '2.7.1'
140
130
  rails_version: '5.0'
141
131
  - test:
142
- name: 'Ruby 2.4.6-Rails 5.1'
143
- ruby_version: '2.4.6'
132
+ name: 'Ruby 2.5.8-Rails 5.1'
133
+ ruby_version: '2.5.8'
144
134
  rails_version: '5.1'
145
135
  - test:
146
- name: 'Ruby 2.5.5-Rails 5.1'
147
- ruby_version: '2.5.5'
136
+ name: 'Ruby 2.6.6-Rails 5.1'
137
+ ruby_version: '2.6.6'
148
138
  rails_version: '5.1'
149
139
  - test:
150
- name: 'Ruby 2.6.3-Rails 5.1'
151
- ruby_version: '2.6.3'
140
+ name: 'Ruby 2.7.1-Rails 5.1'
141
+ ruby_version: '2.7.1'
152
142
  rails_version: '5.1'
153
143
  - test:
154
- name: 'Ruby 2.4.6-Rails 5.2'
155
- ruby_version: '2.4.6'
144
+ name: 'Ruby 2.5.8-Rails 5.2'
145
+ ruby_version: '2.5.8'
156
146
  rails_version: '5.2'
157
147
  - test:
158
- name: 'Ruby 2.5.5-Rails 5.2'
159
- ruby_version: '2.5.5'
148
+ name: 'Ruby 2.6.6-Rails 5.2'
149
+ ruby_version: '2.6.6'
160
150
  rails_version: '5.2'
161
151
  - test:
162
- name: 'Ruby 2.6.3-Rails 5.2'
163
- ruby_version: '2.6.3'
152
+ name: 'Ruby 2.7.1-Rails 5.2'
153
+ ruby_version: '2.7.1'
164
154
  rails_version: '5.2'
165
155
  - test:
166
- name: 'Ruby 2.5.5-Rails 6.0'
167
- ruby_version: '2.5.5'
156
+ name: 'Ruby 2.5.8-Rails 6.0'
157
+ ruby_version: '2.5.8'
158
+ rails_version: '6.0'
159
+ - test:
160
+ name: 'Ruby 2.6.6-Rails 6.0'
161
+ ruby_version: '2.6.6'
168
162
  rails_version: '6.0'
169
163
  - test:
170
- name: 'Ruby 2.6.3-Rails 6.0'
171
- ruby_version: '2.6.3'
164
+ name: 'Ruby 2.7.1-Rails 6.0'
165
+ ruby_version: '2.7.1'
172
166
  rails_version: '6.0'
173
167
  - release:
174
168
  requires:
175
- - 'Ruby 2.4.6-Rails 4.2'
176
- - 'Ruby 2.5.5-Rails 4.2'
177
- - 'Ruby 2.6.3-Rails 4.2'
178
- - 'Ruby 2.4.6-Rails 5.0'
179
- - 'Ruby 2.5.5-Rails 5.0'
180
- - 'Ruby 2.6.3-Rails 5.0'
181
- - 'Ruby 2.4.6-Rails 5.1'
182
- - 'Ruby 2.5.5-Rails 5.1'
183
- - 'Ruby 2.6.3-Rails 5.1'
184
- - 'Ruby 2.4.6-Rails 5.2'
185
- - 'Ruby 2.5.5-Rails 5.2'
186
- - 'Ruby 2.6.3-Rails 5.2'
187
- - 'Ruby 2.5.5-Rails 6.0'
188
- - 'Ruby 2.6.3-Rails 6.0'
169
+ - 'Ruby 2.5.8-Rails 5.0'
170
+ - 'Ruby 2.6.6-Rails 5.0'
171
+ - 'Ruby 2.7.1-Rails 5.0'
172
+ - 'Ruby 2.5.8-Rails 5.1'
173
+ - 'Ruby 2.6.6-Rails 5.1'
174
+ - 'Ruby 2.7.1-Rails 5.1'
175
+ - 'Ruby 2.5.8-Rails 5.2'
176
+ - 'Ruby 2.6.6-Rails 5.2'
177
+ - 'Ruby 2.7.1-Rails 5.2'
178
+ - 'Ruby 2.5.8-Rails 6.0'
179
+ - 'Ruby 2.6.6-Rails 6.0'
180
+ - 'Ruby 2.7.1-Rails 6.0'
189
181
  filters:
190
182
  branches:
191
183
  only: master
data/.gitignore CHANGED
@@ -6,9 +6,13 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /log/
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
12
13
  .ruby-version
13
14
  Gemfile.lock
14
15
  .circleci/config.processed.yml
16
+
17
+ /gemfiles/*.gemfile.lock
18
+ /gemfiles/.bundle
data/imyou.gemspec CHANGED
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.17"
28
- spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "bundler", "~> 2.1"
28
+ spec.add_development_dependency "rake", "~> 13.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
30
  spec.add_development_dependency 'pry', '~> 0'
31
31
  spec.add_development_dependency 'database_cleaner', '~> 1.7'
data/lib/imyou/models.rb CHANGED
@@ -49,10 +49,10 @@ module Imyou
49
49
 
50
50
  scope :partial_match_by_nickname, ->(nickname, with_name_column: true) do
51
51
  if Gem::Version.new(ActiveRecord.version) >= Gem::Version.new(5)
52
- records = self.left_outer_joins(:imyou_nicknames).where(Imyou::Nickname.arel_table[:name].matches("%#{sanitize_sql_like(nickname)}%"))
52
+ records = self.left_outer_joins(:imyou_nicknames).where(Imyou::Nickname.arel_table[:name].matches("%#{sanitize_sql_like(nickname)}%", '\\'))
53
53
  unless name_column.nil? || with_name_column == false
54
54
  records.or!(self.left_outer_joins(:imyou_nicknames).where(
55
- self.arel_table[name_column].matches("%#{sanitize_sql_like(nickname)}%"))
55
+ self.arel_table[name_column].matches("%#{sanitize_sql_like(nickname)}%", '\\'))
56
56
  )
57
57
  end
58
58
  else
@@ -67,13 +67,13 @@ module Imyou
67
67
  arel_nickname_column = Imyou::Nickname.arel_table[:name]
68
68
  records = if name_column.nil? || with_name_column == false
69
69
  joined_records.where(
70
- arel_nickname_column.matches("%#{sanitize_sql_like(nickname)}%")
70
+ arel_nickname_column.matches("%#{sanitize_sql_like(nickname)}%", '\\')
71
71
  )
72
72
  else
73
73
  arel_name_column = self.arel_table[name_column]
74
74
  joined_records.where(
75
- arel_nickname_column.matches("%#{sanitize_sql_like(nickname)}%").or(
76
- arel_name_column.matches("%#{sanitize_sql_like(nickname)}%")
75
+ arel_nickname_column.matches("%#{sanitize_sql_like(nickname)}%", '\\').or(
76
+ arel_name_column.matches("%#{sanitize_sql_like(nickname)}%", '\\')
77
77
  )
78
78
  )
79
79
  end
data/lib/imyou/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Imyou
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imyou
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - patorash
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-19 00:00:00.000000000 Z
11
+ date: 2021-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
19
+ version: '2.1'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.17'
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -125,7 +125,6 @@ files:
125
125
  - Rakefile
126
126
  - bin/console
127
127
  - bin/setup
128
- - gemfiles/rails_4.2.gemfile
129
128
  - gemfiles/rails_5.0.gemfile
130
129
  - gemfiles/rails_5.1.gemfile
131
130
  - gemfiles/rails_5.2.gemfile
@@ -156,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
155
  - !ruby/object:Gem::Version
157
156
  version: '0'
158
157
  requirements: []
159
- rubygems_version: 3.0.3
158
+ rubygems_version: 3.1.2
160
159
  signing_key:
161
160
  specification_version: 4
162
161
  summary: Imyou has feature of attaching popular name to ActiveRecord model.
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'pg', '~> 0.21'
4
- gem 'rails', '~> 4.2.0'
5
-
6
- gemspec path: '../'