redcloth_on 0.1.0 → 0.2.0

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 CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -38,6 +38,11 @@ module RedCloth
38
38
  qt = attributes[name.to_s]
39
39
  qt.nil? ? "" : qt
40
40
  end
41
+
42
+ define_method("old_" + name.to_s) do
43
+ attributes[name.to_s]
44
+ end
45
+
41
46
  end
42
47
  end
43
48
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "redcloth_on"
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ivan Acosta-Rubio"]
@@ -33,7 +33,14 @@ describe "RedclothOn" do
33
33
 
34
34
  it "should not raise when the attribute is nil" do
35
35
  lambda{ TestingClass.new.nil_value }.should_not raise_error
36
+ end
37
+
38
+ it "has access to the unmodified attribute" do
39
+ TestingClass.new.old_testing.should == "*hello*"
40
+ end
36
41
 
42
+ it "returns an empty string for nil attribute" do
43
+ TestingClass.new.nil_value.should == ""
37
44
  end
38
45
 
39
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redcloth_on
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
142
  version: '0'
143
143
  segments:
144
144
  - 0
145
- hash: 2164497241863310733
145
+ hash: 1428702851010503921
146
146
  required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  none: false
148
148
  requirements: