script_helpers 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/script_helpers/helper_additions.rb +12 -2
- metadata +36 -21
@@ -2,7 +2,12 @@ module ScriptHelpers
|
|
2
2
|
module HelperAdditions
|
3
3
|
def script(options = {}, &block)
|
4
4
|
if options.include? :src
|
5
|
-
|
5
|
+
@_script_helpers_script ||= {}
|
6
|
+
|
7
|
+
unless @_script_helpers_script[options[:src]]
|
8
|
+
@_script_helpers_script[options[:src]] = true
|
9
|
+
content_for :script_tags, "\n#{javascript_include_tag options[:src]}".html_safe
|
10
|
+
end
|
6
11
|
end
|
7
12
|
|
8
13
|
if block
|
@@ -29,7 +34,12 @@ module ScriptHelpers
|
|
29
34
|
|
30
35
|
def css(options = {}, &block)
|
31
36
|
if options.include? :src
|
32
|
-
|
37
|
+
@_script_helpers_css ||= {}
|
38
|
+
|
39
|
+
unless @_script_helpers_css[options[:src]]
|
40
|
+
@_script_helpers_css[options[:src]] = true
|
41
|
+
content_for :css_tags, "\n#{stylesheet_link_tag options[:src]}".html_safe
|
42
|
+
end
|
33
43
|
end
|
34
44
|
|
35
45
|
if block
|
metadata
CHANGED
@@ -1,49 +1,64 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: script_helpers
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- Mike Stone
|
9
13
|
autorequire:
|
10
14
|
bindir: bin
|
11
15
|
cert_chain: []
|
12
|
-
|
16
|
+
|
17
|
+
date: 2011-07-19 00:00:00 -07:00
|
13
18
|
default_executable:
|
14
19
|
dependencies: []
|
20
|
+
|
15
21
|
description: A Rails 3 gem that allows easy inlining of css and JavaScript
|
16
22
|
email: stonemj@gmail.com
|
17
23
|
executables: []
|
24
|
+
|
18
25
|
extensions: []
|
26
|
+
|
19
27
|
extra_rdoc_files: []
|
20
|
-
|
28
|
+
|
29
|
+
files:
|
21
30
|
- lib/generators/script_helpers/install/install_generator.rb
|
22
31
|
- lib/script_helpers.rb
|
23
32
|
- lib/script_helpers/helper_additions.rb
|
24
33
|
has_rdoc: true
|
25
34
|
homepage: https://github.com/mikestone/Script-Helpers
|
26
35
|
licenses: []
|
36
|
+
|
27
37
|
post_install_message:
|
28
38
|
rdoc_options: []
|
29
|
-
|
39
|
+
|
40
|
+
require_paths:
|
30
41
|
- lib
|
31
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
segments:
|
54
|
+
- 0
|
55
|
+
version: "0"
|
43
56
|
requirements: []
|
57
|
+
|
44
58
|
rubyforge_project:
|
45
|
-
rubygems_version: 1.6
|
59
|
+
rubygems_version: 1.3.6
|
46
60
|
signing_key:
|
47
61
|
specification_version: 3
|
48
62
|
summary: Script Helpers
|
49
63
|
test_files: []
|
64
|
+
|