neo-rails 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/README.md +12 -0
- data/lib/neo/rails/exposure.rb +4 -5
- data/lib/neo/rails/version.rb +1 -1
- data/neo-rails.gemspec +4 -0
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: debc9008babf85c35225fbdb512555e6013521f4
|
4
|
+
data.tar.gz: 8ac5e36b3247c882f0da1f4e6dffeae143e276ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbf228797fe40e2a6c36da332e51d6241d4320dca62ef291cccdb8d5907b392a6b2d514492f825dd986d7431e799a8d0a0e655b19ec0cb4c5cd72134851fbb0d
|
7
|
+
data.tar.gz: d3e8cfc2b3e52c82f491d15b08c37dadac0636f0743894afd0ceb6dd5a472db3319d76b53110d1ff0d3e29df0514cd74d6b0abb047be209d01ae0bdd98476bda
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -30,6 +30,18 @@ You can generate base classes for your presenters and mocks with
|
|
30
30
|
|
31
31
|
## Usage
|
32
32
|
|
33
|
+
### Generators
|
34
|
+
Create files and tests...
|
35
|
+
|
36
|
+
Example 'User':
|
37
|
+
```ruby
|
38
|
+
rails g presenter User
|
39
|
+
```
|
40
|
+
```ruby
|
41
|
+
rails g mock User
|
42
|
+
```
|
43
|
+
|
44
|
+
|
33
45
|
### Presenter
|
34
46
|
|
35
47
|
In app/presenters/presenter.rb
|
data/lib/neo/rails/exposure.rb
CHANGED
@@ -25,12 +25,11 @@ module Neo
|
|
25
25
|
|
26
26
|
# Define a helper method for each exposure
|
27
27
|
# see Rails: /actionpack/lib/abstract_controller/helpers.rb
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
controller.exposures[exposure_name]
|
32
|
-
end
|
28
|
+
exposure_names.each do |exposure_name|
|
29
|
+
define_method exposure_name do
|
30
|
+
self.exposures[exposure_name]
|
33
31
|
end
|
32
|
+
self.helper_method exposure_name
|
34
33
|
end
|
35
34
|
end
|
36
35
|
end
|
data/lib/neo/rails/version.rb
CHANGED
data/neo-rails.gemspec
CHANGED
@@ -18,6 +18,10 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.version = Neo::Rails::VERSION
|
19
19
|
|
20
20
|
case rails_version
|
21
|
+
when '4.1.6'
|
22
|
+
gem.add_development_dependency "minitest", '~> 5.4'
|
23
|
+
when '4.1'
|
24
|
+
gem.add_development_dependency "minitest", '~> 5.1'
|
21
25
|
when '4.0'
|
22
26
|
gem.add_development_dependency "minitest"
|
23
27
|
when '3.2'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Thiel
|
@@ -9,62 +9,62 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rack-test
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: simplecov
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
description: Some Rails helpers
|
@@ -75,9 +75,9 @@ executables: []
|
|
75
75
|
extensions: []
|
76
76
|
extra_rdoc_files: []
|
77
77
|
files:
|
78
|
-
- .gitignore
|
79
|
-
- .simplecov
|
80
|
-
- .travis.yml
|
78
|
+
- ".gitignore"
|
79
|
+
- ".simplecov"
|
80
|
+
- ".travis.yml"
|
81
81
|
- Gemfile
|
82
82
|
- LICENSE
|
83
83
|
- README.md
|
@@ -125,17 +125,17 @@ require_paths:
|
|
125
125
|
- lib
|
126
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- -
|
128
|
+
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
requirements:
|
133
|
-
- -
|
133
|
+
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.2.2
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Rails mocks, presenters, exposure and scenarios
|