zfben_rails_assets 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.9.3
@@ -0,0 +1,35 @@
1
+ ## SUMMARY
2
+
3
+ A plugin for replace rails pipline.
4
+
5
+ [![Build Status](https://secure.travis-ci.org/benz303/zfben_rails_assets.png)](http://travis-ci.org/benz303/zfben_rails_assets)
6
+
7
+ ## Getting Started
8
+
9
+ 1. adding gem to Gemfile
10
+
11
+ gem 'zfben_rails_assets'
12
+
13
+ 2. update bundle
14
+
15
+ bundle install
16
+
17
+ ## How to Use
18
+
19
+ ### Configuration
20
+
21
+ ```ruby
22
+ # config/application.rb
23
+ config.assets.enabled = false
24
+
25
+ config.action_controller.asset_host = 'http://assets.abc.com'
26
+ config.action_controller.asset_path = 'assets'
27
+ config.action_controller.asset_version = '1'
28
+ ```
29
+
30
+ ### Helper
31
+
32
+ ```ruby
33
+ assets('blank.css') #=> <link rel="stylesheet" href="/assets/blank.css" />
34
+ assets('blank.js') #=> <script src="/assets/blank.js"></script>
35
+ ```
data/Rakefile CHANGED
@@ -12,3 +12,5 @@ Rake::TestTask.new(:test) do |t|
12
12
  t.pattern = 'test/**/*_test.rb'
13
13
  t.verbose = false
14
14
  end
15
+
16
+ task :default => :test
@@ -1,7 +1,7 @@
1
1
  # encoding: UTF-8
2
2
  class AssetsController < ActionController::Base
3
- caches_action :index, :show, cache_path: Proc.new{ |c| c.params }, if: Proc.new{ |c| request.get? && c.params[:version] != 'direct' }
4
-
3
+ caches_page :index
4
+
5
5
  def index
6
6
  if format_defined?
7
7
  render render_assets
@@ -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.10'
6
+ s.version = '0.0.11'
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.10
4
+ version: 0.0.11
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: 2011-11-26 00:00:00.000000000 Z
12
+ date: 2012-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &16705000 !ruby/object:Gem::Requirement
16
+ requirement: &9275200 !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: *16705000
24
+ version_requirements: *9275200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sass
27
- requirement: &16704580 !ruby/object:Gem::Requirement
27
+ requirement: &9274180 !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: *16704580
35
+ version_requirements: *9274180
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: compass
38
- requirement: &16704120 !ruby/object:Gem::Requirement
38
+ requirement: &9272920 !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: *16704120
46
+ version_requirements: *9272920
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: coffee-script
49
- requirement: &16703700 !ruby/object:Gem::Requirement
49
+ requirement: &9271580 !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: *16703700
57
+ version_requirements: *9271580
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: uglifier
60
- requirement: &16703260 !ruby/object:Gem::Requirement
60
+ requirement: &9270560 !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: *16703260
68
+ version_requirements: *9270560
69
69
  description: ''
70
70
  email:
71
71
  - ben@zfben.com
@@ -74,8 +74,9 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - .gitignore
77
+ - .travis.yml
77
78
  - Gemfile
78
- - README.rdoc
79
+ - README.md
79
80
  - Rakefile
80
81
  - app/controllers/assets_controller.rb
81
82
  - app/helpers/assets_helper.rb
@@ -1,13 +0,0 @@
1
- == SUMMARY
2
-
3
- This is plugin to add some useful assets to rails.
4
-
5
- == Getting Started
6
-
7
- 1. adding gem to Gemfile
8
-
9
- gem 'zfben_rails_assets'
10
-
11
- 2. update bundle
12
-
13
- bundle install