markdown_views 3.2.1 → 3.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22fd9dc1ebc13a174e9929445039e9cddcdf90dec5b52b4652e1f3dff8ac9967
4
- data.tar.gz: 7b8ad429986332b8fc6b01ec388fbf4bbee1daa213d0a6e72947c5b247bd4c53
3
+ metadata.gz: e365452e7f80706f6642de3f0b00324391f298ee0fe034149e0f7452a9fdc3df
4
+ data.tar.gz: bfa2f23f84b90fa22756b9e6e20424333b0eaaa20c76847a35d261fa226e3aca
5
5
  SHA512:
6
- metadata.gz: 7caa7c9240cfd6f774e723baf009f95402c7aa32b6df1b15cad493a5624556ed9c176f8a8cc8f9fb10684c30ab42038a939f9be669bacef0a2b243139c295c2e
7
- data.tar.gz: 1fa0822da4cb188a490dd70466c0acbfb0efec5ecf5ca848e9438da24010fe7e5392186964ccbf3180feb93ca9b6bf43180cc0ec2f514f656442bd322e2dd00f
6
+ metadata.gz: eed5f55ec6b86e03e7d31b3d7c8f17402e8e0933021bd6018dba76e517c8c05533d9d8a634ff1a8bcaf1268293672fa39ca76761d5e5c8f966152140b25b354d
7
+ data.tar.gz: 9201c7d0798c0c8042608c97938410a16ab91206e52353585b5e093864d51247d0cfb3eae23162826c3bf53546fea7d157d8c2a340f6cc6949ac813f5392da6f
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in markdown_views.gemspec
4
4
  gemspec
5
+
6
+ gem 'minitest', '~> 5'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdown_views (3.2.1)
4
+ markdown_views (3.2.2)
5
5
  commonmarker (>= 1.1, < 3.0)
6
6
  rails (>= 6.1)
7
7
  rouge (~> 4)
@@ -10,31 +10,31 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- action_text-trix (2.1.15)
13
+ action_text-trix (2.1.16)
14
14
  railties
15
- actioncable (8.1.1)
16
- actionpack (= 8.1.1)
17
- activesupport (= 8.1.1)
15
+ actioncable (8.1.2)
16
+ actionpack (= 8.1.2)
17
+ activesupport (= 8.1.2)
18
18
  nio4r (~> 2.0)
19
19
  websocket-driver (>= 0.6.1)
20
20
  zeitwerk (~> 2.6)
21
- actionmailbox (8.1.1)
22
- actionpack (= 8.1.1)
23
- activejob (= 8.1.1)
24
- activerecord (= 8.1.1)
25
- activestorage (= 8.1.1)
26
- activesupport (= 8.1.1)
21
+ actionmailbox (8.1.2)
22
+ actionpack (= 8.1.2)
23
+ activejob (= 8.1.2)
24
+ activerecord (= 8.1.2)
25
+ activestorage (= 8.1.2)
26
+ activesupport (= 8.1.2)
27
27
  mail (>= 2.8.0)
28
- actionmailer (8.1.1)
29
- actionpack (= 8.1.1)
30
- actionview (= 8.1.1)
31
- activejob (= 8.1.1)
32
- activesupport (= 8.1.1)
28
+ actionmailer (8.1.2)
29
+ actionpack (= 8.1.2)
30
+ actionview (= 8.1.2)
31
+ activejob (= 8.1.2)
32
+ activesupport (= 8.1.2)
33
33
  mail (>= 2.8.0)
34
34
  rails-dom-testing (~> 2.2)
35
- actionpack (8.1.1)
36
- actionview (= 8.1.1)
37
- activesupport (= 8.1.1)
35
+ actionpack (8.1.2)
36
+ actionview (= 8.1.2)
37
+ activesupport (= 8.1.2)
38
38
  nokogiri (>= 1.8.5)
39
39
  rack (>= 2.2.4)
