wordnik_ruby_helpers 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wordnik_ruby_helpers (0.1.0)
4
+ wordnik_ruby_helpers (0.1.1)
5
5
  RedCloth (>= 4.2.3)
6
6
  rails
7
7
 
data/Rakefile CHANGED
@@ -1,2 +1,6 @@
1
1
  require 'bundler'
2
- Bundler::GemHelper.install_tasks
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require 'rspec/core/rake_task'
5
+ RSpec::Core::RakeTask.new('spec')
6
+ task :default => :spec
@@ -1,3 +1,3 @@
1
1
  module WordnikRubyHelpers
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -3,7 +3,7 @@ require 'uri'
3
3
  module WordnikRubyHelpers
4
4
  module ViewHelpers
5
5
 
6
- def tag(element, content, properties={})
6
+ def html_tag(element, content, properties={})
7
7
 
8
8
  # Extract class and id
9
9
  css = element.to_s.scan(/\.(\w+)/).flatten.sort.join(" ")
@@ -5,22 +5,22 @@ describe WordnikRubyHelpers do
5
5
  context "tag" do
6
6
 
7
7
  it "works!" do
8
- tag('span', 'wing').should == "<span>wing</span>"
8
+ html_tag('span', 'wing').should == "<span>wing</span>"
9
9
  end
10
10
 
11
11
  it "accounts for symbols as element names" do
12
- tag(:span, 'wing').should == "<span>wing</span>"
12
+ html_tag(:span, 'wing').should == "<span>wing</span>"
13
13
  end
14
14
 
15
15
  it "accounts for shorthand css classes and id" do
16
- tag('span.big', 'wing').should == "<span class=\"big\">wing</span>"
17
- tag('span#bob', 'wing').should == "<span id=\"bob\">wing</span>"
18
- tag('span#bob.old.big', 'wing').should == "<span class=\"big old\" id=\"bob\">wing</span>"
19
- tag('span.old.big#bob', 'wing').should == "<span class=\"big old\" id=\"bob\">wing</span>"
16
+ html_tag('span.big', 'wing').should == "<span class=\"big\">wing</span>"
17
+ html_tag('span#bob', 'wing').should == "<span id=\"bob\">wing</span>"
18
+ html_tag('span#bob.old.big', 'wing').should == "<span class=\"big old\" id=\"bob\">wing</span>"
19
+ html_tag('span.old.big#bob', 'wing').should == "<span class=\"big old\" id=\"bob\">wing</span>"
20
20
  end
21
21
 
22
22
  it "accounts for extra properties" do
23
- tag('span#bob.old.big', 'wing', :rel => 'bird').should == "<span class=\"big old\" id=\"bob\" rel=\"bird\">wing</span>"
23
+ html_tag('span#bob.old.big', 'wing', :rel => 'bird').should == "<span class=\"big old\" id=\"bob\" rel=\"bird\">wing</span>"
24
24
  end
25
25
 
26
26
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: wordnik_ruby_helpers
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Zeke Sikelianos
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-09 00:00:00 -07:00
14
+ date: 2011-05-10 00:00:00 -07:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency