scopie 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -9
- data/lib/scopie/version.rb +1 -1
- metadata +2 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2d21ca829884963f93e3946c8af27c9c5c8b767
|
4
|
+
data.tar.gz: 2df62e49855d30b6f16ba3364cd8062b38b23fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3911f397d21417168a8246619c3ff9416a176a943c5c917b99395ef997d586353a7426e0d7ada846e9f2a2caa32bf76103dad2d90a8ed06f543cc03abad1851c
|
7
|
+
data.tar.gz: 08cdca7d0fc08ac45f3c75b071588ed09b18c25a82bb40377ea408041c512edec538a4e1e4bc5fe1e8680cf7f521e1f0c7eae5e67a0244b4de74abb517fe1621
|
data/README.md
CHANGED
@@ -1,19 +1,21 @@
|
|
1
1
|
## Scopie
|
2
2
|
|
3
3
|
[](https://codeclimate.com/github/beorc/scopie)
|
4
|
+
[](https://travis-ci.org/beorc/scopie)
|
5
|
+
[](https://codecov.io/gh/beorc/scopie)
|
6
|
+
[](https://gemnasium.com/beorc/scopie)
|
7
|
+
[](https://badge.fury.io/rb/scopie)
|
4
8
|
|
5
|
-
|
9
|
+
A [has_scope](http://github.com/plataformatec/has_scope) alternative.
|
6
10
|
|
7
|
-
Scopie allows you to map incoming controller parameters to named scopes in your resources.
|
11
|
+
Scopie allows you to map incoming controller parameters to named scopes in your resources through OO design.
|
8
12
|
|
9
|
-
|
13
|
+
Motivation:
|
10
14
|
|
11
|
-
|
12
|
-
|
13
|
-
*
|
14
|
-
*
|
15
|
-
* To override default mapping behavior you don't need to pass a block - just define a method with the same name as scope.
|
16
|
-
* You can DRY your custom scopes mapping logic by using helper methods defined in scopie class and use the same scopie class in multiple controllers.
|
15
|
+
* Dedicated class for scopes mapping, so that the logic is isolated and your controller is skinny.
|
16
|
+
* Dependencies free. Please have a look at [scopie_rails](http://github.com/beorc/scopie_rails) if you are using Ruby on Rails framework.
|
17
|
+
* Ability to override default mapping behavior by definition of a method with the same name as scope in the scopie class.
|
18
|
+
* Ability to DRY your custom scopes mapping logic using private methods defined in scopie class and use the same scopie class in multiple controllers.
|
17
19
|
|
18
20
|
Imagine the following model called graduations:
|
19
21
|
|
data/lib/scopie/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scopie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Kotov
|
@@ -9,77 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2016-06-25 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: rspec
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.4'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '3.4'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rubocop
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0.40'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.40'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '11'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '11'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: pry
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: simplecov
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
12
|
+
dependencies: []
|
83
13
|
description: Minimal mapping of incoming parameters to named scopes in your resources
|
84
14
|
through OO design and pure Ruby classes
|
85
15
|
email:
|