neo-rails 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +1 -1
- data/lib/neo/rails/presenter/test_helper.rb +21 -0
- data/lib/neo/rails/version.rb +1 -1
- data/neo-rails.gemspec +2 -0
- data/test/exposure_test.rb +5 -5
- data/test/helper.rb +2 -2
- metadata +51 -23
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NTI2NjVkZjUzMTNiMzZhOTEwYTVmNjBjMTI1MDVlM2JhMWM1OWYyYg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8549602e85a4369b19f06264c165cd792d8ab642
|
4
|
+
data.tar.gz: fb90210beafab8abe23762cafa9d0e37785e16f7
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZWZmZDVkNGIyZTg5MTBiZDk0ZDU0ODRhZTBiYjhhYzg0NmRlOGVjNDM4MDkx
|
11
|
-
ZWIyYjYxMzMyYTYzYThmZWEzMjA0ZTdhODUyODIzZjBiN2NkOGY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZDg4MmEzYzgyNmIyNzlkNDMwYjljZDk3NWE4ZmRkOWNmYTMxMmRiYzNlNmM3
|
14
|
-
ZjhhOTMzZWY1MDRiOTQ4OWM4N2EyYWFhNzI5OWI2OTgyOGVkYjk3Y2M2MDBh
|
15
|
-
ZGQxYTNmNTQ3YWE5ZmQ1OTY0OGY3YTYzZTE5NmQ3MTQ0OWZjMDQ=
|
6
|
+
metadata.gz: 259a22ede3cc2bb09179ec161f24235eeb8707a0cf9c24e10f59ea893aab68a9f850b5a08b3229b87240fab0c8a008a073a94087e152aac6f1225c171674c20b
|
7
|
+
data.tar.gz: 6d4cdcf6ad181f999a2e84fba117dfd2c999885b70263d5ef57e720b1a2930dc3d3db5d2714991499483a0503380e0ce4027954301f7e628214f3592ee5af35a
|
data/.travis.yml
CHANGED
@@ -19,9 +19,30 @@ module Neo
|
|
19
19
|
include Sprockets::Helpers::RailsHelper
|
20
20
|
include Sprockets::Helpers::IsolatedHelper
|
21
21
|
end
|
22
|
+
|
22
23
|
include ::Rails.application.routes.url_helpers
|
23
24
|
|
24
25
|
attr_accessor :output_buffer, :params, :controller
|
26
|
+
|
27
|
+
# Configure sprockets-rails
|
28
|
+
if defined?(VIEW_ACCESSORS) # sprockets-rails version >= 3.0
|
29
|
+
app = ::Rails.application
|
30
|
+
assets_config = app.config.assets
|
31
|
+
|
32
|
+
self.debug_assets = assets_config.debug
|
33
|
+
self.digest_assets = assets_config.digest
|
34
|
+
self.assets_prefix = assets_config.prefix
|
35
|
+
self.assets_precompile = assets_config.precompile
|
36
|
+
self.assets_environment = app.assets
|
37
|
+
self.assets_manifest = app.assets_manifest
|
38
|
+
self.resolve_assets_with = assets_config.resolve_with
|
39
|
+
self.check_precompiled_asset = assets_config.check_precompiled_asset
|
40
|
+
self.precompiled_asset_checker = -> logical_path { app.asset_precompiled? logical_path }
|
41
|
+
|
42
|
+
if self.respond_to?(:unknown_asset_fallback=) # sprockets-rails version >= 3.2
|
43
|
+
self.unknown_asset_fallback = assets_config.unknown_asset_fallback
|
44
|
+
end
|
45
|
+
end
|
25
46
|
end
|
26
47
|
end
|
27
48
|
end
|
data/lib/neo/rails/version.rb
CHANGED
data/neo-rails.gemspec
CHANGED
@@ -19,10 +19,12 @@ Gem::Specification.new do |gem|
|
|
19
19
|
|
20
20
|
gem.add_dependency "view_model-rails"
|
21
21
|
gem.add_dependency "mime-types", ['>= 1.0', '< 3.0']
|
22
|
+
gem.add_dependency "nokogiri", '~> 1.6.8'
|
22
23
|
|
23
24
|
case rails_version
|
24
25
|
when '3.2'
|
25
26
|
gem.add_development_dependency "minitest", '~> 4.7'
|
27
|
+
gem.add_development_dependency 'test-unit', '~> 3.0'
|
26
28
|
when /.*/
|
27
29
|
gem.add_development_dependency "minitest"
|
28
30
|
when NilClass
|
data/test/exposure_test.rb
CHANGED
@@ -101,29 +101,29 @@ class ExposureTest < NeoRailsCase
|
|
101
101
|
end
|
102
102
|
|
103
103
|
test "should expose variable per value" do
|
104
|
-
get
|
104
|
+
get "expose_via_value"
|
105
105
|
assert_equal "ar=a,ah=a,br=b,bh=b", last_response.body
|
106
106
|
end
|
107
107
|
|
108
108
|
test "should expose variable per block" do
|
109
|
-
get
|
109
|
+
get "expose_via_block"
|
110
110
|
assert_equal "ar=a,ah=a,br=b,bh=b", last_response.body
|
111
111
|
end
|
112
112
|
|
113
113
|
test "should expose variable per value with template" do
|
114
|
-
get
|
114
|
+
get "exposes_via_value_with_template"
|
115
115
|
assert_equal "ah=a,bh=b", last_response.body
|
116
116
|
end
|
117
117
|
|
118
118
|
|
119
119
|
test "should raise an error when exposing an undeclared variable" do
|
120
120
|
assert_raises Neo::Rails::Exposure::UndeclaredVariableError do
|
121
|
-
get
|
121
|
+
get "expose_with_error"
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
125
|
test "exposes nil value" do
|
126
|
-
get
|
126
|
+
get "expose_nil_value"
|
127
127
|
assert_equal [ true, false ].inspect, last_response.body
|
128
128
|
end
|
129
129
|
|
data/test/helper.rb
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: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Thiel
|
@@ -9,96 +9,124 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-03-14 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
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: mime-types
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.0'
|
35
|
-
- - <
|
35
|
+
- - "<"
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '3.0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '1.0'
|
45
|
-
- - <
|
45
|
+
- - "<"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: nokogiri
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.6.8
|
55
|
+
type: :runtime
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.6.8
|
48
62
|
- !ruby/object:Gem::Dependency
|
49
63
|
name: minitest
|
50
64
|
requirement: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '4.7'
|
55
69
|
type: :development
|
56
70
|
prerelease: false
|
57
71
|
version_requirements: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '4.7'
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: test-unit
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
62
90
|
- !ruby/object:Gem::Dependency
|
63
91
|
name: rake
|
64
92
|
requirement: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
|
-
- -
|
94
|
+
- - ">="
|
67
95
|
- !ruby/object:Gem::Version
|
68
96
|
version: '0'
|
69
97
|
type: :development
|
70
98
|
prerelease: false
|
71
99
|
version_requirements: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
|
-
- -
|
101
|
+
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
103
|
version: '0'
|
76
104
|
- !ruby/object:Gem::Dependency
|
77
105
|
name: rack-test
|
78
106
|
requirement: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
|
-
- -
|
108
|
+
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
110
|
version: '0'
|
83
111
|
type: :development
|
84
112
|
prerelease: false
|
85
113
|
version_requirements: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
|
-
- -
|
115
|
+
- - ">="
|
88
116
|
- !ruby/object:Gem::Version
|
89
117
|
version: '0'
|
90
118
|
- !ruby/object:Gem::Dependency
|
91
119
|
name: simplecov
|
92
120
|
requirement: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
|
-
- -
|
122
|
+
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
124
|
version: '0'
|
97
125
|
type: :development
|
98
126
|
prerelease: false
|
99
127
|
version_requirements: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
|
-
- -
|
129
|
+
- - ">="
|
102
130
|
- !ruby/object:Gem::Version
|
103
131
|
version: '0'
|
104
132
|
description: Some Rails helpers
|
@@ -109,9 +137,9 @@ executables: []
|
|
109
137
|
extensions: []
|
110
138
|
extra_rdoc_files: []
|
111
139
|
files:
|
112
|
-
- .gitignore
|
113
|
-
- .simplecov
|
114
|
-
- .travis.yml
|
140
|
+
- ".gitignore"
|
141
|
+
- ".simplecov"
|
142
|
+
- ".travis.yml"
|
115
143
|
- Gemfile
|
116
144
|
- LICENSE
|
117
145
|
- README.md
|
@@ -159,12 +187,12 @@ require_paths:
|
|
159
187
|
- lib
|
160
188
|
required_ruby_version: !ruby/object:Gem::Requirement
|
161
189
|
requirements:
|
162
|
-
- -
|
190
|
+
- - ">="
|
163
191
|
- !ruby/object:Gem::Version
|
164
192
|
version: '0'
|
165
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
194
|
requirements:
|
167
|
-
- -
|
195
|
+
- - ">="
|
168
196
|
- !ruby/object:Gem::Version
|
169
197
|
version: '0'
|
170
198
|
requirements: []
|