sprockets-rails 0.0.1 → 1.0.0
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.
- data/MIT-LICENSE +1 -1
- data/README.rdoc +3 -0
- data/Rakefile +15 -31
- data/lib/sprockets/rails/bootstrap.rb +41 -0
- data/lib/sprockets/rails/compressors.rb +87 -0
- data/lib/sprockets/rails/helpers/isolated_helper.rb +15 -0
- data/lib/sprockets/rails/helpers/rails_helper.rb +169 -0
- data/lib/sprockets/rails/helpers.rb +8 -0
- data/lib/sprockets/rails/railtie.rb +64 -0
- data/lib/sprockets/rails/static_compiler.rb +64 -0
- data/lib/sprockets/rails/version.rb +5 -0
- data/lib/sprockets-rails.rb +5 -6
- data/lib/tasks/assets.rake +105 -0
- data/test/abstract_unit.rb +145 -0
- data/test/assets_debugging_test.rb +65 -0
- data/test/assets_test.rb +532 -0
- data/test/fixtures/alternate/stylesheets/style.css +1 -0
- data/{generators/sprockets_rails/templates/application.js → test/fixtures/app/fonts/dir/font.ttf} +0 -0
- data/test/fixtures/app/fonts/font.ttf +0 -0
- data/test/fixtures/app/images/logo.png +0 -0
- data/test/fixtures/app/javascripts/application.js +1 -0
- data/test/fixtures/app/javascripts/dir/xmlhr.js +0 -0
- data/test/fixtures/app/javascripts/extra.js +0 -0
- data/test/fixtures/app/javascripts/xmlhr.js +0 -0
- data/test/fixtures/app/stylesheets/application.css +1 -0
- data/test/fixtures/app/stylesheets/dir/style.css +0 -0
- data/test/fixtures/app/stylesheets/extra.css +0 -0
- data/test/fixtures/app/stylesheets/style.css +0 -0
- data/test/sprockets_compressors_test.rb +27 -0
- data/test/sprockets_helper_test.rb +345 -0
- data/test/sprockets_helper_with_routes_test.rb +60 -0
- data/test/test_helper.rb +84 -0
- metadata +116 -65
- data/.gitignore +0 -5
- data/README.textile +0 -91
- data/VERSION +0 -1
- data/config/sprockets.yml +0 -10
- data/generators/sprockets_rails/sprockets_rails_generator.rb +0 -13
- data/init.rb +0 -1
- data/install.rb +0 -13
- data/lib/sprocket.rb +0 -74
- data/lib/sprockets_application.rb +0 -8
- data/lib/sprockets_controller.rb +0 -12
- data/lib/sprockets_helper.rb +0 -9
- data/recipes/sprockets_tasks.rb +0 -17
- data/sprockets-rails.gemspec +0 -60
- data/tasks/sprockets_tasks.rake +0 -27
- data/test/sprockets_test.rb +0 -8
metadata
CHANGED
@@ -1,83 +1,134 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-rails
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
-
|
8
|
-
- Jeff Kreeftmeijer
|
7
|
+
authors:
|
8
|
+
- David Heinemeier Hansson
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-03-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: sprockets
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.3.1
|
18
22
|
type: :runtime
|
19
|
-
|
20
|
-
version_requirements: !ruby/object:Gem::Requirement
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.3.1
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: railties
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 4.0.0.beta
|
38
|
+
- - <
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
41
|
+
type: :runtime
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ! '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 4.0.0.beta
|
49
|
+
- - <
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '5.0'
|
52
|
+
description: Sprockets Rails integration
|
53
|
+
email:
|
54
|
+
- david@loudthinking.com
|
28
55
|
executables: []
|
29
|
-
|
30
56
|
extensions: []
|
31
|
-
|
32
|
-
|
33
|
-
-
|
34
|
-
|
35
|
-
- .
|
57
|
+
extra_rdoc_files: []
|
58
|
+
files:
|
59
|
+
- lib/sprockets/rails/bootstrap.rb
|
60
|
+
- lib/sprockets/rails/compressors.rb
|
61
|
+
- lib/sprockets/rails/helpers/isolated_helper.rb
|
62
|
+
- lib/sprockets/rails/helpers/rails_helper.rb
|
63
|
+
- lib/sprockets/rails/helpers.rb
|
64
|
+
- lib/sprockets/rails/railtie.rb
|
65
|
+
- lib/sprockets/rails/static_compiler.rb
|
66
|
+
- lib/sprockets/rails/version.rb
|
67
|
+
- lib/sprockets-rails.rb
|
68
|
+
- lib/tasks/assets.rake
|
36
69
|
- MIT-LICENSE
|
37
|
-
- README.textile
|
38
70
|
- Rakefile
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
53
|
-
- test/
|
54
|
-
|
55
|
-
|
71
|
+
- README.rdoc
|
72
|
+
- test/abstract_unit.rb
|
73
|
+
- test/assets_debugging_test.rb
|
74
|
+
- test/assets_test.rb
|
75
|
+
- test/fixtures/alternate/stylesheets/style.css
|
76
|
+
- test/fixtures/app/fonts/dir/font.ttf
|
77
|
+
- test/fixtures/app/fonts/font.ttf
|
78
|
+
- test/fixtures/app/images/logo.png
|
79
|
+
- test/fixtures/app/javascripts/application.js
|
80
|
+
- test/fixtures/app/javascripts/dir/xmlhr.js
|
81
|
+
- test/fixtures/app/javascripts/extra.js
|
82
|
+
- test/fixtures/app/javascripts/xmlhr.js
|
83
|
+
- test/fixtures/app/stylesheets/application.css
|
84
|
+
- test/fixtures/app/stylesheets/dir/style.css
|
85
|
+
- test/fixtures/app/stylesheets/extra.css
|
86
|
+
- test/fixtures/app/stylesheets/style.css
|
87
|
+
- test/sprockets_compressors_test.rb
|
88
|
+
- test/sprockets_helper_test.rb
|
89
|
+
- test/sprockets_helper_with_routes_test.rb
|
90
|
+
- test/test_helper.rb
|
91
|
+
homepage: https://github.com/rails/sprockets-rails
|
56
92
|
licenses: []
|
57
|
-
|
58
93
|
post_install_message:
|
59
|
-
rdoc_options:
|
60
|
-
|
61
|
-
require_paths:
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
62
96
|
- lib
|
63
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
|
+
none: false
|
105
|
+
requirements:
|
106
|
+
- - ! '>='
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
75
109
|
requirements: []
|
76
|
-
|
77
110
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.
|
111
|
+
rubygems_version: 1.8.21
|
79
112
|
signing_key:
|
80
113
|
specification_version: 3
|
81
|
-
summary: Sprockets
|
82
|
-
test_files:
|
83
|
-
- test/
|
114
|
+
summary: Sprockets Rails integration
|
115
|
+
test_files:
|
116
|
+
- test/abstract_unit.rb
|
117
|
+
- test/assets_debugging_test.rb
|
118
|
+
- test/assets_test.rb
|
119
|
+
- test/fixtures/alternate/stylesheets/style.css
|
120
|
+
- test/fixtures/app/fonts/dir/font.ttf
|
121
|
+
- test/fixtures/app/fonts/font.ttf
|
122
|
+
- test/fixtures/app/images/logo.png
|
123
|
+
- test/fixtures/app/javascripts/application.js
|
124
|
+
- test/fixtures/app/javascripts/dir/xmlhr.js
|
125
|
+
- test/fixtures/app/javascripts/extra.js
|
126
|
+
- test/fixtures/app/javascripts/xmlhr.js
|
127
|
+
- test/fixtures/app/stylesheets/application.css
|
128
|
+
- test/fixtures/app/stylesheets/dir/style.css
|
129
|
+
- test/fixtures/app/stylesheets/extra.css
|
130
|
+
- test/fixtures/app/stylesheets/style.css
|
131
|
+
- test/sprockets_compressors_test.rb
|
132
|
+
- test/sprockets_helper_test.rb
|
133
|
+
- test/sprockets_helper_with_routes_test.rb
|
134
|
+
- test/test_helper.rb
|
data/README.textile
DELETED
@@ -1,91 +0,0 @@
|
|
1
|
-
h1. Sprockets-rails
|
2
|
-
|
3
|
-
Sprockets-rails sets up your Rails application for use with "Sprockets":http://github.com/sstephenson/sprockets/.
|
4
|
-
|
5
|
-
h2. Installation
|
6
|
-
|
7
|
-
The first thing you need to do is install the Sprockets RubyGem. Just run;
|
8
|
-
|
9
|
-
bc. gem install --remote sprockets
|
10
|
-
|
11
|
-
For more information about installing and using Sprockets, check out the "Sprockets website":http://getsprockets.org/ and the "Sprockets github project":http://github.com/sstephenson/sprockets.
|
12
|
-
|
13
|
-
Sprockets-rails can be installed as a gem or as a plugin;
|
14
|
-
|
15
|
-
h3. Installing as a gem
|
16
|
-
|
17
|
-
Add this to your @environment.rb@ file;
|
18
|
-
|
19
|
-
bc. config.gem 'sprockets-rails', :source => 'http://gemcutter.org'
|
20
|
-
|
21
|
-
And run;
|
22
|
-
|
23
|
-
bc. rake gems:install
|
24
|
-
|
25
|
-
Once the gem is installed, run the generator and you're all set;
|
26
|
-
|
27
|
-
bc. script/generate sprockets_rails
|
28
|
-
|
29
|
-
The gem is now installed and the required files and folders will be generated into your project.
|
30
|
-
|
31
|
-
h3. Installing as a plugin
|
32
|
-
|
33
|
-
Run this in the root of your Rails project;
|
34
|
-
|
35
|
-
bc. script/plugin install git://github.com/80beans/sprockets-rails.git
|
36
|
-
|
37
|
-
The plugin will get installed and the required files and folders will be generated into your project.
|
38
|
-
|
39
|
-
h2. Usage
|
40
|
-
|
41
|
-
Now you have sprockets-rails installed as a gem or a plugin. You now have @app/javascripts/@ and @vendor/sprockets/@ directories in your application, as well as a @config/sprockets.yml@ file.
|
42
|
-
|
43
|
-
Edit your @config/routes.rb@ file to add routes for @SprocketsController@:
|
44
|
-
|
45
|
-
bc. ActionController::Routing::Routes.draw do |map|
|
46
|
-
# Add the following line:
|
47
|
-
SprocketsApplication.routes(map)
|
48
|
-
...
|
49
|
-
end
|
50
|
-
|
51
|
-
Now, move your JavaScript source files from @public/javascripts/@ into @app/javascripts/@. All files in all subdirectories of @app/javascripts/@ will be required by Sprockets in alphabetical order, with the exception of @app/javascripts/application.js@, which is required _before any other file_. (You can change this behavior by editing the @source_files@ line of @config/sprockets.yml@.)
|
52
|
-
|
53
|
-
The last thing you'll have to do is adjust your HTML templates to call @<%= sprockets_include_tag %>@ instead of @<%= javascript_include_tag ... %>@.
|
54
|
-
|
55
|
-
Once @sprockets-rails@ is installed, you can check out Sprockets plugins into the @vendor/sprockets/@ directory. By default, @sprockets-rails@ configures Sprockets' load path to search @vendor/sprockets/*/src/@, as well as @vendor/plugins/*/javascripts/@. This means that the @javascripts/@ directories of Rails plugins are automatically installed into your Sprockets load path
|
56
|
-
|
57
|
-
h2. Using multiple sprockets configurations in a project
|
58
|
-
|
59
|
-
Edit your @config/sprockets.rb@ file to name the configurations:
|
60
|
-
|
61
|
-
bc. :default:
|
62
|
-
:asset_root: public
|
63
|
-
:load_path:
|
64
|
-
- app/javascripts
|
65
|
-
- vendor/sprockets/*/src
|
66
|
-
- vendor/plugins/*/javascripts
|
67
|
-
:source_files:
|
68
|
-
- app/javascripts/application.js
|
69
|
-
:special:
|
70
|
-
:asset_root: public
|
71
|
-
:load_path:
|
72
|
-
- app/javascripts
|
73
|
-
- vendor/sprockets/*/src
|
74
|
-
- vendor/plugins/*/javascripts
|
75
|
-
:source_files:
|
76
|
-
- app/javascripts/special.js
|
77
|
-
|
78
|
-
Now, adjust your HTML templates to call @<%= sprockets_include_tag(:config_name) %>@ with the name of the configuration you wish to use. Concatenations are located at @RAILS_ROOT/sprockets/<config_name>.js@, except for the default configuration, whose concatenation located at @RAILS_ROOT/sprockets.js@.
|
79
|
-
|
80
|
-
|
81
|
-
h2. How it works
|
82
|
-
|
83
|
-
Sprockets-rails includes a controller named @SprocketsController@ that renders your application's Sprockets concatenation. When caching is enabled, e.g. in production mode, @SprocketsController@ uses Rails page caching to save the concatenated output to @public/sprockets.js@ the first time it is requested. When caching is disabled, e.g. in development mode, @SprocketsController@ will render a fresh concatenation any time a source file changes.
|
84
|
-
|
85
|
-
To source Sprockets' JavaScript concatenation from your HTML templates, use the provided @sprockets_include_tag@ helper.
|
86
|
-
|
87
|
-
Sprockets-rails also includes a set of Rake tasks for generating the concatenation (@rake sprockets:install_script@) and installing provided assets (@rake sprockets:install_assets@). Run @sprockets:install_assets@ any time you add or update a Sprockets plugin in your application. Add @after "deploy:update_code", "sprockets:install_script"@ as a "Capistrano":http://www.capify.org/ post-deploy hook to generate the Sprockets concatenation on your servers automatically at deploy time.
|
88
|
-
|
89
|
-
h2. License
|
90
|
-
|
91
|
-
Copyright (c) 2009 Sam Stephenson, released under the MIT license
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.1
|
data/config/sprockets.yml
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
class SprocketsRailsGenerator < Rails::Generator::Base
|
2
|
-
|
3
|
-
def manifest
|
4
|
-
record do |m|
|
5
|
-
m.directory 'vendor/sprockets'
|
6
|
-
m.directory 'app/javascripts'
|
7
|
-
|
8
|
-
m.file 'application.js', 'app/javascripts/application.js'
|
9
|
-
m.file '/../../../config/sprockets.yml', 'config/sprockets.yml'
|
10
|
-
m.file '/../../../tasks/sprockets_tasks.rake', 'lib/tasks/sprockets_tasks.rake'
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'lib', 'sprockets-rails')
|
data/install.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
require "fileutils"
|
2
|
-
include FileUtils::Verbose
|
3
|
-
|
4
|
-
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..")) unless defined?(RAILS_ROOT)
|
5
|
-
|
6
|
-
mkdir_p File.join(RAILS_ROOT, "vendor", "sprockets")
|
7
|
-
mkdir_p File.join(RAILS_ROOT, "app", "javascripts")
|
8
|
-
touch File.join(RAILS_ROOT, "app", "javascripts", "application.js")
|
9
|
-
|
10
|
-
unless File.exists?(File.join(RAILS_ROOT, "config", "sprockets.yml"))
|
11
|
-
cp File.join(File.dirname(__FILE__), "config", "sprockets.yml"),
|
12
|
-
File.join(RAILS_ROOT, "config")
|
13
|
-
end
|
data/lib/sprocket.rb
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
require "fileutils"
|
2
|
-
|
3
|
-
class Sprocket
|
4
|
-
attr_reader :group
|
5
|
-
|
6
|
-
def initialize(group='default')
|
7
|
-
group = 'default' if group.nil?
|
8
|
-
@group = group.to_sym
|
9
|
-
end
|
10
|
-
|
11
|
-
def source
|
12
|
-
concatenation.to_s
|
13
|
-
end
|
14
|
-
|
15
|
-
def install_script
|
16
|
-
# /public/sprocktes might not exist yet, and sprockets-1.0.2 throws an exception
|
17
|
-
FileUtils.mkdir_p(File.dirname(asset_path))
|
18
|
-
concatenation.save_to(asset_path)
|
19
|
-
end
|
20
|
-
|
21
|
-
def install_assets
|
22
|
-
secretary.install_assets
|
23
|
-
end
|
24
|
-
|
25
|
-
class << self
|
26
|
-
def configurations
|
27
|
-
@conf ||= YAML.load(IO.read(Sprocket.configuration_path)) || {}
|
28
|
-
@conf.keys
|
29
|
-
end
|
30
|
-
|
31
|
-
def configuration_path
|
32
|
-
File.join(Rails.root, "config", "sprockets.yml")
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
protected
|
37
|
-
def secretary
|
38
|
-
@secretary ||= Sprockets::Secretary.new(configuration.merge(:root => Rails.root))
|
39
|
-
end
|
40
|
-
|
41
|
-
def configuration
|
42
|
-
load_configuration
|
43
|
-
end
|
44
|
-
|
45
|
-
def load_configuration
|
46
|
-
@conf ||= YAML.load(IO.read(Sprocket.configuration_path)) || {}
|
47
|
-
if @conf[group]
|
48
|
-
@conf[group]
|
49
|
-
else
|
50
|
-
{}
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def concatenation
|
55
|
-
secretary.reset! unless source_is_unchanged?
|
56
|
-
secretary.concatenation
|
57
|
-
end
|
58
|
-
|
59
|
-
def asset_path
|
60
|
-
if group == :default
|
61
|
-
File.join(Rails.public_path, "sprockets.js")
|
62
|
-
else
|
63
|
-
File.join(Rails.public_path, "sprockets", "#{group}.js")
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def source_is_unchanged?
|
68
|
-
previous_source_last_modified, @source_last_modified =
|
69
|
-
@source_last_modified, secretary.source_last_modified
|
70
|
-
|
71
|
-
previous_source_last_modified == @source_last_modified
|
72
|
-
end
|
73
|
-
|
74
|
-
end
|
data/lib/sprockets_controller.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
class SprocketsController < ActionController::Base
|
2
|
-
caches_page :show, :if => Proc.new { SprocketsApplication.use_page_caching }
|
3
|
-
|
4
|
-
def index
|
5
|
-
show
|
6
|
-
end
|
7
|
-
|
8
|
-
def show
|
9
|
-
sprocket = Sprocket.new(params[:id])
|
10
|
-
render :text => sprocket.source, :content_type => "text/javascript"
|
11
|
-
end
|
12
|
-
end
|
data/lib/sprockets_helper.rb
DELETED
data/recipes/sprockets_tasks.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
def run_sprockets_rake_task(task)
|
2
|
-
rake = fetch(:rake, 'rake')
|
3
|
-
rails_env = fetch(:rails_env, 'production')
|
4
|
-
run "cd #{current_release}; #{rake} RAILS_ENV=#{rails_env} sprockets:#{task}"
|
5
|
-
end
|
6
|
-
|
7
|
-
namespace :sprockets do
|
8
|
-
desc "Generate and install the Sprockets concatenated JavaScript file for all configuration groups"
|
9
|
-
task :install_script, :roles => :app do
|
10
|
-
run_sprockets_rake_task 'install_script'
|
11
|
-
end
|
12
|
-
|
13
|
-
desc "Install any assets provided by Sprockets script, for all configuration groups"
|
14
|
-
task :install_assets, :roles => :app do
|
15
|
-
run_sprockets_rake_task 'install_assets'
|
16
|
-
end
|
17
|
-
end
|
data/sprockets-rails.gemspec
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{sprockets-rails}
|
8
|
-
s.version = "0.0.1"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Sam Stephenson", "Jeff Kreeftmeijer"]
|
12
|
-
s.date = %q{2009-12-02}
|
13
|
-
s.description = %q{Sprockets JavaScript dependency management and concatenation support for Rails applications}
|
14
|
-
s.email = %q{jeff@80beans.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"README.textile"
|
17
|
-
]
|
18
|
-
s.files = [
|
19
|
-
".gitignore",
|
20
|
-
"MIT-LICENSE",
|
21
|
-
"README.textile",
|
22
|
-
"Rakefile",
|
23
|
-
"VERSION",
|
24
|
-
"config/sprockets.yml",
|
25
|
-
"generators/sprockets_rails/sprockets_rails_generator.rb",
|
26
|
-
"generators/sprockets_rails/templates/application.js",
|
27
|
-
"init.rb",
|
28
|
-
"install.rb",
|
29
|
-
"lib/sprocket.rb",
|
30
|
-
"lib/sprockets-rails.rb",
|
31
|
-
"lib/sprockets_application.rb",
|
32
|
-
"lib/sprockets_controller.rb",
|
33
|
-
"lib/sprockets_helper.rb",
|
34
|
-
"recipes/sprockets_tasks.rb",
|
35
|
-
"sprockets-rails.gemspec",
|
36
|
-
"tasks/sprockets_tasks.rake",
|
37
|
-
"test/sprockets_test.rb"
|
38
|
-
]
|
39
|
-
s.homepage = %q{http://github.com/80beans/sprockets-rails}
|
40
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
41
|
-
s.require_paths = ["lib"]
|
42
|
-
s.rubygems_version = %q{1.3.5}
|
43
|
-
s.summary = %q{Sprockets JavaScript dependency management and concatenation support for Rails applications}
|
44
|
-
s.test_files = [
|
45
|
-
"test/sprockets_test.rb"
|
46
|
-
]
|
47
|
-
|
48
|
-
if s.respond_to? :specification_version then
|
49
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
50
|
-
s.specification_version = 3
|
51
|
-
|
52
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
53
|
-
s.add_runtime_dependency(%q<sprockets>, [">= 1.0.2"])
|
54
|
-
else
|
55
|
-
s.add_dependency(%q<sprockets>, [">= 1.0.2"])
|
56
|
-
end
|
57
|
-
else
|
58
|
-
s.add_dependency(%q<sprockets>, [">= 1.0.2"])
|
59
|
-
end
|
60
|
-
end
|
data/tasks/sprockets_tasks.rake
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
def process_config
|
2
|
-
if (config = ENV['CONFIG'] || config = ENV['CONFIGURATION']) && !Sprocket.configurations.include?(config)
|
3
|
-
raise "Configuration #{config} doesn't exist. Valid configurations: #{Sprocket.configurations.to_sentence}."
|
4
|
-
end
|
5
|
-
|
6
|
-
return config
|
7
|
-
end
|
8
|
-
|
9
|
-
namespace :sprockets do
|
10
|
-
desc "Generate and install the Sprockets concatenated JavaScript file for all configuration groups. Generate and install for a specific configuration by specifying CONFIG=<name>."
|
11
|
-
task :install_script => :environment do
|
12
|
-
if config = process_config
|
13
|
-
Sprocket.new(config).install_script
|
14
|
-
else
|
15
|
-
Sprocket.configurations.each { |configuration| Sprocket.new(configuration).install_script }
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
desc "Install any assets provided by Sprockets script, for all configuration groups. Install assets for a specific configuration by specifying CONFIG=<name>."
|
20
|
-
task :install_assets => :environment do
|
21
|
-
if config = process_config
|
22
|
-
Sprocket.new(config).install_assets
|
23
|
-
else
|
24
|
-
Sprocket.configurations.each { |configuration| Sprocket.new(configuration).install_assets }
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|