association_scope 0.1.0 → 0.2.0

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: 3cdd5ffca0653bd30600b32060a42de12505e41af7beae5a4faf750e95189925
4
- data.tar.gz: ce11c4a40bf02a01ca03e7d06ababdda30bc7c01012cd7b91241a2101ec19d70
3
+ metadata.gz: 68f9bb59cba6aef5a515e5e98bc1d2142be093806189a34afabd69ae6c644e1a
4
+ data.tar.gz: 4fcc7b908d68b66c9225538132018ca9dd0925a8ba6ab5c634df5629cebc11cc
5
5
  SHA512:
6
- metadata.gz: 8e380d107ae796069965a993e4ef4c375caea859450e018dffd0f0f53cea917696f7e4fcfd34f556d5b0e0d805e33ad4590cb1acdba115e76691f96884d43f8a
7
- data.tar.gz: b54e0f129fb76f8815c19997e7fdfe3b130bd316c38d4085f566592bfa10d2b3b1b37ecc4a416faa35e8d3d7e681ed7e2849b588955b7c207b5e380ee9403301
6
+ metadata.gz: da819d457189fb70dc3b4cd4f09af01c6a3547c8c5f5fa36a38efd4bf01f7c65c2110e4852d91ccc857a4965ce19c0b64f6425ab7034f1077c65a291668e1bc9
7
+ data.tar.gz: 956f163600f9afcc845fe29f3d621661538b529cea40e84c2ba32fede3356760a81692c11ed6500de436aa4b52f9533c4e18649abadc34d58f915b9f9d08187f
data/README.md CHANGED
@@ -29,7 +29,7 @@ When you have this problem, the AssociationScope gem is for you!
29
29
  Add this line to your application's Gemfile:
30
30
 
31
31
  ```ruby
32
- gem 'association_scope', git: 'https://github.com/datae95/association_scope', branch: :main
32
+ gem 'association_scope'
33
33
  ```
34
34
 
35
35
  And then execute:
@@ -37,6 +37,11 @@ And then execute:
37
37
  $ bundle
38
38
  ```
39
39
 
40
+ Or install it yourself as:
41
+ ```bash
42
+ $ gem install association_scope
43
+ ```
44
+
40
45
  ## Usage
41
46
  After installation you can use `acts_as_association_scope` in your models:
42
47
  ```ruby
@@ -46,11 +51,11 @@ class Topic < ApplicationRecord
46
51
  end
47
52
  ```
48
53
  Now you can use your associations as scopes and chain other scopes with them.
49
- When you have the classes `User` with many `Topic`s and every `Topic` has many `Post`s with many `Comment`s and all of them use `acts_as_association_scope`, you can write
54
+ You can write
50
55
  ```ruby
51
- User.first.topics.posts.comments
56
+ Topic.all.users
52
57
  ```
53
- to retrieve all comments of all posts of all topics of your first user.
58
+ to retrieve the users of all of the topics of your application.
54
59
 
55
60
  ## Known Issues
56
61
  * This gem works with `reflections`.
@@ -74,5 +79,8 @@ Workaround: Migrate JSON columns to JSONB.
74
79
  * Error messages are not raised during application start, but on first instantiation, because of the order in which classes are loaded.
75
80
 
76
81
  ## Development
77
- Clone the app and run `bundle`.
78
- To use `rails console` you have to navigate to the dummy application `cd spec/dummy`.
82
+ Clone this repository and run `bundle`.
83
+ To use `rails console` you have to navigate to the dummy application
84
+ ```bash
85
+ $ cd spec/dummy
86
+ ```
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AssociationScope
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: association_scope
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - datae
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-01 00:00:00.000000000 Z
11
+ date: 2021-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 6.1.4
19
+ version: '5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 6.1.4
26
+ version: '5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: standard
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.1.6
34
- type: :runtime
34
+ type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
@@ -45,13 +45,27 @@ dependencies:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.9.26
48
- type: :runtime
48
+ type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.9.26
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.10'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.10'
55
69
  description: AssociationScope adds useful scopes targeting Associations in ActiveRecord.
56
70
  email:
57
71
  - accounts@datae.de
@@ -93,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
107
  - !ruby/object:Gem::Version
94
108
  version: '0'
95
109
  requirements: []
96
- rubygems_version: 3.1.4
110
+ rubygems_version: 3.2.15
97
111
  signing_key:
98
112
  specification_version: 4
99
113
  summary: AssociationScope adds useful scopes targeting Associations in ActiveRecord.