webmate-sprockets 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/LICENSE.mkd +19 -0
- data/README.mkd +74 -0
- data/Rakefile +1 -0
- data/lib/webmate-sprockets.rb +7 -1
- data/lib/webmate/sprockets/version.rb +1 -1
- data/webmate-sprockets.gemspec +3 -12
- metadata +23 -3
data/.gitignore
ADDED
data/LICENSE.mkd
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2011 Jesse Reiss
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.mkd
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
Webmate Sprockets!
|
2
|
+
====================
|
3
|
+
|
4
|
+
Because Sprockets is cool, and Rails is cool, but they shouldn't get married.
|
5
|
+
|
6
|
+
Installation
|
7
|
+
------------
|
8
|
+
|
9
|
+
Run
|
10
|
+
|
11
|
+
gem install webmate-sprockets
|
12
|
+
|
13
|
+
Or add
|
14
|
+
|
15
|
+
gem 'webmate-sprockets', require: 'webmate/sprockets'
|
16
|
+
|
17
|
+
to your Gemfile
|
18
|
+
|
19
|
+
Setup
|
20
|
+
------------
|
21
|
+
|
22
|
+
Webmate Sprockets needs to be configured to work properly. In your server initialization, add a configuration :
|
23
|
+
|
24
|
+
``` ruby
|
25
|
+
Webmate::Sprockets.configure do |config|
|
26
|
+
config.app = MyApp
|
27
|
+
|
28
|
+
['stylesheets', 'javascripts', 'images'].each do |dir|
|
29
|
+
config.append_path(File.join('app', 'assets', dir))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
The only required field is `app` which is necessary to translate app configuration to Sprockets. You will also want to `append_paths` as none are included by default. See Configuration for more information.
|
35
|
+
|
36
|
+
Include `Webmate::Sprockets::Helpers` as helpers in your application :
|
37
|
+
|
38
|
+
``` ruby
|
39
|
+
helpers Webmate::Sprockets::Helpers
|
40
|
+
```
|
41
|
+
|
42
|
+
And mount the environment :
|
43
|
+
|
44
|
+
``` ruby
|
45
|
+
map '/assets' do
|
46
|
+
run Webmate::Sprockets.environment
|
47
|
+
end
|
48
|
+
```
|
49
|
+
|
50
|
+
Require files in layouts :
|
51
|
+
|
52
|
+
``` ruby
|
53
|
+
<%= javascript_include_tag "application" %>
|
54
|
+
<%= stylesheet_link_tag "application" %>
|
55
|
+
```
|
56
|
+
|
57
|
+
`image_tag`, `favicon_link_tag`, `video_tag` and `audio_tag` are also provided.
|
58
|
+
|
59
|
+
|
60
|
+
Configuration
|
61
|
+
------------
|
62
|
+
Sprockets requires a decent amount of configuration to work properly. Most of the options listed here are taken from the Sprockets/Rails integration. You can get more detailed information in the [Rails guide on asset pipelines](http://guides.rubyonrails.org/asset_pipeline.html).
|
63
|
+
|
64
|
+
`digest` : Boolean value. Should Sprockets use "digest" asset paths? That is, should asset paths be fingerprinted using file digests for cache busting? For more information. This is on by default, though you may want to turn it off in development.
|
65
|
+
|
66
|
+
`debug` : Boolean value. Should sprockets include assets for debugging? That is, should assets be rendered as individual included files for debugging or as the combination? When on, javascript and stylesheet debugging are much easier. Off by default, though you probably want to turn it on in development.
|
67
|
+
|
68
|
+
`compile`: Boolean value.
|
69
|
+
|
70
|
+
|
71
|
+
Known Issues
|
72
|
+
------------
|
73
|
+
|
74
|
+
There's no testing or documentation. I know. Want to help?
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/lib/webmate-sprockets.rb
CHANGED
data/webmate-sprockets.gemspec
CHANGED
@@ -14,20 +14,11 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.rubyforge_project = s.name
|
16
16
|
|
17
|
+
s.add_dependency 'webmate'
|
18
|
+
|
17
19
|
s.add_runtime_dependency 'sprockets', '~> 2.10'
|
18
20
|
|
19
|
-
s.files =
|
20
|
-
"Gemfile",
|
21
|
-
"webmate-sprockets.gemspec",
|
22
|
-
"lib/webmate-sprockets.rb",
|
23
|
-
"lib/webmate/sprockets.rb",
|
24
|
-
"lib/webmate/sprockets/asset_paths.rb",
|
25
|
-
"lib/webmate/sprockets/configuration.rb",
|
26
|
-
"lib/webmate/sprockets/helpers.rb",
|
27
|
-
"lib/webmate/sprockets/rake.rb",
|
28
|
-
"lib/webmate/sprockets/static_compiler.rb",
|
29
|
-
"lib/webmate/sprockets/version.rb"
|
30
|
-
]
|
21
|
+
s.files = `git ls-files`.split($/)
|
31
22
|
|
32
23
|
s.require_paths << "lib"
|
33
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webmate-sprockets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,8 +10,24 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-07-
|
13
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: webmate
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
15
31
|
- !ruby/object:Gem::Dependency
|
16
32
|
name: sprockets
|
17
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -36,8 +52,11 @@ executables: []
|
|
36
52
|
extensions: []
|
37
53
|
extra_rdoc_files: []
|
38
54
|
files:
|
55
|
+
- .gitignore
|
39
56
|
- Gemfile
|
40
|
-
-
|
57
|
+
- LICENSE.mkd
|
58
|
+
- README.mkd
|
59
|
+
- Rakefile
|
41
60
|
- lib/webmate-sprockets.rb
|
42
61
|
- lib/webmate/sprockets.rb
|
43
62
|
- lib/webmate/sprockets/asset_paths.rb
|
@@ -46,6 +65,7 @@ files:
|
|
46
65
|
- lib/webmate/sprockets/rake.rb
|
47
66
|
- lib/webmate/sprockets/static_compiler.rb
|
48
67
|
- lib/webmate/sprockets/version.rb
|
68
|
+
- webmate-sprockets.gemspec
|
49
69
|
homepage: https://github.com/webmaterb/webmate-sprockets
|
50
70
|
licenses: []
|
51
71
|
post_install_message:
|