alphasights-sinatra-sprockets 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,7 +38,7 @@ module Sinatra
38
38
 
39
39
  if sources.is_a?(Array)
40
40
  content_tag("video", options) do
41
- sources.map { |source| tag("source", :src => source) }.join.html_safe
41
+ sources.map { |source| tag("source", :src => source) }.join
42
42
  end
43
43
  else
44
44
  options[:src] = asset_path(sources)
@@ -68,7 +68,7 @@ module Sinatra
68
68
  src = asset_path(source, :ext => 'js', :body => body, :digest => digest)
69
69
  content_tag("script", "", { "type" => "application/javascript", "src" => src }.merge!(options))
70
70
  end
71
- end.join("\n").html_safe
71
+ end.join("\n")
72
72
  end
73
73
 
74
74
  def stylesheet_link_tag(*sources)
@@ -87,7 +87,7 @@ module Sinatra
87
87
  href = asset_path(source, :ext => 'css', :body => body, :protocol => :request, :digest => digest)
88
88
  tag("link", { "rel" => "stylesheet", "type" => "text/css", "media" => "screen", "href" => href }.merge!(options))
89
89
  end
90
- end.join("\n").html_safe
90
+ end.join("\n")
91
91
  end
92
92
 
93
93
  def asset_path(source, options={})
@@ -97,7 +97,7 @@ module Sinatra
97
97
  end
98
98
 
99
99
  def tag(name, options = nil, open = false, escape = true)
100
- "<#{name}#{tag_options(options, escape) if options}#{open ? ">" : " />"}".html_safe
100
+ "<#{name}#{tag_options(options, escape) if options}#{open ? ">" : " />"}"
101
101
  end
102
102
 
103
103
  def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)
@@ -139,13 +139,13 @@ module Sinatra
139
139
  attrs << %(#{key}="#{final_value}")
140
140
  end
141
141
  end
142
- " #{attrs.sort * ' '}".html_safe unless attrs.empty?
142
+ " #{attrs.sort * ' '}" unless attrs.empty?
143
143
  end
144
144
  end
145
145
 
146
146
  def content_tag_string(name, content, options, escape = true)
147
147
  tag_options = tag_options(options, escape) if options
148
- "<#{name}#{tag_options}>#{escape ? ERB::Util.h(content) : content}</#{name}>".html_safe
148
+ "<#{name}#{tag_options}>#{escape ? ERB::Util.h(content) : content}</#{name}>"
149
149
  end
150
150
  end
151
151
  end
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module Sprockets
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
- end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alphasights-sinatra-sprockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-13 00:00:00.000000000 Z
12
+ date: 2012-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sprockets
16
- requirement: &70244933078240 !ruby/object:Gem::Requirement
16
+ requirement: &70339178669640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '2.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70244933078240
24
+ version_requirements: *70339178669640
25
25
  description: Use Sprockets effectively with Sinatra.
26
26
  email:
27
27
  - jessereiss@gmail.com