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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: bc74ebfc66344e32f26ae6d1d368b60c8ba45430
4
- data.tar.gz: 33b4748429340037c4f361e89db1d16bb8542693
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MjNlYTdjMDQyNDQ5ZjNmNDdiYzRlY2NlZTRlOTczZjJlYzAwMWVmNw==
5
+ data.tar.gz: !binary |-
6
+ NTI2NjVkZjUzMTNiMzZhOTEwYTVmNjBjMTI1MDVlM2JhMWM1OWYyYg==
5
7
  SHA512:
6
- metadata.gz: ff8d52b79c3196dcf8df315a3113b17e36e5c35102557a2148a381d293628d3546b93d0fe67415d0778ff90f5b8f6efa2f05f3c29249cd4cd86b87c931922cb8
7
- data.tar.gz: c546542ce34a7a897fcc26455fbe400128f4c74cea055252a65bedec30f5baa4fe8d273e1c60d42ef08fbb7a006b74ab9396df6f60911ad8b5e57f10770de7a1
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 mocks with
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:
@@ -21,7 +21,7 @@ module Neo
21
21
  end
22
22
  include ::Rails.application.routes.url_helpers
23
23
 
24
- attr_accessor :output_buffer
24
+ attr_accessor :output_buffer, :params, :controller
25
25
  end
26
26
  end
27
27
  end
@@ -1,5 +1,5 @@
1
1
  module Neo
2
2
  module Rails
3
- VERSION = "0.3"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.version = Neo::Rails::VERSION
19
19
 
20
20
  gem.add_dependency "view_model-rails"
21
+ gem.add_dependency "mime-types", ['>= 1.0', '< 3.0']
21
22
 
22
23
  case rails_version
23
24
  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.3'
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: 2015-03-18 00:00:00.000000000 Z
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
- - ".gitignore"
93
- - ".simplecov"
94
- - ".travis.yml"
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.2.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