half-pipe 0.3.0.alpha.2 → 0.3.0.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/todomvc-rails/.bowerrc +3 -0
- data/examples/todomvc-rails/.gitignore +20 -0
- data/examples/todomvc-rails/.jshintrc +34 -0
- data/examples/todomvc-rails/Gemfile +40 -0
- data/examples/todomvc-rails/Gruntfile.js +42 -0
- data/examples/todomvc-rails/README.rdoc +5 -0
- data/examples/todomvc-rails/Rakefile +6 -0
- data/examples/todomvc-rails/app/controllers/application_controller.rb +5 -0
- data/examples/todomvc-rails/app/controllers/concerns/.keep +0 -0
- data/examples/todomvc-rails/app/controllers/todos_controller.rb +69 -0
- data/examples/todomvc-rails/app/helpers/application_helper.rb +2 -0
- data/examples/todomvc-rails/app/helpers/todos_helper.rb +5 -0
- data/examples/todomvc-rails/app/mailers/.keep +0 -0
- data/examples/todomvc-rails/app/models/.keep +0 -0
- data/examples/todomvc-rails/app/models/concerns/.keep +0 -0
- data/examples/todomvc-rails/app/models/todo.rb +8 -0
- data/examples/todomvc-rails/app/scripts/main.js +53 -0
- data/examples/todomvc-rails/app/scripts/todo-title-input.js +57 -0
- data/examples/todomvc-rails/app/styles/base.scss +415 -0
- data/examples/todomvc-rails/app/styles/main.scss +2 -0
- data/examples/todomvc-rails/app/styles/todos.scss +29 -0
- data/examples/todomvc-rails/app/views/layouts/application.html.erb +14 -0
- data/examples/todomvc-rails/app/views/layouts/todos.js.erb +7 -0
- data/examples/todomvc-rails/app/views/todos/_destroy.js.erb +1 -0
- data/examples/todomvc-rails/app/views/todos/_footer.html.erb +21 -0
- data/examples/todomvc-rails/app/views/todos/_todo.html.erb +14 -0
- data/examples/todomvc-rails/app/views/todos/_toggle.js.erb +4 -0
- data/examples/todomvc-rails/app/views/todos/create.js.erb +3 -0
- data/examples/todomvc-rails/app/views/todos/destroy.js.erb +1 -0
- data/examples/todomvc-rails/app/views/todos/destroy_completed.js.erb +1 -0
- data/examples/todomvc-rails/app/views/todos/index.html.erb +33 -0
- data/examples/todomvc-rails/app/views/todos/toggle.js.erb +1 -0
- data/examples/todomvc-rails/app/views/todos/toggle_all.js.erb +1 -0
- data/examples/todomvc-rails/app/views/todos/update.js.erb +1 -0
- data/examples/todomvc-rails/bin/bundle +3 -0
- data/examples/todomvc-rails/bin/rails +4 -0
- data/examples/todomvc-rails/bin/rake +4 -0
- data/examples/todomvc-rails/bower.json +10 -0
- data/examples/todomvc-rails/config.ru +4 -0
- data/examples/todomvc-rails/config/application.rb +28 -0
- data/examples/todomvc-rails/config/boot.rb +4 -0
- data/examples/todomvc-rails/config/build.js +14 -0
- data/examples/todomvc-rails/config/database.yml +19 -0
- data/examples/todomvc-rails/config/environment.rb +5 -0
- data/examples/todomvc-rails/config/environments/development.rb +29 -0
- data/examples/todomvc-rails/config/environments/production.rb +80 -0
- data/examples/todomvc-rails/config/environments/test.rb +36 -0
- data/examples/todomvc-rails/config/half-pipe.json +3 -0
- data/examples/todomvc-rails/config/initializers/backtrace_silencers.rb +7 -0
- data/examples/todomvc-rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/examples/todomvc-rails/config/initializers/inflections.rb +16 -0
- data/examples/todomvc-rails/config/initializers/mime_types.rb +5 -0
- data/examples/todomvc-rails/config/initializers/secret_token.rb +12 -0
- data/examples/todomvc-rails/config/initializers/session_store.rb +3 -0
- data/examples/todomvc-rails/config/initializers/wrap_parameters.rb +14 -0
- data/examples/todomvc-rails/config/locales/en.yml +23 -0
- data/examples/todomvc-rails/config/routes.rb +16 -0
- data/examples/todomvc-rails/db/migrate/20130518030840_create_todos.rb +9 -0
- data/examples/todomvc-rails/db/schema.rb +23 -0
- data/examples/todomvc-rails/db/seeds.rb +7 -0
- data/examples/todomvc-rails/lib/assets/.keep +0 -0
- data/examples/todomvc-rails/lib/tasks/.keep +0 -0
- data/examples/todomvc-rails/log/.keep +0 -0
- data/examples/todomvc-rails/package.json +22 -0
- data/examples/todomvc-rails/public/404.html +58 -0
- data/examples/todomvc-rails/public/422.html +58 -0
- data/examples/todomvc-rails/public/500.html +57 -0
- data/examples/todomvc-rails/public/favicon.ico +0 -0
- data/examples/todomvc-rails/public/robots.txt +5 -0
- data/examples/todomvc-rails/tasks/options/connect.js +63 -0
- data/examples/todomvc-rails/tasks/options/copy.js +28 -0
- data/examples/todomvc-rails/tasks/options/cssmin.js +3 -0
- data/examples/todomvc-rails/tasks/options/jshint.js +8 -0
- data/examples/todomvc-rails/tasks/options/rails.js +5 -0
- data/examples/todomvc-rails/tasks/options/requirejs.js +19 -0
- data/examples/todomvc-rails/tasks/options/sass.js +21 -0
- data/examples/todomvc-rails/tasks/options/watch.js +13 -0
- data/examples/todomvc-rails/test/controllers/.keep +0 -0
- data/examples/todomvc-rails/test/fixtures/.keep +0 -0
- data/examples/todomvc-rails/test/fixtures/todos.yml +11 -0
- data/examples/todomvc-rails/test/helpers/.keep +0 -0
- data/examples/todomvc-rails/test/integration/.keep +0 -0
- data/examples/todomvc-rails/test/mailers/.keep +0 -0
- data/examples/todomvc-rails/test/models/.keep +0 -0
- data/examples/todomvc-rails/test/models/todo_test.rb +7 -0
- data/examples/todomvc-rails/test/test_helper.rb +15 -0
- data/examples/todomvc-rails/vendor/assets/javascripts/.keep +0 -0
- data/examples/todomvc-rails/vendor/assets/stylesheets/.keep +0 -0
- data/lib/generators/half_pipe/install_generator.rb +2 -1
- data/lib/generators/half_pipe/templates/app/scripts/main.js +3 -5
- data/lib/generators/half_pipe/templates/config/build.js +4 -0
- data/lib/generators/half_pipe/templates/railties.rb +0 -1
- data/lib/generators/half_pipe/templates/tasks/options/copy.js +0 -1
- data/lib/half-pipe/version.rb +1 -1
- metadata +91 -1
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure your secret_key_base is kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
Todos::Application.config.secret_key_base = '0ff5449d23a6eb51950e555e6dfd6348bd06c232e6b0e765970e93f90788960e107e1b9b69d50465ea7f4b322117b883b8800b539b8430bf8ff0b4e379577eb0'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20130518030840) do
|
15
|
+
|
16
|
+
create_table "todos", force: true do |t|
|
17
|
+
t.boolean "completed", default: false, null: false
|
18
|
+
t.string "title"
|
19
|
+
t.datetime "created_at"
|
20
|
+
t.datetime "updated_at"
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"name": "Todos",
|
3
|
+
"dependencies": {
|
4
|
+
"bower": "~1.2.0"
|
5
|
+
},
|
6
|
+
"devDependencies": {
|
7
|
+
"grunt-cli": "~0.1.7",
|
8
|
+
"grunt": "~0.4.1",
|
9
|
+
"grunt-contrib-sass": "~0.3.0",
|
10
|
+
"grunt-contrib-copy": "~0.4.1",
|
11
|
+
"grunt-contrib-clean": "~0.4.1",
|
12
|
+
"grunt-contrib-jshint": "~0.4.3",
|
13
|
+
"grunt-contrib-cssmin": "~0.6.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"
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/404.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
54
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/422.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The change you wanted was rejected.</h1>
|
54
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/500.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>We're sorry, but something went wrong.</h1>
|
54
|
+
</div>
|
55
|
+
<p>If you are the application owner check the logs for more information.</p>
|
56
|
+
</body>
|
57
|
+
</html>
|
File without changes
|
@@ -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 || 'bower_components' %>"]
|
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,28 @@
|
|
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
|
+
expand: true,
|
15
|
+
cwd: 'app/styles',
|
16
|
+
src: '**/*',
|
17
|
+
dest: '<%= dirs.tmp %>/prepare/assets/styles'
|
18
|
+
}]
|
19
|
+
},
|
20
|
+
finalize: {
|
21
|
+
files: [{
|
22
|
+
expand: true,
|
23
|
+
cwd: '<%= dirs.tmp %>/public',
|
24
|
+
src: ['assets/**/*'],
|
25
|
+
dest: 'public/'
|
26
|
+
}]
|
27
|
+
}
|
28
|
+
};
|