uglifier 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of uglifier might be problematic. Click here for more details.

Files changed (5) hide show
  1. data/Gemfile +1 -1
  2. data/VERSION +1 -1
  3. data/lib/uglifier.rb +3 -8
  4. data/uglifier.gemspec +5 -5
  5. metadata +8 -6
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source "http://rubygems.org"
4
4
  # gem "activesupport", ">= 2.3.5"
5
5
 
6
6
  gem "execjs", ">=0.3.0"
7
- gem "multi_json"
7
+ gem "multi_json", ">= 1.0.2"
8
8
 
9
9
  # Add dependencies to develop your gem here.
10
10
  # Include everything needed to run rake, tests, features, etc.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
data/lib/uglifier.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require "execjs"
2
2
  require "multi_json"
3
- require "multi_json/vendor/ok_json"
4
3
 
5
4
  class Uglifier
6
5
  Error = ExecJS::Error
@@ -40,7 +39,7 @@ class Uglifier
40
39
 
41
40
  js = []
42
41
  js << "var result = '';"
43
- js << "var source = #{encode(source)};"
42
+ js << "var source = #{MultiJson.encode(source)};"
44
43
  js << "var ast = UglifyJS.parser.parse(source);"
45
44
 
46
45
  if @options[:copyright]
@@ -54,7 +53,7 @@ class Uglifier
54
53
  end
55
54
 
56
55
  if @options[:mangle]
57
- js << "ast = UglifyJS.uglify.ast_mangle(ast, #{mangle_options});"
56
+ js << "ast = UglifyJS.uglify.ast_mangle(ast, #{MultiJson.encode(mangle_options)});"
58
57
  end
59
58
 
60
59
  if @options[:squeeze]
@@ -74,12 +73,8 @@ class Uglifier
74
73
 
75
74
  private
76
75
 
77
- def encode(source)
78
- OkJson.strenc(source)
79
- end
80
-
81
76
  def mangle_options
82
- @options[:toplevel] && MultiJson.encode(@options[:toplevel]) || "false"
77
+ @options[:toplevel]
83
78
  end
84
79
 
85
80
  def squeeze_options
data/uglifier.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{uglifier}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ville Lautanala"]
12
- s.date = %q{2011-05-12}
12
+ s.date = %q{2011-05-13}
13
13
  s.email = %q{lautis@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
@@ -48,14 +48,14 @@ Gem::Specification.new do |s|
48
48
 
49
49
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
50
50
  s.add_runtime_dependency(%q<execjs>, [">= 0.3.0"])
51
- s.add_runtime_dependency(%q<multi_json>, [">= 0"])
51
+ s.add_runtime_dependency(%q<multi_json>, [">= 1.0.2"])
52
52
  s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
53
53
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
54
54
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.0"])
55
55
  s.add_development_dependency(%q<rcov>, [">= 0"])
56
56
  else
57
57
  s.add_dependency(%q<execjs>, [">= 0.3.0"])
58
- s.add_dependency(%q<multi_json>, [">= 0"])
58
+ s.add_dependency(%q<multi_json>, [">= 1.0.2"])
59
59
  s.add_dependency(%q<rspec>, ["~> 2.5.0"])
60
60
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
61
61
  s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
@@ -63,7 +63,7 @@ Gem::Specification.new do |s|
63
63
  end
64
64
  else
65
65
  s.add_dependency(%q<execjs>, [">= 0.3.0"])
66
- s.add_dependency(%q<multi_json>, [">= 0"])
66
+ s.add_dependency(%q<multi_json>, [">= 1.0.2"])
67
67
  s.add_dependency(%q<rspec>, ["~> 2.5.0"])
68
68
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
69
69
  s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uglifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ville Lautanala
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-12 00:00:00 Z
18
+ date: 2011-05-13 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -39,10 +39,12 @@ dependencies:
39
39
  requirements:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- hash: 3
42
+ hash: 19
43
43
  segments:
44
+ - 1
44
45
  - 0
45
- version: "0"
46
+ - 2
47
+ version: 1.0.2
46
48
  name: multi_json
47
49
  prerelease: false
48
50
  type: :runtime