batman-rails 0.16.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/batman-rails/version.rb +1 -1
- data/lib/generators/batman/app_generator.rb +1 -1
- data/lib/templates/rails/controller.rb +1 -1
- data/test/define_view_helper_test.rb +1 -1
- data/test/sample/.gitignore +16 -5
- data/test/sample/Gemfile +30 -20
- data/test/sample/README.rdoc +28 -0
- data/test/sample/Rakefile +1 -2
- data/test/sample/app/{mailers/.gitkeep → assets/images/.keep} +0 -0
- data/test/sample/app/assets/javascripts/application.js +11 -4
- data/test/sample/app/assets/stylesheets/application.css +13 -5
- data/test/sample/app/controllers/application_controller.rb +3 -1
- data/test/sample/app/{models/.gitkeep → controllers/concerns/.keep} +0 -0
- data/test/sample/{lib/assets/.gitkeep → app/mailers/.keep} +0 -0
- data/test/sample/{lib/tasks/.gitkeep → app/models/.keep} +0 -0
- data/test/sample/{log/.gitkeep → app/models/concerns/.keep} +0 -0
- data/test/sample/app/views/layouts/application.html.erb +2 -2
- data/test/sample/bin/bundle +3 -0
- data/test/sample/bin/rails +8 -0
- data/test/sample/bin/rake +8 -0
- data/test/sample/bin/spring +18 -0
- data/test/sample/config.ru +1 -1
- data/test/sample/config/application.rb +3 -28
- data/test/sample/config/boot.rb +1 -3
- data/test/sample/config/database.yml +8 -8
- data/test/sample/config/environment.rb +3 -3
- data/test/sample/config/environments/development.rb +21 -14
- data/test/sample/config/environments/production.rb +48 -25
- data/test/sample/config/environments/test.rb +18 -21
- data/test/sample/config/initializers/cookies_serializer.rb +3 -0
- data/test/sample/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/sample/config/initializers/inflections.rb +9 -3
- data/test/sample/config/initializers/mime_types.rb +0 -1
- data/test/sample/config/initializers/session_store.rb +1 -6
- data/test/sample/config/initializers/wrap_parameters.rb +6 -6
- data/test/sample/config/locales/en.yml +20 -2
- data/test/sample/config/routes.rb +23 -25
- data/test/sample/config/secrets.yml +22 -0
- data/test/sample/db/seeds.rb +2 -2
- data/test/sample/{test/fixtures/.gitkeep → lib/assets/.keep} +0 -0
- data/test/sample/{test/functional/.gitkeep → lib/tasks/.keep} +0 -0
- data/test/sample/{test/integration/.gitkeep → log/.keep} +0 -0
- data/test/sample/public/404.html +54 -13
- data/test/sample/public/422.html +54 -13
- data/test/sample/public/500.html +53 -13
- data/test/sample/public/robots.txt +2 -2
- data/test/sample/test/{unit/.gitkeep → controllers/.keep} +0 -0
- data/test/sample/{vendor/assets/stylesheets/.gitkeep → test/fixtures/.keep} +0 -0
- data/test/sample/{vendor/plugins/.gitkeep → test/helpers/.keep} +0 -0
- data/test/sample/test/integration/.keep +0 -0
- data/test/sample/test/mailers/.keep +0 -0
- data/test/sample/test/models/.keep +0 -0
- data/test/sample/test/test_helper.rb +2 -2
- data/test/sample/vendor/assets/javascripts/.keep +0 -0
- data/test/sample/vendor/assets/stylesheets/.keep +0 -0
- metadata +64 -52
- data/test/sample/README +0 -261
- data/test/sample/app/assets/images/rails.png +0 -0
- data/test/sample/config/initializers/secret_token.rb +0 -7
- data/test/sample/doc/README_FOR_APP +0 -2
- data/test/sample/public/index.html +0 -241
- data/test/sample/script/rails +0 -6
- data/test/sample/test/performance/browsing_test.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d95974e3e6ae159f3b780ca698ea0473346a0b0
|
4
|
+
data.tar.gz: 5ab81ea8164ea4a6738d6a3c492d603ea848b1b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 774f27302a95f49b0fd2f2b66154d3d337651b01537f9f908c1626dc306987158adc4a43e4dec4c8a94356e3411ee6817238d56dc38feac0820bd56b3f274a19
|
7
|
+
data.tar.gz: 158bd2974c5803f1003ecd7ebb88c2f12b1472a87ff3494cc6d55f8d9099dff51d951e6e5356daea0012b7b2d6a0b39823d70d9068ea9a719a98becb20f37bd5
|
data/.gitignore
CHANGED
data/lib/batman-rails/version.rb
CHANGED
@@ -23,7 +23,7 @@ module Batman
|
|
23
23
|
template "rails/layout.html", "app/views/layouts/#{app_name}.html.erb"
|
24
24
|
|
25
25
|
unless ENV["RAILS_ENV"] == "test"
|
26
|
-
inject_into_file "config/routes.rb", :after => "
|
26
|
+
inject_into_file "config/routes.rb", :after => "Rails.application.routes.draw do\n" do
|
27
27
|
route_catchall
|
28
28
|
end
|
29
29
|
|
@@ -6,7 +6,7 @@ class <%= js_app_name %>Controller < ApplicationController
|
|
6
6
|
path = request.path[prefix_length..-1]
|
7
7
|
render :text => Rails.application.assets[path]
|
8
8
|
else
|
9
|
-
render
|
9
|
+
render file: 'layouts/<%= app_name %>', layout: false
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -11,7 +11,7 @@ class DefineViewHelperTest < ActionView::TestCase
|
|
11
11
|
end
|
12
12
|
|
13
13
|
test "it can be given override path" do
|
14
|
-
File.expects(:join).with("app/assets/batman/templates
|
14
|
+
File.expects(:join).with("app/assets/batman/templates", "**/*").returns("app/assets/batman/templates/**/*")
|
15
15
|
batman_define_views(path_to_html: "app/assets/batman/templates")
|
16
16
|
end
|
17
17
|
|
data/test/sample/.gitignore
CHANGED
@@ -1,5 +1,16 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
.
|
1
|
+
# See https://help.github.com/articles/ignoring-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
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*.log
|
16
|
+
/tmp
|
data/test/sample/Gemfile
CHANGED
@@ -1,30 +1,40 @@
|
|
1
|
-
source '
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'rails', '3.1.0'
|
4
|
-
|
5
|
-
# Bundle edge Rails instead:
|
6
|
-
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
7
3
|
|
4
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
5
|
+
gem 'rails', '4.1.1'
|
6
|
+
# Use sqlite3 as the database for Active Record
|
8
7
|
gem 'sqlite3'
|
8
|
+
# Use SCSS for stylesheets
|
9
|
+
gem 'sass-rails', '~> 4.0.3'
|
10
|
+
# Use Uglifier as compressor for JavaScript assets
|
11
|
+
gem 'uglifier', '>= 1.3.0'
|
12
|
+
# Use CoffeeScript for .js.coffee assets and views
|
13
|
+
gem 'coffee-rails', '~> 4.0.0'
|
14
|
+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
15
|
+
# gem 'therubyracer', platforms: :ruby
|
16
|
+
|
17
|
+
# Use jquery as the JavaScript library
|
18
|
+
gem 'jquery-rails'
|
19
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
20
|
+
gem 'turbolinks'
|
21
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
22
|
+
gem 'jbuilder', '~> 2.0'
|
23
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
24
|
+
gem 'sdoc', '~> 0.4.0', group: :doc
|
9
25
|
|
10
|
-
|
11
|
-
|
12
|
-
# Gems used only for assets and not required
|
13
|
-
# in production environments by default.
|
14
|
-
group :assets do
|
15
|
-
gem 'sass-rails', " ~> 3.1.0"
|
16
|
-
gem 'coffee-rails', "~> 3.1.0"
|
17
|
-
gem 'uglifier'
|
18
|
-
end
|
26
|
+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
27
|
+
gem 'spring', group: :development
|
19
28
|
|
20
|
-
|
29
|
+
# Use ActiveModel has_secure_password
|
30
|
+
# gem 'bcrypt', '~> 3.1.7'
|
21
31
|
|
22
|
-
# Use unicorn as the
|
32
|
+
# Use unicorn as the app server
|
23
33
|
# gem 'unicorn'
|
24
34
|
|
25
|
-
#
|
26
|
-
# gem 'capistrano'
|
35
|
+
# Use Capistrano for deployment
|
36
|
+
# gem 'capistrano-rails', group: :development
|
27
37
|
|
28
|
-
#
|
29
|
-
# gem '
|
38
|
+
# Use debugger
|
39
|
+
# gem 'debugger', group: [:development, :test]
|
30
40
|
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/sample/Rakefile
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
3
|
|
5
4
|
require File.expand_path('../config/application', __FILE__)
|
6
5
|
|
7
|
-
|
6
|
+
Rails.application.load_tasks
|
File without changes
|
@@ -1,9 +1,16 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into
|
2
|
-
//
|
3
|
-
//
|
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
|
+
//
|
4
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
-
//
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
6
12
|
//
|
7
13
|
//= require jquery
|
8
14
|
//= require jquery_ujs
|
15
|
+
//= require turbolinks
|
9
16
|
//= require_tree .
|
@@ -1,7 +1,15 @@
|
|
1
1
|
/*
|
2
|
-
* This is a manifest file that'll
|
3
|
-
*
|
4
|
-
*
|
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 bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
5
14
|
*= require_self
|
6
|
-
|
7
|
-
*/
|
15
|
+
*/
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>Sample</title>
|
5
|
-
<%= stylesheet_link_tag
|
6
|
-
<%= javascript_include_tag
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
7
|
<%= csrf_meta_tags %>
|
8
8
|
</head>
|
9
9
|
<body>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# This file loads spring without using Bundler, in order to be fast
|
4
|
+
# It gets overwritten when you run the `spring binstub` command
|
5
|
+
|
6
|
+
unless defined?(Spring)
|
7
|
+
require "rubygems"
|
8
|
+
require "bundler"
|
9
|
+
|
10
|
+
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
|
11
|
+
ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
|
12
|
+
ENV["GEM_HOME"] = ""
|
13
|
+
Gem.paths = ENV
|
14
|
+
|
15
|
+
gem "spring", match[1]
|
16
|
+
require "spring/binstub"
|
17
|
+
end
|
18
|
+
end
|
data/test/sample/config.ru
CHANGED
@@ -2,12 +2,9 @@ require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
# If you want your assets lazily compiled in production, use this line
|
9
|
-
# Bundler.require(:default, :assets, Rails.env)
|
10
|
-
end
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(*Rails.groups)
|
11
8
|
|
12
9
|
module Sample
|
13
10
|
class Application < Rails::Application
|
@@ -15,16 +12,6 @@ module Sample
|
|
15
12
|
# Application configuration should go into files in config/initializers
|
16
13
|
# -- all .rb files in that directory are automatically loaded.
|
17
14
|
|
18
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
19
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
20
|
-
|
21
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
22
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
23
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
24
|
-
|
25
|
-
# Activate observers that should always be running.
|
26
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
27
|
-
|
28
15
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
29
16
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
30
17
|
# config.time_zone = 'Central Time (US & Canada)'
|
@@ -32,17 +19,5 @@ module Sample
|
|
32
19
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
33
20
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
34
21
|
# config.i18n.default_locale = :de
|
35
|
-
|
36
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
-
config.encoding = "utf-8"
|
38
|
-
|
39
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
-
config.filter_parameters += [:password]
|
41
|
-
|
42
|
-
# Enable the asset pipeline
|
43
|
-
config.assets.enabled = true
|
44
|
-
|
45
|
-
# Version of your assets, change this if you want to expire all your assets
|
46
|
-
config.assets.version = '1.0'
|
47
22
|
end
|
48
23
|
end
|
data/test/sample/config/boot.rb
CHANGED
@@ -3,23 +3,23 @@
|
|
3
3
|
#
|
4
4
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
5
|
# gem 'sqlite3'
|
6
|
-
|
6
|
+
#
|
7
|
+
default: &default
|
7
8
|
adapter: sqlite3
|
8
|
-
database: db/development.sqlite3
|
9
9
|
pool: 5
|
10
10
|
timeout: 5000
|
11
11
|
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
12
16
|
# Warning: The database defined as "test" will be erased and
|
13
17
|
# re-generated from your development database when you run "rake".
|
14
18
|
# Do not set this db to the same as development or production.
|
15
19
|
test:
|
16
|
-
|
20
|
+
<<: *default
|
17
21
|
database: db/test.sqlite3
|
18
|
-
pool: 5
|
19
|
-
timeout: 5000
|
20
22
|
|
21
23
|
production:
|
22
|
-
|
24
|
+
<<: *default
|
23
25
|
database: db/production.sqlite3
|
24
|
-
pool: 5
|
25
|
-
timeout: 5000
|
@@ -1,30 +1,37 @@
|
|
1
|
-
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
1
|
+
Rails.application.configure do
|
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.
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
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
|
-
#
|
10
|
-
config.
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
11
|
|
12
|
-
# Show full error reports and disable caching
|
12
|
+
# Show full error reports and disable caching.
|
13
13
|
config.consider_all_requests_local = true
|
14
14
|
config.action_controller.perform_caching = false
|
15
15
|
|
16
|
-
# Don't care if the mailer can't send
|
16
|
+
# Don't care if the mailer can't send.
|
17
17
|
config.action_mailer.raise_delivery_errors = false
|
18
18
|
|
19
|
-
# Print deprecation notices to the Rails logger
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
20
|
config.active_support.deprecation = :log
|
21
21
|
|
22
|
-
#
|
23
|
-
config.
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
24
|
|
25
|
-
#
|
26
|
-
|
27
|
-
|
28
|
-
# Expands the lines which load the assets
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
29
28
|
config.assets.debug = true
|
29
|
+
|
30
|
+
# Adds additional error checking when serving assets at runtime.
|
31
|
+
# Checks for improperly declared sprockets dependencies.
|
32
|
+
# Raises helpful error messages.
|
33
|
+
config.assets.raise_runtime_errors = true
|
34
|
+
|
35
|
+
# Raises error for missing translations
|
36
|
+
# config.action_view.raise_on_missing_translations = true
|
30
37
|
end
|