express 0.0.1
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.
- data/bin/express +34 -0
- data/express.gemspec +20 -0
- data/templates/.gitignore +15 -0
- data/templates/Gemfile +5 -0
- data/templates/Rakefile +9 -0
- data/templates/app/controllers/application_controller.rb +3 -0
- data/templates/app/views/application/index.html.erb +7 -0
- data/templates/app/views/layouts/application.html.erb +10 -0
- data/templates/config.ru.tt +4 -0
- data/templates/config/application.rb.tt +12 -0
- data/templates/config/boot.rb +12 -0
- data/templates/config/routes.rb.tt +3 -0
- data/templates/public/404.html +26 -0
- data/templates/public/422.html +26 -0
- data/templates/public/500.html +25 -0
- data/templates/public/favicon.ico +0 -0
- data/templates/public/robots.txt +5 -0
- data/templates/script/rails +6 -0
- data/templates/test/functional/application_controller_test.rb +8 -0
- data/templates/test/test_helper.rb.tt +5 -0
- data/templates/test/unit/.gitkeep +0 -0
- metadata +86 -0
data/bin/express
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
require "active_support/core_ext/string"
|
5
|
+
require "digest/sha1"
|
6
|
+
|
7
|
+
class NewApp < Thor
|
8
|
+
include Thor::Actions
|
9
|
+
|
10
|
+
# Define arguments and options
|
11
|
+
argument :name
|
12
|
+
|
13
|
+
def self.source_root
|
14
|
+
File.expand_path("../../templates", __FILE__)
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "new", "Creates the app"
|
18
|
+
def new
|
19
|
+
@module_name = name.classify
|
20
|
+
@secret_token = 2.times.inject("") {|m, o| m << Digest::SHA1.hexdigest(rand(10e30).to_s)}
|
21
|
+
Dir[File.join(self.class.source_root, '**/*')].each do |file|
|
22
|
+
if File.file?(file)
|
23
|
+
destination = file.gsub(self.class.source_root, name)
|
24
|
+
if file =~ /\.tt$/
|
25
|
+
template(file, destination.gsub(/\.tt$/, ''))
|
26
|
+
else
|
27
|
+
copy_file(file, destination)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
NewApp.start
|
data/express.gemspec
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "express"
|
3
|
+
s.version = "0.0.1"
|
4
|
+
s.authors = ["Norman Clarke"]
|
5
|
+
s.email = ["norman@njclarke.com"]
|
6
|
+
s.homepage = "http://github.com/bvision/express"
|
7
|
+
s.summary = "An alternative Rails application generator"
|
8
|
+
s.files = `git ls-files`.split("\n")
|
9
|
+
s.test_files = `git ls-files -- {test}/*`.split("\n")
|
10
|
+
s.require_paths = ["lib"]
|
11
|
+
s.executables = ["express"]
|
12
|
+
s.default_executable = 'express'
|
13
|
+
s.add_development_dependency "railties", "~> 3.2.0"
|
14
|
+
|
15
|
+
s.description = <<-EOM
|
16
|
+
Express generates a slimmed-down Rails application that leaves out anything not
|
17
|
+
urgently needed for content-oriented sites. Your Rails app will launch very,
|
18
|
+
very fast.
|
19
|
+
EOM
|
20
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile ~/.gitignore_global
|
6
|
+
|
7
|
+
# Ignore bundler config
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
|
13
|
+
# Ignore all logfiles and tempfiles.
|
14
|
+
/log/*.log
|
15
|
+
/tmp
|
data/templates/Gemfile
ADDED
data/templates/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
module <%= @module_name %>
|
2
|
+
class Application < Rails::Application
|
3
|
+
config.active_support.deprecation = :log
|
4
|
+
config.middleware.delete "Rack::Lock"
|
5
|
+
config.middleware.delete "ActionDispatch::Flash"
|
6
|
+
config.middleware.delete "ActionDispatch::BestStandardsSupport"
|
7
|
+
|
8
|
+
config.secret_token = "<%= @secret_token %>"
|
9
|
+
config.cache_classes = Rails.env.production?
|
10
|
+
config.consider_all_requests_local = Rails.env.development?
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require "bundler"
|
2
|
+
|
3
|
+
(ENV["RAILS_ENV"] ||= "development").to_sym.tap do |env|
|
4
|
+
Bundler.setup :default, env
|
5
|
+
Bundler.require :default, env
|
6
|
+
end
|
7
|
+
|
8
|
+
require "rails"
|
9
|
+
require "action_controller/railtie"
|
10
|
+
|
11
|
+
require File.expand_path("../application", __FILE__)
|
12
|
+
require File.expand_path("../routes", __FILE__)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: express
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Norman Clarke
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-03-08 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: railties
|
16
|
+
requirement: &70249099198780 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.2.0
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70249099198780
|
25
|
+
description: ! 'Express generates a slimmed-down Rails application that leaves out
|
26
|
+
anything not
|
27
|
+
|
28
|
+
urgently needed for content-oriented sites. Your Rails app will launch very,
|
29
|
+
|
30
|
+
very fast.
|
31
|
+
|
32
|
+
'
|
33
|
+
email:
|
34
|
+
- norman@njclarke.com
|
35
|
+
executables:
|
36
|
+
- express
|
37
|
+
extensions: []
|
38
|
+
extra_rdoc_files: []
|
39
|
+
files:
|
40
|
+
- bin/express
|
41
|
+
- express.gemspec
|
42
|
+
- templates/.gitignore
|
43
|
+
- templates/Gemfile
|
44
|
+
- templates/Rakefile
|
45
|
+
- templates/app/controllers/application_controller.rb
|
46
|
+
- templates/app/views/application/index.html.erb
|
47
|
+
- templates/app/views/layouts/application.html.erb
|
48
|
+
- templates/config.ru.tt
|
49
|
+
- templates/config/application.rb.tt
|
50
|
+
- templates/config/boot.rb
|
51
|
+
- templates/config/routes.rb.tt
|
52
|
+
- templates/public/404.html
|
53
|
+
- templates/public/422.html
|
54
|
+
- templates/public/500.html
|
55
|
+
- templates/public/favicon.ico
|
56
|
+
- templates/public/robots.txt
|
57
|
+
- templates/script/rails
|
58
|
+
- templates/test/functional/application_controller_test.rb
|
59
|
+
- templates/test/test_helper.rb.tt
|
60
|
+
- templates/test/unit/.gitkeep
|
61
|
+
homepage: http://github.com/bvision/express
|
62
|
+
licenses: []
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options: []
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
none: false
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
requirements: []
|
80
|
+
rubyforge_project:
|
81
|
+
rubygems_version: 1.8.11
|
82
|
+
signing_key:
|
83
|
+
specification_version: 3
|
84
|
+
summary: An alternative Rails application generator
|
85
|
+
test_files: []
|
86
|
+
has_rdoc:
|