noodall 0.1.0 → 0.2.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/noodall +0 -0
- data/lib/noodall/templates/Gemfile +5 -5
- data/lib/noodall/templates/README +13 -8
- data/lib/noodall/templates/Rakefile +1 -1
- data/lib/noodall/templates/app/assets/images/rails.png +0 -0
- data/lib/noodall/templates/app/assets/javascripts/application.js.tt +17 -0
- data/lib/noodall/templates/app/assets/stylesheets/application.css +13 -0
- data/lib/noodall/templates/app/views/layouts/application.html.erb.tt +3 -7
- data/lib/noodall/templates/config/application.rb +15 -9
- data/lib/noodall/templates/config/boot.rb +3 -10
- data/lib/noodall/templates/config/environments/development.rb.tt +8 -11
- data/lib/noodall/templates/config/environments/production.rb.tt +28 -14
- data/lib/noodall/templates/config/environments/test.rb.tt +13 -4
- data/lib/noodall/templates/config/initializers/devise.rb.tt +110 -43
- data/lib/noodall/templates/config/initializers/inflections.rb +5 -0
- data/lib/noodall/templates/config/initializers/noodall.rb.tt +10 -0
- data/lib/noodall/templates/config/initializers/session_store.rb.tt +2 -2
- data/lib/noodall/templates/config/initializers/wrap_parameters.rb.tt +16 -0
- data/lib/noodall/templates/config/locales/en.yml +1 -1
- data/lib/noodall/templates/gitignore +14 -7
- data/lib/noodall/templates/public/500.html +0 -1
- data/lib/noodall/version.rb +1 -1
- data/noodall.gemspec +1 -1
- metadata +18 -15
- data/lib/noodall/templates/config/environments/staging.rb.tt +0 -50
- data/lib/noodall/templates/config/initializers/noodall.rb +0 -8
data/bin/noodall
CHANGED
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
source 'http://gems.github.com'
|
3
3
|
|
4
|
-
gem 'rails', '
|
5
|
-
gem 'noodall-ui'
|
4
|
+
gem 'rails', '~> 3.1.0'
|
5
|
+
gem 'noodall-ui', '0.5.0.pre.1'
|
6
6
|
gem 'noodall-devise'
|
7
7
|
gem 'bson_ext'
|
8
8
|
gem 'dragonfly'
|
@@ -10,18 +10,18 @@ gem 'rack-contrib', :require => 'rack/contrib'
|
|
10
10
|
|
11
11
|
group :production, :staging do
|
12
12
|
gem 'dalli'
|
13
|
-
gem 'rack-cache', '~> 1.0.0', :require => 'rack/cache'
|
14
13
|
end
|
15
14
|
|
15
|
+
<%= assets_gemfile_entry %>
|
16
|
+
<%= javascript_gemfile_entry %>
|
17
|
+
|
16
18
|
group :development, :test do
|
17
19
|
gem 'capybara'
|
18
20
|
gem 'database_cleaner'
|
19
21
|
gem 'cucumber-rails'
|
20
22
|
gem 'cucumber'
|
21
23
|
gem 'rspec-rails'
|
22
|
-
gem 'spork'
|
23
24
|
gem 'launchy' # So you can do Then show me the page
|
24
25
|
gem 'factory_girl_rails'
|
25
26
|
gem 'fakerama'
|
26
27
|
end
|
27
|
-
|
@@ -91,7 +91,7 @@ mode. With gems, use <tt>sudo gem install ruby-debug</tt>. Example:
|
|
91
91
|
|
92
92
|
class WeblogController < ActionController::Base
|
93
93
|
def index
|
94
|
-
@posts = Post.
|
94
|
+
@posts = Post.all
|
95
95
|
debugger
|
96
96
|
end
|
97
97
|
end
|
@@ -139,7 +139,7 @@ To reload your controllers and models after launching the console run
|
|
139
139
|
<tt>reload!</tt>
|
140
140
|
|
141
141
|
More information about irb can be found at:
|
142
|
-
link:http://www.rubycentral.
|
142
|
+
link:http://www.rubycentral.org/pickaxe/irb.html
|
143
143
|
|
144
144
|
|
145
145
|
== dbconsole
|
@@ -156,8 +156,13 @@ PostgreSQL and SQLite 3.
|
|
156
156
|
The default directory structure of a generated Ruby on Rails application:
|
157
157
|
|
158
158
|
|-- app
|
159
|
+
| |-- assets
|
160
|
+
| |-- images
|
161
|
+
| |-- javascripts
|
162
|
+
| `-- stylesheets
|
159
163
|
| |-- controllers
|
160
164
|
| |-- helpers
|
165
|
+
| |-- mailers
|
161
166
|
| |-- models
|
162
167
|
| `-- views
|
163
168
|
| `-- layouts
|
@@ -171,11 +176,7 @@ The default directory structure of a generated Ruby on Rails application:
|
|
171
176
|
| `-- tasks
|
172
177
|
|-- log
|
173
178
|
|-- public
|
174
|
-
| |-- images
|
175
|
-
| |-- javascripts
|
176
|
-
| `-- stylesheets
|
177
179
|
|-- script
|
178
|
-
| `-- performance
|
179
180
|
|-- test
|
180
181
|
| |-- fixtures
|
181
182
|
| |-- functional
|
@@ -188,11 +189,16 @@ The default directory structure of a generated Ruby on Rails application:
|
|
188
189
|
| |-- sessions
|
189
190
|
| `-- sockets
|
190
191
|
`-- vendor
|
192
|
+
|-- assets
|
193
|
+
`-- stylesheets
|
191
194
|
`-- plugins
|
192
195
|
|
193
196
|
app
|
194
197
|
Holds all the code that's specific to this particular application.
|
195
198
|
|
199
|
+
app/assets
|
200
|
+
Contains subdirectories for images, stylesheets, and JavaScript files.
|
201
|
+
|
196
202
|
app/controllers
|
197
203
|
Holds controllers that should be named like weblogs_controller.rb for
|
198
204
|
automated URL mapping. All controllers should descend from
|
@@ -237,8 +243,7 @@ lib
|
|
237
243
|
the load path.
|
238
244
|
|
239
245
|
public
|
240
|
-
The directory available for the web server.
|
241
|
-
images, stylesheets, and javascripts. Also contains the dispatchers and the
|
246
|
+
The directory available for the web server. Also contains the dispatchers and the
|
242
247
|
default HTML files. This should be set as the DOCUMENT_ROOT of your web
|
243
248
|
server.
|
244
249
|
|
@@ -1,7 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
1
2
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
3
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
4
|
|
4
5
|
require File.expand_path('../config/application', __FILE__)
|
5
|
-
require 'rake'
|
6
6
|
|
7
7
|
<%= app_const %>.load_tasks
|
Binary file
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
<% unless options[:skip_javascript] -%>
|
14
|
+
//= require <%= options[:javascript] %>
|
15
|
+
//= require <%= options[:javascript] %>_ujs
|
16
|
+
<% end -%>
|
17
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -2,13 +2,9 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title><%%= page_title %> | <%= app_const_base %></title>
|
5
|
-
<%%= stylesheet_link_tag
|
6
|
-
|
7
|
-
|
8
|
-
google.load("jquery", "1.4");
|
9
|
-
</script>
|
10
|
-
<%%= javascript_include_tag :defaults %>
|
11
|
-
<%%= csrf_meta_tag %>
|
5
|
+
<%%= stylesheet_link_tag "application" %>
|
6
|
+
<%%= javascript_include_tag "application" %>
|
7
|
+
<%%= csrf_meta_tags %>
|
12
8
|
</head>
|
13
9
|
<body>
|
14
10
|
<%%= form_tag(noodall_search_path, :method => :get, :class => 'search') do %>
|
@@ -1,15 +1,16 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
|
-
# Pick the frameworks you want:
|
4
|
-
# require "active_record/railtie"
|
5
3
|
require "action_controller/railtie"
|
6
4
|
require "action_mailer/railtie"
|
7
5
|
require "active_resource/railtie"
|
8
|
-
require "
|
6
|
+
require "sprockets/railtie"
|
9
7
|
|
10
|
-
|
11
|
-
# you
|
12
|
-
Bundler.require(
|
8
|
+
if defined?(Bundler)
|
9
|
+
# If you precompile assets before deploying to production, use this line
|
10
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
11
|
+
# If you want your assets lazily compiled in production, use this line
|
12
|
+
# Bundler.require(:default, :assets, Rails.env)
|
13
|
+
end
|
13
14
|
|
14
15
|
module <%= app_const_base %>
|
15
16
|
class Application < Rails::Application
|
@@ -35,15 +36,20 @@ module <%= app_const_base %>
|
|
35
36
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
36
37
|
# config.i18n.default_locale = :de
|
37
38
|
|
38
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
39
|
-
config.action_view.javascript_expansions[:defaults] = %w(rails)
|
40
|
-
|
41
39
|
# Configure the default encoding used in templates for Ruby 1.9.
|
42
40
|
config.encoding = "utf-8"
|
43
41
|
|
44
42
|
# Configure sensitive parameters which will be filtered from the log file.
|
45
43
|
config.filter_parameters += [:password]
|
46
44
|
|
45
|
+
<% unless options.skip_sprockets? -%>
|
46
|
+
# Enable the asset pipeline
|
47
|
+
config.assets.enabled = true
|
48
|
+
|
49
|
+
# Version of your assets, change this if you want to expire all your assets
|
50
|
+
config.assets.version = '1.0'
|
51
|
+
<% end -%>
|
52
|
+
|
47
53
|
config.middleware.insert 0, 'Dragonfly::Middleware', :noodall_assets
|
48
54
|
end
|
49
55
|
end
|
@@ -1,13 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
|
3
3
|
# Set up gems listed in the Gemfile.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
require 'bundler'
|
8
|
-
Bundler.setup
|
9
|
-
rescue Bundler::GemNotFound => e
|
10
|
-
STDERR.puts e.message
|
11
|
-
STDERR.puts "Try running `bundle install`."
|
12
|
-
exit!
|
13
|
-
end if File.exist?(gemfile)
|
4
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
5
|
+
|
6
|
+
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= app_const %>.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
5
|
-
# every request.
|
6
|
-
# since you don't have to restart the
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
7
|
config.cache_classes = false
|
8
8
|
|
9
9
|
# Log error messages when you accidentally call methods on nil.
|
@@ -11,12 +11,10 @@
|
|
11
11
|
|
12
12
|
# Show full error reports and disable caching
|
13
13
|
config.consider_all_requests_local = true
|
14
|
-
config.action_view.debug_rjs = true
|
15
14
|
config.action_controller.perform_caching = false
|
16
15
|
|
17
16
|
# Don't care if the mailer can't send
|
18
17
|
config.action_mailer.raise_delivery_errors = false
|
19
|
-
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
20
18
|
|
21
19
|
# Print deprecation notices to the Rails logger
|
22
20
|
config.active_support.deprecation = :log
|
@@ -24,10 +22,9 @@
|
|
24
22
|
# Only use best-standards-support built into browsers
|
25
23
|
config.action_dispatch.best_standards_support = :builtin
|
26
24
|
|
27
|
-
#
|
28
|
-
config.
|
29
|
-
headers.delete('Last-Modified')
|
30
|
-
headers['Cache-Control'] = "private, max-age=0"
|
31
|
-
end
|
32
|
-
end
|
25
|
+
# Do not compress assets
|
26
|
+
config.assets.compress = false
|
33
27
|
|
28
|
+
# Expands the lines which load the assets
|
29
|
+
config.assets.debug = true
|
30
|
+
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<%= app_const %>.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
|
-
# The production environment is meant for finished, "live" apps.
|
5
4
|
# Code is not reloaded between requests
|
6
5
|
config.cache_classes = true
|
7
6
|
|
@@ -9,31 +8,46 @@
|
|
9
8
|
config.consider_all_requests_local = false
|
10
9
|
config.action_controller.perform_caching = true
|
11
10
|
|
12
|
-
#
|
13
|
-
config.
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
14
16
|
|
15
|
-
#
|
16
|
-
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
17
19
|
|
18
|
-
#
|
19
|
-
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to Rails.root.join("public/assets")
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
20
32
|
|
21
33
|
# See everything in the log (default is :info)
|
22
34
|
# config.log_level = :debug
|
23
35
|
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
24
39
|
# Use a different logger for distributed setups
|
25
|
-
# config.logger = SyslogLogger.new
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
26
41
|
|
27
42
|
# Use a different cache store in production
|
28
43
|
# config.cache_store = :mem_cache_store
|
29
44
|
|
30
|
-
#
|
31
|
-
# In production, Apache or nginx will already do this
|
32
|
-
config.serve_static_assets = false
|
33
|
-
|
34
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
35
46
|
# config.action_controller.asset_host = "http://assets.example.com"
|
36
47
|
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
37
51
|
# Disable delivery errors, bad email addresses will be ignored
|
38
52
|
# config.action_mailer.raise_delivery_errors = false
|
39
53
|
config.action_mailer.default_url_options = { :host => 'www.<%= app_name %>.com' }
|
@@ -1,13 +1,17 @@
|
|
1
1
|
<%= app_const %>.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite.
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
6
|
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs.
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
-
#
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
11
15
|
config.whiny_nils = true
|
12
16
|
|
13
17
|
# Show full error reports and disable caching
|
@@ -31,6 +35,11 @@
|
|
31
35
|
# like if you have constraints or database-specific column types
|
32
36
|
# config.active_record.schema_format = :sql
|
33
37
|
|
38
|
+
<%- unless options.skip_active_record? -%>
|
39
|
+
# Raise exception on mass assignment protection for ActiveRecord models
|
40
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
41
|
+
<%- end -%>
|
42
|
+
|
34
43
|
# Print deprecation notices to the stderr
|
35
44
|
config.active_support.deprecation = :stderr
|
36
45
|
end
|
@@ -2,8 +2,9 @@
|
|
2
2
|
# four configuration values can also be set straight in your models.
|
3
3
|
Devise.setup do |config|
|
4
4
|
# ==> Mailer Configuration
|
5
|
-
# Configure the e-mail address which will be shown in
|
6
|
-
|
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"
|
7
8
|
|
8
9
|
# Configure the class responsible to send e-mails.
|
9
10
|
# config.mailer = "Devise::Mailer"
|
@@ -15,48 +16,72 @@ Devise.setup do |config|
|
|
15
16
|
require 'devise/orm/mongo_mapper'
|
16
17
|
|
17
18
|
# ==> Configuration for any authentication mechanism
|
18
|
-
# Configure which keys are used when authenticating
|
19
|
+
# Configure which keys are used when authenticating a user. The default is
|
19
20
|
# just :email. You can configure it to use [:username, :subdomain], so for
|
20
|
-
# authenticating
|
21
|
+
# authenticating a user, both parameters are required. Remember that those
|
21
22
|
# parameters are used only when authenticating and not when retrieving from
|
22
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.
|
23
26
|
# config.authentication_keys = [ :email ]
|
24
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
|
+
|
25
45
|
# Tell if authentication through request.params is enabled. True by default.
|
26
46
|
# config.params_authenticatable = true
|
27
47
|
|
28
48
|
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
29
49
|
# config.http_authenticatable = false
|
30
50
|
|
31
|
-
#
|
51
|
+
# If http headers should be returned for AJAX requests. True by default.
|
32
52
|
# config.http_authenticatable_on_xhr = true
|
33
53
|
|
34
|
-
# The realm used in Http Basic Authentication
|
54
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
35
55
|
# config.http_authentication_realm = "Application"
|
36
56
|
|
57
|
+
# It will change confirmation, password recovery and other workflows
|
58
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
59
|
+
# Does not affect registerable.
|
60
|
+
# config.paranoid = true
|
61
|
+
|
37
62
|
# ==> Configuration for :database_authenticatable
|
38
63
|
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
39
64
|
# using other encryptors, it sets how many times you want the password re-encrypted.
|
40
|
-
|
41
|
-
|
42
|
-
#
|
43
|
-
#
|
44
|
-
|
45
|
-
# (then you should set stretches to 10, and copy REST_AUTH_SITE_KEY to pepper)
|
46
|
-
config.encryptor = :bcrypt
|
65
|
+
#
|
66
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
67
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
68
|
+
# a value less than 10 in other environments.
|
69
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
47
70
|
|
48
71
|
# Setup a pepper to generate the encrypted password.
|
49
|
-
config.pepper = <%=
|
72
|
+
# config.pepper = <%= SecureRandom.hex(64).inspect %>
|
50
73
|
|
51
74
|
# ==> Configuration for :confirmable
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
# (ie 2 days).
|
75
|
+
# A period that the user is allowed to access the website even without
|
76
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
77
|
+
# able to access the website for two days without confirming his account,
|
78
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
79
|
+
# the user cannot access the website without confirming his account.
|
58
80
|
# config.confirm_within = 2.days
|
59
81
|
|
82
|
+
# Defines which key will be used when confirming an account
|
83
|
+
# config.confirmation_keys = [ :email ]
|
84
|
+
|
60
85
|
# ==> Configuration for :rememberable
|
61
86
|
# The time the user will be remembered without asking for credentials again.
|
62
87
|
# config.remember_for = 2.weeks
|
@@ -67,17 +92,27 @@ Devise.setup do |config|
|
|
67
92
|
# If true, extends the user's remember period when remembered via cookie.
|
68
93
|
# config.extend_remember_period = false
|
69
94
|
|
95
|
+
# If true, uses the password salt as remember token. This should be turned
|
96
|
+
# to false if you are not using database authenticatable.
|
97
|
+
config.use_salt_as_remember_token = true
|
98
|
+
|
99
|
+
# Options to be passed to the created cookie. For instance, you can set
|
100
|
+
# :secure => true in order to force SSL only cookies.
|
101
|
+
# config.cookie_options = {}
|
102
|
+
|
70
103
|
# ==> Configuration for :validatable
|
71
|
-
# Range for password length
|
72
|
-
# config.password_length = 6..
|
104
|
+
# Range for password length. Default is 6..128.
|
105
|
+
# config.password_length = 6..128
|
73
106
|
|
74
|
-
#
|
75
|
-
#
|
107
|
+
# Email regex used to validate email formats. It simply asserts that
|
108
|
+
# an one (and only one) @ exists in the given string. This is mainly
|
109
|
+
# to give user feedback and not to assert the e-mail validity.
|
110
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
76
111
|
|
77
112
|
# ==> Configuration for :timeoutable
|
78
113
|
# The time you want to timeout the user session without activity. After this
|
79
|
-
# time the user will be asked for credentials again.
|
80
|
-
# config.timeout_in =
|
114
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
115
|
+
# config.timeout_in = 30.minutes
|
81
116
|
|
82
117
|
# ==> Configuration for :lockable
|
83
118
|
# Defines which strategy will be used to lock an account.
|
@@ -85,6 +120,9 @@ Devise.setup do |config|
|
|
85
120
|
# :none = No lock strategy. You should handle locking by yourself.
|
86
121
|
# config.lock_strategy = :failed_attempts
|
87
122
|
|
123
|
+
# Defines which key will be used when locking and unlocking an account
|
124
|
+
# config.unlock_keys = [ :email ]
|
125
|
+
|
88
126
|
# Defines which strategy will be used to unlock an account.
|
89
127
|
# :email = Sends an unlock link to the user email
|
90
128
|
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
@@ -99,45 +137,74 @@ Devise.setup do |config|
|
|
99
137
|
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
100
138
|
# config.unlock_in = 1.hour
|
101
139
|
|
140
|
+
# ==> Configuration for :recoverable
|
141
|
+
#
|
142
|
+
# Defines which key will be used when recovering the password for an account
|
143
|
+
# config.reset_password_keys = [ :email ]
|
144
|
+
|
145
|
+
# Time interval you can reset your password with a reset password key.
|
146
|
+
# Don't put a too small interval or your users won't have the time to
|
147
|
+
# change their passwords.
|
148
|
+
config.reset_password_within = 2.hours
|
149
|
+
|
150
|
+
# ==> Configuration for :encryptable
|
151
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
152
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
153
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
154
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
155
|
+
# REST_AUTH_SITE_KEY to pepper)
|
156
|
+
# config.encryptor = :sha512
|
157
|
+
|
102
158
|
# ==> Configuration for :token_authenticatable
|
103
159
|
# Defines name of the authentication token params key
|
104
160
|
# config.token_authentication_key = :auth_token
|
105
161
|
|
162
|
+
# If true, authentication through token does not store user in session and needs
|
163
|
+
# to be supplied on each request. Useful if you are using the token as API token.
|
164
|
+
# config.stateless_token = false
|
165
|
+
|
106
166
|
# ==> Scopes configuration
|
107
167
|
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
108
168
|
# "users/sessions/new". It's turned off by default because it's slower if you
|
109
169
|
# are using only default views.
|
110
|
-
# config.scoped_views =
|
170
|
+
# config.scoped_views = false
|
111
171
|
|
112
172
|
# Configure the default scope given to Warden. By default it's the first
|
113
|
-
# devise role declared in your routes.
|
173
|
+
# devise role declared in your routes (usually :user).
|
114
174
|
# config.default_scope = :user
|
115
175
|
|
116
176
|
# Configure sign_out behavior.
|
117
|
-
#
|
118
|
-
#
|
119
|
-
# config.sign_out_all_scopes =
|
177
|
+
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
|
178
|
+
# The default is true, which means any logout action will sign out all active scopes.
|
179
|
+
# config.sign_out_all_scopes = true
|
120
180
|
|
121
181
|
# ==> Navigation configuration
|
122
182
|
# Lists the formats that should be treated as navigational. Formats like
|
123
183
|
# :html, should redirect to the sign in page when the user does not have
|
124
184
|
# access, but formats like :xml or :json, should return 401.
|
185
|
+
#
|
125
186
|
# If you have any extra navigational formats, like :iphone or :mobile, you
|
126
|
-
# should add them to the navigational formats lists.
|
127
|
-
#
|
187
|
+
# should add them to the navigational formats lists.
|
188
|
+
#
|
189
|
+
# The :"*/*" and "*/*" formats below is required to match Internet
|
190
|
+
# Explorer requests.
|
191
|
+
# config.navigational_formats = [:"*/*", "*/*", :html]
|
192
|
+
|
193
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
194
|
+
config.sign_out_via = :delete
|
195
|
+
|
196
|
+
# ==> OmniAuth
|
197
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
198
|
+
# up on your models and hooks.
|
199
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
128
200
|
|
129
201
|
# ==> Warden configuration
|
130
|
-
# If you want to use other strategies, that are not
|
131
|
-
# you can configure them inside the config.warden block.
|
132
|
-
# allows you to setup OAuth, using http://github.com/roman/warden_oauth
|
202
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
203
|
+
# change the failure app, you can configure them inside the config.warden block.
|
133
204
|
#
|
134
205
|
# config.warden do |manager|
|
135
|
-
# manager.
|
136
|
-
#
|
137
|
-
#
|
138
|
-
# twitter.options :site => 'http://twitter.com'
|
139
|
-
# end
|
140
|
-
# manager.default_strategies(:scope => :user).unshift :twitter_oauth
|
206
|
+
# manager.failure_app = AnotherApp
|
207
|
+
# manager.intercept_401 = false
|
208
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
141
209
|
# end
|
142
210
|
end
|
143
|
-
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Set the slots and which can be placed in them
|
2
|
+
#Noodall::Node.slot :large, GeneralContent
|
3
|
+
|
4
|
+
# Reset global update time on startup
|
5
|
+
Noodall::GlobalUpdateTime::Stamp.update!
|
6
|
+
|
7
|
+
## Set the Root template classes
|
8
|
+
#<%= app_const %>.config.before_eager_load do
|
9
|
+
#Noodall::Node.root_templates ArticleList
|
10
|
+
#end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
<%= app_const %>.config.session_store :cookie_store, :key
|
3
|
+
<%= app_const %>.config.session_store :cookie_store, <%= key_value :key, "'_#{app_name}_session'" %>
|
4
4
|
|
5
5
|
# Use the database for sessions instead of the cookie-based default,
|
6
6
|
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
8
|
# <%= app_const %>.config.session_store :active_record_store
|
@@ -0,0 +1,16 @@
|
|
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 <%= key_value :format, "[:json]" %>
|
9
|
+
end
|
10
|
+
|
11
|
+
<%- unless options.skip_active_record? -%>
|
12
|
+
# Disable root element in JSON by default.
|
13
|
+
ActiveSupport.on_load(:active_record) do
|
14
|
+
self.include_root_in_json = false
|
15
|
+
end
|
16
|
+
<%- end -%>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
-
# See
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
3
|
|
4
4
|
en:
|
5
5
|
hello: "Hello world"
|
@@ -1,8 +1,15 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
.
|
6
|
-
.livereload
|
7
|
-
.sass-cache/*
|
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
|
8
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/lib/noodall/version.rb
CHANGED
data/noodall.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.description = "Noodall meta-gem that depends on the other components. UI and Core data objects."
|
13
13
|
|
14
14
|
s.required_rubygems_version = ">= 1.3.6"
|
15
|
-
s.add_dependency 'rails', "
|
15
|
+
s.add_dependency 'rails', "~> 3.1.1"
|
16
16
|
s.add_dependency 'noodall-core', ">= 0"
|
17
17
|
s.add_dependency 'noodall-ui', ">= 0"
|
18
18
|
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noodall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0.pre.1
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Steve England
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-10-27 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
|
-
requirement: &
|
17
|
+
requirement: &8906900 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.1.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *8906900
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: noodall-core
|
28
|
-
requirement: &
|
28
|
+
requirement: &8906440 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *8906440
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: noodall-ui
|
39
|
-
requirement: &
|
39
|
+
requirement: &8905940 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *8905940
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: bundler
|
50
|
-
requirement: &
|
50
|
+
requirement: &8905460 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: 1.0.0
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *8905460
|
59
59
|
description: Noodall meta-gem that depends on the other components. UI and Core data
|
60
60
|
objects.
|
61
61
|
email:
|
@@ -75,6 +75,9 @@ files:
|
|
75
75
|
- lib/noodall/templates/Gemfile
|
76
76
|
- lib/noodall/templates/README
|
77
77
|
- lib/noodall/templates/Rakefile
|
78
|
+
- lib/noodall/templates/app/assets/images/rails.png
|
79
|
+
- lib/noodall/templates/app/assets/javascripts/application.js.tt
|
80
|
+
- lib/noodall/templates/app/assets/stylesheets/application.css
|
78
81
|
- lib/noodall/templates/app/controllers/application_controller.rb
|
79
82
|
- lib/noodall/templates/app/helpers/application_helper.rb
|
80
83
|
- lib/noodall/templates/app/mailers/.empty_directory
|
@@ -90,17 +93,17 @@ files:
|
|
90
93
|
- lib/noodall/templates/config/environment.rb
|
91
94
|
- lib/noodall/templates/config/environments/development.rb.tt
|
92
95
|
- lib/noodall/templates/config/environments/production.rb.tt
|
93
|
-
- lib/noodall/templates/config/environments/staging.rb.tt
|
94
96
|
- lib/noodall/templates/config/environments/test.rb.tt
|
95
97
|
- lib/noodall/templates/config/initializers/backtrace_silencers.rb
|
96
98
|
- lib/noodall/templates/config/initializers/devise.rb.tt
|
97
99
|
- lib/noodall/templates/config/initializers/inflections.rb
|
98
100
|
- lib/noodall/templates/config/initializers/mime_types.rb
|
99
101
|
- lib/noodall/templates/config/initializers/mongo_mapper.rb
|
100
|
-
- lib/noodall/templates/config/initializers/noodall.rb
|
102
|
+
- lib/noodall/templates/config/initializers/noodall.rb.tt
|
101
103
|
- lib/noodall/templates/config/initializers/noodall_dragonfly.rb
|
102
104
|
- lib/noodall/templates/config/initializers/secret_token.rb.tt
|
103
105
|
- lib/noodall/templates/config/initializers/session_store.rb.tt
|
106
|
+
- lib/noodall/templates/config/initializers/wrap_parameters.rb.tt
|
104
107
|
- lib/noodall/templates/config/locales/devise.en.yml
|
105
108
|
- lib/noodall/templates/config/locales/en.yml
|
106
109
|
- lib/noodall/templates/config/routes.rb
|
@@ -1,50 +0,0 @@
|
|
1
|
-
<%= app_const %>.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/environment.rb
|
3
|
-
|
4
|
-
# The production environment is meant for finished, "live" apps.
|
5
|
-
# Code is not reloaded between requests
|
6
|
-
config.cache_classes = true
|
7
|
-
|
8
|
-
# Full error reports are disabled and caching is turned on
|
9
|
-
config.consider_all_requests_local = true
|
10
|
-
config.action_controller.perform_caching = true
|
11
|
-
|
12
|
-
# Specifies the header that your server uses for sending files
|
13
|
-
config.action_dispatch.x_sendfile_header = "X-Sendfile"
|
14
|
-
|
15
|
-
# For nginx:
|
16
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
|
17
|
-
|
18
|
-
# If you have no front-end server that supports something like X-Sendfile,
|
19
|
-
# just comment this out and Rails will serve the files
|
20
|
-
|
21
|
-
# See everything in the log (default is :info)
|
22
|
-
# config.log_level = :debug
|
23
|
-
|
24
|
-
# Use a different logger for distributed setups
|
25
|
-
# config.logger = SyslogLogger.new
|
26
|
-
|
27
|
-
# Use a different cache store in production
|
28
|
-
# config.cache_store = :mem_cache_store
|
29
|
-
|
30
|
-
# Disable Rails's static asset server
|
31
|
-
# In production, Apache or nginx will already do this
|
32
|
-
config.serve_static_assets = false
|
33
|
-
|
34
|
-
# Enable serving of images, stylesheets, and javascripts from an asset server
|
35
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
36
|
-
|
37
|
-
# Disable delivery errors, bad email addresses will be ignored
|
38
|
-
# config.action_mailer.raise_delivery_errors = false
|
39
|
-
config.action_mailer.default_url_options = { :host => 'www.<%= app_name %>.com' }
|
40
|
-
|
41
|
-
# Enable threaded mode
|
42
|
-
# config.threadsafe!
|
43
|
-
|
44
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
45
|
-
# the I18n.default_locale when a translation can not be found)
|
46
|
-
config.i18n.fallbacks = true
|
47
|
-
|
48
|
-
# Send deprecation notices to registered listeners
|
49
|
-
config.active_support.deprecation = :notify
|
50
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Set the slots that are avaiable to put components in
|
2
|
-
Noodall::Node.slots :main, :large, :small
|
3
|
-
|
4
|
-
# Set the mongo collection name for nodes
|
5
|
-
Noodall::Node.set_collection_name 'nodes'
|
6
|
-
|
7
|
-
# Reset global update time on startup
|
8
|
-
Noodall::GlobalUpdateTime::Stamp.update!
|