frozen_record 0.21.0 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +4 -1
- data/lib/frozen_record/base.rb +1 -1
- data/lib/frozen_record/compact.rb +1 -1
- data/lib/frozen_record/scope.rb +1 -1
- data/lib/frozen_record/version.rb +1 -1
- data/spec/scope_spec.rb +1 -1
- data/spec/spec_helper.rb +10 -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: 0a25a269067396d2e6054a57c514b1251e39dca90928e7bdd837bfbb9ef8d2cf
|
4
|
+
data.tar.gz: 77b55ee24e39590dd213c157b22e3707c8f551a051df34f516a1e9d061d4eb6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1d23916d54278598ec3ba29e5c1000f4adb0f13566db9be7900e5344199e36fe02254539a531a26d8b2d211e62f3916438c98032e7166795fbbf1681a170b91
|
7
|
+
data.tar.gz: af66cb72d621f8d6008de238d7f0846bf576200437fbdead4cfcdd1d598af62ac4d29bd801efd14420bfddb4470301312eb992628e2c7185e21b8dbee0381f6e
|
data/.github/workflows/main.yml
CHANGED
@@ -8,7 +8,8 @@ jobs:
|
|
8
8
|
strategy:
|
9
9
|
matrix:
|
10
10
|
ruby: [ '2.5', '2.6', '2.7', '3.0' ]
|
11
|
-
|
11
|
+
minimal: [ false, true ]
|
12
|
+
name: Ruby ${{ matrix.ruby }} tests, minimal=${{ matrix.minimal }}
|
12
13
|
steps:
|
13
14
|
- uses: actions/checkout@v2
|
14
15
|
- name: Setup Ruby
|
@@ -26,4 +27,6 @@ jobs:
|
|
26
27
|
gem install bundler
|
27
28
|
bundle install --jobs 4 --retry 3 --path=vendor/bundle
|
28
29
|
- name: Run tests
|
30
|
+
env:
|
31
|
+
MINIMAL: ${{ matrix.minimal }}
|
29
32
|
run: bundle exec rake
|
data/lib/frozen_record/base.rb
CHANGED
@@ -239,7 +239,7 @@ module FrozenRecord
|
|
239
239
|
private
|
240
240
|
|
241
241
|
def attribute?(attribute_name)
|
242
|
-
FALSY_VALUES.
|
242
|
+
!FALSY_VALUES.include?(self[attribute_name]) && self[attribute_name].present?
|
243
243
|
end
|
244
244
|
|
245
245
|
def attribute_method?(attribute_name)
|
data/lib/frozen_record/scope.rb
CHANGED
@@ -234,7 +234,7 @@ module FrozenRecord
|
|
234
234
|
end
|
235
235
|
|
236
236
|
def array_delegable?(method)
|
237
|
-
Array.method_defined?(method) && DISALLOWED_ARRAY_METHODS.
|
237
|
+
Array.method_defined?(method) && !DISALLOWED_ARRAY_METHODS.include?(method)
|
238
238
|
end
|
239
239
|
|
240
240
|
def where!(criterias)
|
data/spec/scope_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
lib = File.expand_path('../lib', __FILE__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
|
4
|
+
minimal = ENV['MINIMAL'] == 'true'
|
5
|
+
|
4
6
|
require 'pry'
|
5
7
|
require 'simplecov'
|
6
8
|
require 'coveralls'
|
@@ -11,7 +13,13 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
11
13
|
SimpleCov.start
|
12
14
|
|
13
15
|
require 'objspace'
|
14
|
-
|
16
|
+
|
17
|
+
if minimal
|
18
|
+
require 'frozen_record/minimal'
|
19
|
+
else
|
20
|
+
require 'frozen_record'
|
21
|
+
end
|
22
|
+
|
15
23
|
require 'frozen_record/test_helper'
|
16
24
|
|
17
25
|
FrozenRecord::Base.base_path = File.join(File.dirname(__FILE__), 'fixtures')
|
@@ -23,6 +31,7 @@ FrozenRecord.eager_load!
|
|
23
31
|
RSpec.configure do |config|
|
24
32
|
config.run_all_when_everything_filtered = true
|
25
33
|
config.filter_run :focus
|
34
|
+
config.filter_run_excluding :exclude_minimal if minimal
|
26
35
|
|
27
36
|
config.order = 'random'
|
28
37
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frozen_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|