findit 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
  SHA1:
3
- metadata.gz: f1a0af7fdc13e935c0c272b7856c7696a718b3b0
4
- data.tar.gz: 8b5a7c64c41d532c216655ae47e32631792e6960
3
+ metadata.gz: 6a8a4312793f6f42a65341ed111881e256230f35
4
+ data.tar.gz: c8a38afe7a521f7663915b1bfac93fc1d54257c8
5
5
  SHA512:
6
- metadata.gz: 04bca2768a0452e08b151793ae973397428ede963f27634b17a31db5b6683ccd1edbd6e49b93cad0b700a962947b8e63de90d2446d9352a46649914f86940b75
7
- data.tar.gz: 90c76bee21b2634f2cb7c37c191db5f8f92ed8dea834113e026804f42a79e2242e3bf4ba5aeefeda8aad41b80f305c7efb1422dc104e23003a62cc0d5635e56a
6
+ metadata.gz: 9d8fd66b0123e72b5c08f08b520d243c63cf1b1953f64cd06d89ce58d6c0aba245bfe3ad1a111fe84bbb44fe997aaa94141d6c941cb0aedfc8873281935d61e7
7
+ data.tar.gz: 7650158362ba60928cb1302c2f6202ffaeb91907b88d496306337e9f5cfbdcbf9685fdedd133d548933f6fba9b8024ac58e9e9711418dc88d8729baa3b791775
data/.drone.yml CHANGED
@@ -1,19 +1,86 @@
1
- build:
2
- test:
3
- image: abakpress/dind-testing
4
- pull: true
5
- privileged: true
6
- volumes:
7
- - /home/data/drone/images:/images
8
- - /home/data/drone/gems:/bundle
1
+ name: build
2
+
3
+ kind: pipeline
4
+ type: docker
5
+
6
+ volumes:
7
+ - name: rubygems
8
+ host:
9
+ path: /home/data/drone/rubygems
10
+ - name: images
11
+ host:
12
+ path: /home/data/drone/images
13
+ - name: bundle
14
+ host:
15
+ path: /home/data/drone/gems
16
+ - name: keys
17
+ host:
18
+ path: /home/data/drone/key_cache
19
+
20
+ spec_step_common: &spec_step_common
21
+ image: abakpress/dind-testing:1.0.3
22
+ pull: if-not-exists
23
+ privileged: true
24
+ volumes:
25
+ - name: images
26
+ path: /images
27
+ - name: bundle
28
+ path: /bundle
29
+ - name: keys
30
+ path: /ssh_keys
31
+ commands:
32
+ - prepare-build
33
+
34
+ - fetch-images
35
+ --image whilp/ssh-agent
36
+ --image abakpress/ruby-app:$RUBY_IMAGE_TAG
37
+
38
+ - dip ssh add -T -v /ssh_keys -k /ssh_keys/id_rsa
39
+ - dip provision
40
+ - dip rspec
41
+
42
+ steps:
43
+ - name: Tests Ruby 2.2
9
44
  environment:
10
- - COMPOSE_FILE_EXT=drone
11
- - RUBY_IMAGE_TAG=2.2-latest
12
- commands:
13
- - wrapdocker docker -v
45
+ COMPOSE_FILE_EXT: drone
46
+ DOCKER_RUBY_VERSION: 2.2
47
+ RUBY_IMAGE_TAG: 2.2-latest
48
+ RAILS_ENV: test
49
+ <<: *spec_step_common
14
50
 
15
- - fetch-images
16
- --image abakpress/ruby-app:$RUBY_IMAGE_TAG
51
+ - name: Tests Ruby 2.3
52
+ environment:
53
+ COMPOSE_FILE_EXT: drone
54
+ DOCKER_RUBY_VERSION: 2.3
55
+ RUBY_IMAGE_TAG: 2.3-latest
56
+ RAILS_ENV: test
57
+ <<: *spec_step_common
58
+
59
+ - name: Tests Ruby 2.4
60
+ environment:
61
+ COMPOSE_FILE_EXT: drone
62
+ DOCKER_RUBY_VERSION: 2.4
63
+ RUBY_IMAGE_TAG: 2.4-latest
64
+ RAILS_ENV: test
65
+ <<: *spec_step_common
17
66
 
