simple_exposure 0.0.1 → 0.0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6213f9983cd1304fe8a1ca1b5b07439dde3f44d
|
4
|
+
data.tar.gz: f51988204546151b272a6332ba049f4046901f1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1f5e71198dcd3cf61165a39baabd819069db2ce2e790cf25244b26ed76c82058ddb375d9cc64f964d14a40e0050bbc214f4fb18e00a4d27d0c013021b454870
|
7
|
+
data.tar.gz: 9b6827ad0f3cb77ba298e115e8b0dee0163d1155951b84dea155ca27de33f10491453cea18e46bff1bdc4a95ea2b11be88d0a6cdd2261b6f8bad56feac4689bd
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# SimpleExposure
|
2
2
|
|
3
|
+

|
4
|
+

|
5
|
+

|
6
|
+

|
7
|
+
|
3
8
|
Simplify sharing state between Rails controllers and views and reduce noise in Rails controllers for those who are tired of writing the same code over and over again.
|
4
9
|
|
5
10
|
Based on the idea behind [view_accessor](https://github.com/invisiblefunnel/view_accessor) borrowing features I like from [decent_exposure](https://github.com/voxdolo/decent_exposure).
|
data/lib/simple_exposure/core.rb
CHANGED
@@ -22,8 +22,11 @@ module SimpleExposure
|
|
22
22
|
|
23
23
|
def _apply_exposure_extension(attribute, extension)
|
24
24
|
value = send(attribute)
|
25
|
-
|
26
|
-
|
25
|
+
|
26
|
+
unless value.nil?
|
27
|
+
extension = _exposure_extension_class(extension)
|
28
|
+
send :"#{attribute}=", extension.apply(value, self)
|
29
|
+
end
|
27
30
|
end
|
28
31
|
|
29
32
|
def _exposure_extension_class(extension)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_exposure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michal Krejčí
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- ".gitignore"
|
69
69
|
- ".ruby-gemset"
|
70
70
|
- ".ruby-version"
|
71
|
+
- ".travis.yml"
|
71
72
|
- Gemfile
|
72
73
|
- LICENSE.txt
|
73
74
|
- README.md
|