viu 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Appraisals +15 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -3
- data/Gemfile.lock +93 -64
- data/README.md +20 -0
- data/gemfiles/.bundle/config +2 -0
- data/gemfiles/rails_5_2.gemfile +8 -0
- data/gemfiles/rails_6_0.gemfile +8 -0
- data/lib/viu/layout.rb +10 -1
- data/lib/viu/version.rb +1 -1
- data/viu.gemspec +1 -0
- metadata +20 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fad2db40122a0f7ee7925e084c50d772f6d695f242398de001de2b62cbdc5fc
|
|
4
|
+
data.tar.gz: 7565743dd49bdad3af8df1a86acec2421d0a30d9ab9acf7f7016cadc52b63b70
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12ce43a27739e1db0d4fcc7e98c064c71d8f26616cbf932af6157e5219c7a10e07c6996151a9dc9d8f11dbb6c9f37a0e443092cbb5efe2c153328ae9a7a27bff
|
|
7
|
+
data.tar.gz: 9458f8e9e98eb0c229fde6c2ff607071d805e2f28cc8904b2d8d9d2e2946bcf891d11adabf505d955b08c61ea31073468097bf7bfdabf75043003d873769b24c
|
data/.gitignore
CHANGED
data/Appraisals
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# appraise "rails-5-0" do
|
|
2
|
+
# gem "rails", "~> 5.0.0"
|
|
3
|
+
# end
|
|
4
|
+
|
|
5
|
+
# appraise "rails-5-1" do
|
|
6
|
+
# gem "rails", "~> 5.1.0"
|
|
7
|
+
# end
|
|
8
|
+
|
|
9
|
+
appraise "rails-5-2" do
|
|
10
|
+
gem "rails", "~> 5.2.0"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
appraise "rails-6-0" do
|
|
14
|
+
gem "rails", "~> 6.0.0"
|
|
15
|
+
end
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -4,7 +4,5 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
|
|
4
4
|
|
|
5
5
|
gemspec
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
gem "rails", rails_version == "master" ? { github: "rails/rails" } : rails_version
|
|
7
|
+
gem "rails", github: "rails/rails"
|
|
10
8
|
gem "oj"
|
data/Gemfile.lock
CHANGED
|
@@ -1,59 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
remote: .
|
|
3
|
-
|
|
4
|
-
viu (0.0.3)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
1
|
+
GIT
|
|
2
|
+
remote: https://github.com/rails/rails
|
|
3
|
+
revision: 7503ef9490583f7b2c3a475edd2bb1b7de0afcac
|
|
8
4
|
specs:
|
|
9
|
-
actioncable (
|
|
10
|
-
actionpack (=
|
|
5
|
+
actioncable (6.1.0.rc1)
|
|
6
|
+
actionpack (= 6.1.0.rc1)
|
|
7
|
+
activesupport (= 6.1.0.rc1)
|
|
11
8
|
nio4r (~> 2.0)
|
|
12
9
|
websocket-driver (>= 0.6.1)
|
|
13
|
-
|
|
14
|
-
actionpack (=
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
actionmailbox (6.1.0.rc1)
|
|
11
|
+
actionpack (= 6.1.0.rc1)
|
|
12
|
+
activejob (= 6.1.0.rc1)
|
|
13
|
+
activerecord (= 6.1.0.rc1)
|
|
14
|
+
activestorage (= 6.1.0.rc1)
|
|
15
|
+
activesupport (= 6.1.0.rc1)
|
|
16
|
+
mail (>= 2.7.1)
|
|
17
|
+
actionmailer (6.1.0.rc1)
|
|
18
|
+
actionpack (= 6.1.0.rc1)
|
|
19
|
+
actionview (= 6.1.0.rc1)
|
|
20
|
+
activejob (= 6.1.0.rc1)
|
|
21
|
+
activesupport (= 6.1.0.rc1)
|
|
17
22
|
mail (~> 2.5, >= 2.5.4)
|
|
18
23
|
rails-dom-testing (~> 2.0)
|
|
19
|
-
actionpack (
|
|
20
|
-
actionview (=
|
|
21
|
-
activesupport (=
|
|
22
|
-
rack (~> 2.0, >= 2.0.
|
|
24
|
+
actionpack (6.1.0.rc1)
|
|
25
|
+
actionview (= 6.1.0.rc1)
|
|
26
|
+
activesupport (= 6.1.0.rc1)
|
|
27
|
+
rack (~> 2.0, >= 2.0.9)
|
|
23
28
|
rack-test (>= 0.6.3)
|
|
24
29
|
rails-dom-testing (~> 2.0)
|
|
25
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
31
|
+
actiontext (6.1.0.rc1)
|
|
32
|
+
actionpack (= 6.1.0.rc1)
|
|
33
|
+
activerecord (= 6.1.0.rc1)
|
|
34
|
+
activestorage (= 6.1.0.rc1)
|
|
35
|
+
activesupport (= 6.1.0.rc1)
|
|
36
|
+
nokogiri (>= 1.8.5)
|
|
37
|
+
actionview (6.1.0.rc1)
|
|
38
|
+
activesupport (= 6.1.0.rc1)
|
|
28
39
|
builder (~> 3.1)
|
|
29
40
|
erubi (~> 1.4)
|
|
30
41
|
rails-dom-testing (~> 2.0)
|
|
31
|
-
rails-html-sanitizer (~> 1.
|
|
32
|
-
activejob (
|
|
33
|
-
activesupport (=
|
|
42
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
43
|
+
activejob (6.1.0.rc1)
|
|
44
|
+
activesupport (= 6.1.0.rc1)
|
|
34
45
|
globalid (>= 0.3.6)
|
|
35
|
-
activemodel (
|
|
36
|
-
activesupport (=
|
|
37
|
-
activerecord (
|
|
38
|
-
activemodel (=
|
|
39
|
-
activesupport (=
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
activerecord (=
|
|
46
|
+
activemodel (6.1.0.rc1)
|
|
47
|
+
activesupport (= 6.1.0.rc1)
|
|
48
|
+
activerecord (6.1.0.rc1)
|
|
49
|
+
activemodel (= 6.1.0.rc1)
|
|
50
|
+
activesupport (= 6.1.0.rc1)
|
|
51
|
+
activestorage (6.1.0.rc1)
|
|
52
|
+
actionpack (= 6.1.0.rc1)
|
|
53
|
+
activejob (= 6.1.0.rc1)
|
|
54
|
+
activerecord (= 6.1.0.rc1)
|
|
55
|
+
activesupport (= 6.1.0.rc1)
|
|
44
56
|
marcel (~> 0.3.1)
|
|
45
|
-
|
|
57
|
+
mimemagic (~> 0.3.2)
|
|
58
|
+
activesupport (6.1.0.rc1)
|
|
46
59
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
47
|
-
i18n (>=
|
|
48
|
-
minitest (
|
|
49
|
-
tzinfo (~>
|
|
50
|
-
|
|
60
|
+
i18n (>= 1.6, < 2)
|
|
61
|
+
minitest (>= 5.1)
|
|
62
|
+
tzinfo (~> 2.0)
|
|
63
|
+
zeitwerk (~> 2.3)
|
|
64
|
+
rails (6.1.0.rc1)
|
|
65
|
+
actioncable (= 6.1.0.rc1)
|
|
66
|
+
actionmailbox (= 6.1.0.rc1)
|
|
67
|
+
actionmailer (= 6.1.0.rc1)
|
|
68
|
+
actionpack (= 6.1.0.rc1)
|
|
69
|
+
actiontext (= 6.1.0.rc1)
|
|
70
|
+
actionview (= 6.1.0.rc1)
|
|
71
|
+
activejob (= 6.1.0.rc1)
|
|
72
|
+
activemodel (= 6.1.0.rc1)
|
|
73
|
+
activerecord (= 6.1.0.rc1)
|
|
74
|
+
activestorage (= 6.1.0.rc1)
|
|
75
|
+
activesupport (= 6.1.0.rc1)
|
|
76
|
+
bundler (>= 1.15.0)
|
|
77
|
+
railties (= 6.1.0.rc1)
|
|
78
|
+
sprockets-rails (>= 2.0.0)
|
|
79
|
+
railties (6.1.0.rc1)
|
|
80
|
+
actionpack (= 6.1.0.rc1)
|
|
81
|
+
activesupport (= 6.1.0.rc1)
|
|
82
|
+
method_source
|
|
83
|
+
rake (>= 0.8.7)
|
|
84
|
+
thor (~> 1.0)
|
|
85
|
+
|
|
86
|
+
PATH
|
|
87
|
+
remote: .
|
|
88
|
+
specs:
|
|
89
|
+
viu (0.0.4)
|
|
90
|
+
|
|
91
|
+
GEM
|
|
92
|
+
remote: https://rubygems.org/
|
|
93
|
+
specs:
|
|
94
|
+
appraisal (2.3.0)
|
|
95
|
+
bundler
|
|
96
|
+
rake
|
|
97
|
+
thor (>= 0.14.0)
|
|
51
98
|
bigdecimal (2.0.0)
|
|
52
99
|
builder (3.2.4)
|
|
53
100
|
concurrent-ruby (1.1.7)
|
|
54
101
|
crass (1.0.6)
|
|
55
102
|
docile (1.3.2)
|
|
56
|
-
erubi (1.
|
|
103
|
+
erubi (1.10.0)
|
|
57
104
|
globalid (0.4.2)
|
|
58
105
|
activesupport (>= 4.2.0)
|
|
59
106
|
haml (5.1.2)
|
|
@@ -61,7 +108,7 @@ GEM
|
|
|
61
108
|
tilt
|
|
62
109
|
i18n (1.8.5)
|
|
63
110
|
concurrent-ruby (~> 1.0)
|
|
64
|
-
loofah (2.
|
|
111
|
+
loofah (2.8.0)
|
|
65
112
|
crass (~> 1.0.2)
|
|
66
113
|
nokogiri (>= 1.5.9)
|
|
67
114
|
mail (2.7.1)
|
|
@@ -73,7 +120,7 @@ GEM
|
|
|
73
120
|
mini_mime (1.0.2)
|
|
74
121
|
mini_portile2 (2.4.0)
|
|
75
122
|
minitest (5.14.1)
|
|
76
|
-
nio4r (2.5.
|
|
123
|
+
nio4r (2.5.4)
|
|
77
124
|
nokogiri (1.10.10)
|
|
78
125
|
mini_portile2 (~> 2.4.0)
|
|
79
126
|
oj (3.10.12)
|
|
@@ -81,30 +128,11 @@ GEM
|
|
|
81
128
|
rack (2.2.3)
|
|
82
129
|
rack-test (1.1.0)
|
|
83
130
|
rack (>= 1.0, < 3)
|
|
84
|
-
rails (5.2.4.3)
|
|
85
|
-
actioncable (= 5.2.4.3)
|
|
86
|
-
actionmailer (= 5.2.4.3)
|
|
87
|
-
actionpack (= 5.2.4.3)
|
|
88
|
-
actionview (= 5.2.4.3)
|
|
89
|
-
activejob (= 5.2.4.3)
|
|
90
|
-
activemodel (= 5.2.4.3)
|
|
91
|
-
activerecord (= 5.2.4.3)
|
|
92
|
-
activestorage (= 5.2.4.3)
|
|
93
|
-
activesupport (= 5.2.4.3)
|
|
94
|
-
bundler (>= 1.3.0)
|
|
95
|
-
railties (= 5.2.4.3)
|
|
96
|
-
sprockets-rails (>= 2.0.0)
|
|
97
131
|
rails-dom-testing (2.0.3)
|
|
98
132
|
activesupport (>= 4.2.0)
|
|
99
133
|
nokogiri (>= 1.6)
|
|
100
134
|
rails-html-sanitizer (1.3.0)
|
|
101
135
|
loofah (~> 2.3)
|
|
102
|
-
railties (5.2.4.3)
|
|
103
|
-
actionpack (= 5.2.4.3)
|
|
104
|
-
activesupport (= 5.2.4.3)
|
|
105
|
-
method_source
|
|
106
|
-
rake (>= 0.8.7)
|
|
107
|
-
thor (>= 0.19.0, < 2.0)
|
|
108
136
|
rake (12.3.3)
|
|
109
137
|
simplecov (0.18.5)
|
|
110
138
|
docile (~> 1.1)
|
|
@@ -116,29 +144,30 @@ GEM
|
|
|
116
144
|
sprockets (4.0.2)
|
|
117
145
|
concurrent-ruby (~> 1.0)
|
|
118
146
|
rack (> 1, < 3)
|
|
119
|
-
sprockets-rails (3.2.
|
|
147
|
+
sprockets-rails (3.2.2)
|
|
120
148
|
actionpack (>= 4.0)
|
|
121
149
|
activesupport (>= 4.0)
|
|
122
150
|
sprockets (>= 3.0.0)
|
|
123
151
|
temple (0.8.2)
|
|
124
152
|
thor (1.0.1)
|
|
125
|
-
thread_safe (0.3.6)
|
|
126
153
|
tilt (2.0.10)
|
|
127
|
-
tzinfo (
|
|
128
|
-
|
|
154
|
+
tzinfo (2.0.3)
|
|
155
|
+
concurrent-ruby (~> 1.0)
|
|
129
156
|
websocket-driver (0.7.3)
|
|
130
157
|
websocket-extensions (>= 0.1.0)
|
|
131
158
|
websocket-extensions (0.1.5)
|
|
159
|
+
zeitwerk (2.4.2)
|
|
132
160
|
|
|
133
161
|
PLATFORMS
|
|
134
162
|
ruby
|
|
135
163
|
|
|
136
164
|
DEPENDENCIES
|
|
165
|
+
appraisal (~> 2.3)
|
|
137
166
|
bundler (~> 1.17)
|
|
138
167
|
haml (~> 5)
|
|
139
168
|
minitest (~> 5.0)
|
|
140
169
|
oj
|
|
141
|
-
rails
|
|
170
|
+
rails!
|
|
142
171
|
rake (~> 12.3)
|
|
143
172
|
simplecov (~> 0.18.0)
|
|
144
173
|
slim (~> 4)
|
data/README.md
CHANGED
|
@@ -380,3 +380,23 @@ Rails application, but with a few boundaries, like a View won't be able to autom
|
|
|
380
380
|
in a controller, those have to explicitly be passed to them.
|
|
381
381
|
|
|
382
382
|
The project is already been tested on a small scale in our production environment.
|
|
383
|
+
|
|
384
|
+
## Development
|
|
385
|
+
|
|
386
|
+
```ruby
|
|
387
|
+
# install dependencies
|
|
388
|
+
bin/setup install
|
|
389
|
+
|
|
390
|
+
# running tests
|
|
391
|
+
bundle exec rake test
|
|
392
|
+
|
|
393
|
+
# running tests for all rails versions
|
|
394
|
+
bundle exec appraisal rake test
|
|
395
|
+
|
|
396
|
+
# releasing a new version:
|
|
397
|
+
# update changelog
|
|
398
|
+
# update VERSION on lib/viu/version.rb
|
|
399
|
+
# run bundle exec rake release
|
|
400
|
+
# create a Bump to version x.x.x commit
|
|
401
|
+
# run bundle exec rake release
|
|
402
|
+
```
|
data/lib/viu/layout.rb
CHANGED
|
@@ -15,10 +15,19 @@ module Viu
|
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
RAILS_6_0 = Gem::Version.new('6.0.0')
|
|
19
|
+
private_constant :RAILS_6_0
|
|
20
|
+
|
|
18
21
|
def render_in(view_context, &block)
|
|
19
22
|
__setup!(view_context)
|
|
20
23
|
|
|
21
|
-
Renderer.new(@lookup_context).render(self, { partial: __fetch_template!, layout: nil }, block)
|
|
24
|
+
rendered = Renderer.new(@lookup_context).render(self, { partial: __fetch_template!, layout: nil }, block)
|
|
25
|
+
|
|
26
|
+
if ::Rails.gem_version >= RAILS_6_0
|
|
27
|
+
rendered.body
|
|
28
|
+
else
|
|
29
|
+
rendered
|
|
30
|
+
end
|
|
22
31
|
end
|
|
23
32
|
end
|
|
24
33
|
end
|
data/lib/viu/version.rb
CHANGED
data/viu.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: viu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ralf Schmitz Bongiolo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-11-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -94,6 +94,20 @@ dependencies:
|
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '4'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: appraisal
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "~>"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '2.3'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "~>"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '2.3'
|
|
97
111
|
description: Rails' missing View layer.
|
|
98
112
|
email:
|
|
99
113
|
- mrbongiolo@hey.com
|
|
@@ -103,6 +117,7 @@ extra_rdoc_files: []
|
|
|
103
117
|
files:
|
|
104
118
|
- ".gitignore"
|
|
105
119
|
- ".travis.yml"
|
|
120
|
+
- Appraisals
|
|
106
121
|
- CHANGELOG.md
|
|
107
122
|
- CODE_OF_CONDUCT.md
|
|
108
123
|
- Gemfile
|
|
@@ -112,6 +127,9 @@ files:
|
|
|
112
127
|
- Rakefile
|
|
113
128
|
- bin/console
|
|
114
129
|
- bin/setup
|
|
130
|
+
- gemfiles/.bundle/config
|
|
131
|
+
- gemfiles/rails_5_2.gemfile
|
|
132
|
+
- gemfiles/rails_6_0.gemfile
|
|
115
133
|
- lib/viu.rb
|
|
116
134
|
- lib/viu/html.rb
|
|
117
135
|
- lib/viu/json.rb
|