zfben_extend 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  # encoding: UTF-8
2
2
  require 'redcarpet'
3
3
  require 'coderay'
4
+ require 'active_support/core_ext/string'
4
5
 
5
6
  class ZfbenExtend::String < String
6
7
  def self.to_html text, options={}
@@ -61,7 +62,7 @@ class ZfbenExtend::String < String
61
62
  end
62
63
  end
63
64
 
64
- self.new text
65
+ self.new text.html_safe
65
66
  end
66
67
 
67
68
  def to_html options = {}
@@ -74,7 +75,7 @@ class ZfbenExtend::String < String
74
75
  br: '<br />'
75
76
  }.merge(options)
76
77
 
77
- self.new text.gsub(options[:chars]){ |char| char << options[:br] }
78
+ self.new text.gsub(options[:chars]){ |char| char << options[:br] }.html_safe
78
79
  end
79
80
 
80
81
  def to_cnbr options = {}
@@ -91,7 +92,7 @@ class ZfbenExtend::String < String
91
92
  strikethrough: true
92
93
  }.merge(options)
93
94
  markdown = Redcarpet::Markdown.new(ZfbenExtend::HTMLwithCodeRay, options)
94
- self.new markdown.render(text)
95
+ self.new markdown.render(text).html_safe
95
96
  end
96
97
 
97
98
  def markdown options = {}
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'zfben_extend'
6
- s.version = '0.0.4'
6
+ s.version = '0.0.5'
7
7
  s.authors = ['Ben']
8
8
  s.email = ['ben@zfben.com']
9
9
  s.homepage = 'https://github.com/benz303/zfben_extend'
@@ -17,4 +17,5 @@ Gem::Specification.new do |s|
17
17
 
18
18
  s.add_dependency 'redcarpet'
19
19
  s.add_dependency 'coderay'
20
+ s.add_dependency 'activesupport'
20
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfben_extend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-15 00:00:00.000000000 Z
12
+ date: 2012-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redcarpet
16
- requirement: &22465880 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *22465880
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: coderay
27
- requirement: &22465300 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,7 +37,28 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *22465300
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: activesupport
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
36
62
  description: ''
37
63
  email:
38
64
  - ben@zfben.com
@@ -69,8 +95,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
95
  version: '0'
70
96
  requirements: []
71
97
  rubyforge_project:
72
- rubygems_version: 1.8.10
98
+ rubygems_version: 1.8.23
73
99
  signing_key:
74
100
  specification_version: 3
75
101
  summary: ''
76
102
  test_files: []
103
+ has_rdoc: