half-pipe 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/generators/half_pipe/install_generator.rb +3 -1
- data/lib/generators/half_pipe/templates/bower.json +1 -0
- data/lib/generators/half_pipe/templates/package.json +1 -1
- data/lib/half-pipe/rails.rb +20 -0
- data/lib/half-pipe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cbe5fb032e79c9165863c45a6d97f2a90fad577
|
4
|
+
data.tar.gz: 32fc10f3920936de02af6f97f129bbc5fce6e2f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abfe871a49baf226c21df382a356b7e6796a37c78ea458814f13decf9080bf5ddeae51d17e19b7ac6b451e417c5b85044df2407f7f4115f4d278d488604514ea
|
7
|
+
data.tar.gz: fec9b343cf0bdb6362931736a49721f1fed50056e50c965ece3a5c7fe2d4eda65066ffe889a3956ec6fc5804879a5ae42233a3e73608e956b2db8d748c7c1914
|
data/README.md
CHANGED
@@ -1,11 +1,19 @@
|
|
1
1
|
# Half Pipe
|
2
2
|
|
3
|
+
[](http://waffle.io/d-i/half-pipe)
|
4
|
+
|
3
5
|
Gem to replace the Rails asset pipeline with a Grunt.js-based workflow, providing dependencies via Bower.
|
4
6
|
|
7
|
+
Half Pipe is a generator to get you up and running quickly with a Grunt setup for building client-side code in Rails apps. We believe that your asset workflow is yours and you should be able to configure it however you need to.
|
8
|
+
|
5
9
|
## Who is this For?
|
6
10
|
|
7
11
|
This initial release assumes you have been using [Grunt.js](http://www.gruntjs.com) in non-Rails apps and would like to start using it in Rails as well. It uses [Bower](http://bower.io) for dependency management, [RequireJS](http://www.requirejs.org) for Javascript modules and Sass for CSS. If you use alternatives to these tools, we'd love to hear from you.
|
8
12
|
|
13
|
+
## Looking for Contributors
|
14
|
+
|
15
|
+
If you take a look at our [issue board on waffle.io](http://waffle.io/d-i/half-pipe) you'll see that we have some big plans for future releases of Half Pipe. If you are interested in working on a feature or fixing a bug, please feel free to move the issue to "In Progress" and send a PR when you're ready. If you have ideas or questions, please feel free to [open an issue](https://github.com/d-i/half-pipe/issues/new).
|
16
|
+
|
9
17
|
## Getting Started
|
10
18
|
|
11
19
|
### Directory Structure
|
@@ -91,10 +99,6 @@ In this early release if you want to configure anything, you'll have to manually
|
|
91
99
|
|
92
100
|
## History
|
93
101
|
|
94
|
-
### 08/09/2013 v0.2.2
|
95
|
-
|
96
|
-
- Use exec rather than system in rake task so Capistrano exists properly
|
97
|
-
|
98
102
|
### 07/22/2013 v0.2.0
|
99
103
|
|
100
104
|
- Removes dependency on rack-asset-compiler and embeds the code in this gem
|
@@ -20,8 +20,10 @@ module HalfPipe
|
|
20
20
|
railties_requires = File.read(File.join(self.class.source_root, "railties.rb"))
|
21
21
|
gsub_file "config/application.rb", %r{require 'rails/all'}, railties_requires
|
22
22
|
|
23
|
-
gsub_file "app/views/layouts/application.html.erb", %r{\s*<%=
|
23
|
+
gsub_file "app/views/layouts/application.html.erb", %r{\s*<%= stylesheet_link_tag\s+"application".*%>$}, ''
|
24
|
+
gsub_file "app/views/layouts/application.html.erb", %r{\s*<%= javascript_include_tag\s+"application".*%>$}, ''
|
24
25
|
insert_into_file "app/views/layouts/application.html.erb", %Q{ <%= requirejs_include_tag "/scripts/application.js" %>\n }, before: "</body>"
|
26
|
+
insert_into_file "app/views/layouts/application.html.erb", %Q{ <%= stylesheet_link_tag "/styles/main.css" %>\n }, before: "</head>"
|
25
27
|
|
26
28
|
gsub_file "config/environments/development.rb", "config.assets.debug = true", "config.middleware.use Rack::HalfPipe"
|
27
29
|
|
data/lib/half-pipe/rails.rb
CHANGED
@@ -4,11 +4,31 @@ module HalfPipe
|
|
4
4
|
config.before_configuration do
|
5
5
|
config.half_pipe = ActiveSupport::OrderedOptions.new
|
6
6
|
config.half_pipe.serve_assets = false
|
7
|
+
config.half_pipe.quiet_assets = false
|
7
8
|
end
|
8
9
|
|
9
10
|
initializer "half_pipe.middleware", after: "build_middleware_stack" do |app|
|
10
11
|
app.config.middleware.use Rack::HalfPipe if config.half_pipe.serve_assets
|
11
12
|
end
|
12
13
|
|
14
|
+
initializer "half_pipe.quiet_assets", after: "build_middleware_stack" do |app|
|
15
|
+
next unless app.config.half_pipe.quiet_assets
|
16
|
+
|
17
|
+
ASSETS_PREFIX = %r{\/(?:images|scripts|styles|components)}
|
18
|
+
|
19
|
+
Rails::Rack::Logger.class_eval do
|
20
|
+
def call_with_quiet_assets(env)
|
21
|
+
old_logger_level, level = Rails.logger.level, Logger::ERROR
|
22
|
+
# Increase log level because of messages that have a low level should not be displayed
|
23
|
+
Rails.logger.level = level if env['PATH_INFO'] =~ ASSETS_PREFIX
|
24
|
+
call_without_quiet_assets(env)
|
25
|
+
ensure
|
26
|
+
Rails.logger.level = old_logger_level
|
27
|
+
end
|
28
|
+
alias_method_chain :call, :quiet_assets
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
13
33
|
end
|
14
34
|
end
|
data/lib/half-pipe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: half-pipe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Fiorini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|