viu 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a20c56c9d9d9efc2b46ed24d46628f24e671e28f5601cdd475939df6b2162974
4
- data.tar.gz: 2b940845dd9fc93fc8af36c7341581b2c37d2cf28649d17f156b7f56666191c2
3
+ metadata.gz: 5fad2db40122a0f7ee7925e084c50d772f6d695f242398de001de2b62cbdc5fc
4
+ data.tar.gz: 7565743dd49bdad3af8df1a86acec2421d0a30d9ab9acf7f7016cadc52b63b70
5
5
  SHA512:
6
- metadata.gz: 2864b1ecae62628434db59ea5256914b826c42305b66fa0bf6437319e16fa898e828fdea020b87c5d19e8537261f112732d7fbf90ef092e809e5369aa487f2e9
7
- data.tar.gz: 1c0cb834d20c499808007b04a3c993a08a6858bb56bd03ac699ee27f047386f585b63075823f4d6cad84c714fefb71b714942865a2335500083f4954bedb53e6
6
+ metadata.gz: 12ce43a27739e1db0d4fcc7e98c064c71d8f26616cbf932af6157e5219c7a10e07c6996151a9dc9d8f11dbb6c9f37a0e443092cbb5efe2c153328ae9a7a27bff
7
+ data.tar.gz: 9458f8e9e98eb0c229fde6c2ff607071d805e2f28cc8904b2d8d9d2e2946bcf891d11adabf505d955b08c61ea31073468097bf7bfdabf75043003d873769b24c
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
  /test/support/dummy/tmp
10
10
  /test/support/dummy/log
11
11
  *.gem
12
+
13
+ /gemfiles/*.gemfile.lock
@@ -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
@@ -1,3 +1,7 @@
1
+ ## 0.0.4 2020-11-29
2
+
3
+ - Added support for Rails ~> 6.0.0
4
+
1
5
  ## 0.0.3 2020-09-02
2
6
 
3
7
  - Added Viu::Json
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
- rails_version = "#{ENV['RAILS_VERSION'] || '~> 5.2'}"
8
-
9
- gem "rails", rails_version == "master" ? { github: "rails/rails" } : rails_version
7
+ gem "rails", github: "rails/rails"
10
8
  gem "oj"
@@ -1,59 +1,106 @@
1
- PATH
2
- remote: .
3
- specs:
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 (5.2.4.3)
10
- actionpack (= 5.2.4.3)
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
- actionmailer (5.2.4.3)
14
- actionpack (= 5.2.4.3)
15
- actionview (= 5.2.4.3)
16
- activejob (= 5.2.4.3)
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 (5.2.4.3)
20
- actionview (= 5.2.4.3)
21
- activesupport (= 5.2.4.3)
22
- rack (~> 2.0, >= 2.0.8)
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.2)
26
- actionview (5.2.4.3)
27
- activesupport (= 5.2.4.3)
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.0, >= 1.0.3)
32
- activejob (5.2.4.3)
33
- activesupport (= 5.2.4.3)
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 (5.2.4.3)
36
- activesupport (= 5.2.4.3)
37
- activerecord (5.2.4.3)
38
- activemodel (= 5.2.4.3)
39
- activesupport (= 5.2.4.3)
40
- arel (>= 9.0)
41
- activestorage (5.2.4.3)
42
- actionpack (= 5.2.4.3)
43
- activerecord (= 5.2.4.3)
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
- activesupport (5.2.4.3)
57
+ mimemagic (~> 0.3.2)
58
+ activesupport (6.1.0.rc1)
46
59
  concurrent-ruby (~> 1.0, >= 1.0.2)
47
- i18n (>= 0.7, < 2)
48
- minitest (~> 5.1)
49
- tzinfo (~> 1.1)
50
- arel (9.0.0)
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.9.0)
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.6.0)
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.2)
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.1)
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 (1.2.7)
128
- thread_safe (~> 0.1)
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 (~> 5.2)
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
+ ```
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.2.0"
6
+ gem "oj"
7
+
8
+ gemspec path: "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.0.0"
6
+ gem "oj"
7
+
8
+ gemspec path: "../"
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Viu
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
@@ -40,4 +40,5 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency "simplecov", "~> 0.18.0"
41
41
  spec.add_development_dependency "haml", "~> 5"
42
42
  spec.add_development_dependency "slim", "~> 4"
43
+ spec.add_development_dependency "appraisal", "~> 2.3"
43
44
  end
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.3
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-09-03 00:00:00.000000000 Z
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