Skip to content

Commit

Permalink
dummy app
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Sep 9, 2013
1 parent 08e0c86 commit 2044892
Show file tree
Hide file tree
Showing 44 changed files with 3,727 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Gemfile.lock
/vendor/cache
/vendor/bundle
tmp/
test/screenshots/
7 changes: 7 additions & 0 deletions bootstrap-sass.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ Gem::Specification.new do |s|
s.add_development_dependency 'sass-rails', '>= 3.2'
s.add_runtime_dependency 'sass', '~> 3.2'


s.add_development_dependency 'capybara'
s.add_development_dependency 'poltergeist'
s.add_development_dependency 'tzinfo'
s.add_development_dependency 'jquery-rails'
s.add_development_dependency 'slim-rails'

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- test/*`.split("\n")
end
3 changes: 3 additions & 0 deletions test/dummy/README.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
== README

This is a dummy app for testing REP
6 changes: 6 additions & 0 deletions test/dummy/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

Dummy::Application.load_tasks
Empty file.
2 changes: 2 additions & 0 deletions test/dummy/app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//= require jquery
//= require bootstrap
1 change: 1 addition & 0 deletions test/dummy/app/assets/stylesheets/application.css.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "bootstrap"
5 changes: 5 additions & 0 deletions test/dummy/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
end
4 changes: 4 additions & 0 deletions test/dummy/app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class PagesController < ApplicationController
def root
end
end
2 changes: 2 additions & 0 deletions test/dummy/app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ApplicationHelper
end
14 changes: 14 additions & 0 deletions test/dummy/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<title>bootstrap-sass Dummy App</title>
<%= stylesheet_link_tag 'application', media: "all", 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>

<body>
<%= yield %>
</body>

</html>
11 changes: 11 additions & 0 deletions test/dummy/app/views/pages/root.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.container
.panel.panel-primary
h1 Dummy App
.row
.col-sm-6
ul.list-group
li.list-group-item: a href='#one' One
li.list-group-item: a href='#two' Two
li.list-group-item: a href='#three' Three
.col-sm-6
button.btn.btn-primary type='button' Button
3 changes: 3 additions & 0 deletions test/dummy/bin/bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
4 changes: 4 additions & 0 deletions test/dummy/bin/rails
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
4 changes: 4 additions & 0 deletions test/dummy/bin/rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run
4 changes: 4 additions & 0 deletions test/dummy/config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
17 changes: 17 additions & 0 deletions test/dummy/config/application.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require File.expand_path('../boot', __FILE__)

require 'action_controller/railtie'
require 'sprockets/railtie'

Bundler.require(*Rails.groups)
require 'sass-rails'
require 'jquery-rails'
require 'slim-rails'
require 'bootstrap-sass'

module Dummy
class Application < Rails::Application
config.assets.enabled = true if config.assets.respond_to?(:enabled)
end
end

5 changes: 5 additions & 0 deletions test/dummy/config/boot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)

require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
5 changes: 5 additions & 0 deletions test/dummy/config/environment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Load the Rails application.
require File.expand_path('../application', __FILE__)

# Initialize the Rails application.
Dummy::Application.initialize!
26 changes: 26 additions & 0 deletions test/dummy/config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false

# Do not eager load code on boot.
config.eager_load = false

# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
end
76 changes: 76 additions & 0 deletions test/dummy/config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# Code is not reloaded between requests.
config.cache_classes = true

# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true

# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true

# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# config.action_dispatch.rack_cache = true

# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = false

# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false

# Generate digests for assets URLs.
config.assets.digest = true

# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'

# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true

# Set to :debug to see everything in the log.
config.log_level = :info

# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]

# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

# Use a different cache store in production.
# config.cache_store = :mem_cache_store

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
config.i18n.fallbacks = true

# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify

# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false

# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
end
30 changes: 30 additions & 0 deletions test/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true

# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false

# Configure static asset server for tests with Cache-Control for performance.
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"

# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false

config.active_support.deprecation = :stderr
end
7 changes: 7 additions & 0 deletions test/dummy/config/initializers/backtrace_silencers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Be sure to restart your server when you modify this file.

# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }

# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
4 changes: 4 additions & 0 deletions test/dummy/config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Be sure to restart your server when you modify this file.

# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
16 changes: 16 additions & 0 deletions test/dummy/config/initializers/inflections.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Be sure to restart your server when you modify this file.

# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end

# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
# end
5 changes: 5 additions & 0 deletions test/dummy/config/initializers/mime_types.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Be sure to restart your server when you modify this file.

# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
18 changes: 18 additions & 0 deletions test/dummy/config/initializers/secret_token.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Be sure to restart your server when you modify this file.

# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!

# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.

# Make sure your secret_key_base is kept private
# if you're sharing your code publicly.
token = '4380f36fda304251bf48f12ad4474b6d11447f1f959bd5b77a5d56c92b97f4c403ee0ae13d31a85ed88058ff8795bf31ec17e70e5c229b3707a77a2ee7e81cc'

if Dummy::Application.config.respond_to?(:secret_key_base=)
Dummy::Application.config.secret_key_base = token
else
Dummy::Application.config.secret_token = token
end
3 changes: 3 additions & 0 deletions test/dummy/config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Be sure to restart your server when you modify this file.

Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
14 changes: 14 additions & 0 deletions test/dummy/config/initializers/wrap_parameters.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Be sure to restart your server when you modify this file.

# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.

# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
end

# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# end
3 changes: 3 additions & 0 deletions test/dummy/config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
en:
dummy:
hello: Hello
3 changes: 3 additions & 0 deletions test/dummy/config/locales/es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
es:
dummy:
hello: Hola
3 changes: 3 additions & 0 deletions test/dummy/config/routes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Dummy::Application.routes.draw do
root to: 'pages#root'
end
Empty file added test/dummy/db/test.sqlite3
Empty file.
Empty file added test/dummy/lib/assets/.keep
Empty file.
Empty file added test/dummy/log/.keep
Empty file.
Empty file added test/dummy/log/development.log
Empty file.
Loading

0 comments on commit 2044892

Please sign in to comment.