40
40
  rack-session (>= 1.0.1)
@@ -42,36 +42,36 @@ GEM
42
42
  rails-dom-testing (~> 2.2)
43
43
  rails-html-sanitizer (~> 1.6)
44
44
  useragent (~> 0.16)
45
- actiontext (8.1.1)
45
+ actiontext (8.1.2)
46
46
  action_text-trix (~> 2.1.15)
47
- actionpack (= 8.1.1)
48
- activerecord (= 8.1.1)
49
- activestorage (= 8.1.1)
50
- activesupport (= 8.1.1)
47
+ actionpack (= 8.1.2)
48
+ activerecord (= 8.1.2)
49
+ activestorage (= 8.1.2)
50
+ activesupport (= 8.1.2)
51
51
  globalid (>= 0.6.0)
52
52
  nokogiri (>= 1.8.5)
53
- actionview (8.1.1)
54
- activesupport (= 8.1.1)
53
+ actionview (8.1.2)
54
+ activesupport (= 8.1.2)
55
55
  builder (~> 3.1)
56
56
  erubi (~> 1.11)
57
57
  rails-dom-testing (~> 2.2)
58
58
  rails-html-sanitizer (~> 1.6)
59
- activejob (8.1.1)
60
- activesupport (= 8.1.1)
59
+ activejob (8.1.2)
60
+ activesupport (= 8.1.2)
61
61
  globalid (>= 0.3.6)
62
- activemodel (8.1.1)
63
- activesupport (= 8.1.1)
64
- activerecord (8.1.1)
65
- activemodel (= 8.1.1)
66
- activesupport (= 8.1.1)
62
+ activemodel (8.1.2)
63
+ activesupport (= 8.1.2)
64
+ activerecord (8.1.2)
65
+ activemodel (= 8.1.2)
66
+ activesupport (= 8.1.2)
67
67
  timeout (>= 0.4.0)
68
- activestorage (8.1.1)
69
- actionpack (= 8.1.1)
70
- activejob (= 8.1.1)
71
- activerecord (= 8.1.1)
72
- activesupport (= 8.1.1)
68
+ activestorage (8.1.2)
69
+ actionpack (= 8.1.2)
70
+ activejob (= 8.1.2)
71
+ activerecord (= 8.1.2)
72
+ activesupport (= 8.1.2)
73
73
  marcel (~> 1.0)
74
- activesupport (8.1.1)
74
+ activesupport (8.1.2)
75
75
  base64
76
76
  bigdecimal
77
77
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -86,31 +86,31 @@ GEM
86
86
  uri (>= 0.13.1)
87
87
  ansi (1.5.0)
88
88
  base64 (0.3.0)
89
- bigdecimal (3.3.1)
89
+ bigdecimal (4.0.1)
90
90
  builder (3.3.0)
91
- commonmarker (2.6.0-aarch64-linux)
92
- commonmarker (2.6.0-arm64-darwin)
93
- commonmarker (2.6.0-x86_64-darwin)
94
- commonmarker (2.6.0-x86_64-linux)
95
- concurrent-ruby (1.3.5)
96
- connection_pool (3.0.1)
91
+ commonmarker (2.6.1-aarch64-linux)
92
+ commonmarker (2.6.1-arm64-darwin)
93
+ commonmarker (2.6.1-x86_64-darwin)
94
+ commonmarker (2.6.1-x86_64-linux)
95
+ concurrent-ruby (1.3.6)
96
+ connection_pool (3.0.2)
97
97
  crass (1.0.6)
98
- date (3.5.0)
98
+ date (3.5.1)
99
99
  drb (2.2.3)
100
- erb (6.0.0)
100
+ erb (6.0.1)
101
101
  erubi (1.13.1)
102
102
  globalid (1.3.0)
103
103
  activesupport (>= 6.1)
104
- i18n (1.14.7)
104
+ i18n (1.14.8)
105
105
  concurrent-ruby (~> 1.0)
