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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 563caaeffa2cef80e01eed9432464ce506e19579
4
- data.tar.gz: 231ca648583e3452764d939bb43c9da0b55b8f0f
3
+ metadata.gz: 2cbe5fb032e79c9165863c45a6d97f2a90fad577
4
+ data.tar.gz: 32fc10f3920936de02af6f97f129bbc5fce6e2f0
5
5
  SHA512:
6
- metadata.gz: 35a9510f3e47266b3015e945cd5ba6d0a4c86ae5b3a6de1f12b99400cffa2b6a3b3ef6513988fe2a2f81b35c1750ec04f8be277a4960b3a53c51cf08bbe84c93
7
- data.tar.gz: 2294b1b1af3fd27c03134d563acbe0cb5994303bbec13082533c86f8b95ac677445b8bd7168f88d19d8d5298b4d58d05c29b87051efd904849da664a6765137b
6
+ metadata.gz: abfe871a49baf226c21df382a356b7e6796a37c78ea458814f13decf9080bf5ddeae51d17e19b7ac6b451e417c5b85044df2407f7f4115f4d278d488604514ea
7
+ data.tar.gz: fec9b343cf0bdb6362931736a49721f1fed50056e50c965ece3a5c7fe2d4eda65066ffe889a3956ec6fc5804879a5ae42233a3e73608e956b2db8d748c7c1914
data/README.md CHANGED
@@ -1,11 +1,19 @@
1
1
  # Half Pipe
2
2
 
3
+ [![Stories in Ready](https://badge.waffle.io/d-i/half-pipe.png?label=ready)](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*<%= javascript_include_tag "application" %>$}, ''
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
 
@@ -1,4 +1,5 @@
1
1
  {
2
+ "name": "<%= main_module_name %>",
2
3
  "dependencies": {
3
4
  "html5shiv": "latest",
4
5
  "requirejs": "latest",
@@ -3,7 +3,7 @@
3
3
  "devDependencies": {
4
4
  "grunt-cli": "~0.1.7",
5
5
  "grunt": "~0.4.1",
6
- "bower": "~0.10.0",
6
+ "bower": "~1.0.0",
7
7
  "grunt-contrib-sass": "~0.3.0",
8
8
  "grunt-contrib-copy": "~0.4.1",
9
9
  "grunt-contrib-clean": "~0.4.1",
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Half
2
2
  module Pipe
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
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.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-08-09 00:00:00.000000000 Z
11
+ date: 2013-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass