tophat 1.6.0 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,2 +1,3 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
+
2
3
  gemspec
data/lib/tophat/html.rb CHANGED
@@ -2,24 +2,17 @@ module TopHat
2
2
  module HtmlHelper
3
3
 
4
4
  def html_tag(options={})
5
- output = '<html'
6
- if options[:version]
7
- output << " version=\"#{options[:version]}\""
8
- end
9
- if options[:xmlns]
10
- if options[:xmlns].kind_of?(String)
11
- output << " xmlns=\"#{options[:xmlns]}\""
12
- elsif options[:xmlns].kind_of?(Array)
13
- output = options[:xmlns].inject(output) do |html, xmlns|
14
- if xmlns.kind_of?(Hash)
15
- html << " xmlns:#{xmlns[:prefix]}=\"#{xmlns[:url]}\""
16
- else
17
- html << " xmlns=\"#{xmlns}\""
18
- end
5
+ if options[:xmlns] && options[:xmlns].kind_of?(Array)
6
+ options.delete(:xmlns).each do |xmlns|
7
+ if xmlns.kind_of?(Hash)
8
+ options["xmlns:#{xmlns[:prefix]}"] = xmlns[:url]
9
+ else
10
+ options['xmlns'] = xmlns
19
11
  end
20
12
  end
21
13
  end
22
- output << '>'
14
+
15
+ tag(:html, options, true)
23
16
  end
24
17
 
25
18
  end
@@ -1,3 +1,3 @@
1
1
  module TopHat
2
- VERSION = '1.6.0'
2
+ VERSION = '1.6.1'
3
3
  end
@@ -20,11 +20,6 @@ describe TopHat::HtmlHelper do
20
20
  output.should eq('<html xmlns="http://someurl.com">')
21
21
  end
22
22
 
23
- it 'accepts and array of xmlns in an options hash' do
24
- output = @template.html_tag(:xmlns => ['http://someurl.com', 'http://otherurl.com'])
25
- output.should eq('<html xmlns="http://someurl.com" xmlns="http://otherurl.com">')
26
- end
27
-
28
23
  it 'accepts an array of xmlns including prefixes' do
29
24
  xmlns = { :prefix => 'fb', :url => 'http://developers.facebook.com/schema/' }
30
25
  output = @template.html_tag(:xmlns => [xmlns])
data/tophat.gemspec CHANGED
@@ -14,13 +14,13 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_runtime_dependency('actionpack', '>= 3.0.0')
16
16
 
17
- s.add_development_dependency('rake', '~> 0.9')
18
- s.add_development_dependency('rspec', '~> 2.7')
19
- s.add_development_dependency('yard', '~> 0.7')
20
- s.add_development_dependency('rdiscount', '~> 1.6')
21
- s.add_development_dependency('simplecov', '~> 0.5')
17
+ s.add_development_dependency('rake')
18
+ s.add_development_dependency('rspec')
19
+ s.add_development_dependency('yard')
20
+ s.add_development_dependency('rdiscount')
21
+ s.add_development_dependency('simplecov')
22
22
  s.add_development_dependency('rails', '>= 3.0.0')
23
- s.add_development_dependency('guard-rspec', '~> 0.5')
23
+ s.add_development_dependency('guard-rspec')
24
24
 
25
25
  s.files = `git ls-files`.split("\n")
26
26
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tophat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-06-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
16
- requirement: &70176171567820 !ruby/object:Gem::Requirement
16
+ requirement: &70282580984540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,65 +21,65 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70176171567820
24
+ version_requirements: *70282580984540
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70176171565740 !ruby/object:Gem::Requirement
27
+ requirement: &70282580982080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ~>
30
+ - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
- version: '0.9'
32
+ version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70176171565740
35
+ version_requirements: *70282580982080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70176171564300 !ruby/object:Gem::Requirement
38
+ requirement: &70282580979740 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - ~>
41
+ - - ! '>='
42
42
  - !ruby/object:Gem::Version
43
- version: '2.7'
43
+ version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70176171564300
46
+ version_requirements: *70282580979740
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yard
49
- requirement: &70176171563140 !ruby/object:Gem::Requirement
49
+ requirement: &70282580978720 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
- - - ~>
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
- version: '0.7'
54
+ version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70176171563140
57
+ version_requirements: *70282580978720
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rdiscount
60
- requirement: &70176171559300 !ruby/object:Gem::Requirement
60
+ requirement: &70282580975360 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
- - - ~>
63
+ - - ! '>='
64
64
  - !ruby/object:Gem::Version
65
- version: '1.6'
65
+ version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70176171559300
68
+ version_requirements: *70282580975360
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
- requirement: &70176171558300 !ruby/object:Gem::Requirement
71
+ requirement: &70282580971680 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
- - - ~>
74
+ - - ! '>='
75
75
  - !ruby/object:Gem::Version
76
- version: '0.5'
76
+ version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70176171558300
79
+ version_requirements: *70282580971680
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rails
82
- requirement: &70176171557480 !ruby/object:Gem::Requirement
82
+ requirement: &70282580969740 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,18 +87,18 @@ dependencies:
87
87
  version: 3.0.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70176171557480
90
+ version_requirements: *70282580969740
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: guard-rspec
93
- requirement: &70176171556620 !ruby/object:Gem::Requirement
93
+ requirement: &70282580968820 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
- - - ~>
96
+ - - ! '>='
97
97
  - !ruby/object:Gem::Version
98
- version: '0.5'
98
+ version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70176171556620
101
+ version_requirements: *70282580968820
102
102
  description: Simple view helpers for your layouts
103
103
  email:
104
104
  - steve.agalloco@gmail.com