sc_jammit_lite 0.2.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/jammit/lite/helper.rb +7 -21
- data/sc_jammit_lite.gemspec +1 -1
- metadata +11 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/lib/jammit/lite/helper.rb
CHANGED
@@ -18,8 +18,7 @@ module Jammit
|
|
18
18
|
|
19
19
|
# creates <script> tags for Jammit templates
|
20
20
|
def include_templates(*bundles)
|
21
|
-
|
22
|
-
tags.join("\n")
|
21
|
+
raise DeprecationError, "Jammit 0.5+ no longer supports separate packages for templates.\nYou can include your JST alongside your JS, and use include_javascripts."
|
23
22
|
end
|
24
23
|
|
25
24
|
private
|
@@ -40,39 +39,26 @@ module Jammit
|
|
40
39
|
# creates <link> tags for Jammit css bundles
|
41
40
|
# in development, creates <link> tag for each individual file in bundles
|
42
41
|
# in production, creates <link> tag for each bundle
|
43
|
-
def include_stylesheets(*bundles)
|
42
|
+
def include_stylesheets(*bundles)
|
43
|
+
options = bundles.extract_options!
|
44
44
|
bundles.map! { |name| Jammit::Lite::Bundle.new(:stylesheets => name) }
|
45
|
-
return include_individual_stylesheets(bundles) unless Rails.env.production? || Rails.env.demo? || Rails.env.testing?
|
46
|
-
tags = bundles.map { |bundle| stylesheet_link_tag(bundle.path) }
|
45
|
+
return include_individual_stylesheets(bundles, options) unless Rails.env.production? || Rails.env.demo? || Rails.env.testing?
|
46
|
+
tags = bundles.map { |bundle| stylesheet_link_tag(bundle.path, options) }
|
47
47
|
tags.join("\n")
|
48
48
|
end
|
49
49
|
|
50
50
|
private
|
51
51
|
|
52
|
-
|
53
|
-
|
54
52
|
# creates <script> tags for each individual file in given Array of bundles
|
55
|
-
def include_individual_stylesheets(bundles=[])
|
53
|
+
def include_individual_stylesheets(bundles = [], options = {})
|
56
54
|
tags = []
|
57
55
|
bundles.each do |bundle|
|
58
|
-
tags.concat bundle.files.map { |css| stylesheet_link_tag(css.path) }
|
56
|
+
tags.concat bundle.files.map { |css| stylesheet_link_tag(css.path, options) }
|
59
57
|
end
|
60
58
|
tags.join("\n")
|
61
59
|
end
|
62
|
-
|
63
|
-
# returns hash for stylesheet link tag attributes for given file
|
64
|
-
def attributes_for_stylesheet_link(file)
|
65
|
-
{:href => file.path, :media => 'screen', :rel => 'stylesheet', :type => 'text/css'}
|
66
|
-
end
|
67
|
-
|
68
|
-
|
69
|
-
|
70
60
|
end
|
71
|
-
|
72
61
|
end
|
73
|
-
|
74
|
-
|
75
|
-
|
76
62
|
end
|
77
63
|
|
78
64
|
# Include the Jammit asset helpers in all views, a-la ApplicationHelper.
|
data/sc_jammit_lite.gemspec
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sc_jammit_lite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 7
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Jordan Glasner
|
@@ -21,9 +22,11 @@ dependencies:
|
|
21
22
|
name: thoughtbot-shoulda
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
27
30
|
segments:
|
28
31
|
- 0
|
29
32
|
version: "0"
|
@@ -63,23 +66,27 @@ rdoc_options:
|
|
63
66
|
require_paths:
|
64
67
|
- lib
|
65
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
66
70
|
requirements:
|
67
71
|
- - ">="
|
68
72
|
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
69
74
|
segments:
|
70
75
|
- 0
|
71
76
|
version: "0"
|
72
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
73
79
|
requirements:
|
74
80
|
- - ">="
|
75
81
|
- !ruby/object:Gem::Version
|
82
|
+
hash: 3
|
76
83
|
segments:
|
77
84
|
- 0
|
78
85
|
version: "0"
|
79
86
|
requirements: []
|
80
87
|
|
81
88
|
rubyforge_project:
|
82
|
-
rubygems_version: 1.3.
|
89
|
+
rubygems_version: 1.3.7
|
83
90
|
signing_key:
|
84
91
|
specification_version: 3
|
85
92
|
summary: Replaces full Jammit gem in production (or demo). Made to reduce slug size at Heroku
|