rectify 0.7.0 → 0.7.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: deb2b71f7c40c0fb4757215a7ba7410ef9a627c4
4
- data.tar.gz: 45b9aee2aae6176d9acabaa246eb21615c3470e9
3
+ metadata.gz: 0bcd5f022557ed0df7cc716ed09c8b9001c0303d
4
+ data.tar.gz: f021048068ca88137eb53b3b023972305f791cb5
5
5
  SHA512:
6
- metadata.gz: d97d1edb9d00fe805110457ad9613a304983fa018681bd10baf26d362f22b33f186900634d1c62718459fb40dc9a58052ef0dc507f3ecf3c04f8185910c4dfbb
7
- data.tar.gz: 726f511c00978ed1dd2f475bbd4f783465a3a3b5680816157f70df693204eaa6e48d03541f2438dfe5d1afff4a181356e7b272b6c5f35084597037bbee740c1f
6
+ metadata.gz: 18d2d0ea2a75fd8d3b462a26be50fb6c13d0094289d5f21e427d0b9dd3ea4b67317d1e9a976e1b6aec47e0f3eef9d0506243d8e0c82dc920e955022af3241cf5
7
+ data.tar.gz: 38dc5dffd208fb1540b607589626711897b18ab6454e89e5f476eae477bbb87fc001c38a053a45c6feb8df88cdcb479371ce8aa5a2aee69c3bce8356c6502f39
data/lib/rectify/query.rb CHANGED
@@ -52,6 +52,8 @@ module Rectify
52
52
  cached_query.to_a
53
53
  end
54
54
 
55
+ alias to_ary to_a
56
+
55
57
  def relation?
56
58
  cached_query.is_a?(ActiveRecord::Relation)
57
59
  end
@@ -1,3 +1,3 @@
1
1
  module Rectify
2
- VERSION = "0.7.0".freeze
2
+ VERSION = "0.7.1".freeze
3
3
  end
data/readme.md CHANGED
@@ -418,7 +418,7 @@ class RegisterAccount < Rectify::Command
418
418
 
419
419
  transaction do
420
420
  create_user
421
- notifiy_admins
421
+ notify_admins
422
422
  audit_event
423
423
  send_user_details_to_crm
424
424
  end
@@ -434,7 +434,7 @@ class RegisterAccount < Rectify::Command
434
434
  # ...
435
435
  end
436
436
 
437
- def notifiy_admins
437
+ def notify_admins
438
438
  # ...
439
439
  end
440
440
 
@@ -835,9 +835,7 @@ active_users_over_20 = ActiveUsers.new.merge(UsersOlderThan.new(20))
835
835
  active_users_over_20.count # => Returns number of active users over 20 years old
836
836
  ```
837
837
 
838
- If you have a long list of queries to compose, Rectify also comes with the class
839
- method `.merge` which takes multiple queries and combines them for you as if you
840
- used `|` (or `#merge`) on them all:
838
+ The `.merge` class method of `Rectify::Query` accepts multiple `Rectify::Query` objects to union together. This is the same as using the `|` operator on multiple `Rectify::Query` objects.
841
839
 
842
840
  ```ruby
843
841
  active_users_over_20 = Rectify::Query.merge(
@@ -848,9 +846,7 @@ active_users_over_20 = Rectify::Query.merge(
848
846
  active_users_over_20.count # => Returns number of active users over 20 years old
849
847
  ```
850
848
 
851
- If you don't those options for composing queries then the final option would be
852
- to pass in a query object to another in it's constructor and use it as the base
853
- scope:
849
+ You can also pass a `Rectify::Query` object into the constructor of another `Rectify::Query` object to set it as the base scope.
854
850
 
855
851
  ```ruby
856
852
  class UsersOlderThan < Rectify::Query
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rectify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Pike
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-28 00:00:00.000000000 Z
11
+ date: 2016-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus