sprockets-font_compressor 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 55a3ebcab3806f822559cf97d874503ac529e4af
4
+ data.tar.gz: 2194726931ac2b6be13042966130faa5bd3b7847
5
+ SHA512:
6
+ metadata.gz: 5c761f52e822bf27b10d25180ba3dc958621d5971cdc3ee2b83668799e693cf096ca3f4d235b58773aec17a9f5e58a002c2b0ffed412166299250398eae3acb0
7
+ data.tar.gz: 812dbcf61d66d9f9ef9769d8021ee5778f07e99b6458a57e719313cf3b9cb2fbc3bf70a3d18bda78e55ba2903549ccc40a1c9338196e1802ca45e5b7caae194d
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "rails", "~> 3.2"
3
+ gem "rails", "~> 4.0.0"
4
+ gem "rake-hooks"
4
5
 
5
6
  group :development do
6
7
  gem "minitest"
@@ -1,90 +1,118 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actionmailer (3.2.13)
5
- actionpack (= 3.2.13)
4
+ actionmailer (4.0.0)
5
+ actionpack (= 4.0.0)
6
6
  mail (~> 2.5.3)
7
- actionpack (3.2.13)
8
- activemodel (= 3.2.13)
9
- activesupport (= 3.2.13)
10
- builder (~> 3.0.0)
7
+ actionpack (4.0.0)
8
+ activesupport (= 4.0.0)
9
+ builder (~> 3.1.0)
11
10
  erubis (~> 2.7.0)
12
- journey (~> 1.0.4)
13
- rack (~> 1.4.5)
14
- rack-cache (~> 1.2)
15
- rack-test (~> 0.6.1)
16
- sprockets (~> 2.2.1)
17
- activemodel (3.2.13)
18
- activesupport (= 3.2.13)
19
- builder (~> 3.0.0)
20
- activerecord (3.2.13)
21
- activemodel (= 3.2.13)
22
- activesupport (= 3.2.13)
23
- arel (~> 3.0.2)
24
- tzinfo (~> 0.3.29)
25
- activeresource (3.2.13)
26
- activemodel (= 3.2.13)
27
- activesupport (= 3.2.13)
28
- activesupport (3.2.13)
29
- i18n (= 0.6.1)
30
- multi_json (~> 1.0)
31
- arel (3.0.2)
32
- builder (3.0.4)
11
+ rack (~> 1.5.2)
12
+ rack-test (~> 0.6.2)
13
+ activemodel (4.0.0)
14
+ activesupport (= 4.0.0)
15
+ builder (~> 3.1.0)
16
+ activerecord (4.0.0)
17
+ activemodel (= 4.0.0)
18
+ activerecord-deprecated_finders (~> 1.0.2)
19
+ activesupport (= 4.0.0)
20
+ arel (~> 4.0.0)
21
+ activerecord-deprecated_finders (1.0.3)
22
+ activesupport (4.0.0)
23
+ i18n (~> 0.6, >= 0.6.4)
24
+ minitest (~> 4.2)
25
+ multi_json (~> 1.3)
26
+ thread_safe (~> 0.1)
27
+ tzinfo (~> 0.3.37)
28
+ addressable (2.3.5)
29
+ arel (4.0.0)
30
+ atomic (1.1.10)
31
+ builder (3.1.4)
33
32
  erubis (2.7.0)
33
+ faraday (0.8.7)
34
+ multipart-post (~> 1.1)
34
35
  git (1.2.5)
35
- hike (1.2.2)
36
- i18n (0.6.1)
37
- jeweler (1.8.4)
36
+ github_api (0.10.1)
37
+ addressable
38
+ faraday (~> 0.8.1)
39
+ hashie (>= 1.2)
40
+ multi_json (~> 1.4)
41
+ nokogiri (~> 1.5.2)
42
+ oauth2
43
+ hashie (2.0.5)
44
+ highline (1.6.19)
45
+ hike (1.2.3)
46
+ httpauth (0.2.0)
47
+ i18n (0.6.4)
48
+ jeweler (1.8.6)
49
+ builder
38
50
  bundler (~> 1.0)
39
51
  git (>= 1.2.5)
52
+ github_api (= 0.10.1)
53
+ highline (>= 1.6.15)
54
+ nokogiri (= 1.5.10)
40
55
  rake
41
56
  rdoc
42
- journey (1.0.4)
43
57
  json (1.8.0)
58
+ jwt (0.1.8)
59
+ multi_json (>= 1.5)
44
60
  mail (2.5.4)
45
61
  mime-types (~> 1.16)
46
62
  treetop (~> 1.4.8)
47
63
  mime-types (1.23)
48
- minitest (5.0.3)
49
- multi_json (1.7.5)
64
+ minitest (4.7.5)
65
+ multi_json (1.7.7)
66
+ multi_xml (0.5.4)
67
+ multipart-post (1.2.0)
68
+ nokogiri (1.5.10)
69
+ oauth2 (0.9.2)
70
+ faraday (~> 0.8)
71
+ httpauth (~> 0.2)
72
+ jwt (~> 0.1.4)
73
+ multi_json (~> 1.0)
74
+ multi_xml (~> 0.5)
75
+ rack (~> 1.2)
50
76
  polyglot (0.3.3)
51
- rack (1.4.5)
52
- rack-cache (1.2)
53
- rack (>= 0.4)
54
- rack-ssl (1.3.3)
55
- rack
77
+ rack (1.5.2)
56
78
  rack-test (0.6.2)
57
79
  rack (>= 1.0)
58
- rails (3.2.13)
59
- actionmailer (= 3.2.13)
60
- actionpack (= 3.2.13)
61
- activerecord (= 3.2.13)
62
- activeresource (= 3.2.13)
63
- activesupport (= 3.2.13)
64
- bundler (~> 1.0)
65
- railties (= 3.2.13)
66
- railties (3.2.13)
67
- actionpack (= 3.2.13)
68
- activesupport (= 3.2.13)
69
- rack-ssl (~> 1.3.2)
80
+ rails (4.0.0)
81
+ actionmailer (= 4.0.0)
82
+ actionpack (= 4.0.0)
83
+ activerecord (= 4.0.0)
84
+ activesupport (= 4.0.0)
85
+ bundler (>= 1.3.0, < 2.0)
86
+ railties (= 4.0.0)
87
+ sprockets-rails (~> 2.0.0)
88
+ railties (4.0.0)
89
+ actionpack (= 4.0.0)
90
+ activesupport (= 4.0.0)
70
91
  rake (>= 0.8.7)
71
- rdoc (~> 3.4)
72
- thor (>= 0.14.6, < 2.0)
73
- rake (10.0.4)
74
- rdoc (3.12.2)
92
+ thor (>= 0.18.1, < 2.0)
93
+ rake (10.1.0)
94
+ rake-hooks (1.2.3)
95
+ rake
96
+ rdoc (4.0.1)
75
97
  json (~> 1.4)
76
- sprockets (2.2.2)
98
+ sprockets (2.10.0)
77
99
  hike (~> 1.2)
78
100
  multi_json (~> 1.0)
79
101
  rack (~> 1.0)
80
102
  tilt (~> 1.1, != 1.3.0)
103
+ sprockets-rails (2.0.0)
104
+ actionpack (>= 3.0)
105
+ activesupport (>= 3.0)
106
+ sprockets (~> 2.8)
81
107
  thor (0.18.1)
108
+ thread_safe (0.1.0)
109
+ atomic
82
110
  tilt (1.4.1)
83
- treetop (1.4.12)
111
+ treetop (1.4.14)
84
112
  polyglot
85
113
  polyglot (>= 0.3.1)
86
114
  tzinfo (0.3.37)
87
- yard (0.8.6.1)
115
+ yard (0.8.6.2)
88
116
 
89
117
  PLATFORMS
90
118
  ruby
@@ -93,5 +121,6 @@ DEPENDENCIES
93
121
  bundler
94
122
  jeweler (~> 1.8.4)
95
123
  minitest
96
- rails (~> 3.2)
124
+ rails (~> 4.0.0)
125
+ rake-hooks
97
126
  yard
data/README.md CHANGED
@@ -5,6 +5,27 @@ Quick and dirty monkeypatch to enable precompression of Web Font related assets
5
5
  Filetypes added to compression list:
6
6
  otf, eot, svg, ttf, woff
7
7
 