18
- - dip provision
19
- - dip rspec
67
+ - name: Tests Ruby 2.5
68
+ environment:
69
+ COMPOSE_FILE_EXT: drone
70
+ DOCKER_RUBY_VERSION: 2.5
71
+ RUBY_IMAGE_TAG: 2.5-latest
72
+ RAILS_ENV: test
73
+ <<: *spec_step_common
74
+
75
+ - name: release
76
+ image: abakpress/gem-publication:latest
77
+ pull: if-not-exists
78
+ when:
79
+ event: push
80
+ branch: master
81
+ status: success
82
+ volumes:
83
+ - name: rubygems
84
+ path: /root/.gem
85
+ commands:
86
+ - release-gem --public
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
  /gemfiles/*
11
11
  /spec/internal/test
12
+ /.idea/
data/Appraisals CHANGED
@@ -1,20 +1,43 @@
1
- appraise 'rails3.1' do
2
- gem 'rails', '~> 3.1'
1
+ if RUBY_VERSION < '2.4'
2
+ appraise 'rails4.0' do
3
+ gem 'activesupport', '~> 4.0.0'
4
+ gem 'sqlite3', '~> 1.3.6'
5
+ end
6
+
7
+ appraise 'rails4.1' do
8
+ gem 'activesupport', '~> 4.1.0'
9
+ gem 'sqlite3', '~> 1.3.6'
10
+ end
3
11
  end
4
12
 
5
- appraise 'rails3.2' do
6
- gem 'rails', '~> 3.2'
13
+ appraise 'rails4.2' do
14
+ gem 'activesupport', '~> 4.2.0'
15
+ gem 'sqlite3', '~> 1.3.6'
7
16
  end
8
17
 
9
- appraise 'rails4.0' do
10
- gem 'rails', '~> 4.0'
18
+ appraise 'rails5.0' do
19
+ gem 'activesupport', '~> 5.0.0'
20
+ gem 'sqlite3', '~> 1.3.6'
11
21
  end
12
22
 
13
- appraise 'rails4.1' do
14
- gem 'rails', '~> 4.1'
23
+ appraise 'rails5.1' do
24
+ gem 'activesupport', '~> 5.1.0'
25
+ gem 'sqlite3', '~> 1.3.6'
15
26
  end
16
27
 
17
- appraise 'rails4.2' do
18
- gem 'rails', '~> 4.2'
28
+ appraise 'rails5.2' do
29
+ gem 'activesupport', '~> 5.2.0'
30
+ gem 'sqlite3', '~> 1.3.6'
19
31
  end
20
32
 
33
+ if RUBY_VERSION >= '2.5'
34
+ appraise 'rails6.0' do
35
+ gem 'activesupport', '~> 6.0.0'
36
+ gem 'sqlite3', '~> 1.4'
37
+ end
38
+
39
+ appraise 'rails6.1' do
40
+ gem 'activesupport', '~> 6.1.0'
41
+ gem 'sqlite3', '~> 1.4'
42
+ end
43
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,40 @@
1
+ # v1.4.1
2
+
3
+ * 2021-08-06 [0941afd](../../commit/0941afd) - __(TamarinEA)__ Release 1.4.1
4
+ * 2021-08-06 [9d06ecf](../../commit/9d06ecf) - __(TamarinEA)__ chore: test ruby 2.2-2.5 and rails 4.0-6.1
5
+ * 2018-05-29 [3fd7608](../../commit/3fd7608) - __(Pavel Galkin)__ fix: expire_in -> expires_in typo
6
+ Из поисков по коду как я понял expires_in это верный вариант
7
+
8
+ https://github.com/sorentwo/readthis/blob/v2.0.2/lib/readthis/cache.rb#L395
9
+
10
+ # v1.4.0
11
+
12
+ * 2017-05-03 [fd29452](../../commit/fd29452) - __(evseevleo)__ feat(collection): delegate :shift
13
+ * 2017-04-03 [92e5b37](../../commit/92e5b37) - __(Denis Korobicyn)__ Release 1.3.0
14
+
15
+ # v1.3.0
16
+
17
+ * 2017-03-31 [51de445](../../commit/51de445) - __(Denis Korobicyn)__ feature: cache extension
18
+ * 2017-03-30 [7e85787](../../commit/7e85787) - __(Denis Korobicyn)__ feature: single extension
19
+ * 2017-03-30 [fa2445f](../../commit/fa2445f) - __(Denis Korobicyn)__ chore: add drone CI
20
+
21
+ # v1.2.0
22
+
23
+ * 2016-05-10 [ce9751b](../../commit/ce9751b) - __(Denis Korobicyn)__ feature: will_paginate integration (#5)
24
+
25
+ # v1.1.0
26
+
27
+ * 2016-05-06 [cc5c612](../../commit/cc5c612) - __(Denis Korobicyn)__ feature: delegate to_a, to_ary to call (#4)
28
+
29
+ # v1.0.0
30
+
31
+ * 2016-05-05 [222dc6e](../../commit/222dc6e) - __(Denis Korobicyn)__ version 1.0.0
32
+ * 2016-05-05 [baffa09](../../commit/baffa09) - __(Denis Korobicyn)__ feature: removed `data`, and pure virtual method - `find` (#3)
33
+ * 2016-05-05 [274a7af](../../commit/274a7af) - __(Denis Korobicyn)__ fix: cache key with namespace of class name (#2)
34
+
35
+ # v0.1.0
36
+
37
+ * 2016-05-04 [1d8e898](../../commit/1d8e898) - __(Denis Korobicyn)__ Init commit (#1)
38
+ * Init commit
39
+
40
+ * 2016-04-26 [56d5ce8](../../commit/56d5ce8) - __(Artem Napolskih)__ Initial commit
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
- gem 'mime-types', '< 3.0' if RUBY_VERSION < '2'
3
2
 
4
3
  gemspec
data/README.md CHANGED
@@ -156,7 +156,7 @@ class PostsController < ApplicationController
156
156
  end
157
157
 
158
158
  #/app/views/posts/index.html.erb
159
- <% cache(@posts, expire_in: 30.minutes) do %>
159
+ <% cache(@posts, expires_in: 30.minutes) do %>
160
160
  <%=render 'post', collection: @posts, as: :post%> # it will automaticly iterate over finder results by each method
161
161
  ```
162
162
 
@@ -197,7 +197,7 @@ class PostsController < ApplicationController
197
197
  end
198
198
 
199
199
  # app/views/posts/index.html.erb
200
- <% cache(@posts, expire_in: 30.minutes) do %>
200
+ <% cache(@posts, expires_in: 30.minutes) do %>
201
201
  <%= render 'post', collection: @posts, as: :post %>
202
202
  <%= will_paginate @posts %>
203
203
  ```
@@ -232,7 +232,7 @@ end
232
232
  ### Cache
233
233
 
234
234
  Extends finder with cache possibility. Every call of `call` method will be cached in `Rails.cache`.
235
- Method `cache options` allows you to add custom options like `expire_in` or `tags` to `Rails.cache.fetch`.
235
+ Method `cache options` allows you to add custom options like `expires_in` or `tags` to `Rails.cache.fetch`.
236
236
  If you want to disable cache dependent of initialization arguments, you can use `cache?` DSL method.
237
237
 
238
238
  All in one Example:
@@ -247,7 +247,7 @@ class CachedPostsFinder
247
247
  end
248
248
 
249
249
  cache_options do
250
- {expire_in: 15.minutes} # This will be directly passed to Rails.cache.fetch
250
+ {expires_in: 15.minutes} # This will be directly passed to Rails.cache.fetch
251
251
  end
252
252
 
253
253
  def initialize(user)
data/dip.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  version: '1'
2
2
 
3
3
  environment:
4
- DOCKER_RUBY_VERSION: 2.2
5
- RUBY_IMAGE_TAG: 2.2-latest
4
+ DOCKER_RUBY_VERSION: 2.5
5
+ RUBY_IMAGE_TAG: 2.5-latest
6
6
  COMPOSE_FILE_EXT: development
7
7
  RAILS_ENV: test
8
8
 
data/findit.gemspec CHANGED
@@ -17,17 +17,15 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
18
  spec.require_paths = ["lib"]
19
19
 
20
- spec.add_runtime_dependency 'activesupport', '>= 3.1'
20
+ spec.add_runtime_dependency 'activesupport', '>= 4.0'
21
21
 
22
- spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_development_dependency 'activerecord'
23
23
  spec.add_development_dependency 'will_paginate'
24
24
  spec.add_development_dependency "rspec", ">= 3.2"
25
- spec.add_development_dependency "rspec-rails", ">= 3.2"
25
+ spec.add_development_dependency "rspec-rails", ">= 3.9.1"
26
26
  spec.add_development_dependency 'combustion', '>= 0.5'
27
27
  spec.add_development_dependency "appraisal", ">= 2.1.0"
28
- spec.add_development_dependency 'pry'
29
- spec.add_development_dependency 'shoulda-matchers', '< 3.0.0'
28
+ spec.add_development_dependency 'pry-byebug'
30
29
  spec.add_development_dependency 'simplecov'
31
30
  spec.add_development_dependency 'sqlite3'
32
- spec.add_development_dependency 'test-unit'
33
31
  end
data/lib/findit/cache.rb CHANGED
@@ -14,7 +14,7 @@
14
14
  # end
15
15
  #
16
16
  # cache_options do
17
- # {expire_in: 15.minutes}
17
+ # {expires_in: 15.minutes}
18
18
  # end
19
19
  #
20
20
  # private
@@ -31,7 +31,7 @@
31
31
  # end
32
32
  #
33
33
  # #/app/views/posts/index.html.erb
34
- # <% cache(@posts, tags: @posts.cache_tags, expire_in: @posts.expire_in) do %>
34
+ # <% cache(@posts, tags: @posts.cache_tags, expires_in: @posts.expires_in) do %>
35
35
  # <%= render 'post' colection: @posts, as: :post%>
36
36
  #
37
37
  module Findit
data/lib/findit/single.rb CHANGED
@@ -29,7 +29,7 @@
29
29
  # end
30
30
  #
31
31
  # #/app/views/posts/show.html.erb
32
- # <% cache(@post, expire_in: 15.minutes) do %>
32
+ # <% cache(@post, expires_in: 15.minutes) do %>
33
33
  # <%= render 'post', post: @post.load%>
34
34
  #
35
35
  module Findit
@@ -1,3 +1,3 @@
1
1
  module Findit
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: findit
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
  - Denis Korobicyn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-03 00:00:00.000000000 Z
11
+ date: 2021-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: '4.0'
20
20
  type: :runtime
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: '3.1'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '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: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: will_paginate
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '3.2'
75
+ version: 3.9.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '3.2'
82
+ version: 3.9.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: combustion
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.1.0
111
111
  - !ruby/object:Gem::Dependency
112
- name: pry
112
+ name: pry-byebug
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -122,20 +122,6 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: shoulda-matchers
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "<"
130
- - !ruby/object:Gem::Version
131
- version: 3.0.0
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "<"
137
- - !ruby/object:Gem::Version
138
- version: 3.0.0
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: simplecov
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -164,20 +150,6 @@ dependencies:
164
150
  - - ">="
165
151
  - !ruby/object:Gem::Version
166
152
  version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: test-unit
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
153
  description:
182
154
  email:
183
155
  - deniskorobitcin@gmail.com
@@ -188,6 +160,7 @@ files:
188
160
  - ".drone.yml"
189
161
  - ".gitignore"
190
162
  - Appraisals
163
+ - CHANGELOG.md
191
164
  - Gemfile
192
165
  - README.md
193
166
  - Rakefile
@@ -224,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
197
  version: '0'
225
198
  requirements: []
226
199
  rubyforge_project:
227
- rubygems_version: 2.5.1
200
+ rubygems_version: 2.6.1
228
201
  signing_key:
229
202
  specification_version: 4
230
203
  summary: Extensions for Finder classes