half-pipe 0.2.4 → 0.3.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/ROADMAP.md +1 -0
- data/app/helpers/half_pipe_helper.rb +3 -3
- data/half-pipe.gemspec +1 -0
- data/lib/generators/half_pipe/install_generator.rb +83 -17
- data/lib/generators/half_pipe/templates/Gruntfile.js +23 -50
- data/lib/generators/half_pipe/templates/app/styles/main.scss +1 -1
- data/lib/generators/half_pipe/templates/config/half-pipe.json +3 -0
- data/lib/generators/half_pipe/templates/package.json +10 -3
- data/lib/generators/half_pipe/templates/tasks/options/connect.js +63 -0
- data/lib/generators/half_pipe/templates/tasks/options/copy.js +31 -0
- data/lib/generators/half_pipe/templates/tasks/options/cssmin.js +3 -0
- data/lib/generators/half_pipe/templates/tasks/options/jshint.js +8 -0
- data/lib/generators/half_pipe/templates/tasks/options/rails.js +5 -0
- data/lib/generators/half_pipe/templates/tasks/options/requirejs.js +45 -0
- data/lib/generators/half_pipe/templates/tasks/options/sass.js +19 -0
- data/lib/generators/half_pipe/templates/tasks/options/watch.js +13 -0
- data/lib/half-pipe/rails.rb +1 -25
- data/lib/half-pipe/version.rb +1 -1
- data/lib/rack/half-pipe.rb +1 -0
- metadata +28 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e25db15e868e377f593f10acc4d469b234b8e6a8
|
4
|
+
data.tar.gz: 6a79cc94c56035c15fb9a43a64c3af950283fc38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e2c8314902a381dd4fa1e81a94c3d5a3a8b16d211ce171913e008cebabaa8c171d2e597b2f8543ca22317faada95aa6fd358363f45dca20abffddcdf3bb2d76
|
7
|
+
data.tar.gz: f54a68b26199cbe600a8b0056253eedc79fc68baae72b021204e09c1856fc84aeb8acd0b087ce5a783e48ee483d05635059393ea52f563e6f3257b7b48efeb03
|
data/README.md
CHANGED
@@ -112,7 +112,7 @@ In this early release if you want to configure anything, you'll have to manually
|
|
112
112
|
|
113
113
|
## Roadmap
|
114
114
|
|
115
|
-
|
115
|
+
We're currently undergoing some pretty major changes in the Half Pipe workflow. See our [milestones](/d-i/half-pipe/issues/milestones) for what's coming in the near future.
|
116
116
|
|
117
117
|
## Future Features
|
118
118
|
|
data/ROADMAP.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Half Pipe currently undergoing some pretty major workflow changes. See our [milestones](/d-i/half-pipe/issues/milestones) for what's coming in the near future.
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module HalfPipeHelper
|
2
2
|
|
3
3
|
def requirejs_include_tag(script, options={})
|
4
|
-
script, options = if Rails.application.config.half_pipe.
|
5
|
-
["/components/requirejs/require.js", { data: { main: "/scripts/application.js" } }]
|
4
|
+
script, options = if Rails.application.config.half_pipe.env.debug?
|
5
|
+
["/components/requirejs/require.js", { data: { main: "/assets/scripts/application.js" } }]
|
6
6
|
else
|
7
|
-
["/scripts/application.js", {}]
|
7
|
+
["/assets/scripts/application.js", {}]
|
8
8
|
end
|
9
9
|
javascript_include_tag script, options
|
10
10
|
end
|
data/half-pipe.gemspec
CHANGED
@@ -8,13 +8,33 @@ module HalfPipe
|
|
8
8
|
@_half_pipe_source_root ||= File.expand_path("../templates", __FILE__)
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def welcome
|
12
|
+
say "*" * 120
|
13
|
+
say
|
14
|
+
say "Welcome to Half Pipe!"
|
15
|
+
say "I'm going to take some preliminary setup steps to get you going."
|
16
|
+
say
|
17
|
+
say "*" * 120
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_config_files
|
21
|
+
say
|
22
|
+
say "First I need to generate config files for NPM & Bower. This is where you'll put your asset building and browser dependencies in the future."
|
23
|
+
say
|
24
|
+
sleep 3
|
12
25
|
template "package.json", "package.json"
|
13
26
|
template "_bowerrc", ".bowerrc"
|
14
27
|
template "bower.json", "bower.json"
|
15
28
|
template "_jshintrc", ".jshintrc"
|
16
29
|
template "Gruntfile.js", "Gruntfile.js"
|
30
|
+
template "config/half-pipe.json"
|
31
|
+
end
|
17
32
|
|
33
|
+
def remove_sprockets
|
34
|
+
say
|
35
|
+
say "Half Pipe uses app/scripts and app/styles for your JavaScript and Stylesheet templates. I need to update your application layout to point to those, plus remove any traces of sprockets."
|
36
|
+
say
|
37
|
+
sleep 3
|
18
38
|
comment_lines "config/application.rb", %r{sprockets/railtie}
|
19
39
|
|
20
40
|
railties_requires = File.read(File.join(self.class.source_root, "railties.rb"))
|
@@ -22,46 +42,92 @@ module HalfPipe
|
|
22
42
|
|
23
43
|
gsub_file "app/views/layouts/application.html.erb", %r{\s*<%= stylesheet_link_tag\s+"application".*%>$}, ''
|
24
44
|
gsub_file "app/views/layouts/application.html.erb", %r{\s*<%= javascript_include_tag\s+"application".*%>$}, ''
|
45
|
+
end
|
46
|
+
|
47
|
+
def insert_includes_into_layout
|
25
48
|
insert_into_file "app/views/layouts/application.html.erb", %Q{ <%= requirejs_include_tag "/scripts/application.js" %>\n }, before: "</body>"
|
26
49
|
insert_into_file "app/views/layouts/application.html.erb", %Q{ <%= stylesheet_link_tag "/styles/main.css" %>\n }, before: "</head>"
|
50
|
+
end
|
27
51
|
|
28
|
-
|
52
|
+
def generate_scripts
|
53
|
+
say
|
54
|
+
say "Now I can generate some starter templates for your requirejs configuration and Sass imports"
|
55
|
+
say
|
56
|
+
sleep 3
|
57
|
+
empty_directory "app/scripts"
|
29
58
|
|
30
|
-
|
59
|
+
template "app/scripts/main.js"
|
60
|
+
template "app/scripts/application.js"
|
61
|
+
end
|
31
62
|
|
32
|
-
|
63
|
+
def generate_stylesheets
|
64
|
+
template "app/styles/main.scss"
|
65
|
+
end
|
33
66
|
|
34
|
-
|
67
|
+
def insert_ignores
|
68
|
+
append_to_file ".gitignore", %w(node_modules bower_components public/assets).join("\n"), force: true
|
69
|
+
end
|
35
70
|
|
36
|
-
|
37
|
-
|
38
|
-
|
71
|
+
def generate_task_config_files
|
72
|
+
say
|
73
|
+
say "All of your Grunt tasks will be configured by files in #{Rails.root.join("tasks/options")}. After I'm done, have a look there to see if you need to customize anything."
|
74
|
+
say
|
75
|
+
sleep 3
|
76
|
+
empty_directory "tasks/options"
|
77
|
+
|
78
|
+
inside "tasks/options" do
|
79
|
+
task_options_files.each do |f|
|
80
|
+
template File.basename(f), force: true
|
81
|
+
end
|
39
82
|
end
|
83
|
+
end
|
40
84
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
85
|
+
def patch_sass_imports
|
86
|
+
# TODO: Remove this once https://github.com/chriseppstein/sass-css-importer/pull/6 is accepted and released
|
87
|
+
gem "sass-css-importer", github: "joefiorini/sass-css-importer", branch: "load-paths"
|
88
|
+
end
|
89
|
+
|
90
|
+
def install_dependencies
|
91
|
+
say_status :run, "bundle install"
|
48
92
|
|
93
|
+
bundle_path = Gem.bin_path("bundler", "bundle")
|
94
|
+
Bundler.with_clean_env do
|
95
|
+
`"#{Gem.ruby}" "#{bundle_path}" install`
|
96
|
+
end
|
49
97
|
run "npm install"
|
98
|
+
end
|
50
99
|
|
100
|
+
def build_project
|
51
101
|
ENV["PATH"] = "./node_modules/.bin:#{ENV["PATH"]}"
|
52
102
|
|
53
103
|
run "bower install"
|
54
|
-
run "grunt build"
|
104
|
+
run "grunt build:public"
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
def finalize
|
109
|
+
|
110
|
+
say
|
111
|
+
say "Congratulations!".upcase
|
112
|
+
say
|
55
113
|
|
56
114
|
say "You may now safely migrate your assets to app/scripts and/or app/styles. Feel free to delete app/assets/javascripts and app/assets/stylesheets when you're done."
|
115
|
+
say
|
116
|
+
say "To start developing, fire up a development server with 'grunt server:debug'. You can continue to use 'http://localhost:3000' in your browser to access your app. I will take care of rebuilding your assets and restarting your Rails server as you work. Enjoy!"
|
57
117
|
end
|
58
118
|
|
119
|
+
protected
|
120
|
+
|
59
121
|
def main_module_name
|
60
122
|
app_name.underscore.dasherize
|
61
123
|
end
|
62
124
|
|
63
125
|
def app_name
|
64
|
-
Rails.application.class.parent_name
|
126
|
+
Rails.application.class.parent_name || "myapp"
|
127
|
+
end
|
128
|
+
|
129
|
+
def task_options_files
|
130
|
+
Dir[File.join(%W(#{File.dirname(__FILE__)} templates tasks options *.js))]
|
65
131
|
end
|
66
132
|
|
67
133
|
end
|
@@ -1,65 +1,38 @@
|
|
1
1
|
/*global module:false*/
|
2
2
|
module.exports = function(grunt) {
|
3
3
|
|
4
|
+
require("load-grunt-tasks")(grunt);
|
5
|
+
grunt.loadNpmTasks('grunt-connect-proxy');
|
6
|
+
|
7
|
+
function config(name){
|
8
|
+
return require("./tasks/options/" + name);
|
9
|
+
}
|
4
10
|
|
5
11
|
// Project configuration.
|
6
12
|
grunt.initConfig({
|
7
13
|
// Metadata.
|
8
14
|
pkg: grunt.file.readJSON('package.json'),
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
options: {
|
21
|
-
style: 'expanded',
|
22
|
-
require: ['./config/initializers/sass']
|
23
|
-
},
|
24
|
-
'tmp/styles/main.css': [
|
25
|
-
'app/styles/main.scss'
|
26
|
-
]
|
27
|
-
},
|
28
|
-
|
29
|
-
cssmin: {
|
30
|
-
'public/styles/main.css': 'tmp/styles/main.css'
|
31
|
-
},
|
32
|
-
|
33
|
-
requirejs: {
|
34
|
-
scripts: {
|
35
|
-
options: {
|
36
|
-
almond: true,
|
37
|
-
baseUrl: "app/scripts",
|
38
|
-
mainConfigFile: "app/scripts/application.js",
|
39
|
-
name: "<%= main_module_name %>",
|
40
|
-
out: "public/scripts/application.js",
|
41
|
-
wrap: true
|
42
|
-
}
|
43
|
-
}
|
44
|
-
},
|
45
|
-
|
46
|
-
clean: ['public/scripts/', 'public/styles', 'tmp/']
|
47
|
-
|
15
|
+
dirs: grunt.file.readJSON('config/half-pipe.json'),
|
16
|
+
bowerOpts: grunt.file.readJSON('.bowerrc'),
|
17
|
+
jshint: config("jshint"),
|
18
|
+
sass: config("sass"),
|
19
|
+
cssmin: config("cssmin"),
|
20
|
+
requirejs: config("requirejs"),
|
21
|
+
connect: config("connect"),
|
22
|
+
copy: config("copy"),
|
23
|
+
watch: config("watch"),
|
24
|
+
rails: config("rails"),
|
25
|
+
clean: ['<%%= dirs.tmp %>']
|
48
26
|
});
|
49
27
|
|
50
|
-
// These plugins provide necessary tasks.
|
51
|
-
grunt.loadNpmTasks('grunt-contrib-jshint');
|
52
|
-
grunt.loadNpmTasks('grunt-contrib-sass');
|
53
|
-
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
54
|
-
grunt.loadNpmTasks('grunt-contrib-copy');
|
55
|
-
grunt.loadNpmTasks('grunt-contrib-clean');
|
56
|
-
grunt.loadNpmTasks('grunt-requirejs');
|
57
|
-
|
58
28
|
// Default task.
|
59
|
-
grunt.registerTask('default', 'build');
|
29
|
+
grunt.registerTask('default', 'build:debug');
|
30
|
+
|
31
|
+
grunt.registerTask('build:debug', ['copy:prepare', 'sass:debug', 'copy:stage']);
|
32
|
+
grunt.registerTask('build:public', ['copy:prepare', 'sass:public', 'copy:stage', 'requirejs:public', 'copy:public']);
|
60
33
|
|
61
|
-
|
62
|
-
grunt.registerTask('
|
34
|
+
grunt.registerTask('server:debug', ['build:debug', 'configureProxies', 'connect:debug', 'rails:server:start', 'watch']);
|
35
|
+
grunt.registerTask('server:public', ['build:public', 'configureProxies', 'connect:public:keepalive']);
|
63
36
|
|
64
37
|
};
|
65
38
|
|
@@ -1 +1 @@
|
|
1
|
-
@import "
|
1
|
+
@import "CSS:normalize-css/normalize";
|
@@ -1,15 +1,22 @@
|
|
1
1
|
{
|
2
2
|
"name": "<%= app_name %>",
|
3
|
+
"dependencies": {
|
4
|
+
"bower": "~1.2.0"
|
5
|
+
},
|
3
6
|
"devDependencies": {
|
4
7
|
"grunt-cli": "~0.1.7",
|
5
8
|
"grunt": "~0.4.1",
|
6
|
-
"bower": "~1.0.0",
|
7
9
|
"grunt-contrib-sass": "~0.3.0",
|
8
10
|
"grunt-contrib-copy": "~0.4.1",
|
9
11
|
"grunt-contrib-clean": "~0.4.1",
|
10
12
|
"grunt-contrib-jshint": "~0.4.3",
|
11
13
|
"grunt-contrib-cssmin": "~0.6.0",
|
12
|
-
"grunt-requirejs": "~0.
|
14
|
+
"grunt-contrib-requirejs": "~0.4.1",
|
15
|
+
"grunt-contrib-connect": "~0.5.0",
|
16
|
+
"grunt-contrib-watch": "~0.5.3",
|
17
|
+
"grunt-connect-proxy": "~0.1.5",
|
18
|
+
"grunt-rails-server": "git://github.com/joefiorini/grunt-rails-server.git",
|
19
|
+
"load-grunt-tasks": "~0.1.0",
|
20
|
+
"almond": "~0.2.6"
|
13
21
|
}
|
14
22
|
}
|
15
|
-
|
@@ -0,0 +1,63 @@
|
|
1
|
+
var proxy = require('grunt-connect-proxy/lib/utils').proxyRequest;
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
options: {
|
5
|
+
port: process.env.PORT || "3000",
|
6
|
+
middleware: middlewareChooser,
|
7
|
+
debug: true
|
8
|
+
},
|
9
|
+
debug: {
|
10
|
+
options: {
|
11
|
+
base: ["<%%= dirs.tmp %>/public", "<%%= bowerOpts.directory %>"]
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"public": {
|
15
|
+
options: {
|
16
|
+
base: ["public/"]
|
17
|
+
}
|
18
|
+
},
|
19
|
+
proxies: [{
|
20
|
+
context: '/',
|
21
|
+
host: 'localhost',
|
22
|
+
port: 3001,
|
23
|
+
https: false,
|
24
|
+
changeOrigin: false
|
25
|
+
}],
|
26
|
+
options: {
|
27
|
+
debounceDelay: 200
|
28
|
+
}
|
29
|
+
};
|
30
|
+
|
31
|
+
function middlewareChooser(connect, options) {
|
32
|
+
var assetServer = connect['static'](options.base[0]);
|
33
|
+
var bowerServer;
|
34
|
+
|
35
|
+
if(options.base[1]) {
|
36
|
+
bowerServer = connect['static'](options.base[1]);
|
37
|
+
}
|
38
|
+
|
39
|
+
return [
|
40
|
+
runMiddleware(function(request) {
|
41
|
+
if(request.url.match(/^\/assets/)) {
|
42
|
+
return assetServer;
|
43
|
+
} else if(bowerServer && request.url.match(/^\/components/)) {
|
44
|
+
request.url = request.url.replace(/^\/components/, "");
|
45
|
+
return bowerServer;
|
46
|
+
} else {
|
47
|
+
return proxy;
|
48
|
+
}
|
49
|
+
})
|
50
|
+
];
|
51
|
+
}
|
52
|
+
|
53
|
+
function runMiddleware(chooser) {
|
54
|
+
return function(request, response, next) {
|
55
|
+
var middleware = chooser(request);
|
56
|
+
|
57
|
+
if(middleware) {
|
58
|
+
middleware.apply(this, arguments);
|
59
|
+
} else {
|
60
|
+
next();
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module.exports = {
|
2
|
+
prepare: {
|
3
|
+
files: [{
|
4
|
+
expand: true,
|
5
|
+
cwd: 'app/scripts',
|
6
|
+
src: '**/*.js',
|
7
|
+
dest: '<%%= dirs.tmp %>/prepare/assets/scripts'
|
8
|
+
}, {
|
9
|
+
expand: true,
|
10
|
+
cwd: 'app/images',
|
11
|
+
src: '**/*',
|
12
|
+
dest: '<%%= dirs.tmp %>/prepare/assets/images'
|
13
|
+
}]
|
14
|
+
},
|
15
|
+
stage: {
|
16
|
+
files: [{
|
17
|
+
expand: true,
|
18
|
+
cwd: '<%%= dirs.tmp %>/prepare',
|
19
|
+
src: '**/*',
|
20
|
+
dest: '<%%= dirs.tmp %>/public'
|
21
|
+
}]
|
22
|
+
},
|
23
|
+
"public": {
|
24
|
+
files: [{
|
25
|
+
expand: true,
|
26
|
+
cwd: '<%%= dirs.tmp %>/prepare',
|
27
|
+
src: ['**/*', '!**/*.js'],
|
28
|
+
dest: 'public/'
|
29
|
+
}]
|
30
|
+
}
|
31
|
+
};
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module.exports = {
|
2
|
+
"public": {
|
3
|
+
options: {
|
4
|
+
name: "../../../../../node_modules/almond/almond",
|
5
|
+
baseUrl: "<%%= dirs.tmp %>/public/assets/scripts",
|
6
|
+
out: "public/assets/scripts/application.js",
|
7
|
+
wrap: true,
|
8
|
+
insertRequire: ['<%= main_module_name %>'],
|
9
|
+
deps: ['<%= main_module_name %>'],
|
10
|
+
shim: {
|
11
|
+
'jquery': { exports: '$' },
|
12
|
+
'jquery.textareaAutogrow': {
|
13
|
+
deps: ['jquery']
|
14
|
+
},
|
15
|
+
'pickadate/picker.date': {
|
16
|
+
deps: ['pickadate/picker'],
|
17
|
+
exports: 'Picker'
|
18
|
+
},
|
19
|
+
'pickadate/picker.time': {
|
20
|
+
deps: ['pickadate/picker'],
|
21
|
+
exports: 'Picker'
|
22
|
+
},
|
23
|
+
'pickadate/picker': {
|
24
|
+
deps: ['jquery'],
|
25
|
+
exports: 'Picker'
|
26
|
+
}
|
27
|
+
},
|
28
|
+
paths: {
|
29
|
+
'<%= main_module_name %>': 'main',
|
30
|
+
'flight': '../../../../../bower_components/flight',
|
31
|
+
'jquery': '../../../../../bower_components/jquery/jquery',
|
32
|
+
'lodash': '../../../../../bower_components/lodash/lodash',
|
33
|
+
'jquery-ujs': '../../../../../bower_components/jquery-ujs/src/rails',
|
34
|
+
'jquery.fileupload': '../../../../../bower_components/jquery-file-upload/js/jquery.fileupload',
|
35
|
+
'jquery.ui.widget': '../../../../../bower_components/jquery-file-upload/js/vendor/jquery.ui.widget',
|
36
|
+
'jquery.textareaAutogrow': '../../../../../bower_components/jquery.textareaAutogrow/jquery.textareaAutogrow',
|
37
|
+
'bacon': '../../../../../bower_components/bacon/dist/Bacon',
|
38
|
+
'bacon.jquery': '../../../../../bower_components/bacon.jquery/dist/bacon.jquery',
|
39
|
+
'zeroclipboard': '../../../../../bower_components/zeroclipboard/ZeroClipboard',
|
40
|
+
'pickadate': '../../../../../bower_components/pickadate/lib'
|
41
|
+
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module.exports = {
|
2
|
+
options: {
|
3
|
+
style: 'expanded',
|
4
|
+
require: ['sass-css-importer'],
|
5
|
+
loadPath: ['<%%= bowerOpts.directory || "bower_components" %>'],
|
6
|
+
bundleExec: true
|
7
|
+
},
|
8
|
+
debug: {
|
9
|
+
src: 'app/styles/main.scss',
|
10
|
+
dest: '<%%= dirs.tmp %>/prepare/assets/styles/main.css'
|
11
|
+
},
|
12
|
+
"public": {
|
13
|
+
options: {
|
14
|
+
style: 'compressed'
|
15
|
+
},
|
16
|
+
src: 'app/styles/main.scss',
|
17
|
+
dest: '<%%= dirs.tmp %>/prepare/assets/styles/main.css'
|
18
|
+
}
|
19
|
+
};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module.exports = {
|
2
|
+
debug: {
|
3
|
+
files: ['app/scripts/**/*', 'app/styles/**/*'],
|
4
|
+
tasks: ['build:debug']
|
5
|
+
},
|
6
|
+
rails: {
|
7
|
+
files: ['config/**/*.rb', 'lib/**/*.rb', 'Gemfile.lock'],
|
8
|
+
tasks: ['rails:server:restart'],
|
9
|
+
options: {
|
10
|
+
interrupt: true
|
11
|
+
}
|
12
|
+
}
|
13
|
+
};
|
data/lib/half-pipe/rails.rb
CHANGED
@@ -3,31 +3,7 @@ module HalfPipe
|
|
3
3
|
|
4
4
|
config.before_configuration do
|
5
5
|
config.half_pipe = ActiveSupport::OrderedOptions.new
|
6
|
-
config.half_pipe.
|
7
|
-
config.half_pipe.quiet_assets = false
|
8
|
-
end
|
9
|
-
|
10
|
-
initializer "half_pipe.middleware", after: "build_middleware_stack" do |app|
|
11
|
-
app.config.middleware.use Rack::HalfPipe if config.half_pipe.serve_assets
|
12
|
-
end
|
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
|
-
|
6
|
+
config.half_pipe.env = ActiveSupport::StringInquirer.new(ENV['HALF_PIPE_ENV'] || 'debug')
|
31
7
|
end
|
32
8
|
|
33
9
|
end
|
data/lib/half-pipe/version.rb
CHANGED
data/lib/rack/half-pipe.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.
|
4
|
+
version: 0.3.0.alpha.1
|
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-09-
|
11
|
+
date: 2013-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 4.0.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 4.0.0
|
27
41
|
description: Grunt-based workflow for your Rails assets
|
28
42
|
email:
|
29
43
|
- joe@joefiorini.com
|
@@ -35,6 +49,7 @@ files:
|
|
35
49
|
- Gemfile
|
36
50
|
- LICENSE.txt
|
37
51
|
- README.md
|
52
|
+
- ROADMAP.md
|
38
53
|
- Rakefile
|
39
54
|
- app/helpers/half_pipe_helper.rb
|
40
55
|
- examples/rails/.bowerrc
|
@@ -101,8 +116,17 @@ files:
|
|
101
116
|
- lib/generators/half_pipe/templates/app/scripts/main.js
|
102
117
|
- lib/generators/half_pipe/templates/app/styles/main.scss
|
103
118
|
- lib/generators/half_pipe/templates/bower.json
|
119
|
+
- lib/generators/half_pipe/templates/config/half-pipe.json
|
104
120
|
- lib/generators/half_pipe/templates/package.json
|
105
121
|
- lib/generators/half_pipe/templates/railties.rb
|
122
|
+
- lib/generators/half_pipe/templates/tasks/options/connect.js
|
123
|
+
- lib/generators/half_pipe/templates/tasks/options/copy.js
|
124
|
+
- lib/generators/half_pipe/templates/tasks/options/cssmin.js
|
125
|
+
- lib/generators/half_pipe/templates/tasks/options/jshint.js
|
126
|
+
- lib/generators/half_pipe/templates/tasks/options/rails.js
|
127
|
+
- lib/generators/half_pipe/templates/tasks/options/requirejs.js
|
128
|
+
- lib/generators/half_pipe/templates/tasks/options/sass.js
|
129
|
+
- lib/generators/half_pipe/templates/tasks/options/watch.js
|
106
130
|
- lib/half-pipe.rb
|
107
131
|
- lib/half-pipe/rails.rb
|
108
132
|
- lib/half-pipe/version.rb
|
@@ -127,9 +151,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
151
|
version: '0'
|
128
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
153
|
requirements:
|
130
|
-
- - '
|
154
|
+
- - '>'
|
131
155
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
156
|
+
version: 1.3.1
|
133
157
|
requirements: []
|
134
158
|
rubyforge_project:
|
135
159
|
rubygems_version: 2.0.2
|