simpre 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/lib/simpre/helper.rb +4 -0
- data/lib/simpre/version.rb +1 -1
- data/simpre.gemspec +1 -0
- metadata +25 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e973c05de9a7b234530590b64bd75f0ebe74e0b3
|
4
|
+
data.tar.gz: 53e23e0516eead3ac4abf9efdec426eb75d6b11a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aebd00253858fee75c270a2b30c3aac34d5f5d90859f2005eb177af4bdfec47edc94dadffdf9b1140e765489bed2938d21fbc7d82870b9f5521d325bcbec92ff
|
7
|
+
data.tar.gz: 4ebefd5f0ba4b552d443cd89797ffe90d2919bac30d3850d0e25a9c104f29b2241e5add0a2a5c6b9042ea9832bc02d0c011d86bdc9349196c14b7cb3c2e07234
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.3
|
data/lib/simpre/helper.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module Simpre
|
2
|
+
# A helper method for decorating objects
|
2
3
|
module Helper
|
3
4
|
def decorate(item_or_collection)
|
4
5
|
if item_or_collection.respond_to?(:map)
|
@@ -14,6 +15,9 @@ module Simpre
|
|
14
15
|
private
|
15
16
|
|
16
17
|
def current_view_context
|
18
|
+
# if calling `decorate` from another presenter return the existing
|
19
|
+
# view_context
|
20
|
+
return h if is_a?(Presenter)
|
17
21
|
is_a?(ApplicationController) ? view_context : self
|
18
22
|
end
|
19
23
|
end
|
data/lib/simpre/version.rb
CHANGED
data/simpre.gemspec
CHANGED
metadata
CHANGED
@@ -1,43 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simpre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Dyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.7'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.4'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.4'
|
41
55
|
description: A super simple presenter implementation for Rails apps
|
42
56
|
email:
|
43
57
|
- jamie@kernowsoul.com
|
@@ -45,7 +59,8 @@ executables: []
|
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
|
-
- .gitignore
|
62
|
+
- ".gitignore"
|
63
|
+
- ".ruby-version"
|
49
64
|
- Gemfile
|
50
65
|
- LICENSE.txt
|
51
66
|
- README.md
|
@@ -66,17 +81,17 @@ require_paths:
|
|
66
81
|
- lib
|
67
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
68
83
|
requirements:
|
69
|
-
- -
|
84
|
+
- - ">="
|
70
85
|
- !ruby/object:Gem::Version
|
71
86
|
version: '0'
|
72
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
88
|
requirements:
|
74
|
-
- -
|
89
|
+
- - ">="
|
75
90
|
- !ruby/object:Gem::Version
|
76
91
|
version: '0'
|
77
92
|
requirements: []
|
78
93
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.4.8
|
80
95
|
signing_key:
|
81
96
|
specification_version: 4
|
82
97
|
summary: A super simple presenter implementation for Rails apps
|