simple_format 0.0.1 → 0.0.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
  SHA1:
3
- metadata.gz: 14148770aeb5474cb5315dd69011e28a95de2564
4
- data.tar.gz: b0ca531bda9dada1a046c25daaebcb73e12cd467
3
+ metadata.gz: 34c845c32712d925c46d8130899832a6d3cf0a6f
4
+ data.tar.gz: c6b23b1066f559f1c6a0644055d052818bd5e6ff
5
5
  SHA512:
6
- metadata.gz: 5769ec213b0bcae9571ae4c048128831f970236260cacb53cdbc75f2ee5887e38f6b5f91ad7469fd3a880400c7281140cba3f5e8cd920c37ce2ca8c440b45324
7
- data.tar.gz: 383ee893bbfc414dabc2eca5ca98190d1e3d51ffff7334e11422be2b3b4957f1bc3a4f523ddb4ab562cfef054fb2ddfe6713c1f67293715dde25c9d4a50d7f96
6
+ metadata.gz: 80a82f9016c92d09ade050bb8bcf1a139820ea0f996b3a1334bbef6324ac84f1d98e5929c73f31c4205de48bcebe7bfc49906eaa1fbc4263a6554f68b95250d6
7
+ data.tar.gz: 0f30d1cab8e76c3e49ebceee2a917053d3776a823d4d00a16a4db66ae91ef3ac8a27afd5fd2d13b9eccd772b56df822dfe390c343dd7aac05f2aadb3825e6734
data/README.md CHANGED
@@ -5,6 +5,8 @@ simple_format
5
5
  * Auto Link url and email.
6
6
  * Clean HTML elements and attributes.
7
7
 