106
- io-console (0.8.1)
107
- irb (1.15.3)
106
+ io-console (0.8.2)
107
+ irb (1.16.0)
108
108
  pp (>= 0.6.0)
109
109
  rdoc (>= 4.0.0)
110
110
  reline (>= 0.4.2)
111
- json (2.17.1)
111
+ json (2.18.0)
112
112
  logger (1.7.0)
113
- loofah (2.24.1)
113
+ loofah (2.25.0)
114
114
  crass (~> 1.0.2)
115
115
  nokogiri (>= 1.12.0)
116
116
  mail (2.9.0)
@@ -121,13 +121,13 @@ GEM
121
121
  net-smtp
122
122
  marcel (1.1.0)
123
123
  mini_mime (1.1.5)
124
- minitest (5.26.2)
124
+ minitest (5.27.0)
125
125
  minitest-reporters (1.7.1)
126
126
  ansi
127
127
  builder
128
128
  minitest (>= 5.0)
129
129
  ruby-progressbar
130
- net-imap (0.5.12)
130
+ net-imap (0.6.2)
131
131
  date
132
132
  net-protocol
133
133
  net-pop (0.1.2)
@@ -137,18 +137,18 @@ GEM
137
137
  net-smtp (0.5.1)
138
138
  net-protocol
139
139
  nio4r (2.7.5)
140
- nokogiri (1.18.10-aarch64-linux-gnu)
140
+ nokogiri (1.19.0-aarch64-linux-gnu)
141
141
  racc (~> 1.4)
142
- nokogiri (1.18.10-arm64-darwin)
142
+ nokogiri (1.19.0-arm64-darwin)
143
143
  racc (~> 1.4)
144
- nokogiri (1.18.10-x86_64-darwin)
144
+ nokogiri (1.19.0-x86_64-darwin)
145
145
  racc (~> 1.4)
146
- nokogiri (1.18.10-x86_64-linux-gnu)
146
+ nokogiri (1.19.0-x86_64-linux-gnu)
147
147
  racc (~> 1.4)
148
148
  pp (0.6.3)
149
149
  prettyprint
150
150
  prettyprint (0.2.0)
151
- psych (5.2.6)
151
+ psych (5.3.1)
152
152
  date
153
153
  stringio
154
154
  racc (1.8.1)
@@ -160,20 +160,20 @@ GEM
160
160
  rack (>= 1.3)
161
161
  rackup (2.3.1)
162
162
  rack (>= 3)
163
- rails (8.1.1)
164
- actioncable (= 8.1.1)
165
- actionmailbox (= 8.1.1)
166
- actionmailer (= 8.1.1)
167
- actionpack (= 8.1.1)
168
- actiontext (= 8.1.1)
169
- actionview (= 8.1.1)
170
- activejob (= 8.1.1)
171
- activemodel (= 8.1.1)
172
- activerecord (= 8.1.1)
173
- activestorage (= 8.1.1)
174
- activesupport (= 8.1.1)
163
+ rails (8.1.2)
164
+ actioncable (= 8.1.2)
165
+ actionmailbox (= 8.1.2)
166
+ actionmailer (= 8.1.2)
167
+ actionpack (= 8.1.2)
168
+ actiontext (= 8.1.2)
169
+ actionview (= 8.1.2)
170
+ activejob (= 8.1.2)
171
+ activemodel (= 8.1.2)
172
+ activerecord (= 8.1.2)
173
+ activestorage (= 8.1.2)
174
+ activesupport (= 8.1.2)
175
175
  bundler (>= 1.15.0)
176
- railties (= 8.1.1)
176
+ railties (= 8.1.2)
177
177
  rails-dom-testing (2.3.0)
178
178
  activesupport (>= 5.0.0)
179
179
  minitest
@@ -181,9 +181,9 @@ GEM
181
181
  rails-html-sanitizer (1.6.2)
182
182
  loofah (~> 2.21)
183
183
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
184
- railties (8.1.1)
185
- actionpack (= 8.1.1)
186
- activesupport (= 8.1.1)
184
+ railties (8.1.2)
185
+ actionpack (= 8.1.2)
186
+ activesupport (= 8.1.2)
187
187
  irb (~> 1.13)
188
188
  rackup (>= 1.0.0)
189
189
  rake (>= 12.2)
@@ -191,18 +191,18 @@ GEM
191
191
  tsort (>= 0.2)
192
192
  zeitwerk (~> 2.6)
193
193
  rake (13.3.1)
194
- rdoc (6.16.1)
194
+ rdoc (7.1.0)
195
195
  erb
196
196
  psych (>= 4.0.0)
197
197
  tsort
198
198
  reline (0.6.3)
199
199
  io-console (~> 0.5)
200
- rouge (4.6.1)
200
+ rouge (4.7.0)
201
201
  ruby-progressbar (1.13.0)
202
202
  securerandom (0.4.1)
203
- stringio (3.1.9)
204
- thor (1.4.0)
205
- timeout (0.4.4)
203
+ stringio (3.2.0)
204
+ thor (1.5.0)
205
+ timeout (0.6.0)
206
206
  tsort (0.2.0)
207
207
  tzinfo (2.0.6)
208
208
  concurrent-ruby (~> 1.0)
@@ -212,7 +212,7 @@ GEM
212
212
  base64
213
213
  websocket-extensions (>= 0.1.0)
214
214
  websocket-extensions (0.1.5)
215
- zeitwerk (2.7.3)
215
+ zeitwerk (2.7.4)
216
216
 
217
217
  PLATFORMS
218
218
  aarch64-linux
@@ -222,6 +222,7 @@ PLATFORMS
222
222
 
223
223
  DEPENDENCIES
224
224
  markdown_views!
225
+ minitest (~> 5)
225
226
  minitest-reporters
226
227
  rake
227
228
 
data/Rakefile CHANGED
@@ -16,6 +16,7 @@ Rake::TestTask.new(:test) do |t|
16
16
  t.libs << "test"
17
17
  t.libs << "lib"
18
18
  t.test_files = FileList["test/**/*_test.rb"]
19
+ t.warning = false # rouge is very noisy
19
20
  end
20
21
 
21
22
  task :default => :test
@@ -3,7 +3,7 @@ module MarkdownViews
3
3
  class << self
4
4
 
5
5
  def render(template)
6
- out = template.to_s
6
+ out = template.to_s.encode('UTF-8')
7
7
  out = strip_comments(out) if MarkdownViews.strip_comments
8
8
  out = render_md(out)
9
9
  out = strip_comments(out) if MarkdownViews.strip_comments
@@ -1,3 +1,3 @@
1
1
  module MarkdownViews
2
- VERSION = '3.2.1'
2
+ VERSION = '3.2.2'
3
3
  end
data/test/render_test.rb CHANGED
@@ -42,6 +42,31 @@ class RenderTest < Minitest::Test
42
42
  assert_equal o, render(s)
43
43
  end
44
44
 
45
+ def test_integer
46
+ o = <<~HTML
47
+ <p>314</p>
48
+ HTML
49
+ assert_equal o, render(314)
50
+ end
51
+
52
+ def test_float
53
+ o = <<~HTML
54
+ <p>3.14</p>
55
+ HTML
56
+ assert_equal o, render(3.14)
57
+ end
58
+
59
+ def test_bigdecimal
60
+ o = <<~HTML
61
+ <p>3.14</p>
62
+ HTML
63
+ assert_equal o, render(BigDecimal('3.14'))
64
+ end
65
+
66
+ def test_nil
67
+ assert_equal '', render(nil)
68
+ end
69
+
45
70
 
46
71
  def render(*args)
47
72
  MarkdownViews::Renderer.render(*args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_views
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan