jammit 0.6.6 → 0.7.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: d2effd9626b6600078e3eb96bce391f6d60f5282
4
+ data.tar.gz: e9d9bfece50de7b2417a41ee427c23a16b6b32ff
5
+ SHA512:
6
+ metadata.gz: 69d9fe7387a7ae4bcfe852712721d0f45b94a4071ca34114c03d3e1818a6955a16d1b7bdb44c2999facb00c3e1844b8a59fc6d7a5fee8223ba7e075328db2e34
7
+ data.tar.gz: c426832b0725cf6910dae408cc778fb15ed6c12d41c6f32e57544c3521ef176db05d472746a942615682dcd0fbab8d31b3a47e49953e7e23d53fed0b834f9ce4
@@ -0,0 +1,18 @@
1
+ _ _ __ __ __ __ ___ _____
2
+ _ | |/_\ | \/ | \/ |_ _|_ _|
3
+ | || / _ \| |\/| | |\/| || | | |
4
+ \__/_/ \_\_| |_|_| |_|___| |_|
5
+
6
+ Jammit is an industrial-strength asset packaging library for Rails, providing both the CSS and JavaScript concatenation and compression that you'd expect, as well as ahead-of-time gzipping, built-in JavaScript template support, and optional Data-URI / MHTML image embedding.
7
+
8
+ - For documentation, usage, and examples, see: http://documentcloud.github.com/jammit/
9
+ - To suggest a feature or report a bug: http://github.com/documentcloud/jammit/issues/
10
+ - For internal source docs, see: http://documentcloud.github.com/jammit/doc/
11
+
12
+ ## Installation
13
+
14
+ `gem install jammit`
15
+
16
+ ## License
17
+
18
+ Jammit is released under the MIT license (see the LICENSE file).
@@ -1,33 +1,33 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jammit'
3
- s.version = '0.6.6' # Keep version in sync with jammit.rb
4
- s.date = '2013-03-20'
3
+ s.version = '0.7.0' # Keep version in sync with jammit.rb
4
+ s.license = 'MIT'
5
+ s.date = '2015-10-28'
5
6
 
6
7
  s.homepage = "http://documentcloud.github.com/jammit/"
7
- s.summary = "Industrial Strength Asset Packaging for Rails"
8
+ s.summary = "Industrial-strength asset packaging for Rails."
8
9
  s.description = <<-EOS
9
- Jammit is an industrial strength asset packaging library for Rails,
10
+ Jammit is an industrial-strength asset packaging library for Rails,
10
11
  providing both the CSS and JavaScript concatenation and compression that
11
12
  you'd expect, as well as YUI Compressor and Closure Compiler compatibility,
12
13
  ahead-of-time gzipping, built-in JavaScript template support, and optional
13
14
  Data-URI / MHTML image embedding.
14
15
  EOS
15
16
 
16
- s.authors = ['Jeremy Ashkenas']
17
- s.email = 'jeremy@documentcloud.org'
18
- s.rubyforge_project = 'jammit'
17
+ s.authors = ['Jeremy Ashkenas', 'Ted Han', 'Justin Reese']
18
+ s.email = ['opensource@documentcloud.org']
19
19
 
20
20
  s.require_paths = ['lib']
21
21
  s.executables = ['jammit']
22
22
 
23
- s.extra_rdoc_files = ['README']
23
+ s.extra_rdoc_files = ['README.md']
24
24
  s.rdoc_options << '--title' << 'Jammit' <<
25
25
  '--exclude' << 'test' <<
26
- '--main' << 'README' <<
26
+ '--main' << 'README.md' <<
27
27
  '--all'
28
28
 
29
- s.add_dependency 'cssmin', ['>= 1.0.3']
30
- s.add_dependency 'jsmin', ['>= 1.0.1']
29
+ s.add_dependency 'cssmin', ['~> 1.0']
30
+ s.add_dependency 'jsmin', ['~> 1.0']
31
31
 
32
- s.files = Dir['lib/**/*', 'bin/*', 'rails/*', 'jammit.gemspec', 'LICENSE', 'README']
32
+ s.files = Dir['lib/**/*', 'bin/*', 'rails/*', 'jammit.gemspec', 'LICENSE', 'README.md']
33
33
  end