8
+ [![Gem Version](https://badge.fury.io/rb/simple_format.png)](http://badge.fury.io/rb/simple_format) [![Dependency Status](https://gemnasium.com/mimosa/simple_format.png?travis)](https://gemnasium.com/mimosa/rails-cache_control) [![Code Climate](https://codeclimate.com/github/mimosa/simple_format.png)](https://codeclimate.com/github/mimosa/simple_format)
9
+
8
10
 
9
11
  Installation
10
12
  ------------
@@ -20,35 +22,36 @@ Usage
20
22
 
21
23
  ``` ruby
22
24
  require 'simple_format'
23
- string = "This is a <span src='error'>:ruby:</span> <script type='text/javascript'>alert('Formater');</script>.\n\n Test Auto Link www.ruby-china.com\n\nmail@domain.com\n\nTest Emoji tag <a href=':cat:'>🍀</a>:ruby-china:."
24
- SimpleFormat.h(string) # Emoji, Auto Link, Sanitize.clean
25
+ c = SimpleFormat::Converter.new
26
+ string = "This is a <span src='error'>:ruby:</span> <script type='text/javascript'>alert('Formater');</script>.\n\n Test Auto Link www.ruby-china.com\n\nmail@domain.com\n\nTest Emoji tag <a href=':cat:'>🍀</a>:ruby-china:." # 测试文本
27
+ ```
28
+ ------
29
+ ``` ruby
30
+ c.rich_with(string) # 富文本转换(Emoji, nl2br, Auto Link, Sanitize.clean)
25
31
  ```
26
- * return
27
-
28
32
  ``` html
29
- This is a <span src=\"error\">:ruby:</span> alert('Formater');.<br><br> Test Auto Link <a href=\"http://www.ruby-china.com\" target=\"_blank\">www.ruby-china.com</a><br><br><a href=\"mailto:mail@domain.com\">mail@domain.com</a><br><br>Test Emoji tag <a href=\"&lt;img%20class=%22emoji%22%20src=%22//l.ruby-china.org/assets/emojis/cat.png%22%20width=%2264%22%20height=%2264%22%20/&gt;\"><img class=\"emoji\" src=\"//l.ruby-china.org/assets/emojis/four_leaf_clover.png\" width=\"64\" height=\"64\"></a>:ruby-china:.
33
+ => "This is a <span src=\"error\">:ruby:</span> alert('Formater');.<br><br> Test Auto Link <a href=\"http://www.ruby-china.com\" target=\"_blank\">www.ruby-china.com</a><br><br><a href=\"mailto:mail@domain.com\">mail@domain.com</a><br><br>Test Emoji tag <a href=\"&lt;img%20class=%22emoji%22%20src=%22//l.ruby-china.org/assets/emojis/cat.png%22%20width=%2264%22%20height=%2264%22%20/&gt;\"><img class=\"emoji\" src=\"//l.ruby-china.org/assets/emojis/four_leaf_clover.png\"></a>:ruby-china:."
30
34
  ```
35
+ ----
31
36
 
32
37
  ``` ruby
33
- SimpleFormat.auto_link(string)
38
+ c.auto_link('www.ruby-china.org') # 自动链接
34
39
  ```
35
- * return
36
-
37
40
  ``` html
38
- This is a <span src='error'>:ruby:</span> <script type='text/javascript'>alert('Formater');</script>.<br /><br /> Test Auto Link <a href='http://www.ruby-china.com' target='_blank'>www.ruby-china.com</a><br /><br /><a href='mailto:mail@domain.com'>mail@domain.com</a><br /><br />Test Emoji tag <a href=':cat:'>🍀</a>:ruby-china:.
41
+ => "<a href='//www.ruby-china.org' target='_blank'>www.ruby-china.org</a>"
39
42
  ```
43
+ ----
40
44
 
41
45
  ``` ruby
42
- SimpleFormat.replace_emoji_with_images(string, 24) # Default img size is 64
46
+ c.emoji_with('🍀') # 表情符
43
47
  ```
44
- * return
45
-
46
48
  ``` html
47
- This is a <span src='error'>:ruby:</span> <script type='text/javascript'>alert('Formater');</script>.\n\n Test Auto Link www.ruby-china.com\n\nmail@domain.com\n\nTest Emoji tag <a href='<img class=\"emoji\" src=\"//l.ruby-china.org/assets/emojis/cat.png\" width=\"24\" height=\"24\" />'><img class=\"emoji\" src=\"//l.ruby-china.org/assets/emojis/four_leaf_clover.png\" width=\"24\" height=\"24\" /></a>:ruby-china:.
49
+ => "<img class=\"emoji\" src=\"//l.ruby-china.org/assets/emojis/four_leaf_clover.png\" />"
48
50
  ```
51
+ ----
49
52
 
50
53
  ``` ruby
51
- SimpleFormat.clean(string, {elements: [], attributes: { all: [] }})
54
+ c.text_with(string) # 清除 HTML
52
55
  => "This is a :ruby: alert('Formater');.\n\n Test Auto Link www.ruby-china.com\n\nmail@domain.com\n\nTest Emoji tag 🍀:ruby-china:."
53
56
 
54
57
  ```
@@ -5,36 +5,57 @@ require 'simple_format/auto_link'
5
5
  require 'sanitize' unless defined?(::Sanitize)
6
6
 
7
7
  module SimpleFormat
8
- extend self
8
+ class Converter
9
+ def initialize(emoji=nil)
10
+ @emoji = emoji if emoji.is_a?(SimpleFormat::Emoji)
11
+ end
12
+
13
+ def rich_with(string) # 转 富文本
14
+ return string unless string
15
+ string = emoji_with(string)
16
+ string = nl2br(string).to_str
17
+ string = auto_link(string)
18
+ string = html_with(string)
19
+ return string
20
+ end
21
+
22
+ def emoji_with(string) # 表情符 转 <img>
23
+ emoji.replace_emoji_with_images(string)
24
+ end
25
+
26
+ def html_with(html, options = {})
27
+ options = { elements: sanitized_allowed_tags, attributes: { all: sanitized_allowed_attributes } } if options.empty?
28
+ Sanitize.clean(html, options)
29
+ end
30
+
31
+ def text_with(string) # 清除 html
32
+ Sanitize.clean(string, {elements: [], attributes: { all: [] }})
33
+ end
34
+
35
+ def nl2br(string) # 回车 转 <br />
36
+ if string
37
+ string.gsub("\n\r","<br />").gsub("\r", "").gsub("\n", "<br />")
38
+ end
39
+ end
40
+
41
+ def auto_link(string) # 链接转换
42
+ @auto_link ||= AutoLink.new
43
+ @auto_link.all(string)
44
+ end
45
+
46
+ private
47
+
48
+ def emoji
49
+ @emoji || Emoji.new
50
+ end
51
+
52
+ def sanitized_allowed_tags
53
+ ['a', 'p', 'br', 'img', 'abbr', 'mark', 'm', 'fieldset', 'legend', 'label', 'summary', 'details', 'address', 'map', 'area', 'td', 'tr', 'th', 'thead', 'tbody', 'tfoot', 'caption', 'table', 'h4', 'h5', 'h6', 'hr', 'span', 'em', 'dl', 'dt', 'dd', 'b', 'del', 'ins', 'small', 'pre', 'blockquote', 'strong', 'audio', 'video', 'source', 'ul', 'ol', 'li', 'i', 'embed', 'sub', 'sup']
54
+ end
55
+
56
+ def sanitized_allowed_attributes
57
+ ['shape', 'coords', 'target', 'href', 'muted', 'volume', 'name', 'class', 'title', 'border', 'poster', 'loop', 'autoplay', 'allowfullscreen', 'fullscreen', 'align' , 'quality', 'allowscriptaccess', 'wmode', 'flashvars', 'webkit-playsinline', 'x-webkit-airplay', 'data-original', 'src', 'controls', 'preload', 'type', 'width', 'height', 'size', 'alt']
58
+ end
9
59
 
10
- def h(string, size=64)
11
- return string unless string
12
- string = emoji.replace_emoji_with_images(string, size)
13
- string = auto_link(string)
14
- string = clean(string)
15
60
  end
16
-
17
- def replace_emoji_with_images(string, size=64)
18
- emoji.replace_emoji_with_images(string, size)
19
- end
20
-
21
- def clean(html, options = {})
22
- options = { elements: sanitized_allowed_tags, attributes: { all: sanitized_allowed_attributes } } if options.empty?
23
- Sanitize.clean(html, options)
24
- end
25
-
26
- def emoji
27
- @emoji ||= Emoji.new
28
- end
29
-
30
- private
31
-
32
- def sanitized_allowed_tags
33
- ['a', 'p', 'br', 'img', 'abbr', 'mark', 'm', 'fieldset', 'legend', 'label', 'summary', 'details', 'address', 'map', 'area', 'td', 'tr', 'th', 'thead', 'tbody', 'tfoot', 'caption', 'table', 'h4', 'h5', 'h6', 'hr', 'span', 'em', 'dl', 'dt', 'dd', 'b', 'del', 'ins', 'small', 'pre', 'blockquote', 'strong', 'audio', 'video', 'source', 'ul', 'ol', 'li', 'i', 'embed', 'sub', 'sup']
34
- end
35
-
36
- def sanitized_allowed_attributes
37
- ['shape', 'coords', 'target', 'href', 'muted', 'volume', 'name', 'class', 'title', 'border', 'poster', 'loop', 'autoplay', 'allowfullscreen', 'fullscreen', 'align' , 'quality', 'allowscriptaccess', 'wmode', 'flashvars', 'webkit-playsinline', 'x-webkit-airplay', 'data-original', 'src', 'controls', 'preload', 'type', 'width', 'height', 'size', 'alt']
38
- end
39
-
40
61
  end
@@ -1,94 +1,72 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module SimpleFormat
4
- extend self
4
+ class AutoLink
5
5
 
6
- def auto_link(text, *args, &block) #link = :all, html = {}, &block)
7
- return text unless text
8
-
9
- options = {}
10
- unless args.empty?
11
- options[:link] = args[0] || :all
12
- end
13
- options.merge!(:link => :all)
14
- # 转换回行
15
- text = nl2br(text).to_str
16
- # 根据类型生成链接
17
- case options[:link].to_sym
18
- when :all then auto_link_email_addresses(auto_link_urls(text, &block), &block)
19
- when :email_addresses then auto_link_email_addresses(text, &block)
20
- when :urls then auto_link_urls(text, &block)
6
+ def initialize()
7
+ @regex = {
8
+ protocol: %r{(?: ((?:ed2k|ftp|http|https|irc|mailto|news|gopher|nntp|telnet|webcal|xmpp|callto|feed|svn|urn|aim|rsync|tag|ssh|sftp|rtsp|afs|file):)// | www\. )[^\s<]+}x,
9
+ href: [/<[^>]+$/, /^[^>]*>/, /<a\b.*?>/i, /<\/a>/i],
10
+ mail: /[\w.!#\$%+-]+@[\w-]+(?:\.[\w-]+)+/,
11
+ brackets: { ']' => '[', ')' => '(', '}' => '{' },
12
+ word_pattern: RUBY_VERSION < '1.9' ? '\w' : '\p{Word}'
13
+ }
21
14
  end
22
- end
23
15
 
24
- private
25
-
26
- def nl2br(string)
27
- if string
28
- string.gsub("\n\r","<br />").gsub("\r", "").gsub("\n", "<br />")
16
+ def all(text)
17
+ return text unless text
18
+ email_addresses( urls(text) )
29
19
  end
30
- end
31
-
32
- AUTO_LINK_RE = %r{
33
- (?: ((?:ed2k|ftp|http|https|irc|mailto|news|gopher|nntp|telnet|webcal|xmpp|callto|feed|svn|urn|aim|rsync|tag|ssh|sftp|rtsp|afs|file):)// | www\. )
34
- [^\s<]+
35
- }x
36
-
37
- # regexps for determining context, used high-volume
38
- AUTO_LINK_CRE = [/<[^>]+$/, /^[^>]*>/, /<a\b.*?>/i, /<\/a>/i]
39
-
40
- AUTO_EMAIL_RE = /[\w.!#\$%+-]+@[\w-]+(?:\.[\w-]+)+/
41
-
42
- BRACKETS = { ']' => '[', ')' => '(', '}' => '{' }
43
20
 
44
- WORD_PATTERN = RUBY_VERSION < '1.9' ? '\w' : '\p{Word}'
21
+ # Turns all urls into clickable links. If a block is given, each url
22
+ # is yielded and the result is used as the link text.
23
+ def urls(text)
24
+
25
+ text.gsub(@regex[:protocol]) do
26
+ scheme, href = $1, $&
27
+ punctuation = []
45
28
 
46
- # Turns all urls into clickable links. If a block is given, each url
47
- # is yielded and the result is used as the link text.
48
- def auto_link_urls(text)
49
-
50
- text.gsub(AUTO_LINK_RE) do
51
- scheme, href = $1, $&
52
- punctuation = []
53
-
54
- if auto_linked?($`, $')
55
- # do not change string; URL is already linked
56
- href
57
- else
58
- # don't include trailing punctuation character as part of the URL
59
- while href.sub!(/[^#{WORD_PATTERN}\/-]$/, '')
60
- punctuation.push $&
61
- if opening = BRACKETS[punctuation.last] and href.scan(opening).size > href.scan(punctuation.last).size
62
- href << punctuation.pop
63
- break
29
+ if auto_linked?($`, $')
30
+ # do not change string; URL is already linked
31
+ href
32
+ else
33
+ # don't include trailing punctuation character as part of the URL
34
+ while href.sub!(/[^#{@regex[:word_pattern]}\/-]$/, '')
35
+ punctuation.push $&
36
+ if opening = @regex[:brackets][punctuation.last] and href.scan(opening).size > href.scan(punctuation.last).size
37
+ href << punctuation.pop
38
+ break
39
+ end
64
40
  end
65
- end
66
41
 
67
- link_text = block_given?? yield(href) : href
68
- href = 'http://' + href unless scheme
42
+ link_text = block_given?? yield(href) : href
43
+ href = '//' + href unless scheme
69
44
 
70
- "<a href='#{href}' target='_blank'>#{link_text}</a>" + punctuation.reverse.join('')
45
+ "<a href='#{href}' target='_blank'>#{link_text}</a>" + punctuation.reverse.join('')
46
+ end
71
47
  end
72
48
  end
73
- end
74
49
 
75
- # Turns all email addresses into clickable links. If a block is given,
76
- # each email is yielded and the result is used as the link text.
77
- def auto_link_email_addresses(text)
78
- text.gsub(AUTO_EMAIL_RE) do
79
- text = $&
80
- if auto_linked?($`, $')
81
- text
82
- else
83
- display_text = (block_given?) ? yield(text) : text
84
- # mail_to text, display_text
85
- "<a href='mailto:#{text}'>#{display_text}</a>"
50
+ # Turns all email addresses into clickable links. If a block is given,
51
+ # each email is yielded and the result is used as the link text.
52
+ def email_addresses(text)
53
+ text.gsub(@regex[:mail]) do
54
+ text = $&
55
+ if auto_linked?($`, $')
56
+ text
57
+ else
58
+ display_text = (block_given?) ? yield(text) : text
59
+ # mail_to text, display_text
60
+ "<a href='mailto:#{text}'>#{display_text}</a>"
61
+ end
86
62
  end
87
63
  end
88
- end
89
64
 
90
- # Detects already linked context or position in the middle of a tag
91
- def auto_linked?(left, right)
92
- (left =~ AUTO_LINK_CRE[0] and right =~ AUTO_LINK_CRE[1]) or (left.rindex(AUTO_LINK_CRE[2]) and $' !~ AUTO_LINK_CRE[3])
65
+ private
66
+
67
+ # Detects already linked context or position in the middle of a tag
68
+ def auto_linked?(left, right)
69
+ (left =~ @regex[:href][0] and right =~ @regex[:href][1]) or (left.rindex(@regex[:href][2]) and $' !~ @regex[:href][3])
70
+ end
93
71
  end
94
72
  end
@@ -1,5 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require 'multi_json' unless defined?(::MultiJson)
3
+ require 'active_support/core_ext/string' unless ::String.respond_to?(:present?)
4
+ require 'active_support/core_ext/object/inclusion' unless ::String.respond_to?(:in?)
3
5
 
4
6
  module SimpleFormat
5
7
  class Emoji
@@ -23,9 +25,10 @@ module SimpleFormat
23
25
  @emoji_name_regex = /:([a-z0-9\+\-_]+):/
24
26
  @emoji_unicode_regex = /#{@emoji_by_unicode.keys.join('|')}/
25
27
  end
28
+
26
29
  # 主机地址
27
30
  def asset_host
28
- @asset_host || '//l.ruby-china.org'
31
+ @asset_host || 'emoji.qiniudn.com'
29
32
  end
30
33
  # 设置主机地址
31
34
  def asset_host=(host)
@@ -33,51 +36,69 @@ module SimpleFormat
33
36
  end
34
37
  # 资源路径
35
38
  def asset_path
36
- @asset_path || '/assets/emojis/'
39
+ @asset_path || '/'
37
40
  end
38
41
  # 设置路径
39
42
  def asset_path=(path)
40
43
  @asset_path = path
41
44
  end
45
+ # 图标尺寸
46
+ def asset_size
47
+ @asset_size || ''
48
+ end
49
+ # 设置图标尺寸
50
+ def asset_size=(size)
51
+ @asset_size = size
52
+ end
53
+ # 分隔符
54
+ def asset_delimiter
55
+ @asset_delimiter || '_'
56
+ end
57
+ def asset_delimiter=(delimiter)
58
+ @asset_delimiter = delimiter
59
+ end
42
60
  # 通过(名称、字符)替换表情
43
- def replace_emoji_with_images(string, size='64')
61
+ def replace_emoji_with_images(string)
44
62
  return string unless string
45
-
46
63
  html ||= string.dup
47
- html = replace_name_with_images(html, size)
48
- html = replace_unicode_with_images(html.to_str, size)
49
- puts html
50
- puts '_'*88 + 'replace_unicode_with_images'
64
+ html = replace_name_with_images(html)
65
+ html = replace_unicode_with_images(html.to_str)
51
66
  return html
52
67
  end
53
68
  # 通过(名称)替换表情
54
- def replace_name_with_images(string, size='64')
69
+ def replace_name_with_images(string)
55
70
  unless string && string.match(names_regex)
56
71
  return string
57
72
  end
58
73
 
59
74
  string.to_str.gsub(names_regex) do |match|
60
75
  if names.include?($1)
61
- %Q{<img class="emoji" src="#{ image_url_for_name($1) }" width="#{size}" height="#{size}" />}
76
+ %Q{<img class="emoji" src="//#{ image_url_for_name($1) }" />}
62
77
  else
63
78
  match
64
79
  end
65
80
  end
66
81
  end
67
82
  # 通过(字符)替换表情
68
- def replace_unicode_with_images(string, size='64')
83
+ def replace_unicode_with_images(string)
69
84
  unless string && string.match(unicodes_regex)
70
85
  return string
71
86
  end
72
87
 
73
88
  html ||= string.dup
74
89
  html.gsub!(unicodes_regex) do |unicode|
75
- %Q{<img class="emoji" src="#{ image_url_for_unicode(unicode) }" width="#{size}" height="#{size}" />}
90
+ %Q{<img class="emoji" src="//#{ image_url_for_unicode(unicode) }" />}
76
91
  end
77
92
  end
78
93
  # 通过(名称)合成图片地址
79
94
  def image_url_for_name(name)
80
- "#{asset_host}#{ File.join(asset_path, name) }.png"
95
+ image_url = "#{asset_host}#{ File.join(asset_path, name) }.png"
96
+ if image_url.present?
97
+ if asset_size.present? && asset_size.in?(sizes)
98
+ image_url = [image_url, asset_size].join(asset_delimiter)
99
+ end
100
+ end
101
+ return image_url
81
102
  end
82
103
  # 通过(字符)合成图片地址
83
104
  def image_url_for_unicode(unicode)
@@ -108,5 +129,12 @@ module SimpleFormat
108
129
  def unicodes_regex
109
130
  @emoji_unicode_regex
110
131
  end
132
+
133
+ private
134
+
135
+ # 尺寸
136
+ def sizes
137
+ %W(16x16 24x24 32x32 48x48 56x56)
138
+ end
111
139
  end
112
140
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleFormat
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,79 +1,79 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Howl王
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-28 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
15
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
20
+ requirement: !ruby/object:Gem::Requirement
23
21
  requirements:
24
- - - ">="
22
+ - - '>='
25
23
  - !ruby/object:Gem::Version
26
24
  version: '0'
25
+ prerelease: false
26
+ type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sanitize
29
- requirement: !ruby/object:Gem::Requirement
29
+ version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
37
35
  requirements:
38
- - - ">="
36
+ - - '>='
39
37
  - !ruby/object:Gem::Version
40
38
  version: '0'
39
+ prerelease: false
40
+ type: :runtime
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
- requirement: !ruby/object:Gem::Requirement
43
+ version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.5'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
51
49
  requirements:
52
- - - "~>"
50
+ - - ~>
53
51
  - !ruby/object:Gem::Version
54
52
  version: '1.5'
53
+ prerelease: false
54
+ type: :development
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
- requirement: !ruby/object:Gem::Requirement
57
+ version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
62
+ requirement: !ruby/object:Gem::Requirement
65
63
  requirements:
66
- - - ">="
64
+ - - '>='
67
65
  - !ruby/object:Gem::Version
68
66
  version: '0'
69
- description:
67
+ prerelease: false
68
+ type: :development
69
+ description:
70
70
  email:
71
71
  - howl.wong@gmail.com
72
72
  executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - ".gitignore"
76
+ - .gitignore
77
77
  - Gemfile
78
78
  - LICENSE.txt
79
79
  - README.md
@@ -88,24 +88,24 @@ homepage: https://github.com/mimosa/simple_format/
88
88
  licenses:
89
89
  - MIT
90
90
  metadata: {}
91
- post_install_message:
91
+ post_install_message:
92
92
  rdoc_options: []
93
93
  require_paths:
94
94
  - lib
95
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - ">="
97
+ - - '>='
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">="
102
+ - - '>='
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubyforge_project:
107
- rubygems_version: 2.2.1
108
- signing_key:
106
+ rubyforge_project:
107
+ rubygems_version: 2.2.2
108
+ signing_key:
109
109
  specification_version: 4
110
110
  summary: Returns text transformed into HTML using simple formatting rules.
111
111
  test_files: []