activeset 0.8.1 → 0.8.2

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: bbf4217bf27e15473b352948d99a734ccb9e8c7f
4
- data.tar.gz: 420ef8ce849ce5dd0a7539533609eb56e474ccb8
3
+ metadata.gz: '090c118d248ba30a9211b369e12636499c05a95b'
4
+ data.tar.gz: 458586ba5bfcddaedaf6fab6ebaf09f8d36a6e14
5
5
  SHA512:
6
- metadata.gz: c507ef02f81b2d5ecbae34eb69cbf852fab01177b37c48bc16d6badee56b969a5a904cae488d7becf6fe59272435b4984446445caaffa8158a96f86eed538c7f
7
- data.tar.gz: 79e30270feda953162ee11a03a096fd142c5c4f0b0cbfd5a76bfdfc4af315cdfe85379b732d351efed9b07e261d797650488bbda366e3485bd9d8751e5906a10
6
+ metadata.gz: 33676ed9e211c8fa8c70048851815d52931ba4b11ed6e3704180ee25629fd322dac291d72223c24757699698ae07726bb7f26b3d4a9c08bad62149009b845a62
7
+ data.tar.gz: 8db447ae3d2440bca54cb0a47c4d2f8c1ae93794087228ed702e7bffdd03aeaa60f09fd9431f7149cd1913cf959c572b9ac1bbee50be207c4afb491d6cb21713
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v 0.8.2
2
+ - fix a bug that prevents enumerable sets from being filtered down to empty sets
1
3
  v 0.8.1
2
4
  - fix a small bug when doing ARel filtering against binary fields
3
5
  - add the ARel operators to the README
@@ -6,7 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  Gem::Specification.new do |spec|
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.name = 'activeset'
9
- spec.version = '0.8.1'
9
+ spec.version = '0.8.2'
10
10
  spec.authors = ['Stephen Margheim']
11
11
  spec.email = ['stephen.margheim@gmail.com']
12
12
 
@@ -30,7 +30,10 @@ class ActiveSet
30
30
 
31
31
  attribute_instructions.reject(&:processed?).reduce(activerecord_filtered_set) do |set, attribute_instruction|
32
32
  maybe_set_or_false = EnumerableStrategy.new(set, attribute_instruction).execute
33
- maybe_set_or_false.presence || set
33
+ next set unless maybe_set_or_false
34
+
35
+ attribute_instruction.processed = true
36
+ maybe_set_or_false
34
37
  end
35
38
  end
36
39
  # rubocop:enable Metrics/MethodLength
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-17 00:00:00.000000000 Z
11
+ date: 2019-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -214,7 +214,6 @@ files:
214
214
  - bin/console
215
215
  - bin/setup
216
216
  - config.ru
217
- - lib/.DS_Store
218
217
  - lib/active_set.rb
219
218
  - lib/active_set/attribute_instruction.rb
220
219
  - lib/active_set/column_instruction.rb