active_text 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -37,7 +37,7 @@ You can also update the values:
37
37
  <pre>
38
38
  @at = ActiveText::Base.new(text_you_see_above)
39
39
  @at.bg_image.value = "'/path/to/image.png'"
40
- @at.render # returns the text passed into base, with values replaced:
40
+ @at.apply # returns the text passed into base, with values replaced:
41
41
  </pre>
42
42
 
43
43
  <pre>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
data/active_text.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active_text}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ramon Tayag"]
@@ -24,7 +24,7 @@ module ActiveText
24
24
  end
25
25
 
26
26
  # Used to update the text
27
- def render
27
+ def apply
28
28
  @variables.each do |key, var|
29
29
  @text.gsub!(/^\$#{key}: .+;/, %Q($#{key}: #{var.value};))
30
30
  end
@@ -39,13 +39,13 @@ $mbc2: "http://someurl.com/image.jpg";}
39
39
  @s.mbc2.value = %Q("Another URL")
40
40
  @s.mbc2.value.should == %Q("Another URL")
41
41
 
42
- rendered_text = @s.render
42
+ rendered_text = @s.apply
43
43
  rendered_text.should_not match(/http:\/\/someurl\.com\/image\.jpg/)
44
44
  rendered_text.should match(/\$mbc2: "Another URL";/)
45
45
 
46
46
  @s.mbc2.value = %Q("Some third URL")
47
47
  @s.mbc2.value.should == %Q("Some third URL")
48
- rendered_text = @s.render
48
+ rendered_text = @s.apply
49
49
  rendered_text.should_not match(/\$mbc2: "Another URL";/)
50
50
  rendered_text.should match(/\$mbc2: "Some third URL";/)
51
51
  end
@@ -61,7 +61,7 @@ $mbc2: "http://someurl.com/image.jpg";}
61
61
  $mbc2: "Another URL";}
62
62
  @s = ActiveText::Base.new(text_old)
63
63
  @s.mbc2.value = %Q("Another URL")
64
- @s.render.should == text_new
64
+ @s.apply.should == text_new
65
65
  end
66
66
  end
67
67
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_text
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ramon Tayag