mongoid_markdown_extension 0.1.8 → 0.1.9

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: 2c05808c0e94472e050d3837e3f264b5fa5c692eb1077154b2ee7ced3cd8ec3b
4
- data.tar.gz: 3d807cd8a6a87b8eb5f3f929f15117b475d2316be1c3c5b77552d856da6620b1
3
+ metadata.gz: c6fa514c9fb252d09aa62c0d8b8a02b81674b674e859f96e5eed1e63affef6a7
4
+ data.tar.gz: 89c54cdd6239871fca3f5c8a4eab3a142c181e7e922a662f9211ceb8fa9befc0
5
5
  SHA512:
6
- metadata.gz: 4b0c4baa5cfcd3f1f154e01f35c05db6fd151ae9734a0971fe14339dd835b8d99f684bdfbe4b14af9469c313e89576bcfd0e86b5bdcaa902c33f1911bd14d47d
7
- data.tar.gz: 601c89e9e832335bae1363f2854adeb341405997e1cd1b7ad7db162e1a1d82f034e4f58ded57d02f0ca9b0d9d231351028111f5ba93059ac10bc5003dc4ab763
6
+ metadata.gz: 33181047147b12cd3f2a847229879dc413aeff1a54af71fe78841bdbc45b76f5674e1ce154cac377680e4071c50a304e23a772aaf3d8705c5ba36171b18e80c0
7
+ data.tar.gz: '03864db7acadfd5aa62eeb2cdeac117a2dd7565f3901b5d7efe5196d27b764cb900db36daa45c9bdf93437fddd8de054f5829db25cecd3a312ac1620de38c705'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.9
4
+
5
+ * `#to_stripped_s` removes leading & trailing white-space (null, horizontal tab, line feed, vertical tab, form feed, carriage return, space) using Ruby's `#strip`
6
+
3
7
  ## 0.1.8
4
8
 
5
9
  * Mongoid 7 compatibility
@@ -55,7 +55,7 @@ module MongoidMarkdownExtension
55
55
  end
56
56
 
57
57
  def to_stripped_s
58
- markdown_stripdown_renderer.render(@str)
58
+ markdown_stripdown_renderer.render(@str).try(:strip)
59
59
  end
60
60
 
61
61
  def mongoize
@@ -1,3 +1,3 @@
1
1
  module MongoidMarkdownExtension
2
- VERSION = '0.1.8'.freeze
2
+ VERSION = '0.1.9'.freeze
3
3
  end
@@ -94,6 +94,10 @@ module MongoidMarkdownExtension
94
94
  it 'converts the markdown to stripped string' do
95
95
  subject.to_stripped_s.wont_include '_'
96
96
  end
97
+
98
+ it 'removes newlines' do
99
+ subject.to_stripped_s.wont_include "\n"
100
+ end
97
101
  end
98
102
 
99
103
  describe '#mongoize' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_markdown_extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-03 00:00:00.000000000 Z
11
+ date: 2018-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.7.3
132
+ rubygems_version: 2.7.6
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Custom field type for Mongoid that handles Markdown conversion via Redcarpet