8
+ ## Compatibility
9
+
10
+ ###Rails 3.2.x:
11
+
12
+ ```ruby
13
+ gem 'sprockets-font_compressor', '~> 1.0.0'
14
+ ```
15
+
16
+ ### Rails 4.x:
17
+
18
+ ```ruby
19
+ gem 'sprockets-font_compressor', '~> 1.1.0', :require => false
20
+ ```
21
+
22
+ and in ``lib/tasks/assets.rake``:
23
+
24
+ ```ruby
25
+ require 'sprockets-font_compressor'
26
+ ```
27
+
28
+
8
29
  ## Contributing to sprockets-font_compressor
9
30
 
10
31
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -1,22 +1,17 @@
1
1
 
2
- module Sprockets
3
- class StaticCompiler
2
+ require 'rake/hooks'
4
3
 
5
- # override method to enable compression of more filetypes
6
- def write_asset(asset)
7
- path_for(asset).tap do |path|
8
- env.logger.info "writing asset: #{path}"
9
- filename = File.join(target, path)
10
- FileUtils.mkdir_p File.dirname(filename)
11
- asset.write_to(filename)
4
+ after 'assets:precompile' do
5
+ logger = Logger.new($stderr)
6
+ logger.level = Logger::INFO
12
7
 
13
- # monkeypatched to add more file formats
14
- if filename.to_s =~ /\.(css|js|otf|eot|svg|ttf|woff)$/
15
- env.logger.info "writing asset: #{path}.gz"
16
- asset.write_to("#{filename}.gz")
17
- end
18
- end
19
- end
8
+ env = Sprockets::Environment.new(Rails.root)
9
+ env.append_path File.join(Rails.root, "public", Rails.application.config.assets.prefix)
20
10
 
11
+ files = Dir.glob(File.join(Rails.root, "public", Rails.application.config.assets.prefix, "**/**"))
12
+ files.find_all{ |f| f =~ /\.(otf|eot|svg|ttf|woff)$/ }.each do |f|
13
+ logger.info "Compressing #{f}"
14
+ asset = Sprockets::StaticAsset.new(env, f, f)
15
+ asset.write_to("#{f}.gz")
21
16
  end
22
17
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "sprockets-font_compressor"
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Chetan Sarva"]
12
- s.date = "2013-06-04"
12
+ s.date = "2013-07-22"
13
13
  s.description = "Font compressor plugin for Sprockets"
14
14
  s.email = "chetan@pixelcop.net"
