smart_asset 0.5.9 → 0.5.10
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/bin/yuicompressor-2.4.6.jar +0 -0
- data/lib/smart_asset.rb +4 -0
- data/lib/smart_asset/adapters/stasis.rb +1 -1
- data/lib/smart_asset/recipes.rb +15 -0
- data/recipes/smart_asset.rb +1 -0
- data/smart_asset.gemspec +1 -1
- metadata +6 -4
data/bin/yuicompressor-2.4.6.jar
CHANGED
File without changes
|
data/lib/smart_asset.rb
CHANGED
@@ -124,6 +124,10 @@ class SmartAsset
|
|
124
124
|
def load_config(root, relative_config=nil)
|
125
125
|
relative_config ||= 'config/assets.yml'
|
126
126
|
@root = File.expand_path(root)
|
127
|
+
|
128
|
+
return unless File.file?("#{@root}/#{relative_config}")
|
129
|
+
|
130
|
+
@cache = nil
|
127
131
|
@config = YAML::load(File.read("#{@root}/#{relative_config}"))
|
128
132
|
|
129
133
|
# Default values
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.join File.dirname(__FILE__),'..','smart_asset'
|
2
|
+
Capistrano::Configuration.instance(:must_exist).load do
|
3
|
+
namespace :smart_asset do
|
4
|
+
|
5
|
+
desc 'Precompile assets for deploys'
|
6
|
+
task :precompile do
|
7
|
+
destination = SmartAsset.load_config(Dir.pwd) && SmartAsset.dest
|
8
|
+
run_locally "smart_asset"
|
9
|
+
return unless scm == :git
|
10
|
+
run_locally "git ls-files -d #{destination['javascripts']} #{destination['stylesheets']} | xargs git rm"
|
11
|
+
run_locally "git add #{destination['javascripts']} #{destination['stylesheets']}"
|
12
|
+
run_locally "git commit -m 'autocommit: smart_asset'"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require File.join File.dirname(__FILE__),'..','lib','smart_asset','recipes'
|
data/smart_asset.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_asset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 10
|
10
|
+
version: 0.5.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Winton Welsh
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-06-03 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: framework_fixture
|
@@ -84,6 +84,8 @@ files:
|
|
84
84
|
- lib/smart_asset/adapters/sinatra.rb
|
85
85
|
- lib/smart_asset/adapters/stasis.rb
|
86
86
|
- lib/smart_asset/helper.rb
|
87
|
+
- lib/smart_asset/recipes.rb
|
88
|
+
- recipes/smart_asset.rb
|
87
89
|
- smart_asset.gemspec
|
88
90
|
- spec/fixtures/all_frameworks/assets.yml
|
89
91
|
- spec/fixtures/all_frameworks/test.html.erb
|