@@ -4,13 +4,13 @@ $LOAD_PATH.push File.expand_path(File.dirname(__FILE__))
4
4
  # to all of the configuration options.
5
5
  module Jammit
6
6
 
7
- VERSION = "0.6.6"
7
+ VERSION = "0.7.0"
8
8
 
9
9
  ROOT = File.expand_path(File.dirname(__FILE__) + '/..')
10
10
 
11
11
  ASSET_ROOT = File.expand_path((defined?(Rails) && Rails.root.to_s.length > 0) ? Rails.root : ENV['RAILS_ROOT'] || ".") unless defined?(ASSET_ROOT)
12
12
 
13
- DEFAULT_PUBLIC_ROOT = (defined?(Rails) && Rails.public_path.to_s.length > 0) ? Rails.public_path : File.join(ASSET_ROOT, 'public') unless defined?(PUBLIC_ROOT)
13
+ DEFAULT_PUBLIC_ROOT = (defined?(Rails) && Rails.public_path.to_s.length > 0) ? Rails.public_path.to_s : File.join(ASSET_ROOT, 'public') unless defined?(PUBLIC_ROOT)
14
14
 
15
15
  DEFAULT_CONFIG_PATH = File.join(ASSET_ROOT, 'config', 'assets.yml')
16
16
 
@@ -1,3 +1,4 @@
1
+ require 'rails'
1
2
  require 'action_controller'
2
3
 
3
4
  module Jammit
@@ -26,10 +26,11 @@ module Jammit
26
26
  # except in development, where it references the individual scripts.
27
27
  def include_javascripts(*packages)
28
28
  options = packages.extract_options!
29
+ options.merge!(:extname=>false)
29
30
  html_safe packages.map {|pack|
30
31
  should_package? ? Jammit.asset_url(pack, :js) : Jammit.packager.individual_urls(pack.to_sym, :js)
31
32
  }.flatten.map {|pack|
32
- javascript_include_tag pack, options
33
+ "<script src=\"#{pack}\"></script>"
33
34
  }.join("\n")
34
35
  end
35
36
 
@@ -10,8 +10,6 @@ class Jammit::SassCompressor
10
10
  # Compresses +css+ using sass' CSS parser, and returns the
11
11
  # compressed css.
12
12
  def compress(css)
13
- root_node = ::Sass::SCSS::CssParser.new(css, 'jammit-combined-input').parse
14
- root_node.options = {:style => :compressed}
15
- root_node.render.strip
13
+ ::Sass::Engine.new(css, :syntax => :scss, :style => :compressed).render.strip
16
14
  end
17
- end
15
+ end
@@ -1,4 +1,6 @@
1
1
  if defined?(Rails::Application)
2
+ major = Rails.version.split(".").first.to_i
3
+
2
4
  # Rails3 routes
3
5
  Rails.application.routes.draw do
4
6
  match "/#{Jammit.package_path}/:package.:extension",
@@ -6,5 +8,14 @@ if defined?(Rails::Application)
6
8
  # A hack to allow extension to include "."
7
9
  :extension => /.+/
8
10
  }
9
- end
11
+ end if major == 3
12
+
13
+ # Rails4 routes
14
+ Rails.application.routes.draw do
15
+ get "/#{Jammit.package_path}/:package.:extension",
16
+ :to => 'jammit#package', :as => :jammit, :constraints => {
17
+ # A hack to allow extension to include "."
18
+ :extension => /.+/
19
+ }
20
+ end if major == 4
10
21
  end
metadata CHANGED
@@ -1,63 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: jammit
3
- version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 6
10
- version: 0.6.6
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Jeremy Ashkenas
8
+ - Ted Han
9
+ - Justin Reese
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
-
18
- date: 2013-03-20 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
13
+ date: 2015-10-28 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
21
16
  name: cssmin
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 17
29
- segments:
30
- - 1
31
- - 0
32
- - 3
33
- version: 1.0.3
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
34
22
  type: :runtime
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: jsmin
38
23
  prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 21
45
- segments:
46
- - 1
47
- - 0
48
- - 1
49
- version: 1.0.1
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: jsmin
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '1.0'
50
36
  type: :runtime
51
- version_requirements: *id002
52
- description: " Jammit is an industrial strength asset packaging library for Rails,\n providing both the CSS and JavaScript concatenation and compression that\n you'd expect, as well as YUI Compressor and Closure Compiler compatibility,\n ahead-of-time gzipping, built-in JavaScript template support, and optional\n Data-URI / MHTML image embedding.\n"
53
- email: jeremy@documentcloud.org
54
- executables:
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '1.0'
43
+ description: |2
44
+ Jammit is an industrial-strength asset packaging library for Rails,
45
+ providing both the CSS and JavaScript concatenation and compression that
46
+ you'd expect, as well as YUI Compressor and Closure Compiler compatibility,
47
+ ahead-of-time gzipping, built-in JavaScript template support, and optional
48
+ Data-URI / MHTML image embedding.
49
+ email:
50
+ - opensource@documentcloud.org
51
+ executables:
55
52
  - jammit
56
53
  extensions: []
57
-
58
- extra_rdoc_files:
59
- - README
60
- files:
54
+ extra_rdoc_files:
55
+ - README.md
56
+ files:
57
+ - LICENSE
58
+ - README.md
59
+ - bin/jammit
60
+ - jammit.gemspec
61
+ - lib/jammit.rb
61
62
  - lib/jammit/command_line.rb
62
63
  - lib/jammit/compressor.rb
63
64
  - lib/jammit/controller.rb
@@ -71,51 +72,37 @@ files:
71
72
  - lib/jammit/routes.rb
72
73
  - lib/jammit/sass_compressor.rb
73
74
  - lib/jammit/uglifier.rb
74
- - lib/jammit.rb
75
- - bin/jammit
76
75
  - rails/routes.rb
77
- - jammit.gemspec
78
- - LICENSE
79
- - README
80
76
  homepage: http://documentcloud.github.com/jammit/
81
- licenses: []
82
-
77
+ licenses:
78
+ - MIT
79
+ metadata: {}
83
80
  post_install_message:
84
- rdoc_options:
85
- - --title
81
+ rdoc_options:
82
+ - "--title"
86
83
  - Jammit
87
- - --exclude
84
+ - "--exclude"
88
85
  - test
89
- - --main
90
- - README
91
- - --all
92
- require_paths:
86
+ - "--main"
87
+ - README.md
88
+ - "--all"
89
+ require_paths:
93
90
  - lib
94
- required_ruby_version: !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ requirements:
97
93
  - - ">="
98
- - !ruby/object:Gem::Version
99
- hash: 3
100
- segments:
101
- - 0
102
- version: "0"
103
- required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
- requirements:
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ requirements:
106
98
  - - ">="
107
- - !ruby/object:Gem::Version
108
- hash: 3
109
- segments:
110
- - 0
111
- version: "0"
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
112
101
  requirements: []
113
-
114
- rubyforge_project: jammit
115
- rubygems_version: 1.8.24
102
+ rubyforge_project:
103
+ rubygems_version: 2.4.8
116
104
  signing_key:
117
- specification_version: 3
118
- summary: Industrial Strength Asset Packaging for Rails
105
+ specification_version: 4
106
+ summary: Industrial-strength asset packaging for Rails.
119
107
  test_files: []
120
-
121
108
  has_rdoc:
data/README DELETED
@@ -1,24 +0,0 @@
1
- ==
2
- _ _ __ __ __ __ ___ _____
3
- _ | |/_\ | \/ | \/ |_ _|_ _|
4
- | || / _ \| |\/| | |\/| || | | |
5
- \__/_/ \_\_| |_|_| |_|___| |_|
6
-
7
-
8
- Jammit is an industrial strength asset packaging library for Rails,
9
- providing both the CSS and JavaScript concatenation and compression
10
- that you'd expect, as well as ahead-of-time gzipping, built-in JavaScript
11
- template support, and optional Data-URI / MHTML image embedding.
12
-
13
- Installation:
14
- gem install jammit
15
-
16
- For documentation, usage, and examples, see:
17
- http://documentcloud.github.com/jammit/
18
-
19
- To suggest a feature or report a bug:
20
- http://github.com/documentcloud/jammit/issues/
21
-
22
- For internal source docs, see:
23
- http://documentcloud.github.com/jammit/doc/
24
-