artirix_data_models 1.0.0.beta9 → 1.0.0.beta10

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: 51cf2ac011d50d6b250b70122edc4b984f34a847944d32d73e48eee6c33c18bb
4
- data.tar.gz: fb96c3a2f40a95c36f662e420e93c2b82ec7ea070b563d65f0cb8879e039a6b3
3
+ metadata.gz: 4cd6a068a83b61ecedda5145e35fbd18a92fa2457e9a950a4d381d5a705761c5
4
+ data.tar.gz: a5011b338480743016e8c2e96fb76610a2d0671298f51fecaee86a45b279d5c8
5
5
  SHA512:
6
- metadata.gz: 995f907438ed91d9b590c2f7e43a022182ff001f7037d7de1d7703615dcab9258d5b39496b8eaa7d1dd3fdd275ceb334f5f0e188d28fc8599067673ad1b211f6
7
- data.tar.gz: 8783adac248a275f2666adc44c171931ae07256881c565a52697b4959ae422c03ca770b8321397bc3ee192416b5d3c574fb1cff171fbeb3e159aa69b75ebe1b3
6
+ metadata.gz: 388141e372f2237ca7d7e645ef82c15b351259255308bf03a2343029c99c9dc468fef59a63b65f0f1149556e0642ba571662f3c429c9b63dad47becfeaae1bf3
7
+ data.tar.gz: c61faab4ea50ff52a5802c521d8084b25748ece7bc32aa24fb328604f80bdc63c81b08da641511e9a2ee1556e94533b69c62cb3c4ab7dbad2242bfa4187018be
@@ -2,8 +2,12 @@ language: ruby
2
2
  rvm:
3
3
  - 2.3.3
4
4
  - 2.4.0
5
+ - 2.5.3
6
+ - 2.6
5
7
 
6
- before_install: gem install bundler -v 1.11.2
8
+ before_install:
9
+ - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
10
+ - gem install bundler -v '< 2'
7
11
 
8
12
  addons:
9
13
  code_climate:
data/README.md CHANGED
@@ -320,6 +320,10 @@ end
320
320
 
321
321
  ## Changes
322
322
 
323
+ ### 1.0.0.beta10
324
+
325
+ - `CachedActionAdapter#force_fresh_fetch` method
326
+
323
327
  ### 1.0.0.beta9
324
328
 
325
329
  - remove deprecated codeclimate gem
@@ -31,8 +31,8 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency 'kaminari', '~> 0.16'
32
32
  spec.add_development_dependency 'will_paginate', '~> 3.0'
33
33
 
34
- spec.add_development_dependency 'bundler', '~> 1.10'
35
- spec.add_development_dependency 'rake', '~> 10.0'
34
+ spec.add_development_dependency 'bundler', '>= 1.10'
35
+ spec.add_development_dependency 'rake', '>= 10.0'
36
36
  spec.add_development_dependency 'rspec'
37
37
  spec.add_development_dependency 'rspec-given'
38
38
  spec.add_development_dependency 'faker'
@@ -1,13 +1,13 @@
1
1
  class ArtirixDataModels::CachedActionAdaptor
2
- STATUS_OK = 'ok'.freeze
2
+ STATUS_OK = 'ok'.freeze
3
3
  STATUS_NOT_FOUND = 'not_found'.freeze
4
- STATUSES = [STATUS_OK, STATUS_NOT_FOUND]
4
+ STATUSES = [STATUS_OK, STATUS_NOT_FOUND]
5
5
 
6
6
  attr_reader :logger, :cache
7
7
 
8
- def initialize(logger: nil, cache: nil, **ignored_options)
9
- @logger = logger || ArtirixDataModels.logger
10
- @cache = cache || ArtirixDataModels.cache
8
+ def initialize(logger: nil, cache: nil, **_ignored_options)
9
+ @logger = logger || ArtirixDataModels.logger
10
+ @cache = cache || ArtirixDataModels.cache
11
11
  @enabled = true
12
12
  end
13
13
 
@@ -21,14 +21,16 @@ class ArtirixDataModels::CachedActionAdaptor
21
21
  if cached?
22
22
  get_cached_result
23
23
  elsif block_given?
24
- perform &block
25
- else
26
- nil
24
+ perform(&block)
27
25
  end
28
26
  end
29
27
 
30
28
  alias_method :call, :fetch
31
29
 
30
+ def force_fresh_fetch(&block)
31
+ perform(&block) if block_given?
32
+ end
33
+
32
34
  def enable
33
35
  @enabled = true
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module ArtirixDataModels
2
- VERSION = '1.0.0.beta9'
2
+ VERSION = '1.0.0.beta10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artirix_data_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta9
4
+ version: 1.0.0.beta10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Turiño
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-29 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -154,28 +154,28 @@ dependencies:
154
154
  name: bundler
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
159
  version: '1.10'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '1.10'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rake
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '10.0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - "~>"
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '10.0'
181
181
  - !ruby/object:Gem::Dependency