string_master 0.3.6 → 0.3.7
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.
- data/VERSION +1 -1
- data/lib/string_master/string_master.rb +7 -0
- data/spec/lib/string_master/string_master_spec.rb +16 -0
- data/string_master.gemspec +3 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
@@ -51,6 +51,22 @@ end</code>and here's what my code looks like.
|
|
51
51
|
WRAPPED_CODE
|
52
52
|
end
|
53
53
|
|
54
|
+
it "wraps code in <code> and adds a closing tag even if regexp for closing tag doesn't match" do
|
55
|
+
code = <<CODE
|
56
|
+
I have a piece of code
|
57
|
+
def say_hello
|
58
|
+
puts "hello world"
|
59
|
+
return true
|
60
|
+
end
|
61
|
+
CODE
|
62
|
+
StringMaster.new(code).wrap_code.to_s.should == <<WRAPPED_CODE
|
63
|
+
I have a piece of code<code>def say_hello
|
64
|
+
puts "hello world"
|
65
|
+
return true
|
66
|
+
end</code>
|
67
|
+
WRAPPED_CODE
|
68
|
+
end
|
69
|
+
|
54
70
|
it "wraps inline code into <span class=\"inlineCode\"></span> tags" do
|
55
71
|
code = "I have a variable called `a` and it has a `nil` value"
|
56
72
|
parser = StringMaster.new(code)
|
data/string_master.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "string_master"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Roman Snitko"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-09-05"
|
13
13
|
s.description = "Because every time I create a new webapp, I think about how I should process user-generated content. Should convert urls to links and images? Should I allow certain tags? Should I convert all new lines to *br* tags? Well, now all that is as simple as calling a single method."
|
14
14
|
s.email = "roman.snitko@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.homepage = "http://github.com/snitko/string_master"
|
38
38
|
s.licenses = ["MIT"]
|
39
39
|
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = "1.8.
|
40
|
+
s.rubygems_version = "1.8.25"
|
41
41
|
s.summary = "Most common string manipulations for a webapp"
|
42
42
|
|
43
43
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_master
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
segments:
|
119
119
|
- 0
|
120
|
-
hash: -
|
120
|
+
hash: -2734865303812765722
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 1.8.
|
129
|
+
rubygems_version: 1.8.25
|
130
130
|
signing_key:
|
131
131
|
specification_version: 3
|
132
132
|
summary: Most common string manipulations for a webapp
|