string_master 0.3.1 → 0.3.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.
data/README.markdown CHANGED
@@ -37,4 +37,4 @@ Fuck yeah.
37
37
 
38
38
  More
39
39
  ---------------
40
- Please read RDoc to see all of the available methods of StringMaster class: http://rdoc.info/github/snitko/string_master/master/StringMaster
40
+ Please read RDoc to see all of the available methods of StringMaster class: http://rdoc.info/gems/string_master/frames
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -116,15 +116,17 @@ class StringMaster
116
116
  end
117
117
  end
118
118
  @modified_string = result
119
+ self
119
120
  end
120
121
 
121
122
  # Finds all lines that start with 4 spaces and wraps them into <code> tags.
122
123
  def wrap_code
123
- wrap_lines("code", /\A\s{4}/)
124
+ wrap_lines("code", /\A\s{4}/) # wrap lines already returns `self`
124
125
  end
125
126
 
126
127
  def wrap_inline_code(opening_tag="<span class=\"inlineCode\">", closing_tag="</span>")
127
128
  @modified_string.gsub!(/`(.+?)`/, opening_tag + '\1' + closing_tag)
129
+ self
128
130
  end
129
131
 
130
132
  def to_s
@@ -41,7 +41,7 @@ I have a piece of code
41
41
  exit
42
42
  and here's what my code looks like.
43
43
  CODE
44
- StringMaster.new(code).wrap_code.should == <<WRAPPED_CODE
44
+ StringMaster.new(code).wrap_code.to_s.should == <<WRAPPED_CODE
45
45
  I have a piece of code
46
46
  <code>puts "hello world"
47
47
  exit</code>
@@ -52,7 +52,7 @@ WRAPPED_CODE
52
52
  it "wraps inline code into <span class=\"inlineCode\"></span> tags" do
53
53
  code = "I have a variable called `a` and it has a `nil` value"
54
54
  parser = StringMaster.new(code)
55
- parser.wrap_inline_code.should == "I have a variable called <span class=\"inlineCode\">a</span> and it has a <span class=\"inlineCode\">nil</span> value"
55
+ parser.wrap_inline_code.to_s.should == "I have a variable called <span class=\"inlineCode\">a</span> and it has a <span class=\"inlineCode\">nil</span> value"
56
56
  end
57
57
 
58
58
  it "breaks long words" do
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "string_master"
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
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"]
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.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -133,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  segments:
135
135
  - 0
136
- hash: -1214522452410579616
136
+ hash: 2478903722703068135
137
137
  required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements: