laces 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CONTRIBUTING.md +38 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +122 -0
- data/LICENSE +21 -0
- data/README.md +5 -0
- data/Rakefile +8 -0
- data/bin/laces +16 -0
- data/features/creating_a_heroku_app.feature +9 -0
- data/features/rake_clean.feature +21 -0
- data/features/skipping_clearance.feature +13 -0
- data/features/step_definitions/gem_steps.rb +5 -0
- data/features/step_definitions/heroku_steps.rb +3 -0
- data/features/step_definitions/shell_steps.rb +55 -0
- data/features/support/bin/heroku +5 -0
- data/features/support/env.rb +15 -0
- data/features/support/fake_heroku.rb +21 -0
- data/laces-0.0.1.gem +0 -0
- data/laces.gemspec +35 -0
- data/lib/laces/actions.rb +35 -0
- data/lib/laces/app_builder.rb +237 -0
- data/lib/laces/generators/app_generator.rb +111 -0
- data/lib/laces/version.rb +3 -0
- data/templates/.DS_Store +0 -0
- data/templates/Gemfile_template +76 -0
- data/templates/HEROKU_README.md +66 -0
- data/templates/Procfile +1 -0
- data/templates/README.md +81 -0
- data/templates/app/assets/imgs/glyphicons-halflings-white.png +0 -0
- data/templates/app/assets/imgs/glyphicons-halflings.png +0 -0
- data/templates/app/assets/javascripts/admin.coffee +20 -0
- data/templates/app/assets/javascripts/application.coffee +21 -0
- data/templates/app/assets/javascripts/lib/actinology.coffee +47 -0
- data/templates/app/assets/javascripts/lib/analytics.js +11 -0
- data/templates/app/assets/javascripts/lib/auth_token_sync.js +17 -0
- data/templates/app/assets/javascripts/lib/backbone-ui.js +2455 -0
- data/templates/app/assets/javascripts/lib/backbone.coffee +27 -0
- data/templates/app/assets/javascripts/lib/backbone/collection.js +249 -0
- data/templates/app/assets/javascripts/lib/backbone/events.js +64 -0
- data/templates/app/assets/javascripts/lib/backbone/helpers.js +68 -0
- data/templates/app/assets/javascripts/lib/backbone/history.js +144 -0
- data/templates/app/assets/javascripts/lib/backbone/model.js +291 -0
- data/templates/app/assets/javascripts/lib/backbone/router.coffee +45 -0
- data/templates/app/assets/javascripts/lib/backbone/sync.coffee +38 -0
- data/templates/app/assets/javascripts/lib/backbone/view.js +150 -0
- data/templates/app/assets/javascripts/lib/backbone_extended.coffee +276 -0
- data/templates/app/assets/javascripts/lib/bootstrap.js +1836 -0
- data/templates/app/assets/javascripts/lib/inflection.js +658 -0
- data/templates/app/assets/javascripts/lib/jquery-ui.js +343 -0
- data/templates/app/assets/javascripts/lib/jquery.hotkeys.js +102 -0
- data/templates/app/assets/javascripts/lib/jquery.js +4 -0
- data/templates/app/assets/javascripts/lib/milk.js.coffee +265 -0
- data/templates/app/assets/javascripts/lib/raw.js +143 -0
- data/templates/app/assets/javascripts/lib/strftime.js +732 -0
- data/templates/app/assets/javascripts/lib/throttle-debounce.js +251 -0
- data/templates/app/assets/javascripts/lib/timeago.js +148 -0
- data/templates/app/assets/javascripts/lib/underscore.js +28 -0
- data/templates/app/assets/styles/application.sass +21 -0
- data/templates/app/assets/styles/layouts/default.sass +15 -0
- data/templates/app/assets/styles/layouts/footer.sass +0 -0
- data/templates/app/assets/styles/layouts/forms.sass +34 -0
- data/templates/app/assets/styles/layouts/header.sass +0 -0
- data/templates/app/assets/styles/layouts/navigation.sass +0 -0
- data/templates/app/assets/styles/lib/backbone-ui.css +580 -0
- data/templates/app/assets/styles/lib/bootstrap.sass +4248 -0
- data/templates/app/assets/styles/pages/home.sass +0 -0
- data/templates/app/assets/styles/sessions/new.sass +0 -0
- data/templates/app/assets/styles/users/activate.sass +0 -0
- data/templates/app/assets/styles/users/new.sass +0 -0
- data/templates/app/assets/styles/users/suspended.sass +0 -0
- data/templates/app/controllers/app_controller.rb +14 -0
- data/templates/app/controllers/pages_controller.rb +2 -0
- data/templates/app/controllers/sessions_controller.rb +2 -0
- data/templates/app/controllers/templating_controller.rb +31 -0
- data/templates/app/controllers/users_controller.rb +2 -0
- data/templates/app/helpers/app_helper.rb +94 -0
- data/templates/app/helpers/users_helper.rb +53 -0
- data/templates/app/models/user.rb +9 -0
- data/templates/app/views/devise/confirmations/new.haml +9 -0
- data/templates/app/views/devise/passwords/edit.haml +11 -0
- data/templates/app/views/devise/passwords/new.haml +9 -0
- data/templates/app/views/devise/registrations/edit.haml +13 -0
- data/templates/app/views/devise/registrations/new.haml +8 -0
- data/templates/app/views/devise/sessions/_form.haml +7 -0
- data/templates/app/views/devise/sessions/new.haml +5 -0
- data/templates/app/views/devise/unlocks/new.haml +7 -0
- data/templates/app/views/layouts/_ascii.haml +0 -0
- data/templates/app/views/layouts/_column.haml +0 -0
- data/templates/app/views/layouts/_content.haml +1 -0
- data/templates/app/views/layouts/_extra.haml +0 -0
- data/templates/app/views/layouts/_footer.haml +9 -0
- data/templates/app/views/layouts/_head.haml +13 -0
- data/templates/app/views/layouts/_header.haml +6 -0
- data/templates/app/views/layouts/application.html.haml +16 -0
- data/templates/app/views/pages/home.haml +1 -0
- data/templates/config/app.yml +29 -0
- data/templates/config/application.erb +28 -0
- data/templates/config/database.yml +32 -0
- data/templates/config/initializers/devise.rb +232 -0
- data/templates/config/initializers/rabl_init.rb +4 -0
- data/templates/config/initializers/setup_mail.rb +13 -0
- data/templates/config/initializers/wrap_parameters.rb +12 -0
- data/templates/db/migrate/user_migration.rb +36 -0
- data/templates/laces_gitignore +9 -0
- data/templates/lib/development_mail_interceptor.rb +7 -0
- data/templates/lib/templating.rb +40 -0
- metadata +225 -0
@@ -0,0 +1,232 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
+
# Many of these configuration options can be set straight in your model.
|
3
|
+
Devise.setup do |config|
|
4
|
+
# ==> Mailer Configuration
|
5
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
6
|
+
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
7
|
+
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
8
|
+
|
9
|
+
# Configure the class responsible to send e-mails.
|
10
|
+
# config.mailer = "Devise::Mailer"
|
11
|
+
|
12
|
+
# ==> ORM configuration
|
13
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
14
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
15
|
+
# available as additional gems.
|
16
|
+
require 'devise/orm/active_record'
|
17
|
+
|
18
|
+
# ==> Configuration for any authentication mechanism
|
19
|
+
# Configure which keys are used when authenticating a user. The default is
|
20
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
21
|
+
# authenticating a user, both parameters are required. Remember that those
|
22
|
+
# parameters are used only when authenticating and not when retrieving from
|
23
|
+
# session. If you need permissions, you should implement that in a before filter.
|
24
|
+
# You can also supply a hash where the value is a boolean determining whether
|
25
|
+
# or not authentication should be aborted when the value is not present.
|
26
|
+
# config.authentication_keys = [ :email ]
|
27
|
+
|
28
|
+
# Configure parameters from the request object used for authentication. Each entry
|
29
|
+
# given should be a request method and it will automatically be passed to the
|
30
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
31
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
32
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
33
|
+
# config.request_keys = []
|
34
|
+
|
35
|
+
# Configure which authentication keys should be case-insensitive.
|
36
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
37
|
+
# to authenticate or find a user. Default is :email.
|
38
|
+
config.case_insensitive_keys = [ :email ]
|
39
|
+
|
40
|
+
# Configure which authentication keys should have whitespace stripped.
|
41
|
+
# These keys will have whitespace before and after removed upon creating or
|
42
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
43
|
+
config.strip_whitespace_keys = [ :email ]
|
44
|
+
|
45
|
+
# Tell if authentication through request.params is enabled. True by default.
|
46
|
+
# It can be set to an array that will enable params authentication only for the
|
47
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
48
|
+
# enable it only for database (email + password) authentication.
|
49
|
+
# config.params_authenticatable = true
|
50
|
+
|
51
|
+
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
52
|
+
# It can be set to an array that will enable http authentication only for the
|
53
|
+
# given strategies, for example, `config.http_authenticatable = [:token]` will
|
54
|
+
# enable it only for token authentication.
|
55
|
+
# config.http_authenticatable = false
|
56
|
+
|
57
|
+
# If http headers should be returned for AJAX requests. True by default.
|
58
|
+
# config.http_authenticatable_on_xhr = true
|
59
|
+
|
60
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
61
|
+
# config.http_authentication_realm = "Application"
|
62
|
+
|
63
|
+
# It will change confirmation, password recovery and other workflows
|
64
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
65
|
+
# Does not affect registerable.
|
66
|
+
# config.paranoid = true
|
67
|
+
|
68
|
+
# By default Devise will store the user in session. You can skip storage for
|
69
|
+
# :http_auth and :token_auth by adding those symbols to the array below.
|
70
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
71
|
+
# may want to disable generating routes to Devise's sessions controller by
|
72
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
73
|
+
config.skip_session_storage = [:http_auth]
|
74
|
+
|
75
|
+
# ==> Configuration for :database_authenticatable
|
76
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
77
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
78
|
+
#
|
79
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
80
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
81
|
+
# a value less than 10 in other environments.
|
82
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
83
|
+
|
84
|
+
# Setup a pepper to generate the encrypted password.
|
85
|
+
# config.pepper = "3b999010b2c35bffdbe1d543aa042152062601ab6e4409b1f1bb7b7bacc14908e947289df0440602ca2ab7cd369f97e7ce53058534a786fb9c4c2714de739d6a"
|
86
|
+
|
87
|
+
# ==> Configuration for :confirmable
|
88
|
+
# A period that the user is allowed to access the website even without
|
89
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
90
|
+
# able to access the website for two days without confirming his account,
|
91
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
92
|
+
# the user cannot access the website without confirming his account.
|
93
|
+
# config.allow_unconfirmed_access_for = 2.days
|
94
|
+
|
95
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
96
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
97
|
+
# db field (see migrations). Until confirmed new email is stored in
|
98
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
99
|
+
config.reconfirmable = true
|
100
|
+
|
101
|
+
# Defines which key will be used when confirming an account
|
102
|
+
# config.confirmation_keys = [ :email ]
|
103
|
+
|
104
|
+
# ==> Configuration for :rememberable
|
105
|
+
# The time the user will be remembered without asking for credentials again.
|
106
|
+
# config.remember_for = 2.weeks
|
107
|
+
|
108
|
+
# If true, extends the user's remember period when remembered via cookie.
|
109
|
+
# config.extend_remember_period = false
|
110
|
+
|
111
|
+
# Options to be passed to the created cookie. For instance, you can set
|
112
|
+
# :secure => true in order to force SSL only cookies.
|
113
|
+
# config.rememberable_options = {}
|
114
|
+
|
115
|
+
# ==> Configuration for :validatable
|
116
|
+
# Range for password length. Default is 6..128.
|
117
|
+
# config.password_length = 6..128
|
118
|
+
|
119
|
+
# Email regex used to validate email formats. It simply asserts that
|
120
|
+
# an one (and only one) @ exists in the given string. This is mainly
|
121
|
+
# to give user feedback and not to assert the e-mail validity.
|
122
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
123
|
+
|
124
|
+
# ==> Configuration for :timeoutable
|
125
|
+
# The time you want to timeout the user session without activity. After this
|
126
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
127
|
+
# config.timeout_in = 30.minutes
|
128
|
+
|
129
|
+
# If true, expires auth token on session timeout.
|
130
|
+
# config.expire_auth_token_on_timeout = false
|
131
|
+
|
132
|
+
# ==> Configuration for :lockable
|
133
|
+
# Defines which strategy will be used to lock an account.
|
134
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
135
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
136
|
+
# config.lock_strategy = :failed_attempts
|
137
|
+
|
138
|
+
# Defines which key will be used when locking and unlocking an account
|
139
|
+
# config.unlock_keys = [ :email ]
|
140
|
+
|
141
|
+
# Defines which strategy will be used to unlock an account.
|
142
|
+
# :email = Sends an unlock link to the user email
|
143
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
144
|
+
# :both = Enables both strategies
|
145
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
146
|
+
# config.unlock_strategy = :both
|
147
|
+
|
148
|
+
# Number of authentication tries before locking an account if lock_strategy
|
149
|
+
# is failed attempts.
|
150
|
+
# config.maximum_attempts = 20
|
151
|
+
|
152
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
153
|
+
# config.unlock_in = 1.hour
|
154
|
+
|
155
|
+
# ==> Configuration for :recoverable
|
156
|
+
#
|
157
|
+
# Defines which key will be used when recovering the password for an account
|
158
|
+
# config.reset_password_keys = [ :email ]
|
159
|
+
|
160
|
+
# Time interval you can reset your password with a reset password key.
|
161
|
+
# Don't put a too small interval or your users won't have the time to
|
162
|
+
# change their passwords.
|
163
|
+
config.reset_password_within = 6.hours
|
164
|
+
|
165
|
+
# ==> Configuration for :encryptable
|
166
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
167
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
168
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
169
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
170
|
+
# REST_AUTH_SITE_KEY to pepper)
|
171
|
+
# config.encryptor = :sha512
|
172
|
+
|
173
|
+
# ==> Configuration for :token_authenticatable
|
174
|
+
# Defines name of the authentication token params key
|
175
|
+
# config.token_authentication_key = :auth_token
|
176
|
+
|
177
|
+
# ==> Scopes configuration
|
178
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
179
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
180
|
+
# are using only default views.
|
181
|
+
config.scoped_views = true
|
182
|
+
|
183
|
+
# Configure the default scope given to Warden. By default it's the first
|
184
|
+
# devise role declared in your routes (usually :user).
|
185
|
+
# config.default_scope = :user
|
186
|
+
|
187
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
188
|
+
# only the current scope. By default, Devise signs out all scopes.
|
189
|
+
# config.sign_out_all_scopes = true
|
190
|
+
|
191
|
+
# ==> Navigation configuration
|
192
|
+
# Lists the formats that should be treated as navigational. Formats like
|
193
|
+
# :html, should redirect to the sign in page when the user does not have
|
194
|
+
# access, but formats like :xml or :json, should return 401.
|
195
|
+
#
|
196
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
197
|
+
# should add them to the navigational formats lists.
|
198
|
+
#
|
199
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
200
|
+
# config.navigational_formats = ["*/*", :html]
|
201
|
+
|
202
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
203
|
+
config.sign_out_via = :delete
|
204
|
+
|
205
|
+
# ==> OmniAuth
|
206
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
207
|
+
# up on your models and hooks.
|
208
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
209
|
+
|
210
|
+
# ==> Warden configuration
|
211
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
212
|
+
# change the failure app, you can configure them inside the config.warden block.
|
213
|
+
#
|
214
|
+
# config.warden do |manager|
|
215
|
+
# manager.intercept_401 = false
|
216
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
217
|
+
# end
|
218
|
+
|
219
|
+
# ==> Mountable engine configurations
|
220
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
221
|
+
# is mountable, there are some extra configurations to be taken into account.
|
222
|
+
# The following options are available, assuming the engine is mounted as:
|
223
|
+
#
|
224
|
+
# mount MyEngine, at: "/my_engine"
|
225
|
+
#
|
226
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
227
|
+
# config.router_name = :my_engine
|
228
|
+
#
|
229
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
230
|
+
# so you need to do it manually. For the users scope, it would be:
|
231
|
+
# config.omniauth_path_prefix = "/my_engine/users/auth"
|
232
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'development_mail_interceptor'
|
2
|
+
ActionMailer::Base.smtp_settings = {
|
3
|
+
:address => APP.mail.address,
|
4
|
+
:port => APP.mail.port,
|
5
|
+
:domain => APP.mail.domain,
|
6
|
+
:user_name => APP.mail.user_name,
|
7
|
+
:password => APP.mail.password,
|
8
|
+
:authenication => APP.mail.authenication,
|
9
|
+
:enable_starttls_auto => APP.mail.enable_starttls_auto
|
10
|
+
}
|
11
|
+
|
12
|
+
ActionMailer::Base.default_url_options[:host] = APP.domain
|
13
|
+
ActionMailer::Base.register_interceptor DevelopmentMailInterceptor if Rails.env.development?
|
@@ -0,0 +1,12 @@
|
|
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
|
+
ActionController::Base.wrap_parameters format: [:json]
|
8
|
+
|
9
|
+
# Disable root element in JSON by default.
|
10
|
+
if defined?(ActiveRecord)
|
11
|
+
ActiveRecord::Base.include_root_in_json = false
|
12
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class DeviseCreateUsers < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table(:users) do |t|
|
4
|
+
## Database authenticatable
|
5
|
+
t.string :email, null: false, default: ''
|
6
|
+
t.string :encrypted_password, null: false, default: ''
|
7
|
+
|
8
|
+
## Recoverable
|
9
|
+
t.string :reset_password_token
|
10
|
+
t.datetime :reset_password_sent_at
|
11
|
+
|
12
|
+
## Rememberable
|
13
|
+
t.datetime :remember_created_at
|
14
|
+
|
15
|
+
## Trackable
|
16
|
+
t.integer :sign_in_count, default: 0
|
17
|
+
t.datetime :current_sign_in_at
|
18
|
+
t.datetime :last_sign_in_at
|
19
|
+
t.string :current_sign_in_ip
|
20
|
+
t.string :last_sign_in_ip
|
21
|
+
|
22
|
+
## Confirmable
|
23
|
+
t.string :confirmation_token
|
24
|
+
t.datetime :confirmed_at
|
25
|
+
t.datetime :confirmation_sent_at
|
26
|
+
t.string :unconfirmed_email # Only if using reconfirmable
|
27
|
+
|
28
|
+
t.timestamps
|
29
|
+
end
|
30
|
+
|
31
|
+
add_index :users, :email, unique: true
|
32
|
+
add_index :users, :reset_password_token, unique: true
|
33
|
+
add_index :users, :confirmation_token, unique: true
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# This compiles haml templates into a json object and writes it to
|
2
|
+
# the file app/javascripts/template.js. Its so we can render html
|
3
|
+
# via javascript.
|
4
|
+
|
5
|
+
class Templating
|
6
|
+
def self.r partial
|
7
|
+
t = TemplatingController.new
|
8
|
+
t.r partial
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
def self.append_to_tree template, current
|
13
|
+
keys = current.split('/').collect{|k|"['#{k}']"}.join
|
14
|
+
partials = {}
|
15
|
+
template.each_index do |i|
|
16
|
+
partials[template[i]] = self.r("#{current}/#{template[i]}")
|
17
|
+
end
|
18
|
+
eval "@@templates#{keys} = partials"
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.process_tree template, key=nil, current=''
|
22
|
+
current = current == '' ? current = key.to_s : current = current+"/#{key}"
|
23
|
+
if template.is_a?(Hash)
|
24
|
+
template.each{|k,v|self.process_tree(v,k,current)}
|
25
|
+
elsif template.is_a?(Array)
|
26
|
+
self.append_to_tree template, current
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.compile
|
31
|
+
file = File.open(Rails.root.join('config','templating.yml'))
|
32
|
+
templates = YAML::load file
|
33
|
+
@@templates = templates
|
34
|
+
self.process_tree templates
|
35
|
+
js = "Template = #{@@templates.to_json}"
|
36
|
+
path = Rails.root.join 'app','assets','javascripts','template.js'
|
37
|
+
File.open(path,'w'){|f|f.write(js)}
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: laces
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- notesolution
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2012-07-07 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rails
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 3.2.3
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: bundler
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "1.1"
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: artii
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - "="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.0.1
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: cucumber
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.1.9
|
57
|
+
type: :development
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: aruba
|
61
|
+
prerelease: false
|
62
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.4.11
|
68
|
+
type: :development
|
69
|
+
version_requirements: *id005
|
70
|
+
description: |
|
71
|
+
Laces is a base Rails project that you can upgrade. It is used by
|
72
|
+
thoughtbot to get a jump start on a working app. Use Laces if you're in a
|
73
|
+
rush to build something amazing; don't use it if you like missing deadlines.
|
74
|
+
|
75
|
+
email:
|
76
|
+
executables:
|
77
|
+
- laces
|
78
|
+
extensions: []
|
79
|
+
|
80
|
+
extra_rdoc_files:
|
81
|
+
- README.md
|
82
|
+
- LICENSE
|
83
|
+
files:
|
84
|
+
- CONTRIBUTING.md
|
85
|
+
- Gemfile
|
86
|
+
- Gemfile.lock
|
87
|
+
- LICENSE
|
88
|
+
- README.md
|
89
|
+
- Rakefile
|
90
|
+
- bin/laces
|
91
|
+
- features/creating_a_heroku_app.feature
|
92
|
+
- features/rake_clean.feature
|
93
|
+
- features/skipping_clearance.feature
|
94
|
+
- features/step_definitions/gem_steps.rb
|
95
|
+
- features/step_definitions/heroku_steps.rb
|
96
|
+
- features/step_definitions/shell_steps.rb
|
97
|
+
- features/support/bin/heroku
|
98
|
+
- features/support/env.rb
|
99
|
+
- features/support/fake_heroku.rb
|
100
|
+
- laces-0.0.1.gem
|
101
|
+
- laces.gemspec
|
102
|
+
- lib/laces/actions.rb
|
103
|
+
- lib/laces/app_builder.rb
|
104
|
+
- lib/laces/generators/app_generator.rb
|
105
|
+
- lib/laces/version.rb
|
106
|
+
- templates/.DS_Store
|
107
|
+
- templates/Gemfile_template
|
108
|
+
- templates/HEROKU_README.md
|
109
|
+
- templates/Procfile
|
110
|
+
- templates/README.md
|
111
|
+
- templates/app/assets/imgs/glyphicons-halflings-white.png
|
112
|
+
- templates/app/assets/imgs/glyphicons-halflings.png
|
113
|
+
- templates/app/assets/javascripts/admin.coffee
|
114
|
+
- templates/app/assets/javascripts/application.coffee
|
115
|
+
- templates/app/assets/javascripts/lib/actinology.coffee
|
116
|
+
- templates/app/assets/javascripts/lib/analytics.js
|
117
|
+
- templates/app/assets/javascripts/lib/auth_token_sync.js
|
118
|
+
- templates/app/assets/javascripts/lib/backbone-ui.js
|
119
|
+
- templates/app/assets/javascripts/lib/backbone.coffee
|
120
|
+
- templates/app/assets/javascripts/lib/backbone/collection.js
|
121
|
+
- templates/app/assets/javascripts/lib/backbone/events.js
|
122
|
+
- templates/app/assets/javascripts/lib/backbone/helpers.js
|
123
|
+
- templates/app/assets/javascripts/lib/backbone/history.js
|
124
|
+
- templates/app/assets/javascripts/lib/backbone/model.js
|
125
|
+
- templates/app/assets/javascripts/lib/backbone/router.coffee
|
126
|
+
- templates/app/assets/javascripts/lib/backbone/sync.coffee
|
127
|
+
- templates/app/assets/javascripts/lib/backbone/view.js
|
128
|
+
- templates/app/assets/javascripts/lib/backbone_extended.coffee
|
129
|
+
- templates/app/assets/javascripts/lib/bootstrap.js
|
130
|
+
- templates/app/assets/javascripts/lib/inflection.js
|
131
|
+
- templates/app/assets/javascripts/lib/jquery-ui.js
|
132
|
+
- templates/app/assets/javascripts/lib/jquery.hotkeys.js
|
133
|
+
- templates/app/assets/javascripts/lib/jquery.js
|
134
|
+
- templates/app/assets/javascripts/lib/milk.js.coffee
|
135
|
+
- templates/app/assets/javascripts/lib/raw.js
|
136
|
+
- templates/app/assets/javascripts/lib/strftime.js
|
137
|
+
- templates/app/assets/javascripts/lib/throttle-debounce.js
|
138
|
+
- templates/app/assets/javascripts/lib/timeago.js
|
139
|
+
- templates/app/assets/javascripts/lib/underscore.js
|
140
|
+
- templates/app/assets/styles/application.sass
|
141
|
+
- templates/app/assets/styles/layouts/default.sass
|
142
|
+
- templates/app/assets/styles/layouts/footer.sass
|
143
|
+
- templates/app/assets/styles/layouts/forms.sass
|
144
|
+
- templates/app/assets/styles/layouts/header.sass
|
145
|
+
- templates/app/assets/styles/layouts/navigation.sass
|
146
|
+
- templates/app/assets/styles/lib/backbone-ui.css
|
147
|
+
- templates/app/assets/styles/lib/bootstrap.sass
|
148
|
+
- templates/app/assets/styles/pages/home.sass
|
149
|
+
- templates/app/assets/styles/sessions/new.sass
|
150
|
+
- templates/app/assets/styles/users/activate.sass
|
151
|
+
- templates/app/assets/styles/users/new.sass
|
152
|
+
- templates/app/assets/styles/users/suspended.sass
|
153
|
+
- templates/app/controllers/app_controller.rb
|
154
|
+
- templates/app/controllers/pages_controller.rb
|
155
|
+
- templates/app/controllers/sessions_controller.rb
|
156
|
+
- templates/app/controllers/templating_controller.rb
|
157
|
+
- templates/app/controllers/users_controller.rb
|
158
|
+
- templates/app/helpers/app_helper.rb
|
159
|
+
- templates/app/helpers/users_helper.rb
|
160
|
+
- templates/app/models/user.rb
|
161
|
+
- templates/app/views/devise/confirmations/new.haml
|
162
|
+
- templates/app/views/devise/passwords/edit.haml
|
163
|
+
- templates/app/views/devise/passwords/new.haml
|
164
|
+
- templates/app/views/devise/registrations/edit.haml
|
165
|
+
- templates/app/views/devise/registrations/new.haml
|
166
|
+
- templates/app/views/devise/sessions/_form.haml
|
167
|
+
- templates/app/views/devise/sessions/new.haml
|
168
|
+
- templates/app/views/devise/unlocks/new.haml
|
169
|
+
- templates/app/views/layouts/_ascii.haml
|
170
|
+
- templates/app/views/layouts/_column.haml
|
171
|
+
- templates/app/views/layouts/_content.haml
|
172
|
+
- templates/app/views/layouts/_extra.haml
|
173
|
+
- templates/app/views/layouts/_footer.haml
|
174
|
+
- templates/app/views/layouts/_head.haml
|
175
|
+
- templates/app/views/layouts/_header.haml
|
176
|
+
- templates/app/views/layouts/application.html.haml
|
177
|
+
- templates/app/views/pages/home.haml
|
178
|
+
- templates/config/app.yml
|
179
|
+
- templates/config/application.erb
|
180
|
+
- templates/config/database.yml
|
181
|
+
- templates/config/initializers/devise.rb
|
182
|
+
- templates/config/initializers/rabl_init.rb
|
183
|
+
- templates/config/initializers/setup_mail.rb
|
184
|
+
- templates/config/initializers/wrap_parameters.rb
|
185
|
+
- templates/db/migrate/user_migration.rb
|
186
|
+
- templates/laces_gitignore
|
187
|
+
- templates/lib/development_mail_interceptor.rb
|
188
|
+
- templates/lib/templating.rb
|
189
|
+
homepage:
|
190
|
+
licenses: []
|
191
|
+
|
192
|
+
post_install_message:
|
193
|
+
rdoc_options:
|
194
|
+
- --charset=UTF-8
|
195
|
+
require_paths:
|
196
|
+
- lib
|
197
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
198
|
+
none: false
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: "0"
|
203
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
|
+
none: false
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: "0"
|
209
|
+
requirements: []
|
210
|
+
|
211
|
+
rubyforge_project:
|
212
|
+
rubygems_version: 1.8.15
|
213
|
+
signing_key:
|
214
|
+
specification_version: 3
|
215
|
+
summary: Generate a Rails app using notesolution's best practices.
|
216
|
+
test_files:
|
217
|
+
- features/creating_a_heroku_app.feature
|
218
|
+
- features/rake_clean.feature
|
219
|
+
- features/skipping_clearance.feature
|
220
|
+
- features/step_definitions/gem_steps.rb
|
221
|
+
- features/step_definitions/heroku_steps.rb
|
222
|
+
- features/step_definitions/shell_steps.rb
|
223
|
+
- features/support/bin/heroku
|
224
|
+
- features/support/env.rb
|
225
|
+
- features/support/fake_heroku.rb
|