activeset 0.5.7 → 0.5.8

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: d6972c807b12c1eb191198aecdc0c08256953382
4
- data.tar.gz: 8c9c412d18da350ebdae78a46f006ebad98764e8
3
+ metadata.gz: 247cfa01133a97a1cd14001735f39c8893991ba2
4
+ data.tar.gz: 4486e9c33939988777f2f48b34cd380025754088
5
5
  SHA512:
6
- metadata.gz: 47ad1ecf1991b76272e234476c62832c5b15cf6011a21d44ecbb77718a40f5ac7524dad1cc0344daf3fad0ee076d990d123106cf52557d4985318ea3d89c2f4e
7
- data.tar.gz: 40aacf00dbe68267c227d7b3712ffa5433abd9db89197610cde7fc8ffeb711cedb829fee9c497d4794b4629f0aedc3d046155698dfbf5ecca33ff94f3b9d8dd8
6
+ metadata.gz: 1fc8a19b38aae78bd7e31e8ab26b670ef8fbdb6f6378c7bf7621f46e8e1b7e34f81f3c44a74c26916fe64d68686d548af0d20ec19ba572ebde493b92ee1b0309
7
+ data.tar.gz: 49fdcd2b998a7ec0fdfdb1d9dd3febb284d17abadc54085145883e6a4209b6815a45979b0d0ed6388d048f809f3b6501cabbd7082a004b18cb372f0965029878
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v 0.5.8
2
+ - Avoid a possible error path where relations with a '#union' would blow up when using '#merge' because the '#order' operation was being built with the relation and not with the relation's base class
1
3
  v 0.5.7
2
4
  - Fix bug where filtering wasn't updating the new ActiveSet instances #total_count
3
5
  - Add that this gem now does transformations to the README
data/README.md CHANGED
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- The `ActiveSet` class is an extension of `Enumerable` that adds methods for filtering, sorting, paginating, and transforming (right now; other methods are sure to follow).
21
+ The `ActiveSet` class is an extension of `Enumerable` that adds methods for filtering, sorting, paginating, and transforming (as of right now).
22
22
 
23
23
  Every convenience method added to the `ActiveSet` class is handled via a `Processor` class, and that `Processor` class will then use 1 or more `Adapter` classes to actually fulfill the functional contract.
24
24
 
@@ -39,8 +39,6 @@ e.g. `filter(attribute: 'value', association: { field: 'value' })` or `sort(attr
39
39
 
40
40
  This library does not deal with typecasting string values; the values of your structures must be of the appropriate data-type.
41
41
 
42
- This library does not work with `:time` fields in ActiveRecord relations.
43
-
44
42
  ## Development
45
43
 
46
44
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -34,7 +34,7 @@ class ActiveSet
34
34
 
35
35
  def attribute_model
36
36
  @instruction.associations_array
37
- .reduce(@set) do |obj, assoc|
37
+ .reduce(@set.klass) do |obj, assoc|
38
38
  obj.reflections[assoc.to_s]&.klass
39
39
  end
40
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ActiveSet
4
- VERSION = '0.5.7'
4
+ VERSION = '0.5.8'
5
5
  end
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.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-21 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport