githubbish_assets 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/githubbish_assets.gemspec +2 -2
- data/lib/githubbish_assets/helper.rb +13 -5
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.6
|
data/githubbish_assets.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{githubbish_assets}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Dashevskii"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-04-01}
|
13
13
|
s.description = %q{Github style assets bundling in a Rails 3 engine}
|
14
14
|
s.email = %q{olegdashevski@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -41,18 +41,26 @@ module GithubbishAssets
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def stylesheet_bundle(*sources)
|
44
|
+
opts = sources.extract_options!
|
45
|
+
|
44
46
|
sources = sources.to_a
|
45
|
-
bundle_files?
|
47
|
+
if bundle_files?
|
48
|
+
stylesheet_include_bundles(sources, opts)
|
49
|
+
else
|
50
|
+
stylesheet_include_files(sources, opts)
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
# This method assumes you have manually bundled css using a rake command
|
49
55
|
# or similar. So there better be bundle_* files.
|
50
|
-
def stylesheet_include_bundles(bundles)
|
51
|
-
stylesheet_link_tag(bundles.collect{ |b| "bundle_#{b}"})
|
56
|
+
def stylesheet_include_bundles(bundles, opts = {})
|
57
|
+
stylesheet_link_tag(bundles.collect{ |b| "bundle_#{b}"}, opts)
|
52
58
|
end
|
53
59
|
|
54
|
-
def stylesheet_include_files(bundles)
|
55
|
-
_gh_include_files("public/stylesheets", ".css", bundles)
|
60
|
+
def stylesheet_include_files(bundles, opts = {})
|
61
|
+
_gh_include_files("public/stylesheets", ".css", bundles) do |file|
|
62
|
+
stylesheet_link_tag(file, opts)
|
63
|
+
end
|
56
64
|
end
|
57
65
|
|
58
66
|
private
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: githubbish_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Oleg Dashevskii
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-04-01 00:00:00 +07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|