raygun 0.0.34 → 0.9.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGES.md +7 -1
- data/README.md +7 -11
- data/bin/raygun +4 -181
- data/cleanup.sh +1 -6
- data/lib/raygun/raygun.rb +238 -0
- data/lib/raygun/version.rb +1 -1
- metadata +6 -223
- data/TODO.md +0 -16
- data/rails_32/.env +0 -8
- data/rails_32/.gitignore +0 -19
- data/rails_32/.rspec +0 -1
- data/rails_32/.ruby-gemset +0 -1
- data/rails_32/.ruby-version +0 -1
- data/rails_32/Gemfile +0 -54
- data/rails_32/Guardfile +0 -32
- data/rails_32/Procfile +0 -2
- data/rails_32/README.md +0 -69
- data/rails_32/Rakefile +0 -15
- data/rails_32/app/assets/javascripts/application.js +0 -16
- data/rails_32/app/assets/javascripts/users.js.coffee +0 -3
- data/rails_32/app/assets/stylesheets/_footer.less +0 -30
- data/rails_32/app/assets/stylesheets/_navbar.less +0 -5
- data/rails_32/app/assets/stylesheets/application.css.less +0 -3
- data/rails_32/app/controllers/application_controller.rb +0 -15
- data/rails_32/app/controllers/pages_controller.rb +0 -8
- data/rails_32/app/controllers/password_resets_controller.rb +0 -36
- data/rails_32/app/controllers/registrations_controller.rb +0 -29
- data/rails_32/app/controllers/user_sessions_controller.rb +0 -26
- data/rails_32/app/controllers/users_controller.rb +0 -41
- data/rails_32/app/helpers/application_helper.rb +0 -11
- data/rails_32/app/helpers/users_helper.rb +0 -2
- data/rails_32/app/mailers/.gitkeep +0 -0
- data/rails_32/app/mailers/user_mailer.rb +0 -19
- data/rails_32/app/models/.gitkeep +0 -0
- data/rails_32/app/models/ability.rb +0 -40
- data/rails_32/app/models/user.rb +0 -21
- data/rails_32/app/models/user_session.rb +0 -6
- data/rails_32/app/views/layouts/application.html.slim +0 -36
- data/rails_32/app/views/pages/root.html.slim +0 -9
- data/rails_32/app/views/password_resets/edit.html.slim +0 -15
- data/rails_32/app/views/password_resets/new.html.slim +0 -11
- data/rails_32/app/views/registrations/new.html.slim +0 -13
- data/rails_32/app/views/user_mailer/activation_needed_email.html.erb +0 -17
- data/rails_32/app/views/user_mailer/activation_needed_email.text.erb +0 -9
- data/rails_32/app/views/user_mailer/activation_success_email.html.erb +0 -17
- data/rails_32/app/views/user_mailer/activation_success_email.text.erb +0 -9
- data/rails_32/app/views/user_mailer/reset_password_email.html.erb +0 -16
- data/rails_32/app/views/user_mailer/reset_password_email.text.erb +0 -8
- data/rails_32/app/views/user_sessions/new.html.slim +0 -13
- data/rails_32/app/views/users/_form.html.slim +0 -12
- data/rails_32/app/views/users/edit.html.slim +0 -5
- data/rails_32/app/views/users/index.html.slim +0 -26
- data/rails_32/app/views/users/new.html.slim +0 -4
- data/rails_32/app/views/users/show.html.slim +0 -17
- data/rails_32/config/application.rb +0 -77
- data/rails_32/config/boot.rb +0 -6
- data/rails_32/config/database.yml +0 -13
- data/rails_32/config/environment.rb +0 -5
- data/rails_32/config/environments/acceptance.rb +0 -69
- data/rails_32/config/environments/development.rb +0 -39
- data/rails_32/config/environments/production.rb +0 -69
- data/rails_32/config/environments/test.rb +0 -42
- data/rails_32/config/initializers/backtrace_silencers.rb +0 -7
- data/rails_32/config/initializers/inflections.rb +0 -15
- data/rails_32/config/initializers/mailcatcher.rb +0 -15
- data/rails_32/config/initializers/mime_types.rb +0 -5
- data/rails_32/config/initializers/secret_token.rb +0 -7
- data/rails_32/config/initializers/session_store.rb +0 -8
- data/rails_32/config/initializers/simple_form.rb +0 -142
- data/rails_32/config/initializers/simple_form_bootstrap.rb +0 -45
- data/rails_32/config/initializers/sorcery.rb +0 -398
- data/rails_32/config/initializers/wrap_parameters.rb +0 -14
- data/rails_32/config/locales/en.yml +0 -5
- data/rails_32/config/locales/simple_form.en.yml +0 -26
- data/rails_32/config/routes.rb +0 -21
- data/rails_32/config/unicorn.rb +0 -27
- data/rails_32/config.ru +0 -21
- data/rails_32/db/migrate/20121128215324_sorcery_core.rb +0 -19
- data/rails_32/db/migrate/20121128215325_sorcery_brute_force_protection.rb +0 -13
- data/rails_32/db/migrate/20121128215326_sorcery_activity_logging.rb +0 -17
- data/rails_32/db/migrate/20121128215327_sorcery_user_activation.rb +0 -17
- data/rails_32/db/migrate/20121128215328_sorcery_remember_me.rb +0 -15
- data/rails_32/db/migrate/20121128215329_sorcery_reset_password.rb +0 -17
- data/rails_32/db/migrate/20121128215330_sorcery_external.rb +0 -14
- data/rails_32/db/migrate/20121128215337_add_admin_to_users.rb +0 -5
- data/rails_32/db/sample_data.rb +0 -24
- data/rails_32/db/schema.rb +0 -54
- data/rails_32/db/seeds.rb +0 -7
- data/rails_32/lib/assets/.gitkeep +0 -0
- data/rails_32/lib/tasks/.gitkeep +0 -0
- data/rails_32/lib/tasks/cane.rake +0 -30
- data/rails_32/lib/tasks/coverage.rake +0 -10
- data/rails_32/lib/tasks/db.rake +0 -7
- data/rails_32/lib/tasks/spec.rake +0 -35
- data/rails_32/lib/templates/rails/scaffold_controller/controller.rb +0 -45
- data/rails_32/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
- data/rails_32/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
- data/rails_32/lib/templates/rspec/scaffold/index_spec.rb +0 -26
- data/rails_32/lib/templates/rspec/scaffold/new_spec.rb +0 -18
- data/rails_32/lib/templates/rspec/scaffold/show_spec.rb +0 -16
- data/rails_32/lib/templates/slim/scaffold/_form.html.slim +0 -13
- data/rails_32/lib/templates/slim/scaffold/edit.html.slim +0 -5
- data/rails_32/lib/templates/slim/scaffold/index.html.slim +0 -28
- data/rails_32/lib/templates/slim/scaffold/new.html.slim +0 -4
- data/rails_32/lib/templates/slim/scaffold/show.html.slim +0 -17
- data/rails_32/log/.gitkeep +0 -0
- data/rails_32/public/404.html +0 -26
- data/rails_32/public/422.html +0 -26
- data/rails_32/public/500.html +0 -25
- data/rails_32/public/favicon.ico +0 -0
- data/rails_32/public/robots.txt +0 -5
- data/rails_32/script/rails +0 -6
- data/rails_32/spec/controllers/user_sessions_controller_spec.rb +0 -42
- data/rails_32/spec/controllers/users_controller_spec.rb +0 -150
- data/rails_32/spec/factories/users.rb +0 -14
- data/rails_32/spec/features/activation_spec.rb +0 -18
- data/rails_32/spec/features/password_reset_spec.rb +0 -41
- data/rails_32/spec/features/registration_spec.rb +0 -39
- data/rails_32/spec/features/sign_in_spec.rb +0 -30
- data/rails_32/spec/javascripts/example_spec.js.coffee +0 -20
- data/rails_32/spec/javascripts/spec.css +0 -3
- data/rails_32/spec/javascripts/spec.js.coffee +0 -2
- data/rails_32/spec/mailers/user_mailer_spec.rb +0 -48
- data/rails_32/spec/models/ability_spec.rb +0 -38
- data/rails_32/spec/models/user_spec.rb +0 -36
- data/rails_32/spec/spec_helper.rb +0 -64
- data/rails_32/spec/support/accept_values.rb +0 -55
- data/rails_32/spec/support/database_cleaner.rb +0 -24
- data/rails_32/spec/support/factory_girl.rb +0 -3
- data/rails_32/spec/support/sorcery.rb +0 -3
- data/rails_32/spec/support/user_sessions_feature_helper.rb +0 -21
- data/rails_32/spec/views/users/edit.html.slim_spec.rb +0 -16
- data/rails_32/spec/views/users/index.html.slim_spec.rb +0 -16
- data/rails_32/spec/views/users/new.html.slim_spec.rb +0 -16
- data/rails_32/spec/views/users/show.html.slim_spec.rb +0 -13
- data/rails_32/vendor/assets/javascripts/.gitkeep +0 -0
- data/rails_32/vendor/assets/stylesheets/.gitkeep +0 -0
- data/rails_32/vendor/plugins/.gitkeep +0 -0
- data/rails_40/.env +0 -8
- data/rails_40/.gitignore +0 -16
- data/rails_40/.rspec +0 -1
- data/rails_40/.ruby-gemset +0 -1
- data/rails_40/.ruby-version +0 -1
- data/rails_40/Gemfile +0 -53
- data/rails_40/Guardfile +0 -34
- data/rails_40/Procfile +0 -2
- data/rails_40/README.md +0 -90
- data/rails_40/Rakefile +0 -15
- data/rails_40/app/assets/javascripts/application.js +0 -17
- data/rails_40/app/assets/stylesheets/_footer.less +0 -30
- data/rails_40/app/assets/stylesheets/_navbar.less +0 -3
- data/rails_40/app/assets/stylesheets/application.css.less +0 -3
- data/rails_40/app/controllers/application_controller.rb +0 -5
- data/rails_40/app/controllers/concerns/.keep +0 -0
- data/rails_40/app/controllers/pages_controller.rb +0 -6
- data/rails_40/app/helpers/application_helper.rb +0 -11
- data/rails_40/app/mailers/.keep +0 -0
- data/rails_40/app/models/.keep +0 -0
- data/rails_40/app/models/concerns/.keep +0 -0
- data/rails_40/app/views/layouts/application.html.slim +0 -39
- data/rails_40/app/views/pages/root.html.slim +0 -13
- data/rails_40/bin/bundle +0 -3
- data/rails_40/bin/deploy.sh +0 -47
- data/rails_40/bin/rails +0 -4
- data/rails_40/bin/rake +0 -4
- data/rails_40/circle.yml +0 -16
- data/rails_40/config/application.rb +0 -36
- data/rails_40/config/boot.rb +0 -4
- data/rails_40/config/database.yml +0 -15
- data/rails_40/config/environment.rb +0 -5
- data/rails_40/config/environments/acceptance.rb +0 -8
- data/rails_40/config/environments/development.rb +0 -31
- data/rails_40/config/environments/production.rb +0 -82
- data/rails_40/config/environments/test.rb +0 -38
- data/rails_40/config/initializers/backtrace_silencers.rb +0 -7
- data/rails_40/config/initializers/filter_parameter_logging.rb +0 -4
- data/rails_40/config/initializers/inflections.rb +0 -16
- data/rails_40/config/initializers/mailcatcher.rb +0 -15
- data/rails_40/config/initializers/mime_types.rb +0 -5
- data/rails_40/config/initializers/secret_token.rb +0 -12
- data/rails_40/config/initializers/session_store.rb +0 -3
- data/rails_40/config/initializers/simple_form.rb +0 -142
- data/rails_40/config/initializers/simple_form_bootstrap.rb +0 -45
- data/rails_40/config/initializers/wrap_parameters.rb +0 -14
- data/rails_40/config/locales/en.yml +0 -23
- data/rails_40/config/locales/simple_form.en.yml +0 -26
- data/rails_40/config/routes.rb +0 -5
- data/rails_40/config/unicorn.rb +0 -27
- data/rails_40/config.ru +0 -18
- data/rails_40/db/sample_data.rb +0 -11
- data/rails_40/db/schema.rb +0 -19
- data/rails_40/db/seeds.rb +0 -7
- data/rails_40/lib/assets/.keep +0 -0
- data/rails_40/lib/tasks/.keep +0 -0
- data/rails_40/lib/tasks/coverage.rake +0 -10
- data/rails_40/lib/tasks/db.rake +0 -7
- data/rails_40/lib/tasks/spec.rake +0 -60
- data/rails_40/lib/templates/rails/scaffold_controller/controller.rb +0 -61
- data/rails_40/lib/templates/rspec/controller/controller_spec.rb +0 -16
- data/rails_40/lib/templates/rspec/scaffold/controller_spec.rb +0 -155
- data/rails_40/lib/templates/rspec/scaffold/edit_spec.rb +0 -18
- data/rails_40/lib/templates/rspec/scaffold/index_spec.rb +0 -26
- data/rails_40/lib/templates/rspec/scaffold/new_spec.rb +0 -19
- data/rails_40/lib/templates/rspec/scaffold/show_spec.rb +0 -16
- data/rails_40/lib/templates/slim/scaffold/_form.html.slim +0 -13
- data/rails_40/lib/templates/slim/scaffold/edit.html.slim +0 -5
- data/rails_40/lib/templates/slim/scaffold/index.html.slim +0 -29
- data/rails_40/lib/templates/slim/scaffold/new.html.slim +0 -4
- data/rails_40/lib/templates/slim/scaffold/show.html.slim +0 -17
- data/rails_40/log/.keep +0 -0
- data/rails_40/public/404.html +0 -58
- data/rails_40/public/422.html +0 -58
- data/rails_40/public/500.html +0 -57
- data/rails_40/public/favicon.ico +0 -0
- data/rails_40/public/robots.txt +0 -5
- data/rails_40/spec/controllers/pages_controller_spec.rb +0 -12
- data/rails_40/spec/features/pages_spec.rb +0 -18
- data/rails_40/spec/javascripts/example_spec.js.coffee +0 -20
- data/rails_40/spec/javascripts/spec.css +0 -3
- data/rails_40/spec/javascripts/spec.js.coffee +0 -2
- data/rails_40/spec/spec_helper.rb +0 -79
- data/rails_40/spec/support/database_cleaner.rb +0 -24
- data/rails_40/spec/support/factory_girl.rb +0 -3
- data/rails_40/vendor/assets/javascripts/.keep +0 -0
- data/rails_40/vendor/assets/stylesheets/.keep +0 -0
@@ -1,82 +0,0 @@
|
|
1
|
-
AppPrototype::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# Code is not reloaded between requests.
|
5
|
-
config.cache_classes = true
|
6
|
-
|
7
|
-
# Eager load code on boot. This eager loads most of Rails and
|
8
|
-
# your application in memory, allowing both thread web servers
|
9
|
-
# and those relying on copy on write to perform better.
|
10
|
-
# Rake tasks automatically ignore this option for performance.
|
11
|
-
config.eager_load = true
|
12
|
-
|
13
|
-
# Full error reports are disabled and caching is turned on.
|
14
|
-
config.consider_all_requests_local = false
|
15
|
-
config.action_controller.perform_caching = true
|
16
|
-
|
17
|
-
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
-
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
-
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
-
# config.action_dispatch.rack_cache = true
|
21
|
-
|
22
|
-
# When deploying to Heroku, the app must serve static assets (or serve them from a CDN).
|
23
|
-
config.serve_static_assets = true
|
24
|
-
|
25
|
-
# Compress JavaScripts and CSS.
|
26
|
-
config.assets.js_compressor = :uglifier
|
27
|
-
# config.assets.css_compressor = :sass
|
28
|
-
|
29
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
-
config.assets.compile = false
|
31
|
-
|
32
|
-
# Generate digests for assets URLs.
|
33
|
-
config.assets.digest = true
|
34
|
-
|
35
|
-
# Version of your assets, change this if you want to expire all your assets.
|
36
|
-
config.assets.version = '1.0'
|
37
|
-
|
38
|
-
# Specifies the header that your server uses for sending files.
|
39
|
-
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for apache
|
40
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
41
|
-
|
42
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
-
# config.force_ssl = true
|
44
|
-
|
45
|
-
# Set to :debug to see everything in the log.
|
46
|
-
config.log_level = :info
|
47
|
-
|
48
|
-
# Prepend all log lines with the following tags.
|
49
|
-
# config.log_tags = [ :subdomain, :uuid ]
|
50
|
-
|
51
|
-
# Use a different logger for distributed setups.
|
52
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
53
|
-
|
54
|
-
# Use a different cache store in production.
|
55
|
-
# config.cache_store = :mem_cache_store
|
56
|
-
|
57
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
58
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
59
|
-
|
60
|
-
# Precompile additional assets.
|
61
|
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
62
|
-
# config.assets.precompile += %w( search.js )
|
63
|
-
|
64
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
65
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
66
|
-
# config.action_mailer.raise_delivery_errors = false
|
67
|
-
|
68
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
69
|
-
# the I18n.default_locale when a translation can not be found).
|
70
|
-
config.i18n.fallbacks = true
|
71
|
-
|
72
|
-
# Send deprecation notices to registered listeners.
|
73
|
-
config.active_support.deprecation = :notify
|
74
|
-
|
75
|
-
# Disable automatic flushing of the log to improve performance.
|
76
|
-
# config.autoflush_log = false
|
77
|
-
|
78
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
|
-
config.log_formatter = ::Logger::Formatter.new
|
80
|
-
|
81
|
-
config.action_mailer.default_url_options = { host: 'app-prototype.herokuapp.com' }
|
82
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
AppPrototype::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
9
|
-
|
10
|
-
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
-
# just for the purpose of running a single test. If you are using a tool that
|
12
|
-
# preloads Rails for running tests, you may have to set it to true.
|
13
|
-
config.eager_load = false
|
14
|
-
|
15
|
-
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
-
config.serve_static_assets = true
|
17
|
-
config.static_cache_control = "public, max-age=3600"
|
18
|
-
|
19
|
-
# Show full error reports and disable caching.
|
20
|
-
config.consider_all_requests_local = true
|
21
|
-
config.action_controller.perform_caching = false
|
22
|
-
|
23
|
-
# Raise exceptions instead of rendering exception templates.
|
24
|
-
config.action_dispatch.show_exceptions = false
|
25
|
-
|
26
|
-
# Disable request forgery protection in test environment.
|
27
|
-
config.action_controller.allow_forgery_protection = false
|
28
|
-
|
29
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
-
# The :test delivery method accumulates sent emails in the
|
31
|
-
# ActionMailer::Base.deliveries array.
|
32
|
-
config.action_mailer.delivery_method = :test
|
33
|
-
|
34
|
-
# Print deprecation notices to the stderr.
|
35
|
-
config.active_support.deprecation = :stderr
|
36
|
-
|
37
|
-
config.action_mailer.default_url_options = { host: 'example.com' }
|
38
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# http://www.mikeperham.com/2012/12/09/12-gems-of-christmas-4-mailcatcher-and-mail_view/
|
2
|
-
|
3
|
-
mailcatcher_port = 1025
|
4
|
-
|
5
|
-
begin
|
6
|
-
sock = TCPSocket.new('localhost', mailcatcher_port)
|
7
|
-
sock.close
|
8
|
-
mailcatcher = true
|
9
|
-
rescue
|
10
|
-
mailcatcher = false
|
11
|
-
end
|
12
|
-
|
13
|
-
if Rails.env.development? && mailcatcher
|
14
|
-
ActionMailer::Base.smtp_settings = { host: 'localhost', port: mailcatcher_port }
|
15
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure your secret_key_base is kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
AppPrototype::Application.config.secret_key_base = ENV['SECRET_TOKEN'] || 'AWAbYFxfy5SxropZl5yIiNiE2bv3lJ7nLcreGI9p'
|
@@ -1,142 +0,0 @@
|
|
1
|
-
# Use this setup block to configure all options available in SimpleForm.
|
2
|
-
SimpleForm.setup do |config|
|
3
|
-
# Wrappers are used by the form builder to generate a
|
4
|
-
# complete input. You can remove any component from the
|
5
|
-
# wrapper, change the order or even add your own to the
|
6
|
-
# stack. The options given below are used to wrap the
|
7
|
-
# whole input.
|
8
|
-
config.wrappers :default, class: :input,
|
9
|
-
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
10
|
-
## Extensions enabled by default
|
11
|
-
# Any of these extensions can be disabled for a
|
12
|
-
# given input by passing: `f.input EXTENSION_NAME => false`.
|
13
|
-
# You can make any of these extensions optional by
|
14
|
-
# renaming `b.use` to `b.optional`.
|
15
|
-
|
16
|
-
# Determines whether to use HTML5 (:email, :url, ...)
|
17
|
-
# and required attributes
|
18
|
-
b.use :html5
|
19
|
-
|
20
|
-
# Calculates placeholders automatically from I18n
|
21
|
-
# You can also pass a string as f.input placeholder: "Placeholder"
|
22
|
-
b.use :placeholder
|
23
|
-
|
24
|
-
## Optional extensions
|
25
|
-
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
|
26
|
-
# to the input. If so, they will retrieve the values from the model
|
27
|
-
# if any exists. If you want to enable the lookup for any of those
|
28
|
-
# extensions by default, you can change `b.optional` to `b.use`.
|
29
|
-
|
30
|
-
# Calculates maxlength from length validations for string inputs
|
31
|
-
b.optional :maxlength
|
32
|
-
|
33
|
-
# Calculates pattern from format validations for string inputs
|
34
|
-
b.optional :pattern
|
35
|
-
|
36
|
-
# Calculates min and max from length validations for numeric inputs
|
37
|
-
b.optional :min_max
|
38
|
-
|
39
|
-
# Calculates readonly automatically from readonly attributes
|
40
|
-
b.optional :readonly
|
41
|
-
|
42
|
-
## Inputs
|
43
|
-
b.use :label_input
|
44
|
-
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
45
|
-
b.use :error, wrap_with: { tag: :span, class: :error }
|
46
|
-
end
|
47
|
-
|
48
|
-
# The default wrapper to be used by the FormBuilder.
|
49
|
-
config.default_wrapper = :default
|
50
|
-
|
51
|
-
# Define the way to render check boxes / radio buttons with labels.
|
52
|
-
# Defaults to :nested for bootstrap config.
|
53
|
-
# inline: input + label
|
54
|
-
# nested: label > input
|
55
|
-
config.boolean_style = :nested
|
56
|
-
|
57
|
-
# Default class for buttons
|
58
|
-
config.button_class = 'btn'
|
59
|
-
|
60
|
-
# Method used to tidy up errors. Specify any Rails Array method.
|
61
|
-
# :first lists the first message for each field.
|
62
|
-
# Use :to_sentence to list all errors for each field.
|
63
|
-
# config.error_method = :first
|
64
|
-
|
65
|
-
# Default tag used for error notification helper.
|
66
|
-
config.error_notification_tag = :div
|
67
|
-
|
68
|
-
# CSS class to add for error notification helper.
|
69
|
-
config.error_notification_class = 'alert alert-error'
|
70
|
-
|
71
|
-
# ID to add for error notification helper.
|
72
|
-
# config.error_notification_id = nil
|
73
|
-
|
74
|
-
# Series of attempts to detect a default label method for collection.
|
75
|
-
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
76
|
-
|
77
|
-
# Series of attempts to detect a default value method for collection.
|
78
|
-
# config.collection_value_methods = [ :id, :to_s ]
|
79
|
-
|
80
|
-
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
81
|
-
# config.collection_wrapper_tag = nil
|
82
|
-
|
83
|
-
# You can define the class to use on all collection wrappers. Defaulting to none.
|
84
|
-
# config.collection_wrapper_class = nil
|
85
|
-
|
86
|
-
# You can wrap each item in a collection of radio/check boxes with a tag,
|
87
|
-
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
88
|
-
# SimpleForm will force this option to be a label.
|
89
|
-
# config.item_wrapper_tag = :span
|
90
|
-
|
91
|
-
# You can define a class to use in all item wrappers. Defaulting to none.
|
92
|
-
# config.item_wrapper_class = nil
|
93
|
-
|
94
|
-
# How the label text should be generated altogether with the required text.
|
95
|
-
config.label_text = lambda { |label, required| "#{label}" }
|
96
|
-
|
97
|
-
# You can define the class to use on all labels. Default is nil.
|
98
|
-
config.label_class = 'control-label'
|
99
|
-
|
100
|
-
# You can define the class to use on all forms. Default is simple_form.
|
101
|
-
# config.form_class = :simple_form
|
102
|
-
|
103
|
-
# You can define which elements should obtain additional classes
|
104
|
-
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
105
|
-
|
106
|
-
# Whether attributes are required by default (or not). Default is true.
|
107
|
-
# config.required_by_default = true
|
108
|
-
|
109
|
-
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
110
|
-
# These validations are enabled in SimpleForm's internal config but disabled by default
|
111
|
-
# in this configuration, which is recommended due to some quirks from different browsers.
|
112
|
-
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
113
|
-
# change this configuration to true.
|
114
|
-
config.browser_validations = false
|
115
|
-
|
116
|
-
# Collection of methods to detect if a file type was given.
|
117
|
-
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
118
|
-
|
119
|
-
# Custom mappings for input types. This should be a hash containing a regexp
|
120
|
-
# to match as key, and the input type that will be used when the field name
|
121
|
-
# matches the regexp as value.
|
122
|
-
# config.input_mappings = { /count/ => :integer }
|
123
|
-
|
124
|
-
# Custom wrappers for input types. This should be a hash containing an input
|
125
|
-
# type as key and the wrapper that will be used for all inputs with specified type.
|
126
|
-
# config.wrapper_mappings = { string: :prepend }
|
127
|
-
|
128
|
-
# Default priority for time_zone inputs.
|
129
|
-
# config.time_zone_priority = nil
|
130
|
-
|
131
|
-
# Default priority for country inputs.
|
132
|
-
# config.country_priority = nil
|
133
|
-
|
134
|
-
# When false, do not use translations for labels.
|
135
|
-
# config.translate_labels = true
|
136
|
-
|
137
|
-
# Automatically discover new inputs in Rails' autoload path.
|
138
|
-
# config.inputs_discovery = true
|
139
|
-
|
140
|
-
# Cache SimpleForm inputs discovery
|
141
|
-
# config.cache_discovery = !Rails.env.development?
|
142
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# Use this setup block to configure all options available in SimpleForm.
|
2
|
-
SimpleForm.setup do |config|
|
3
|
-
config.wrappers :bootstrap, tag: 'div', class: 'control-group', error_class: 'error' do |b|
|
4
|
-
b.use :html5
|
5
|
-
b.use :placeholder
|
6
|
-
b.use :label
|
7
|
-
b.wrapper tag: 'div', class: 'controls' do |ba|
|
8
|
-
ba.use :input
|
9
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
|
10
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
config.wrappers :prepend, tag: 'div', class: "control-group", error_class: 'error' do |b|
|
15
|
-
b.use :html5
|
16
|
-
b.use :placeholder
|
17
|
-
b.use :label
|
18
|
-
b.wrapper tag: 'div', class: 'controls' do |input|
|
19
|
-
input.wrapper tag: 'div', class: 'input-prepend' do |prepend|
|
20
|
-
prepend.use :input
|
21
|
-
end
|
22
|
-
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
|
23
|
-
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
config.wrappers :append, tag: 'div', class: "control-group", error_class: 'error' do |b|
|
28
|
-
b.use :html5
|
29
|
-
b.use :placeholder
|
30
|
-
b.use :label
|
31
|
-
b.wrapper tag: 'div', class: 'controls' do |input|
|
32
|
-
input.wrapper tag: 'div', class: 'input-append' do |append|
|
33
|
-
append.use :input
|
34
|
-
end
|
35
|
-
input.use :hint, wrap_with: { tag: 'span', class: 'help-block' }
|
36
|
-
input.use :error, wrap_with: { tag: 'span', class: 'help-inline' }
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
|
41
|
-
# Check the Bootstrap docs (http://twitter.github.com/bootstrap)
|
42
|
-
# to learn about the different styles for forms and inputs,
|
43
|
-
# buttons and other elements.
|
44
|
-
config.default_wrapper = :bootstrap
|
45
|
-
end
|
@@ -1,14 +0,0 @@
|
|
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 format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|
@@ -1,26 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
simple_form:
|
3
|
-
"yes": 'Yes'
|
4
|
-
"no": 'No'
|
5
|
-
required:
|
6
|
-
text: 'required'
|
7
|
-
mark: '*'
|
8
|
-
# You can uncomment the line below if you need to overwrite the whole required html.
|
9
|
-
# When using html, text and mark won't be used.
|
10
|
-
# html: '<abbr title="required">*</abbr>'
|
11
|
-
error_notification:
|
12
|
-
default_message: "Please review the problems below:"
|
13
|
-
# Labels and hints examples
|
14
|
-
# labels:
|
15
|
-
# defaults:
|
16
|
-
# password: 'Password'
|
17
|
-
# user:
|
18
|
-
# new:
|
19
|
-
# email: 'E-mail to sign in.'
|
20
|
-
# edit:
|
21
|
-
# email: 'E-mail.'
|
22
|
-
# hints:
|
23
|
-
# defaults:
|
24
|
-
# username: 'User name to sign in.'
|
25
|
-
# password: 'No special characters, please.'
|
26
|
-
|
data/rails_40/config/routes.rb
DELETED
data/rails_40/config/unicorn.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# http://unicorn.bogomips.org/
|
2
|
-
# https://blog.heroku.com/archives/2013/2/27/unicorn_rails
|
3
|
-
# http://devblog.thinkthroughmath.com/blog/2013/02/27/managing-request-queuing-with-rails-on-heroku/
|
4
|
-
|
5
|
-
listen ENV['PORT'], backlog: Integer(ENV['UNICORN_BACKLOG'] || 16)
|
6
|
-
worker_processes Integer(ENV['UNICORN_WORKERS'] || 3)
|
7
|
-
timeout 30
|
8
|
-
preload_app true
|
9
|
-
|
10
|
-
before_fork do |server, worker|
|
11
|
-
Signal.trap 'TERM' do
|
12
|
-
puts 'Unicorn master intercepting TERM and sending myself QUIT instead.'
|
13
|
-
Process.kill 'QUIT', Process.pid
|
14
|
-
end
|
15
|
-
|
16
|
-
defined?(ActiveRecord::Base) and
|
17
|
-
ActiveRecord::Base.connection.disconnect!
|
18
|
-
end
|
19
|
-
|
20
|
-
after_fork do |server, worker|
|
21
|
-
Signal.trap 'TERM' do
|
22
|
-
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT.'
|
23
|
-
end
|
24
|
-
|
25
|
-
defined?(ActiveRecord::Base) and
|
26
|
-
ActiveRecord::Base.establish_connection
|
27
|
-
end
|
data/rails_40/config.ru
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# This file is used by Rack-based servers to start the application.
|
2
|
-
|
3
|
-
require ::File.expand_path('../config/environment', __FILE__)
|
4
|
-
|
5
|
-
# Redirect to the custom (canonical) hostname.
|
6
|
-
use Rack::CanonicalHost, ENV['HOSTNAME'] if ENV['HOSTNAME']
|
7
|
-
|
8
|
-
# Optional Basic Auth - Enabled if BASIC_AUTH_PASSWORD is set. User is optional (any value will be accepted).
|
9
|
-
BASIC_AUTH_USER = ENV['BASIC_AUTH_USER']
|
10
|
-
BASIC_AUTH_PASSWORD = ENV['BASIC_AUTH_PASSWORD']
|
11
|
-
|
12
|
-
if BASIC_AUTH_PASSWORD
|
13
|
-
use Rack::Auth::Basic do |username, password|
|
14
|
-
password == BASIC_AUTH_PASSWORD && (BASIC_AUTH_USER.blank? || username == BASIC_AUTH_USER)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
run AppPrototype::Application
|
data/rails_40/db/sample_data.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# Populate the database with a small set of realistic sample data so that as a developer/designer, you can use the
|
2
|
-
# application without having to create a bunch of stuff or pull down production data.
|
3
|
-
#
|
4
|
-
# After running db:sample_data, a developer/designer should be able to fire up the app, sign in, browse data and see
|
5
|
-
# examples of practically anything (interesting) that can happen in the system.
|
6
|
-
#
|
7
|
-
# It's a good idea to build this up along with the features; when you build a feature, make sure you can easily demo it
|
8
|
-
# after running db:sample_data.
|
9
|
-
#
|
10
|
-
# Data that is required by the application across all environments (i.e. reference data) should _not_ be included here.
|
11
|
-
# That belongs in seeds.rb instead.
|
data/rails_40/db/schema.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# This file is auto-generated from the current state of the database. Instead
|
3
|
-
# of editing this file, please use the migrations feature of Active Record to
|
4
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
-
#
|
6
|
-
# Note that this schema.rb definition is the authoritative source for your
|
7
|
-
# database schema. If you need to create the application database on another
|
8
|
-
# system, you should be using db:schema:load, not running all the migrations
|
9
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
-
#
|
12
|
-
# It's strongly recommended that you check this file into your version control system.
|
13
|
-
|
14
|
-
ActiveRecord::Schema.define(version: 0) do
|
15
|
-
|
16
|
-
# These are extensions that must be enabled in order to support this database
|
17
|
-
enable_extension "plpgsql"
|
18
|
-
|
19
|
-
end
|
data/rails_40/db/seeds.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
-
#
|
4
|
-
# Examples:
|
5
|
-
#
|
6
|
-
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
-
# Mayor.create(name: 'Emanuel', city: cities.first)
|
data/rails_40/lib/assets/.keep
DELETED
File without changes
|
data/rails_40/lib/tasks/.keep
DELETED
File without changes
|
data/rails_40/lib/tasks/db.rake
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
namespace :db do
|
2
|
-
desc "Load a small, representative set of data so that the application can start in an use state (for development)."
|
3
|
-
task sample_data: :environment do
|
4
|
-
sample_data = File.join(Rails.root, 'db', 'sample_data.rb')
|
5
|
-
load(sample_data) if sample_data
|
6
|
-
end
|
7
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'rspec/core'
|
3
|
-
require 'rspec/core/rake_task'
|
4
|
-
|
5
|
-
namespace :spec do
|
6
|
-
desc "Run the code examples in spec/ except those in spec/features"
|
7
|
-
RSpec::Core::RakeTask.new('without_features' => 'db:test:prepare') do |t|
|
8
|
-
file_list = FileList['spec/**/*_spec.rb'].exclude("spec/features/**/*_spec.rb")
|
9
|
-
|
10
|
-
t.pattern = file_list
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
rescue LoadError
|
15
|
-
namespace :spec do
|
16
|
-
task :without_requests do
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
begin
|
22
|
-
require 'guard/jasmine/task'
|
23
|
-
|
24
|
-
namespace :spec do
|
25
|
-
desc "Run all javascript specs"
|
26
|
-
task :javascripts do
|
27
|
-
begin
|
28
|
-
::Guard::Jasmine::CLI.start([])
|
29
|
-
|
30
|
-
rescue SystemExit => e
|
31
|
-
case e.status
|
32
|
-
when 1
|
33
|
-
fail "Some specs have failed."
|
34
|
-
when 2
|
35
|
-
fail "The spec couldn't be run: #{e.message}."
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
desc 'Runs specs with coverage and cane checks'
|
41
|
-
task cane: ['spec:enable_coverage', 'spec:coverage', 'quality']
|
42
|
-
end
|
43
|
-
|
44
|
-
Rake::Task['spec'].enhance do
|
45
|
-
Rake::Task['spec:javascripts'].invoke
|
46
|
-
end
|
47
|
-
|
48
|
-
rescue LoadError
|
49
|
-
namespace :spec do
|
50
|
-
task :javascripts do
|
51
|
-
puts "Guard is not available in this environment: #{Rails.env}."
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
|
57
|
-
Rake::Task['spec'].clear_actions
|
58
|
-
|
59
|
-
desc 'Runs all specs'
|
60
|
-
task spec: ['spec:without_features', 'spec:features', 'spec:javascripts']
|