sprockets_uglifier_with_source_maps 2.0.0 → 2.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a337e54ddbe94b21c24d01c16ef80f42ce052b6
4
- data.tar.gz: c47b967d8c5932d52515834aa6c77db532c784c3
3
+ metadata.gz: 93335675b385d5414755b625b2243a1af4aa6a81
4
+ data.tar.gz: 0c4532f47fdc81881b4e9a80bb3af018d370942d
5
5
  SHA512:
6
- metadata.gz: 6f3de890ee08e02d318c79f46fcb5613b12619e35bd4f9ab1a159725897a52c2ed79a179b1099d29f1564c780cbcb9555ecbf3e43016da2bd4bfa722eba24628
7
- data.tar.gz: 350ccacfb57d30b6027be5283c3a87d3cf88296f152c9744cfc193b859941f2a3a49988d6675a054111166c4e34faca53788d4c228eb12a06fe74dfad3acb5ba
6
+ metadata.gz: b3228b0eebf8f657de32befc52e6944ef61f86098562db05ade4fff1d57f1433dc1ccabbdc5d64e86a19a5a3a43a03e3ac252c7a8b0e2fac6c595707e6cede4a
7
+ data.tar.gz: 23eb2fbeaad91ca8491afba04fe585dc67d9d6c326fb279e29ee31c747e8fb258339068c621bd54aa728ee12bf47eab31b60f72bf31f73f3d7860902b122b30c
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ Gemfile.lock
18
18
  .ruby-version
19
19
  .ruby-gemset
20
20
  .rvmrc
21
+ .*.sw[po]
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SprocketsUglifierWithSourceMaps
2
2
 
3
- Create source maps when compressing assets in your Rails 4.2 applications.
3
+ Create source maps when compressing assets in your Rails applications.
4
4
 
5
5
  This gem uses Uglifier to create source maps for your concatenated javascripts in Rails.
6
6
  It is meant to be used as a replacement for javascript compressor.
@@ -8,6 +8,7 @@ It is meant to be used as a replacement for javascript compressor.
8
8
  Source maps are useful for debugging javascript and many errors monitoring services utilize them,
9
9
  for example [Rollbar](https://rollbar.com/docs/source-maps/).
10
10
 
11
+ Rails versions supported: 4.2, 5.
11
12
  For Rails 3.2 see: https://github.com/leifcr/uglifier_with_source_maps
12
13
 
13
14
  ## Installation
@@ -9,15 +9,16 @@ module SprocketsUglifierWithSM
9
9
  def initialize(options = {})
10
10
  # merge in any options passed in from our rails configuration - i wish
11
11
  # rails actually did this by default :/
12
- options = options.merge(DEFAULTS).merge!(Rails.application.config.assets.uglifier.to_h)
13
- super options
12
+ @options = options.merge(DEFAULTS).merge!(Rails.application.config.assets.uglifier.to_h)
13
+ super @options
14
14
  end
15
15
 
16
16
  def call(input)
17
17
  data = input.fetch(:data)
18
18
  name = input.fetch(:name)
19
19
 
20
- compressed_data, sourcemap = @uglifier.compile_with_map(data)
20
+ uglifier = Sprockets::Autoload::Uglifier.new(@options)
21
+ compressed_data, sourcemap = uglifier.compile_with_map(data)
21
22
 
22
23
  uncompressed_filename = File.join(Rails.application.config.assets.prefix, Rails.application.config.assets.uncompressed_prefix, "#{name}-#{digest(data)}.js")
23
24
  uncompressed_url = filename_to_url uncompressed_filename
@@ -1,3 +1,3 @@
1
1
  module SprocketsUglifierWithSM
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = SprocketsUglifierWithSM::VERSION
8
8
  spec.authors = ['Alexander Pavlenko']
9
9
  spec.email = ['alerticus@gmail.com']
10
- spec.summary = %q{Create javascript source maps for your Rails 4.2 applications}
10
+ spec.summary = %q{Create javascript source maps for your Rails applications}
11
11
  spec.description = %q{sprockets_uglifier_with_source_maps creates source maps for your javascript assets along with their compression using uglifier.}
12
12
  spec.homepage = 'https://github.com/AlexanderPavlenko/sprockets_uglifier_with_source_maps'
13
13
  spec.license = 'MIT'
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ['lib']
19
19
 
20
20
  spec.add_runtime_dependency 'sprockets-rails', '~> 3.0'
21
- spec.add_runtime_dependency 'uglifier', '~> 2.5'
21
+ spec.add_runtime_dependency 'uglifier', '>= 2.5'
22
22
  spec.add_development_dependency 'bundler'
23
23
  spec.add_development_dependency 'rake'
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets_uglifier_with_source_maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Pavlenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-28 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets-rails
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: uglifier
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '2.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.5'
41
41
  - !ruby/object:Gem::Dependency
@@ -104,9 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.4.8
107
+ rubygems_version: 2.6.8
108
108
  signing_key:
109
109
  specification_version: 4
110
- summary: Create javascript source maps for your Rails 4.2 applications
110
+ summary: Create javascript source maps for your Rails applications
111
111
  test_files: []
112
- has_rdoc: