fingerjam 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +7 -8
- data/fingerjam.gemspec +7 -6
- data/lib/fingerjam/capistrano.rb +1 -2
- data/lib/fingerjam/jammit.rb +6 -4
- data/lib/fingerjam/railtie.rb +2 -0
- data/lib/fingerjam/version.rb +1 -1
- metadata +28 -17
data/README.rdoc
CHANGED
@@ -2,21 +2,20 @@
|
|
2
2
|
|
3
3
|
Fingerjam uploads your Jammit-compressed assets with fingerprinted filenames so they can be cached indefinitely.
|
4
4
|
|
5
|
-
Fingerjam
|
5
|
+
Currently, Fingerjam monkey-patches Jammit's rewrite_asset_path method to generate a complete URL. I'm looking for a better way to do this.
|
6
|
+
|
7
|
+
Fingerjam also ships with a Capistrano strategy (which extends the "copy" strategy) to run Jammit, save a YAML file of the results, and add appropriate symlinks before deploying.
|
6
8
|
|
7
9
|
== Usage
|
8
10
|
|
9
|
-
* Configure Capistrano & Jammit
|
11
|
+
* Configure Capistrano & Jammit as required
|
10
12
|
|
11
13
|
* Add code similar to the following to config/deploy.rb:
|
12
14
|
|
13
|
-
set :
|
15
|
+
set :cache_host, "cache.example.com"
|
16
|
+
set :cache_protocol, "https"
|
14
17
|
require "fingerjam/capistrano"
|
15
18
|
|
16
|
-
* Add code similar to the following to config/initializers/fingerjam.rb:
|
17
|
-
|
18
|
-
Fingerjam::Base.configure(:host => "cache.example.com")
|
19
|
-
|
20
19
|
* Execute cap deploy
|
21
20
|
|
22
21
|
bundle exec cap deploy
|
@@ -33,4 +32,4 @@ Fingerjam will install a capistrano task to package assets with Jammit, write co
|
|
33
32
|
|
34
33
|
== Copyright
|
35
34
|
|
36
|
-
Copyright (c)
|
35
|
+
Copyright (c) 2011 Steve Hoeksema. See LICENSE.txt for further details.
|
data/fingerjam.gemspec
CHANGED
@@ -19,12 +19,13 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_runtime_dependency(%q<rails>, ["
|
23
|
-
s.add_runtime_dependency(%q<jammit>, ["
|
24
|
-
s.add_runtime_dependency(%q<capistrano>, ["
|
25
|
-
s.add_runtime_dependency(%q<activesupport>, ["
|
22
|
+
s.add_runtime_dependency(%q<rails>, ["~> 3.0"])
|
23
|
+
s.add_runtime_dependency(%q<jammit>, ["~> 1.6"])
|
24
|
+
s.add_runtime_dependency(%q<capistrano>, ["~> 2.5"])
|
25
|
+
s.add_runtime_dependency(%q<activesupport>, ["~> 3.0"])
|
26
|
+
s.add_runtime_dependency(%q<actionpack>, ["~> 3.0"])
|
26
27
|
|
27
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.
|
28
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0
|
28
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5"])
|
29
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
29
30
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
30
31
|
end
|
data/lib/fingerjam/capistrano.rb
CHANGED
data/lib/fingerjam/jammit.rb
CHANGED
@@ -1,14 +1,16 @@
|
|
1
|
+
# Used by rake fingerjam:package
|
1
2
|
module Jammit
|
2
|
-
class Compressor
|
3
3
|
|
4
|
-
|
4
|
+
module JammitCompressor
|
5
5
|
def rewrite_asset_path(relative_path, absolute_path)
|
6
6
|
if File.exist?(absolute_path)
|
7
7
|
Fingerjam::Base.save_cached_url_from_path(relative_path, absolute_path)
|
8
8
|
else
|
9
|
-
|
9
|
+
super
|
10
10
|
end
|
11
11
|
end
|
12
|
-
|
13
12
|
end
|
13
|
+
|
14
|
+
Compressor.send :include, JammitCompressor
|
15
|
+
|
14
16
|
end
|
data/lib/fingerjam/railtie.rb
CHANGED
data/lib/fingerjam/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: fingerjam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Steve Hoeksema
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-02-
|
13
|
+
date: 2011-02-21 00:00:00 +13:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -19,9 +19,9 @@ dependencies:
|
|
19
19
|
requirement: &id001 !ruby/object:Gem::Requirement
|
20
20
|
none: false
|
21
21
|
requirements:
|
22
|
-
- -
|
22
|
+
- - ~>
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 3.0
|
24
|
+
version: "3.0"
|
25
25
|
type: :runtime
|
26
26
|
version_requirements: *id001
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -30,9 +30,9 @@ dependencies:
|
|
30
30
|
requirement: &id002 !ruby/object:Gem::Requirement
|
31
31
|
none: false
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - ~>
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: "
|
35
|
+
version: "1.6"
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
@@ -41,9 +41,9 @@ dependencies:
|
|
41
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: "
|
46
|
+
version: "2.5"
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
@@ -52,44 +52,55 @@ dependencies:
|
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
|
-
- -
|
55
|
+
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: "0"
|
57
|
+
version: "3.0"
|
58
58
|
type: :runtime
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
61
|
+
name: actionpack
|
62
62
|
prerelease: false
|
63
63
|
requirement: &id005 !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
type: :
|
68
|
+
version: "3.0"
|
69
|
+
type: :runtime
|
70
70
|
version_requirements: *id005
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
-
name:
|
72
|
+
name: rspec
|
73
73
|
prerelease: false
|
74
74
|
requirement: &id006 !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
77
77
|
- - ~>
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
79
|
+
version: "2.5"
|
80
80
|
type: :development
|
81
81
|
version_requirements: *id006
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
|
-
name:
|
83
|
+
name: bundler
|
84
84
|
prerelease: false
|
85
85
|
requirement: &id007 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: "1.0"
|
91
|
+
type: :development
|
92
|
+
version_requirements: *id007
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: rcov
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
86
97
|
none: false
|
87
98
|
requirements:
|
88
99
|
- - ">="
|
89
100
|
- !ruby/object:Gem::Version
|
90
101
|
version: "0"
|
91
102
|
type: :development
|
92
|
-
version_requirements: *
|
103
|
+
version_requirements: *id008
|
93
104
|
description: Fingerjam uploads your Jammit-compressed assets with fingerprinted filenames so they can be cached indefinitely
|
94
105
|
email:
|
95
106
|
- steve@seven.net.nz
|