15
15
  s.extra_rdoc_files = [
@@ -32,27 +32,30 @@ Gem::Specification.new do |s|
32
32
  s.homepage = "http://github.com/chetan/sprockets-font_compressor"
33
33
  s.licenses = ["MIT"]
34
34
  s.require_paths = ["lib"]
35
- s.rubygems_version = "1.8.25"
35
+ s.rubygems_version = "2.0.3"
36
36
  s.summary = "Font compressor plugin for Sprockets"
37
37
 
38
38
  if s.respond_to? :specification_version then
39
- s.specification_version = 3
39
+ s.specification_version = 4
40
40
 
41
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
- s.add_runtime_dependency(%q<rails>, ["~> 3.2"])
42
+ s.add_runtime_dependency(%q<rails>, ["~> 4.0.0"])
43
+ s.add_runtime_dependency(%q<rake-hooks>, [">= 0"])
43
44
  s.add_development_dependency(%q<minitest>, [">= 0"])
44
45
  s.add_development_dependency(%q<yard>, [">= 0"])
45
46
  s.add_development_dependency(%q<bundler>, [">= 0"])
46
47
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
47
48
  else
48
- s.add_dependency(%q<rails>, ["~> 3.2"])
49
+ s.add_dependency(%q<rails>, ["~> 4.0.0"])
50
+ s.add_dependency(%q<rake-hooks>, [">= 0"])
49
51
  s.add_dependency(%q<minitest>, [">= 0"])
50
52
  s.add_dependency(%q<yard>, [">= 0"])
51
53
  s.add_dependency(%q<bundler>, [">= 0"])
52
54
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
53
55
  end
54
56
  else
55
- s.add_dependency(%q<rails>, ["~> 3.2"])
57
+ s.add_dependency(%q<rails>, ["~> 4.0.0"])
58
+ s.add_dependency(%q<rake-hooks>, [">= 0"])
56
59
  s.add_dependency(%q<minitest>, [">= 0"])
57
60
  s.add_dependency(%q<yard>, [">= 0"])
58
61
  s.add_dependency(%q<bundler>, [">= 0"])
metadata CHANGED
@@ -1,96 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-font_compressor
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.0.0
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Chetan Sarva
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-04 00:00:00.000000000 Z
11
+ date: 2013-07-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
- prerelease: false
17
15
  requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '3.2'
22
- none: false
19
+ version: 4.0.0
23
20
  type: :runtime
21
+ prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
23
  requirements:
26
24
  - - ~>
27
25
  - !ruby/object:Gem::Version
28
- version: '3.2'
29
- none: false
26
+ version: 4.0.0
30
27
  - !ruby/object:Gem::Dependency
31
- name: minitest
28
+ name: rake-hooks
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
32
35
  prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
33
43
  requirement: !ruby/object:Gem::Requirement
34
44
  requirements:
35
- - - ! '>='
45
+ - - '>='
36
46
  - !ruby/object:Gem::Version
37
47
  version: '0'
38
- none: false
39
48
  type: :development
49
+ prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
51
  requirements:
42
- - - ! '>='
52
+ - - '>='
43
53
  - !ruby/object:Gem::Version
44
54
  version: '0'
45
- none: false
46
55
  - !ruby/object:Gem::Dependency
47
56
  name: yard
48
- prerelease: false
49
57
  requirement: !ruby/object:Gem::Requirement
50
58
  requirements:
51
- - - ! '>='
59
+ - - '>='
52
60
  - !ruby/object:Gem::Version
53
61
  version: '0'
54
- none: false
55
62
  type: :development
63
+ prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
65
  requirements:
58
- - - ! '>='
66
+ - - '>='
59
67
  - !ruby/object:Gem::Version
60
68
  version: '0'
61
- none: false
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: bundler
64
- prerelease: false
65
71
  requirement: !ruby/object:Gem::Requirement
66
72
  requirements:
67
- - - ! '>='
73
+ - - '>='
68
74
  - !ruby/object:Gem::Version
69
75
  version: '0'
70
- none: false
71
76
  type: :development
77
+ prerelease: false
72
78
  version_requirements: !ruby/object:Gem::Requirement
73
79
  requirements:
74
- - - ! '>='
80
+ - - '>='
75
81
  - !ruby/object:Gem::Version
76
82
  version: '0'
77
- none: false
78
83
  - !ruby/object:Gem::Dependency
79
84
  name: jeweler
80
- prerelease: false
81
85
  requirement: !ruby/object:Gem::Requirement
82
86
  requirements:
83
87
  - - ~>
84
88
  - !ruby/object:Gem::Version
85
89
  version: 1.8.4
86
- none: false
87
90
  type: :development
91
+ prerelease: false
88
92
  version_requirements: !ruby/object:Gem::Requirement
89
93
  requirements:
90
94
  - - ~>
91
95
  - !ruby/object:Gem::Version
92
96
  version: 1.8.4
93
- none: false
94
97
  description: Font compressor plugin for Sprockets
95
98
  email: chetan@pixelcop.net
96
99
  executables: []
@@ -113,29 +116,25 @@ files:
113
116
  homepage: http://github.com/chetan/sprockets-font_compressor
114
117
  licenses:
115
118
  - MIT
119
+ metadata: {}
116
120
  post_install_message:
117
121
  rdoc_options: []
118
122
  require_paths:
119
123
  - lib
120
124
  required_ruby_version: !ruby/object:Gem::Requirement
121
125
  requirements:
122
- - - ! '>='
126
+ - - '>='
123
127
  - !ruby/object:Gem::Version
124
- hash: -3688784392010696206
125
- segments:
126
- - 0
127
128
  version: '0'
128
- none: false
129
129
  required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - ! '>='
131
+ - - '>='
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
- none: false
135
134
  requirements: []
136
135
  rubyforge_project:
137
- rubygems_version: 1.8.25
136
+ rubygems_version: 2.0.3
138
137
  signing_key:
139
- specification_version: 3
138
+ specification_version: 4
140
139
  summary: Font compressor plugin for Sprockets
141
140
  test_files: []