neo-rails 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/README.md +33 -1
- data/lib/neo/rails/presenter/test_helper.rb +1 -1
- data/lib/neo/rails/version.rb +1 -1
- data/neo-rails.gemspec +1 -0
- metadata +38 -18
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MjNlYTdjMDQyNDQ5ZjNmNDdiYzRlY2NlZTRlOTczZjJlYzAwMWVmNw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NTI2NjVkZjUzMTNiMzZhOTEwYTVmNjBjMTI1MDVlM2JhMWM1OWYyYg==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjJiNmQzZmMzZTE4MGNlMTVjYjRkMmI4ZWU1YWU1YjNmZmFjOGM3ODQyYjgx
|
10
|
+
ZWZmZDVkNGIyZTg5MTBiZDk0ZDU0ODRhZTBiYjhhYzg0NmRlOGVjNDM4MDkx
|
11
|
+
ZWIyYjYxMzMyYTYzYThmZWEzMjA0ZTdhODUyODIzZjBiN2NkOGY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZDg4MmEzYzgyNmIyNzlkNDMwYjljZDk3NWE4ZmRkOWNmYTMxMmRiYzNlNmM3
|
14
|
+
ZjhhOTMzZWY1MDRiOTQ4OWM4N2EyYWFhNzI5OWI2OTgyOGVkYjk3Y2M2MDBh
|
15
|
+
ZGQxYTNmNTQ3YWE5ZmQ1OTY0OGY3YTYzZTE5NmQ3MTQ0OWZjMDQ=
|
data/README.md
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
This gem includes:
|
23
23
|
* Mocks
|
24
24
|
* Presenters
|
25
|
+
* View Models
|
25
26
|
* Exposure
|
26
27
|
* Scenarios
|
27
28
|
|
@@ -39,7 +40,7 @@ Or install it yourself as:
|
|
39
40
|
|
40
41
|
$ gem install neo-rails
|
41
42
|
|
42
|
-
You can generate base classes for your presenters and
|
43
|
+
You can generate base classes for your presenters, mocks and view models with
|
43
44
|
|
44
45
|
$ rake neo-rails:setup
|
45
46
|
|
@@ -55,6 +56,9 @@ rails g presenter User
|
|
55
56
|
```ruby
|
56
57
|
rails g mock User
|
57
58
|
```
|
59
|
+
```ruby
|
60
|
+
rails g view_model UserProfile
|
61
|
+
```
|
58
62
|
|
59
63
|
|
60
64
|
### Presenter
|
@@ -89,6 +93,34 @@ require 'neo/rails/presenter/test_helper'
|
|
89
93
|
Neo::Rails::Presenter::TestHelper.setup
|
90
94
|
```
|
91
95
|
|
96
|
+
### Exposures
|
97
|
+
|
98
|
+
In app/controllers/pages_controller.rb
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
class PagesController < ApplicationController
|
102
|
+
include Neo::Rails::Exposure
|
103
|
+
|
104
|
+
exposes :title, :description
|
105
|
+
|
106
|
+
def faq
|
107
|
+
expose :title, "A title"
|
108
|
+
expose :description, "A description"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
```
|
112
|
+
|
113
|
+
In app/views/pages/faq.html.erb
|
114
|
+
|
115
|
+
```erb
|
116
|
+
<div class="title">
|
117
|
+
<%= title %>
|
118
|
+
</div>
|
119
|
+
<div class="description">
|
120
|
+
<%= description %>
|
121
|
+
</div>
|
122
|
+
```
|
123
|
+
|
92
124
|
### Scenarios
|
93
125
|
|
94
126
|
In app/assets/stylesheets/application.css:
|
data/lib/neo/rails/version.rb
CHANGED
data/neo-rails.gemspec
CHANGED
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:
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Thiel
|
@@ -9,76 +9,96 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: view_model-rails
|
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: :runtime
|
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
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: mime-types
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ! '>='
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.0'
|
35
|
+
- - <
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '3.0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '1.0'
|
45
|
+
- - <
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
28
48
|
- !ruby/object:Gem::Dependency
|
29
49
|
name: minitest
|
30
50
|
requirement: !ruby/object:Gem::Requirement
|
31
51
|
requirements:
|
32
|
-
- -
|
52
|
+
- - ! '>='
|
33
53
|
- !ruby/object:Gem::Version
|
34
54
|
version: '0'
|
35
55
|
type: :development
|
36
56
|
prerelease: false
|
37
57
|
version_requirements: !ruby/object:Gem::Requirement
|
38
58
|
requirements:
|
39
|
-
- -
|
59
|
+
- - ! '>='
|
40
60
|
- !ruby/object:Gem::Version
|
41
61
|
version: '0'
|
42
62
|
- !ruby/object:Gem::Dependency
|
43
63
|
name: rake
|
44
64
|
requirement: !ruby/object:Gem::Requirement
|
45
65
|
requirements:
|
46
|
-
- -
|
66
|
+
- - ! '>='
|
47
67
|
- !ruby/object:Gem::Version
|
48
68
|
version: '0'
|
49
69
|
type: :development
|
50
70
|
prerelease: false
|
51
71
|
version_requirements: !ruby/object:Gem::Requirement
|
52
72
|
requirements:
|
53
|
-
- -
|
73
|
+
- - ! '>='
|
54
74
|
- !ruby/object:Gem::Version
|
55
75
|
version: '0'
|
56
76
|
- !ruby/object:Gem::Dependency
|
57
77
|
name: rack-test
|
58
78
|
requirement: !ruby/object:Gem::Requirement
|
59
79
|
requirements:
|
60
|
-
- -
|
80
|
+
- - ! '>='
|
61
81
|
- !ruby/object:Gem::Version
|
62
82
|
version: '0'
|
63
83
|
type: :development
|
64
84
|
prerelease: false
|
65
85
|
version_requirements: !ruby/object:Gem::Requirement
|
66
86
|
requirements:
|
67
|
-
- -
|
87
|
+
- - ! '>='
|
68
88
|
- !ruby/object:Gem::Version
|
69
89
|
version: '0'
|
70
90
|
- !ruby/object:Gem::Dependency
|
71
91
|
name: simplecov
|
72
92
|
requirement: !ruby/object:Gem::Requirement
|
73
93
|
requirements:
|
74
|
-
- -
|
94
|
+
- - ! '>='
|
75
95
|
- !ruby/object:Gem::Version
|
76
96
|
version: '0'
|
77
97
|
type: :development
|
78
98
|
prerelease: false
|
79
99
|
version_requirements: !ruby/object:Gem::Requirement
|
80
100
|
requirements:
|
81
|
-
- -
|
101
|
+
- - ! '>='
|
82
102
|
- !ruby/object:Gem::Version
|
83
103
|
version: '0'
|
84
104
|
description: Some Rails helpers
|
@@ -89,9 +109,9 @@ executables: []
|
|
89
109
|
extensions: []
|
90
110
|
extra_rdoc_files: []
|
91
111
|
files:
|
92
|
-
-
|
93
|
-
-
|
94
|
-
-
|
112
|
+
- .gitignore
|
113
|
+
- .simplecov
|
114
|
+
- .travis.yml
|
95
115
|
- Gemfile
|
96
116
|
- LICENSE
|
97
117
|
- README.md
|
@@ -139,17 +159,17 @@ require_paths:
|
|
139
159
|
- lib
|
140
160
|
required_ruby_version: !ruby/object:Gem::Requirement
|
141
161
|
requirements:
|
142
|
-
- -
|
162
|
+
- - ! '>='
|
143
163
|
- !ruby/object:Gem::Version
|
144
164
|
version: '0'
|
145
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
166
|
requirements:
|
147
|
-
- -
|
167
|
+
- - ! '>='
|
148
168
|
- !ruby/object:Gem::Version
|
149
169
|
version: '0'
|
150
170
|
requirements: []
|
151
171
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
172
|
+
rubygems_version: 2.4.8
|
153
173
|
signing_key:
|
154
174
|
specification_version: 4
|
155
175
|
summary: Rails mocks, presenters, exposure and scenarios
|