zfben_rails_assets 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -87,7 +87,11 @@ class ControllerTest < ActionController::TestCase
87
87
  test('import_iteration.min.' + format)do
88
88
  get :index, file: 'import_iteration.min', format: format
89
89
  assert_response :success
90
- assert_equal @response.body, ''
90
+ if format == 'css'
91
+ assert_equal @response.body, ''
92
+ else
93
+ assert_equal @response.body, ';'
94
+ end
91
95
  end
92
96
 
93
97
  test('import_404.' + format)do
@@ -1,2 +1,5 @@
1
+ (function() {
1
2
 
2
3
  alert('hi');
4
+
5
+ }).call(this);
@@ -1,3 +1,3 @@
1
1
  #id {
2
- color: #fff;
2
+ color: white;
3
3
  }
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "zfben_rails_assets"
6
- s.version = '0.0.11'
6
+ s.version = '0.0.12'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Ben"]
9
9
  s.email = ["ben@zfben.com"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfben_rails_assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-30 00:00:00.000000000 Z
12
+ date: 2012-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &9275200 !ruby/object:Gem::Requirement
16
+ requirement: &12789660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *9275200
24
+ version_requirements: *12789660
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sass
27
- requirement: &9274180 !ruby/object:Gem::Requirement
27
+ requirement: &12789280 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *9274180
35
+ version_requirements: *12789280
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: compass
38
- requirement: &9272920 !ruby/object:Gem::Requirement
38
+ requirement: &12788820 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *9272920
46
+ version_requirements: *12788820
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: coffee-script
49
- requirement: &9271580 !ruby/object:Gem::Requirement
49
+ requirement: &12788400 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *9271580
57
+ version_requirements: *12788400
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: uglifier
60
- requirement: &9270560 !ruby/object:Gem::Requirement
60
+ requirement: &12787980 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *9270560
68
+ version_requirements: *12787980
69
69
  description: ''
70
70
  email:
71
71
  - ben@zfben.com
@@ -84,7 +84,6 @@ files:
84
84
  - app/models/asset_format/css.rb
85
85
  - app/models/asset_format/js.rb
86
86
  - config/routes.rb
87
- - lib/tasks/tasks.rake
88
87
  - lib/zfben_rails_assets.rb
89
88
  - test/assets_test.rb
90
89
  - test/dummy/Rakefile
@@ -1,56 +0,0 @@
1
- require 'rainbow'
2
- def sys cmd
3
- STDOUT.puts cmd.color(:black).background(:white)
4
- system cmd
5
- end
6
-
7
- def err msg
8
- STDOUT.puts msg.color(:yellow).background(:red)
9
- exit!
10
- end
11
-
12
- namespace :assets do
13
- task :clear_assets do
14
- p '== Clear old assets'
15
- js_path = File.join(Rails.root, 'app', 'assets', 'javascripts', 'zff')
16
- css_path = File.join(Rails.root, 'app', 'assets', 'stylesheets', 'zff')
17
- img_path = File.join(Rails.root, 'app', 'assets', 'images', 'zff')
18
- sys('rm -r ' + js_path) if File.exists?(js_path)
19
- sys('rm -r ' + css_path) if File.exists?(css_path)
20
- sys('rm -r ' + img_path) if File.exists?(img_path)
21
- end
22
-
23
- task :add_assets => :clear_assets do
24
- p '== Add assets'
25
- sys 'cp -Ruf ' << File.join(ZfbenRailsAssetsPath, 'assets') << ' ' << File.join(Rails.root, 'app')
26
- end
27
-
28
- task :clear_gem do
29
- gem_path = File.join(Rails.root, 'Gemfile')
30
- unless File.exists? gem_path
31
- err 'Gemfile is not exists'
32
- else
33
- p '== Clear old gems'
34
- file = File.open(gem_path).readlines.join('')
35
- regexp = /(\n)?# Added by zfben_rails_assets.*# End zfben_rails_assets/im
36
- File.open(gem_path, 'w'){ |f| f.write(file.gsub(regexp, '')) } if file =~ regexp
37
- end
38
- end
39
-
40
- task :add_gem => :clear_gem do
41
- p '== Add gems'
42
- gem_path = File.join(Rails.root, 'Gemfile')
43
- file = File.open(gem_path).readlines
44
- file.push "\n# Added by zfben_rails_assets\n\n" << File.open(File.join(ZfbenRailsAssetsPath, 'Gemfile')).readlines.join('') << "\n# End zfben_rails_assets"
45
- File.open(gem_path, 'w'){ |f| f.write(file.join('')) }
46
- end
47
-
48
- desc 'install zfben_rails_assets'
49
- task :install => [:add_gem, :add_assets] do
50
- p ''
51
- p '!! Please run `bundle install`'
52
- end
53
-
54
- desc 'uninstall zfben_rails_assets'
55
- task :uninstall => [:clear_gem, :clear_assets]
56
- end