uglifier-rails 3.1.0.rc.1 → 3.1.0.rc.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,3 +2,5 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ test/dummy/log/*
6
+ test/dummy/tmp
@@ -1,3 +1,2 @@
1
- require "uglifier"
2
1
  require "uglifier/rails/railtie"
3
2
  require "uglifier/rails/version"
@@ -5,7 +5,7 @@ class Uglifier
5
5
  class Railtie < ::Rails::Railtie
6
6
  initializer :setup_compressor do |app|
7
7
  if app.config.assets.compress
8
- app.config.assets.js_compressor = Uglifier.new
8
+ app.config.assets.js_compressor = :uglifier
9
9
  end
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  class Uglifier
2
2
  module Rails
3
- VERSION = "3.1.0.rc.1"
3
+ VERSION = "3.1.0.rc.2"
4
4
  end
5
5
  end
@@ -1,6 +1,7 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  require "action_controller/railtie"
4
+ require "sprockets/railtie"
4
5
 
5
6
  Bundler.require
6
7
  require "uglifier-rails"
@@ -1,6 +1,4 @@
1
1
  Dummy::Application.routes.draw do
2
- root :to => "home#index"
3
-
4
2
  # The priority is based upon order of creation:
5
3
  # first created -> highest priority.
6
4
 
@@ -1,12 +1,25 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class UglifierRailsTest < ActiveSupport::TestCase
4
+ include Rack::Test::Methods
5
+
6
+ def app
7
+ @app ||= Rails.application
8
+ end
9
+
4
10
  test "classes are loaded" do
5
11
  assert_kind_of Module, Uglifier::Rails
6
12
  assert_kind_of Class, Uglifier::Rails::Railtie
7
13
  end
8
14
 
9
15
  test "js compressor is set" do
10
- assert_kind_of Uglifier, Dummy::Application.config.assets.js_compressor
16
+ assert_equal :uglifier, Rails.application.config.assets.js_compressor
17
+ assert_not_nil Rails.application.assets.js_compressor
18
+ end
19
+
20
+ test "js files are compressed" do
21
+ get "/assets/test.js"
22
+
23
+ assert_match "function test(){alert(\"Hello World\")}", last_response.body
11
24
  end
12
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uglifier-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.rc.1
4
+ version: 3.1.0.rc.2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: uglifier
17
- requirement: &2156499100 !ruby/object:Gem::Requirement
17
+ requirement: &2164553700 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2156499100
25
+ version_requirements: *2164553700
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: railties
28
- requirement: &2156498600 !ruby/object:Gem::Requirement
28
+ requirement: &2164553200 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 3.1.0.rc1
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2156498600
36
+ version_requirements: *2164553200
37
37
  description: Uglifier adapter for the Rails asset pipeline.
38
38
  email:
39
39
  - guilleiguaran@gmail.com
@@ -77,7 +77,6 @@ files:
77
77
  - test/dummy/lib/assets/.gitkeep
78
78
  - test/dummy/log/.gitkeep
79
79
  - test/dummy/log/development.log
80
- - test/dummy/log/test.log
81
80
  - test/dummy/public/404.html
82
81
  - test/dummy/public/422.html
83
82
  - test/dummy/public/500.html
@@ -140,7 +139,6 @@ test_files:
140
139
  - test/dummy/lib/assets/.gitkeep
141
140
  - test/dummy/log/.gitkeep
142
141
  - test/dummy/log/development.log
143
- - test/dummy/log/test.log
144
142
  - test/dummy/public/404.html
145
143
  - test/dummy/public/422.html
146
144
  - test/dummy/public/500.html
@@ -1,9 +0,0 @@
1
-
2
-
3
- Started GET "/test.js" for 127.0.0.1 at 2011-07-28 01:56:37 -0500
4
-
5
-
6
- Started GET "/assets/test.js" for 127.0.0.1 at 2011-07-28 01:57:00 -0500
7
-
8
-
9
- Started GET "/assets/test.js" for 127.0.0.1 at 2011-07-28 02:20:50 -0500