uglifier 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.
Potentially problematic release.
This version of uglifier might be problematic. Click here for more details.
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/uglifier.rb +3 -1
- data/spec/uglifier_spec.rb +5 -0
- data/uglifier.gemspec +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Uglifier [](http://travis-ci.org/lautis/uglifier) [](https://gemnasium.com/lautis/uglifier)
|
2
2
|
|
3
|
-
Ruby wrapper for [UglifyJS](https://github.com/mishoo/
|
3
|
+
Ruby wrapper for [UglifyJS](https://github.com/mishoo/UglifyJS2) JavaScript compressor.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -86,4 +86,4 @@ See [CONTRIBUTING](https://github.com/lautis/uglifier/blob/master/CONTRIBUTING.m
|
|
86
86
|
|
87
87
|
## Copyright
|
88
88
|
|
89
|
-
© Ville Lautanala. Released under MIT license, see [LICENSE
|
89
|
+
© Ville Lautanala. Released under MIT license, see [LICENSE](https://github.com/lautis/uglifier/blob/master/LICENSE.txt) for details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.1
|
data/lib/uglifier.rb
CHANGED
@@ -79,7 +79,7 @@ class Uglifier
|
|
79
79
|
#
|
80
80
|
# options - Hash of options to override Uglifier::DEFAULTS
|
81
81
|
def initialize(options = {})
|
82
|
-
(options.keys - DEFAULTS.keys - [:comments, :squeeze])[0..1].each do |missing|
|
82
|
+
(options.keys - DEFAULTS.keys - [:comments, :squeeze, :copyright])[0..1].each do |missing|
|
83
83
|
raise ArgumentError.new("Invalid option: #{missing}")
|
84
84
|
end
|
85
85
|
@options = options
|
@@ -190,6 +190,8 @@ class Uglifier
|
|
190
190
|
@options[:output][:comments]
|
191
191
|
elsif @options.has_key?(:comments)
|
192
192
|
@options[:comments]
|
193
|
+
elsif @options[:copyright] == false
|
194
|
+
:none
|
193
195
|
else
|
194
196
|
DEFAULTS[:output][:comments]
|
195
197
|
end
|
data/spec/uglifier_spec.rb
CHANGED
@@ -66,6 +66,11 @@ describe "Uglifier" do
|
|
66
66
|
EOS
|
67
67
|
}
|
68
68
|
|
69
|
+
it "handles copyright option" do
|
70
|
+
compiled = Uglifier.compile(source, :copyright => false)
|
71
|
+
compiled.should_not match /Copyright/
|
72
|
+
end
|
73
|
+
|
69
74
|
describe ":copyright" do
|
70
75
|
subject { Uglifier.compile(source, :comments => :copyright) }
|
71
76
|
|
data/uglifier.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: uglifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.0.
|
5
|
+
version: 2.0.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ville Lautanala
|
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
168
|
- !ruby/object:Gem::Version
|
169
169
|
segments:
|
170
170
|
- 0
|
171
|
-
hash:
|
171
|
+
hash: 887923606777556648
|
172
172
|
version: '0'
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|