5 |
--------------------------------------------------------------------------------
/bin/autospec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'autospec' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('rspec-core', 'autospec')
17 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/bin/bundler:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'bundler' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('bundler', 'bundler')
17 |
--------------------------------------------------------------------------------
/bin/byebug:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'byebug' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('byebug', 'byebug')
17 |
--------------------------------------------------------------------------------
/bin/dotenv:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'dotenv' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('dotenv', 'dotenv')
17 |
--------------------------------------------------------------------------------
/bin/erubis:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'erubis' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('erubis', 'erubis')
17 |
--------------------------------------------------------------------------------
/bin/foreman:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'foreman' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('foreman', 'foreman')
17 |
--------------------------------------------------------------------------------
/bin/htmldiff:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'htmldiff' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('diff-lcs', 'htmldiff')
17 |
--------------------------------------------------------------------------------
/bin/ldiff:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'ldiff' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('diff-lcs', 'ldiff')
17 |
--------------------------------------------------------------------------------
/bin/nokogiri:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'nokogiri' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('nokogiri', 'nokogiri')
17 |
--------------------------------------------------------------------------------
/bin/puma:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'puma' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('puma', 'puma')
17 |
--------------------------------------------------------------------------------
/bin/pumactl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'pumactl' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('puma', 'pumactl')
17 |
--------------------------------------------------------------------------------
/bin/rackup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'rackup' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('rack', 'rackup')
17 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | APP_PATH = File.expand_path('../../config/application', __FILE__)
7 | require_relative '../config/boot'
8 | require 'rails/commands'
9 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | require_relative '../config/boot'
7 | require 'rake'
8 | Rake.application.run
9 |
--------------------------------------------------------------------------------
/bin/rdoc:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'rdoc' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('rdoc', 'rdoc')
17 |
--------------------------------------------------------------------------------
/bin/ri:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'ri' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('rdoc', 'ri')
17 |
--------------------------------------------------------------------------------
/bin/rspec:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | #
7 | # This file was generated by Bundler.
8 | #
9 | # The application 'rspec' is installed as part of a gem, and
10 | # this file is here to facilitate running it.
11 | #
12 |
13 | require 'pathname'
14 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
15 | Pathname.new(__FILE__).realpath)
16 |
17 | require 'rubygems'
18 | require 'bundler/setup'
19 |
20 | load Gem.bin_path('rspec-core', 'rspec')
21 |
--------------------------------------------------------------------------------
/bin/ruby_parse:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'ruby_parse' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('ruby_parser', 'ruby_parse')
17 |
--------------------------------------------------------------------------------
/bin/ruby_parse_extract_error:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'ruby_parse_extract_error' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('ruby_parser', 'ruby_parse_extract_error')
17 |
--------------------------------------------------------------------------------
/bin/sass:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sass' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sass', 'sass')
17 |
--------------------------------------------------------------------------------
/bin/sass-convert:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sass-convert' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sass', 'sass-convert')
17 |
--------------------------------------------------------------------------------
/bin/scss:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'scss' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sass', 'scss')
17 |
--------------------------------------------------------------------------------
/bin/sdoc:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sdoc' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sdoc', 'sdoc')
17 |
--------------------------------------------------------------------------------
/bin/sdoc-merge:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sdoc-merge' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sdoc', 'sdoc-merge')
17 |
--------------------------------------------------------------------------------
/bin/setup:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'pathname'
3 |
4 | # path to your application root.
5 | APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6 |
7 | Dir.chdir APP_ROOT do
8 | # This script is a starting point to setup your application.
9 | # Add necessary setup steps to this file:
10 |
11 | puts "== Installing dependencies =="
12 | system "gem install bundler --conservative"
13 | system "bundle check || bundle install"
14 |
15 | # puts "\n== Copying sample files =="
16 | # unless File.exist?("config/database.yml")
17 | # system "cp config/database.yml.sample config/database.yml"
18 | # end
19 |
20 | puts "\n== Preparing database =="
21 | system "bin/rake db:setup"
22 |
23 | puts "\n== Removing old logs and tempfiles =="
24 | system "rm -f log/*"
25 | system "rm -rf tmp/cache"
26 |
27 | puts "\n== Restarting application server =="
28 | system "touch tmp/restart.txt"
29 | end
30 |
--------------------------------------------------------------------------------
/bin/spring:
--------------------------------------------------------------------------------
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 | Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
12 | gem "spring", match[1]
13 | require "spring/binstub"
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/bin/sprockets:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'sprockets' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('sprockets', 'sprockets')
17 |
--------------------------------------------------------------------------------
/bin/thor:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'thor' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('thor', 'thor')
17 |
--------------------------------------------------------------------------------
/bin/tilt:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'tilt' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('tilt', 'tilt')
17 |
--------------------------------------------------------------------------------
/bin/tt:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | #
3 | # This file was generated by Bundler.
4 | #
5 | # The application 'tt' is installed as part of a gem, and
6 | # this file is here to facilitate running it.
7 | #
8 |
9 | require 'pathname'
10 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11 | Pathname.new(__FILE__).realpath)
12 |
13 | require 'rubygems'
14 | require 'bundler/setup'
15 |
16 | load Gem.bin_path('treetop', 'tt')
17 |
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | ENV['RANSACK_FORM_BUILDER'] = '::SimpleForm::FormBuilder'
4 |
5 | require 'rails/all'
6 |
7 | # Require the gems listed in Gemfile, including any gems
8 | # you've limited to :test, :development, or :production.
9 | Bundler.require(*Rails.groups)
10 |
11 | module Gunzel
12 | class Application < Rails::Application
13 | # Settings in config/environments/* take precedence over those specified here.
14 | # Application configuration should go into files in config/initializers
15 | # -- all .rb files in that directory are automatically loaded.
16 |
17 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
18 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
19 | # config.time_zone = 'Central Time (US & Canada)'
20 |
21 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
22 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
23 | # config.i18n.default_locale = :de
24 |
25 | # Do not swallow errors in after_commit/after_rollback callbacks.
26 | config.active_record.raise_in_transactional_callbacks = true
27 |
28 | # because including all helpers, all the time is a bad idea
29 | config.action_controller.include_all_helpers = false
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/config/database/docker.example.yml:
--------------------------------------------------------------------------------
1 | # PostgreSQL. Versions 8.2 and up are supported.
2 | #
3 | # Install the pg driver:
4 | # gem install pg
5 | # On OS X with Homebrew:
6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7 | # On OS X with MacPorts:
8 | # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9 | # On Windows:
10 | # gem install pg
11 | # Choose the win32 build.
12 | # Install PostgreSQL and put its /bin directory on your path.
13 | #
14 | # Configure Using Gemfile
15 | # gem 'pg'
16 | #
17 | development:
18 | adapter: postgresql
19 | encoding: unicode
20 | database: gunzel_development
21 | pool: 5
22 | username: postgres
23 | password:
24 | host: db
25 |
26 | # Connect on a TCP socket. Omitted by default since the client uses a
27 | # domain socket that doesn't need configuration. Windows does not have
28 | # domain sockets, so uncomment these lines.
29 | #host: localhost
30 |
31 | # The TCP port the server listens on. Defaults to 5432.
32 | # If your server runs on a different port number, change accordingly.
33 | #port: 5432
34 |
35 | # Schema search path. The server defaults to $user,public
36 | #schema_search_path: myapp,sharedapp,public
37 |
38 | # Minimum log levels, in increasing order:
39 | # debug5, debug4, debug3, debug2, debug1,
40 | # log, notice, warning, error, fatal, and panic
41 | # Defaults to warning.
42 | #min_messages: notice
43 |
44 | # Warning: The database defined as "test" will be erased and
45 | # re-generated from your development database when you run "rake".
46 | # Do not set this db to the same as development or production.
47 | test:
48 | adapter: postgresql
49 | encoding: unicode
50 | database: gunzel_test
51 | pool: 5
52 | username: postgres
53 | password:
54 | host: db
55 |
56 | production:
57 | adapter: postgresql
58 | encoding: unicode
59 | database: gunzel_production
60 | pool: 5
61 | username: postgres
62 | password:
63 | host: db
64 |
--------------------------------------------------------------------------------
/config/database/postgresql.example.yml:
--------------------------------------------------------------------------------
1 | # PostgreSQL. Versions 8.2 and up are supported.
2 | #
3 | # Install the pg driver:
4 | # gem install pg
5 | # On OS X with Homebrew:
6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7 | # On OS X with MacPorts:
8 | # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9 | # On Windows:
10 | # gem install pg
11 | # Choose the win32 build.
12 | # Install PostgreSQL and put its /bin directory on your path.
13 | #
14 | # Configure Using Gemfile
15 | # gem 'pg'
16 | #
17 | development:
18 | adapter: postgresql
19 | encoding: unicode
20 | database: gunzel_development
21 | pool: 5
22 | username: gunzel
23 | password:
24 |
25 | # Connect on a TCP socket. Omitted by default since the client uses a
26 | # domain socket that doesn't need configuration. Windows does not have
27 | # domain sockets, so uncomment these lines.
28 | #host: localhost
29 |
30 | # The TCP port the server listens on. Defaults to 5432.
31 | # If your server runs on a different port number, change accordingly.
32 | #port: 5432
33 |
34 | # Schema search path. The server defaults to $user,public
35 | #schema_search_path: myapp,sharedapp,public
36 |
37 | # Minimum log levels, in increasing order:
38 | # debug5, debug4, debug3, debug2, debug1,
39 | # log, notice, warning, error, fatal, and panic
40 | # Defaults to warning.
41 | #min_messages: notice
42 |
43 | # Warning: The database defined as "test" will be erased and
44 | # re-generated from your development database when you run "rake".
45 | # Do not set this db to the same as development or production.
46 | test:
47 | adapter: postgresql
48 | encoding: unicode
49 | database: gunzel_test
50 | pool: 5
51 | username: gunzel
52 | password:
53 |
54 | production:
55 | adapter: postgresql
56 | encoding: unicode
57 | database: gunzel_production
58 | pool: 5
59 | username: gunzel
60 | password:
61 |
--------------------------------------------------------------------------------
/config/database/sqlite3.example.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | development:
7 | adapter: sqlite3
8 | database: db/development.sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | # Warning: The database defined as "test" will be erased and
13 | # re-generated from your development database when you run "rake".
14 | # Do not set this db to the same as development or production.
15 | test:
16 | adapter: sqlite3
17 | database: db/test.sqlite3
18 | pool: 5
19 | timeout: 5000
20 |
21 | production:
22 | adapter: sqlite3
23 | database: db/production.sqlite3
24 | pool: 5
25 | timeout: 5000
26 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
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 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send.
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Mailer should generate links back to the development server
20 | config.action_mailer.default_url_options = { :host => 'localhost:5000' }
21 |
22 | # Print deprecation notices to the Rails logger.
23 | config.active_support.deprecation = :log
24 |
25 | # Raise an error on page load if there are pending migrations.
26 | config.active_record.migration_error = :page_load
27 |
28 | # Debug mode disables concatenation and preprocessing of assets.
29 | # This option may cause significant delays in view rendering with a large
30 | # number of complex assets.
31 | config.assets.debug = true
32 |
33 | # Asset digests allow you to set far-future HTTP expiration dates on all assets,
34 | # yet still be able to expire them through the digest params.
35 | config.assets.digest = true
36 |
37 | # Adds additional error checking when serving assets at runtime.
38 | # Checks for improperly declared sprockets dependencies.
39 | # Raises helpful error messages.
40 | config.assets.raise_runtime_errors = true
41 |
42 | # Raises error for missing translations
43 | # config.action_view.raise_on_missing_translations = true
44 | end
45 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | Rails.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 threaded 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
20 | # NGINX, varnish or squid.
21 | # config.action_dispatch.rack_cache = true
22 |
23 | # Disable serving static files from the `/public` folder by default since
24 | # Apache or NGINX already handles this.
25 | config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26 |
27 | # Compress JavaScripts and CSS.
28 | config.assets.js_compressor = :uglifier
29 | # config.assets.css_compressor = :sass
30 |
31 | # Do not fallback to assets pipeline if a precompiled asset is missed.
32 | config.assets.compile = false
33 |
34 | # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35 | # yet still be able to expire them through the digest params.
36 | config.assets.digest = true
37 |
38 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39 |
40 | # Specifies the header that your server uses for sending files.
41 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43 |
44 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45 | # config.force_ssl = true
46 |
47 | # Use the lowest log level to ensure availability of diagnostic information
48 | # when problems arise.
49 | config.log_level = :debug
50 |
51 | # Prepend all log lines with the following tags.
52 | # config.log_tags = [ :subdomain, :uuid ]
53 |
54 | # Use a different logger for distributed setups.
55 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56 |
57 | # Use a different cache store in production.
58 | # config.cache_store = :mem_cache_store
59 |
60 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61 | # config.action_controller.asset_host = 'http://assets.example.com'
62 |
63 | # Ignore bad email addresses and do not raise email delivery errors.
64 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65 | # config.action_mailer.raise_delivery_errors = false
66 |
67 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68 | # the I18n.default_locale when a translation cannot be found).
69 | config.i18n.fallbacks = true
70 |
71 | # Send deprecation notices to registered listeners.
72 | config.active_support.deprecation = :notify
73 |
74 | # Use default logging formatter so that PID and timestamp are not suppressed.
75 | config.log_formatter = ::Logger::Formatter.new
76 |
77 | # Do not dump schema after migrations.
78 | config.active_record.dump_schema_after_migration = false
79 | end
80 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.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 file server for tests with Cache-Control for performance.
16 | config.serve_static_files = 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 | # Randomize the order test cases are executed.
35 | config.active_support.test_order = :random
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | # Raises error for missing translations
41 | # config.action_view.raise_on_missing_translations = true
42 | end
43 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11 | # Rails.application.config.assets.precompile += %w( search.js )
12 |
13 | Rails.application.config.assets.precompile +=
14 | %w(html5shiv.js respond.js)
15 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
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!
8 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.action_dispatch.cookies_serializer = :json
4 |
--------------------------------------------------------------------------------
/config/initializers/devise.rb:
--------------------------------------------------------------------------------
1 | # Use this hook to configure devise mailer, warden hooks and so forth.
2 | # Many of these configuration options can be set straight in your model.
3 | Devise.setup do |config|
4 | # The secret key used by Devise. Devise uses this key to generate
5 | # random tokens. Changing this key will render invalid all existing
6 | # confirmation, reset password and unlock tokens in the database.
7 | # config.secret_key = '7ac132dfa675c510494895956bb6dbdca4cb51319c1aa91af8b6f928ae8732f381868b2587abf9420dc571f3aed9fa3aa3c73b2e898b1a5956ea4c0c741c7e91'
8 |
9 | # ==> Mailer Configuration
10 | # Configure the e-mail address which will be shown in Devise::Mailer,
11 | # note that it will be overwritten if you use your own mailer class
12 | # with default "from" parameter.
13 | config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
14 |
15 | # Configure the class responsible to send e-mails.
16 | # config.mailer = 'Devise::Mailer'
17 |
18 | # ==> ORM configuration
19 | # Load and configure the ORM. Supports :active_record (default) and
20 | # :mongoid (bson_ext recommended) by default. Other ORMs may be
21 | # available as additional gems.
22 | require 'devise/orm/active_record'
23 |
24 | # ==> Configuration for any authentication mechanism
25 | # Configure which keys are used when authenticating a user. The default is
26 | # just :email. You can configure it to use [:username, :subdomain], so for
27 | # authenticating a user, both parameters are required. Remember that those
28 | # parameters are used only when authenticating and not when retrieving from
29 | # session. If you need permissions, you should implement that in a before filter.
30 | # You can also supply a hash where the value is a boolean determining whether
31 | # or not authentication should be aborted when the value is not present.
32 | config.authentication_keys = [ :login ]
33 |
34 | # Configure parameters from the request object used for authentication. Each entry
35 | # given should be a request method and it will automatically be passed to the
36 | # find_for_authentication method and considered in your model lookup. For instance,
37 | # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
38 | # The same considerations mentioned for authentication_keys also apply to request_keys.
39 | # config.request_keys = []
40 |
41 | # Configure which authentication keys should be case-insensitive.
42 | # These keys will be downcased upon creating or modifying a user and when used
43 | # to authenticate or find a user. Default is :email.
44 | config.case_insensitive_keys = [ :email ]
45 |
46 | # Configure which authentication keys should have whitespace stripped.
47 | # These keys will have whitespace before and after removed upon creating or
48 | # modifying a user and when used to authenticate or find a user. Default is :email.
49 | config.strip_whitespace_keys = [ :email ]
50 |
51 | # Tell if authentication through request.params is enabled. True by default.
52 | # It can be set to an array that will enable params authentication only for the
53 | # given strategies, for example, `config.params_authenticatable = [:database]` will
54 | # enable it only for database (email + password) authentication.
55 | # config.params_authenticatable = true
56 |
57 | # Tell if authentication through HTTP Auth is enabled. False by default.
58 | # It can be set to an array that will enable http authentication only for the
59 | # given strategies, for example, `config.http_authenticatable = [:database]` will
60 | # enable it only for database authentication. The supported strategies are:
61 | # :database = Support basic authentication with authentication key + password
62 | # config.http_authenticatable = false
63 |
64 | # If http headers should be returned for AJAX requests. True by default.
65 | # config.http_authenticatable_on_xhr = true
66 |
67 | # The realm used in Http Basic Authentication. 'Application' by default.
68 | # config.http_authentication_realm = 'Application'
69 |
70 | # It will change confirmation, password recovery and other workflows
71 | # to behave the same regardless if the e-mail provided was right or wrong.
72 | # Does not affect registerable.
73 | # config.paranoid = true
74 |
75 | # By default Devise will store the user in session. You can skip storage for
76 | # particular strategies by setting this option.
77 | # Notice that if you are skipping storage for all authentication paths, you
78 | # may want to disable generating routes to Devise's sessions controller by
79 | # passing skip: :sessions to `devise_for` in your config/routes.rb
80 | config.skip_session_storage = [:http_auth]
81 |
82 | # By default, Devise cleans up the CSRF token on authentication to
83 | # avoid CSRF token fixation attacks. This means that, when using AJAX
84 | # requests for sign in and sign up, you need to get a new CSRF token
85 | # from the server. You can disable this option at your own risk.
86 | # config.clean_up_csrf_token_on_authentication = true
87 |
88 | # ==> Configuration for :database_authenticatable
89 | # For bcrypt, this is the cost for hashing the password and defaults to 10. If
90 | # using other encryptors, it sets how many times you want the password re-encrypted.
91 | #
92 | # Limiting the stretches to just one in testing will increase the performance of
93 | # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
94 | # a value less than 10 in other environments. Note that, for bcrypt (the default
95 | # encryptor), the cost increases exponentially with the number of stretches (e.g.
96 | # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
97 | config.stretches = Rails.env.test? ? 1 : 10
98 |
99 | # Setup a pepper to generate the encrypted password.
100 | # config.pepper = '443dd4f8ef26700b98e101764fb9653b47e30368bce676cea8744cb265aa77ba84f06114237d220b2b58ab78b234a70637894b04cc7caf82db61ee0b5343ba2e'
101 |
102 | # ==> Configuration for :confirmable
103 | # A period that the user is allowed to access the website even without
104 | # confirming their account. For instance, if set to 2.days, the user will be
105 | # able to access the website for two days without confirming their account,
106 | # access will be blocked just in the third day. Default is 0.days, meaning
107 | # the user cannot access the website without confirming their account.
108 | # config.allow_unconfirmed_access_for = 2.days
109 |
110 | # A period that the user is allowed to confirm their account before their
111 | # token becomes invalid. For example, if set to 3.days, the user can confirm
112 | # their account within 3 days after the mail was sent, but on the fourth day
113 | # their account can't be confirmed with the token any more.
114 | # Default is nil, meaning there is no restriction on how long a user can take
115 | # before confirming their account.
116 | # config.confirm_within = 3.days
117 |
118 | # If true, requires any email changes to be confirmed (exactly the same way as
119 | # initial account confirmation) to be applied. Requires additional unconfirmed_email
120 | # db field (see migrations). Until confirmed, new email is stored in
121 | # unconfirmed_email column, and copied to email column on successful confirmation.
122 | config.reconfirmable = true
123 |
124 | # Defines which key will be used when confirming an account
125 | # config.confirmation_keys = [ :email ]
126 |
127 | # ==> Configuration for :rememberable
128 | # The time the user will be remembered without asking for credentials again.
129 | # config.remember_for = 2.weeks
130 |
131 | # If true, extends the user's remember period when remembered via cookie.
132 | # config.extend_remember_period = false
133 |
134 | # Options to be passed to the created cookie. For instance, you can set
135 | # secure: true in order to force SSL only cookies.
136 | # config.rememberable_options = {}
137 |
138 | # ==> Configuration for :validatable
139 | # Range for password length.
140 | config.password_length = 8..128
141 |
142 | # Email regex used to validate email formats. It simply asserts that
143 | # one (and only one) @ exists in the given string. This is mainly
144 | # to give user feedback and not to assert the e-mail validity.
145 | # config.email_regexp = /\A[^@]+@[^@]+\z/
146 |
147 | # ==> Configuration for :timeoutable
148 | # The time you want to timeout the user session without activity. After this
149 | # time the user will be asked for credentials again. Default is 30 minutes.
150 | # config.timeout_in = 30.minutes
151 |
152 | # If true, expires auth token on session timeout.
153 | # config.expire_auth_token_on_timeout = false
154 |
155 | # ==> Configuration for :lockable
156 | # Defines which strategy will be used to lock an account.
157 | # :failed_attempts = Locks an account after a number of failed attempts to sign in.
158 | # :none = No lock strategy. You should handle locking by yourself.
159 | # config.lock_strategy = :failed_attempts
160 |
161 | # Defines which key will be used when locking and unlocking an account
162 | # config.unlock_keys = [ :email ]
163 |
164 | # Defines which strategy will be used to unlock an account.
165 | # :email = Sends an unlock link to the user email
166 | # :time = Re-enables login after a certain amount of time (see :unlock_in below)
167 | # :both = Enables both strategies
168 | # :none = No unlock strategy. You should handle unlocking by yourself.
169 | # config.unlock_strategy = :both
170 |
171 | # Number of authentication tries before locking an account if lock_strategy
172 | # is failed attempts.
173 | # config.maximum_attempts = 20
174 |
175 | # Time interval to unlock the account if :time is enabled as unlock_strategy.
176 | # config.unlock_in = 1.hour
177 |
178 | # Warn on the last attempt before the account is locked.
179 | # config.last_attempt_warning = false
180 |
181 | # ==> Configuration for :recoverable
182 | #
183 | # Defines which key will be used when recovering the password for an account
184 | config.reset_password_keys = [ :login ]
185 |
186 | # Time interval you can reset your password with a reset password key.
187 | # Don't put a too small interval or your users won't have the time to
188 | # change their passwords.
189 | config.reset_password_within = 6.hours
190 |
191 | # ==> Configuration for :encryptable
192 | # Allow you to use another encryption algorithm besides bcrypt (default). You can use
193 | # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
194 | # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
195 | # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
196 | # REST_AUTH_SITE_KEY to pepper).
197 | #
198 | # Require the `devise-encryptable` gem when using anything other than bcrypt
199 | # config.encryptor = :sha512
200 |
201 | # ==> Scopes configuration
202 | # Turn scoped views on. Before rendering "sessions/new", it will first check for
203 | # "users/sessions/new". It's turned off by default because it's slower if you
204 | # are using only default views.
205 | # config.scoped_views = false
206 |
207 | # Configure the default scope given to Warden. By default it's the first
208 | # devise role declared in your routes (usually :user).
209 | # config.default_scope = :user
210 |
211 | # Set this configuration to false if you want /users/sign_out to sign out
212 | # only the current scope. By default, Devise signs out all scopes.
213 | # config.sign_out_all_scopes = true
214 |
215 | # ==> Navigation configuration
216 | # Lists the formats that should be treated as navigational. Formats like
217 | # :html, should redirect to the sign in page when the user does not have
218 | # access, but formats like :xml or :json, should return 401.
219 | #
220 | # If you have any extra navigational formats, like :iphone or :mobile, you
221 | # should add them to the navigational formats lists.
222 | #
223 | # The "*/*" below is required to match Internet Explorer requests.
224 | # config.navigational_formats = ['*/*', :html]
225 |
226 | # The default HTTP method used to sign out a resource. Default is :delete.
227 | config.sign_out_via = :delete
228 |
229 | # ==> OmniAuth
230 | # Add a new OmniAuth provider. Check the wiki for more information on setting
231 | # up on your models and hooks.
232 | # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
233 |
234 | # ==> Warden configuration
235 | # If you want to use other strategies, that are not supported by Devise, or
236 | # change the failure app, you can configure them inside the config.warden block.
237 | #
238 | # config.warden do |manager|
239 | # manager.intercept_401 = false
240 | # manager.default_strategies(scope: :user).unshift :some_external_strategy
241 | # end
242 |
243 | # ==> Mountable engine configurations
244 | # When using Devise inside an engine, let's call it `MyEngine`, and this engine
245 | # is mountable, there are some extra configurations to be taken into account.
246 | # The following options are available, assuming the engine is mounted as:
247 | #
248 | # mount MyEngine, at: '/my_engine'
249 | #
250 | # The router that invoked `devise_for`, in the example above, would be:
251 | # config.router_name = :my_engine
252 | #
253 | # When using omniauth, Devise cannot automatically set Omniauth path,
254 | # so you need to do it manually. For the users scope, it would be:
255 | # config.omniauth_path_prefix = '/my_engine/users/auth'
256 | end
257 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/config/initializers/friendly_id.rb:
--------------------------------------------------------------------------------
1 | # FriendlyId Global Configuration
2 | #
3 | # Use this to set up shared configuration options for your entire application.
4 | # Any of the configuration options shown here can also be applied to single
5 | # models by passing arguments to the `friendly_id` class method or defining
6 | # methods in your model.
7 | #
8 | # To learn more, check out the guide:
9 | #
10 | # http://norman.github.io/friendly_id/file.Guide.html
11 |
12 | FriendlyId.defaults do |config|
13 | # ## Reserved Words
14 | #
15 | # Some words could conflict with Rails's routes when used as slugs, or are
16 | # undesirable to allow as slugs. Edit this list as needed for your app.
17 | config.use :reserved
18 |
19 | config.reserved_words = %w(new edit index session login logout users admin
20 | stylesheets assets javascripts images)
21 |
22 | # ## Friendly Finders
23 | #
24 | # Uncomment this to use friendly finders in all models. By default, if
25 | # you wish to find a record by its friendly id, you must do:
26 | #
27 | # MyModel.friendly.find('foo')
28 | #
29 | # If you uncomment this, you can do:
30 | #
31 | # MyModel.find('foo')
32 | #
33 | # This is significantly more convenient but may not be appropriate for
34 | # all applications, so you must explicity opt-in to this behavior. You can
35 | # always also configure it on a per-model basis if you prefer.
36 | #
37 | # Something else to consider is that using the :finders addon boosts
38 | # performance because it will avoid Rails-internal code that makes runtime
39 | # calls to `Module.extend`.
40 | #
41 | config.use :finders
42 | #
43 | # ## Slugs
44 | #
45 | # Most applications will use the :slugged module everywhere. If you wish
46 | # to do so, uncomment the following line.
47 | #
48 | config.use :slugged
49 | #
50 | # By default, FriendlyId's :slugged addon expects the slug column to be named
51 | # 'slug', but you can change it if you wish.
52 | #
53 | # config.slug_column = 'slug'
54 | #
55 | # When FriendlyId can not generate a unique ID from your base method, it appends
56 | # a UUID, separated by a single dash. You can configure the character used as the
57 | # separator. If you're upgrading from FriendlyId 4, you may wish to replace this
58 | # with two dashes.
59 | #
60 | # config.sequence_separator = '-'
61 | #
62 | # ## Tips and Tricks
63 | #
64 | # ### Controlling when slugs are generated
65 | #
66 | # As of FriendlyId 5.0, new slugs are generated only when the slug field is
67 | # nil, but if you're using a column as your base method can change this
68 | # behavior by overriding the `should_generate_new_friendly_id` method that
69 | # FriendlyId adds to your model. The change below makes FriendlyId 5.0 behave
70 | # more like 4.0.
71 | #
72 | # config.use Module.new {
73 | # def should_generate_new_friendly_id?
74 | # slug.blank? || _changed?
75 | # end
76 | # }
77 | #
78 | # FriendlyId uses Rails's `parameterize` method to generate slugs, but for
79 | # languages that don't use the Roman alphabet, that's not usually suffient. Here
80 | # we use the Babosa library to transliterate Russian Cyrillic slugs to ASCII. If
81 | # you use this, don't forget to add "babosa" to your Gemfile.
82 | #
83 | # config.use Module.new {
84 | # def normalize_friendly_id(text)
85 | # text.to_slug.normalize! :transliterations => [:russian, :latin]
86 | # end
87 | # }
88 | end
89 |
--------------------------------------------------------------------------------
/config/initializers/gunzel.rb:
--------------------------------------------------------------------------------
1 | require 'gunzel/gem_ext/devise/permit_username_and_login_parameters'
2 |
3 | Gunzel::Application.config.generators do |g|
4 | g.fixture_replacement :factory_girl, :dir => 'spec/factories'
5 |
6 | # don't generate quite so much cruft when scaffolding
7 | g.javascripts false
8 | g.stylesheets false
9 | g.jbuilder false
10 |
11 | # don't go overboard with generated specs either
12 | g.test_framework :rspec,
13 | :helper_specs => false,
14 | :request_specs => false,
15 | :routing_specs => false,
16 | :view_specs => false
17 |
18 | g.scaffold_controller :gunzel_controller
19 | g.template_engine :gunzel
20 | end
21 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
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
17 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/config/initializers/rolify.rb:
--------------------------------------------------------------------------------
1 | Rolify.configure do |config|
2 | # By default ORM adapter is ActiveRecord. uncomment to use mongoid
3 | # config.use_mongoid
4 |
5 | # Dynamic shortcuts for User class (user.is_admin? like methods). Default is: false
6 | # Enable this feature _after_ running rake db:migrate as it relies on the roles table
7 | # config.use_dynamic_shortcuts
8 | end
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.session_store :cookie_store, key: '_gunzel_session'
4 |
--------------------------------------------------------------------------------
/config/initializers/simple_form.rb:
--------------------------------------------------------------------------------
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 => true`
26 | # to the input. If so, they will retrieve the values from the model
27 | # if any exists. If you want to enable 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 |
47 | ## full_messages_for
48 | # If you want to display the full error message for the attribute, you can
49 | # use the component :full_error, like:
50 | #
51 | # b.use :full_error, wrap_with: { tag: :span, class: :error }
52 | end
53 |
54 | # The default wrapper to be used by the FormBuilder.
55 | config.default_wrapper = :default
56 |
57 | # Define the way to render check boxes / radio buttons with labels.
58 | # Defaults to :nested for bootstrap config.
59 | # inline: input + label
60 | # nested: label > input
61 | config.boolean_style = :nested
62 |
63 | # Default class for buttons
64 | config.button_class = 'btn'
65 |
66 | # Method used to tidy up errors. Specify any Rails Array method.
67 | # :first lists the first message for each field.
68 | # Use :to_sentence to list all errors for each field.
69 | # config.error_method = :first
70 |
71 | # Default tag used for error notification helper.
72 | config.error_notification_tag = :div
73 |
74 | # CSS class to add for error notification helper.
75 | config.error_notification_class = 'error_notification'
76 |
77 | # ID to add for error notification helper.
78 | # config.error_notification_id = nil
79 |
80 | # Series of attempts to detect a default label method for collection.
81 | # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
82 |
83 | # Series of attempts to detect a default value method for collection.
84 | # config.collection_value_methods = [ :id, :to_s ]
85 |
86 | # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
87 | # config.collection_wrapper_tag = nil
88 |
89 | # You can define the class to use on all collection wrappers. Defaulting to none.
90 | # config.collection_wrapper_class = nil
91 |
92 | # You can wrap each item in a collection of radio/check boxes with a tag,
93 | # defaulting to :span. Please note that when using :boolean_style = :nested,
94 | # SimpleForm will force this option to be a label.
95 | # config.item_wrapper_tag = :span
96 |
97 | # You can define a class to use in all item wrappers. Defaulting to none.
98 | # config.item_wrapper_class = nil
99 |
100 | # How the label text should be generated altogether with the required text.
101 | # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
102 |
103 | # You can define the class to use on all labels. Default is nil.
104 | # config.label_class = nil
105 |
106 | # You can define the class to use on all forms. Default is simple_form.
107 | # config.form_class = :simple_form
108 |
109 | # You can define which elements should obtain additional classes
110 | # config.generate_additional_classes_for = [:wrapper, :label, :input]
111 |
112 | # Whether attributes are required by default (or not). Default is true.
113 | # config.required_by_default = true
114 |
115 | # Tell browsers whether to use the native HTML5 validations (novalidate form option).
116 | # These validations are enabled in SimpleForm's internal config but disabled by default
117 | # in this configuration, which is recommended due to some quirks from different browsers.
118 | # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
119 | # change this configuration to true.
120 | config.browser_validations = false
121 |
122 | # Collection of methods to detect if a file type was given.
123 | # config.file_methods = [ :mounted_as, :file?, :public_filename ]
124 |
125 | # Custom mappings for input types. This should be a hash containing a regexp
126 | # to match as key, and the input type that will be used when the field name
127 | # matches the regexp as value.
128 | # config.input_mappings = { /count/ => :integer }
129 |
130 | # Custom wrappers for input types. This should be a hash containing an input
131 | # type as key and the wrapper that will be used for all inputs with specified type.
132 | # config.wrapper_mappings = { string: :prepend }
133 |
134 | # Namespaces where SimpleForm should look for custom input classes that
135 | # override default inputs.
136 | # config.custom_inputs_namespaces << "CustomInputs"
137 |
138 | # Default priority for time_zone inputs.
139 | # config.time_zone_priority = nil
140 |
141 | # Default priority for country inputs.
142 | # config.country_priority = nil
143 |
144 | # When false, do not use translations for labels.
145 | # config.translate_labels = true
146 |
147 | # Automatically discover new inputs in Rails' autoload path.
148 | # config.inputs_discovery = true
149 |
150 | # Cache SimpleForm inputs discovery
151 | # config.cache_discovery = !Rails.env.development?
152 |
153 | # Default class for inputs
154 | # config.input_class = nil
155 |
156 | # Define the default class of the input wrapper of the boolean input.
157 | config.boolean_label_class = 'checkbox'
158 |
159 | # Defines if the default input wrapper class should be included in radio
160 | # collection wrappers.
161 | # config.include_default_input_wrapper_class = true
162 |
163 | # Defines which i18n scope will be used in Simple Form.
164 | # config.i18n_scope = 'simple_form'
165 | end
166 |
--------------------------------------------------------------------------------
/config/initializers/simple_form_bootstrap.rb:
--------------------------------------------------------------------------------
1 | # Use this setup block to configure all options available in SimpleForm.
2 | SimpleForm.setup do |config|
3 | config.error_notification_class = 'alert alert-danger'
4 | config.button_class = 'btn btn-default'
5 | config.boolean_label_class = nil
6 |
7 | config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
8 | b.use :html5
9 | b.use :placeholder
10 | b.optional :maxlength
11 | b.optional :pattern
12 | b.optional :min_max
13 | b.optional :readonly
14 | b.use :label, class: 'control-label'
15 |
16 | b.use :input, class: 'form-control'
17 | b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
18 | b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
19 | end
20 |
21 | config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
22 | b.use :html5
23 | b.use :placeholder
24 | b.optional :maxlength
25 | b.optional :readonly
26 | b.use :label, class: 'control-label'
27 |
28 | b.use :input
29 | b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
30 | b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
31 | end
32 |
33 | config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
34 | b.use :html5
35 | b.optional :readonly
36 |
37 | b.wrapper tag: 'div', class: 'checkbox' do |ba|
38 | ba.use :label_input
39 | end
40 |
41 | b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
42 | b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
43 | end
44 |
45 | config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
46 | b.use :html5
47 | b.optional :readonly
48 | b.use :label_input
49 | b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
50 | b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
51 | end
52 |
53 | config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
54 | b.use :html5
55 | b.use :placeholder
56 | b.optional :maxlength
57 | b.optional :pattern
58 | b.optional :min_max
59 | b.optional :readonly
60 | b.use :label, class: 'col-sm-3 control-label'
61 |
62 | b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
63 | ba.use :input, class: 'form-control'
64 | ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
65 | ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
66 | end
67 | end
68 |
69 | config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
70 | b.use :html5
71 | b.use :placeholder
72 | b.optional :maxlength
73 | b.optional :readonly
74 | b.use :label, class: 'col-sm-3 control-label'
75 |
76 | b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
77 | ba.use :input
78 | ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
79 | ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
80 | end
81 | end
82 |
83 | config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
84 | b.use :html5
85 | b.optional :readonly
86 |
87 | b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
88 | wr.wrapper tag: 'div', class: 'checkbox' do |ba|
89 | ba.use :label_input, class: 'col-sm-9'
90 | end
91 |
92 | wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
93 | wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
94 | end
95 | end
96 |
97 | config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
98 | b.use :html5
99 | b.optional :readonly
100 |
101 | b.use :label, class: 'col-sm-3 control-label'
102 |
103 | b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
104 | ba.use :input
105 | ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
106 | ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
107 | end
108 | end
109 |
110 | config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
111 | b.use :html5
112 | b.use :placeholder
113 | b.optional :maxlength
114 | b.optional :pattern
115 | b.optional :min_max
116 | b.optional :readonly
117 | b.use :label, class: 'sr-only'
118 |
119 | b.use :input, class: 'form-control'
120 | b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
121 | b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
122 | end
123 |
124 | # Wrappers for forms and inputs using the Bootstrap toolkit.
125 | # Check the Bootstrap docs (http://getbootstrap.com)
126 | # to learn about the different styles for forms and inputs,
127 | # buttons and other elements.
128 | config.default_wrapper = :vertical_form
129 | end
130 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
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
15 |
--------------------------------------------------------------------------------
/config/locales/devise.en.yml:
--------------------------------------------------------------------------------
1 | # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2 |
3 | en:
4 | devise:
5 | confirmations:
6 | confirmed: "Your account was successfully confirmed."
7 | send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
8 | send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
9 | failure:
10 | already_authenticated: "You are already signed in."
11 | inactive: "Your account is not activated yet."
12 | invalid: "Invalid login or password."
13 | locked: "Your account is locked."
14 | last_attempt: "You have one more attempt before your account will be locked."
15 | not_found_in_database: "Invalid login or password."
16 | timeout: "Your session expired. Please sign in again to continue."
17 | unauthenticated: "You need to sign in or sign up before continuing."
18 | unconfirmed: "You have to confirm your account before continuing."
19 | mailer:
20 | confirmation_instructions:
21 | subject: "Confirmation instructions"
22 | reset_password_instructions:
23 | subject: "Reset password instructions"
24 | unlock_instructions:
25 | subject: "Unlock Instructions"
26 | omniauth_callbacks:
27 | failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
28 | success: "Successfully authenticated from %{kind} account."
29 | passwords:
30 | no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
31 | send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
32 | send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
33 | updated: "Your password was changed successfully. You are now signed in."
34 | updated_not_active: "Your password was changed successfully."
35 | registrations:
36 | destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
37 | signed_up: "Welcome! You have signed up successfully."
38 | signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
39 | signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
40 | signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
41 | update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
42 | updated: "You updated your account successfully."
43 | sessions:
44 | signed_in: "Signed in successfully."
45 | signed_out: "Signed out successfully."
46 | unlocks:
47 | send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
48 | send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
49 | unlocked: "Your account has been unlocked successfully. Please sign in to continue."
50 | errors:
51 | messages:
52 | already_confirmed: "was already confirmed, please try signing in"
53 | confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
54 | expired: "has expired, please request a new one"
55 | not_found: "not found"
56 | not_locked: "was not locked"
57 | not_saved:
58 | one: "1 error prohibited this %{resource} from being saved:"
59 | other: "%{count} errors prohibited this %{resource} from being saved:"
60 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
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"
24 |
--------------------------------------------------------------------------------
/config/locales/simple_form.en.yml:
--------------------------------------------------------------------------------
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: '*'
11 | error_notification:
12 | default_message: "Please review the problems below:"
13 | # 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 | # include_blanks:
27 | # defaults:
28 | # age: 'Rather not say'
29 | # prompts:
30 | # defaults:
31 | # age: 'Select your age'
32 |
--------------------------------------------------------------------------------
/config/puma.rb:
--------------------------------------------------------------------------------
1 | workers Integer(ENV['WEB_CONCURRENCY'] || 2)
2 | threads_count = Integer(ENV['MAX_THREADS'] || 5)
3 | threads threads_count, threads_count
4 |
5 | preload_app!
6 |
7 | rackup DefaultRackup
8 | port ENV['PORT'] || 3000
9 | environment ENV['RACK_ENV'] || 'development'
10 |
11 | on_worker_boot do
12 | config =
13 | ActiveRecord::Base.configurations[Rails.env] ||
14 | Rails.application \
15 | .config \
16 | .database_configuration[Rails.env]
17 |
18 | ActiveRecord::Base.establish_connection(
19 | config.merge('pool' => ENV['MAX_THREADS'] || 5))
20 | end
21 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | # The priority is based upon order of creation: first created -> highest priority.
3 | # See how all your routes lay out with "rake routes".
4 |
5 | devise_for :users
6 |
7 | # You can have the root of your site routed with "root"
8 | # root 'welcome#index'
9 |
10 | root 'statics#home'
11 |
12 | # Example of regular route:
13 | # get 'products/:id' => 'catalog#view'
14 |
15 | # Example of named route that can be invoked with purchase_url(id: product.id)
16 | # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
17 |
18 | # Example resource route (maps HTTP verbs to controller actions automatically):
19 | # resources :products
20 |
21 | # Example resource route with options:
22 | # resources :products do
23 | # member do
24 | # get 'short'
25 | # post 'toggle'
26 | # end
27 | #
28 | # collection do
29 | # get 'sold'
30 | # end
31 | # end
32 |
33 | # Example resource route with sub-resources:
34 | # resources :products do
35 | # resources :comments, :sales
36 | # resource :seller
37 | # end
38 |
39 | # Example resource route with more complex sub-resources:
40 | # resources :products do
41 | # resources :comments
42 | # resources :sales do
43 | # get 'recent', on: :collection
44 | # end
45 | # end
46 |
47 | # Example resource route with concerns:
48 | # concern :toggleable do
49 | # post 'toggle'
50 | # end
51 | # resources :posts, concerns: :toggleable
52 | # resources :photos, concerns: :toggleable
53 |
54 | # Example resource route within a namespace:
55 | # namespace :admin do
56 | # # Directs /admin/products/* to Admin::ProductsController
57 | # # (app/controllers/admin/products_controller.rb)
58 | # resources :products
59 | # end
60 | end
61 |
--------------------------------------------------------------------------------
/config/secrets.yml:
--------------------------------------------------------------------------------
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 the secrets in this file are kept private
11 | # if you're sharing your code publicly.
12 |
13 | development:
14 | secret_key_base: 22cb5ab2b57a9f80b8a7ec1bae8399d655a94660d61d09d7d68bc6fb935fa0870324c3498050141550b41aa1b1a70e19d1cb621eeaaab2cc1a22dea14b356437
15 |
16 | test:
17 | secret_key_base: 4bbc4396fd0e5b7c98ee56dd854c2e33035a24dc487f16222ebeaa29936fc225417fa6a684b94c8c8e228f4a4598b04bfb30d17fbf4bf5631b773d6b14fa2b29
18 |
19 | # Do not keep production secrets in the repository,
20 | # instead read values from the environment.
21 | production:
22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
23 |
--------------------------------------------------------------------------------
/config/sitemap.rb:
--------------------------------------------------------------------------------
1 | # Set the host name for URL creation
2 | SitemapGenerator::Sitemap.default_host = "http://www.example.com"
3 |
4 | SitemapGenerator::Sitemap.create do
5 | # Put links creation logic here.
6 | #
7 | # The root path '/' and sitemap index file are added automatically for you.
8 | # Links are added to the Sitemap in the order they are specified.
9 | #
10 | # Usage: add(path, options={})
11 | # (default options are used if you don't specify)
12 | #
13 | # Defaults: :priority => 0.5, :changefreq => 'weekly',
14 | # :lastmod => Time.now, :host => default_host
15 | #
16 | # Examples:
17 | #
18 | # Add '/articles'
19 | #
20 | # add articles_path, :priority => 0.7, :changefreq => 'daily'
21 | #
22 | # Add all articles:
23 | #
24 | # Article.find_each do |article|
25 | # add article_path(article), :lastmod => article.updated_at
26 | # end
27 | end
28 |
--------------------------------------------------------------------------------
/db/migrate/20140317050901_create_friendly_id_slugs.rb:
--------------------------------------------------------------------------------
1 | class CreateFriendlyIdSlugs < ActiveRecord::Migration
2 | def change
3 | create_table :friendly_id_slugs do |t|
4 | t.string :slug, :null => false
5 | t.integer :sluggable_id, :null => false
6 | t.string :sluggable_type, :limit => 50
7 | t.string :scope
8 | t.datetime :created_at
9 | end
10 | add_index :friendly_id_slugs, :sluggable_id
11 | add_index :friendly_id_slugs, [:slug, :sluggable_type]
12 | add_index :friendly_id_slugs, [:slug, :sluggable_type, :scope], :unique => true
13 | add_index :friendly_id_slugs, :sluggable_type
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20140317052339_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb:
--------------------------------------------------------------------------------
1 | # This migration comes from acts_as_taggable_on_engine (originally 1)
2 | class ActsAsTaggableOnMigration < ActiveRecord::Migration
3 | def self.up
4 | create_table :tags do |t|
5 | t.string :name
6 | end
7 |
8 | create_table :taggings do |t|
9 | t.references :tag
10 |
11 | # You should make sure that the column created is
12 | # long enough to store the required class names.
13 | t.references :taggable, :polymorphic => true
14 | t.references :tagger, :polymorphic => true
15 |
16 | # Limit is created to prevent MySQL error on index
17 | # length for MyISAM table type: http://bit.ly/vgW2Ql
18 | t.string :context, :limit => 128
19 |
20 | t.datetime :created_at
21 | end
22 |
23 | add_index :taggings, :tag_id
24 | add_index :taggings, [:taggable_id, :taggable_type, :context]
25 | end
26 |
27 | def self.down
28 | drop_table :taggings
29 | drop_table :tags
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/db/migrate/20140317052340_add_missing_unique_indices.acts_as_taggable_on_engine.rb:
--------------------------------------------------------------------------------
1 | # This migration comes from acts_as_taggable_on_engine (originally 2)
2 | class AddMissingUniqueIndices < ActiveRecord::Migration
3 |
4 | def self.up
5 | add_index :tags, :name, unique: true
6 |
7 | remove_index :taggings, :tag_id
8 | remove_index :taggings, [:taggable_id, :taggable_type, :context]
9 | add_index :taggings,
10 | [:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
11 | unique: true, name: 'taggings_idx'
12 | end
13 |
14 | def self.down
15 | remove_index :tags, :name
16 |
17 | remove_index :taggings, name: 'tagging_idx'
18 | add_index :taggings, :tag_id
19 | add_index :taggings, [:taggable_id, :taggable_type, :context]
20 | end
21 |
22 | end
23 |
--------------------------------------------------------------------------------
/db/migrate/20140519012208_devise_create_users.rb:
--------------------------------------------------------------------------------
1 | class DeviseCreateUsers < ActiveRecord::Migration
2 | def change
3 | create_table(:users) do |t|
4 | ## Database authenticatable
5 | t.string :username, null: false, default: ""
6 | t.string :email, null: false, default: ""
7 | t.string :encrypted_password, null: false, default: ""
8 |
9 | ## Recoverable
10 | t.string :reset_password_token
11 | t.datetime :reset_password_sent_at
12 |
13 | ## Rememberable
14 | t.datetime :remember_created_at
15 |
16 | ## Trackable
17 | t.integer :sign_in_count, default: 0, null: false
18 | t.datetime :current_sign_in_at
19 | t.datetime :last_sign_in_at
20 | t.string :current_sign_in_ip
21 | t.string :last_sign_in_ip
22 |
23 | ## Confirmable
24 | # t.string :confirmation_token
25 | # t.datetime :confirmed_at
26 | # t.datetime :confirmation_sent_at
27 | # t.string :unconfirmed_email # Only if using reconfirmable
28 |
29 | ## Lockable
30 | # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
31 | # t.string :unlock_token # Only if unlock strategy is :email or :both
32 | # t.datetime :locked_at
33 |
34 |
35 | t.timestamps
36 | end
37 |
38 | add_index :users, :username, unique: true
39 | add_index :users, :email, unique: true
40 | add_index :users, :reset_password_token, unique: true
41 | # add_index :users, :confirmation_token, unique: true
42 | # add_index :users, :unlock_token, unique: true
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/db/migrate/20140519020326_rolify_create_roles.rb:
--------------------------------------------------------------------------------
1 | class RolifyCreateRoles < ActiveRecord::Migration
2 | def change
3 | create_table(:roles) do |t|
4 | t.string :name
5 | t.references :resource, :polymorphic => true
6 |
7 | t.timestamps
8 | end
9 |
10 | create_table(:users_roles, :id => false) do |t|
11 | t.references :user
12 | t.references :role
13 | end
14 |
15 | add_index(:roles, :name)
16 | add_index(:roles, [ :name, :resource_type, :resource_id ])
17 | add_index(:users_roles, [ :user_id, :role_id ])
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/db/migrate/20140610231308_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb:
--------------------------------------------------------------------------------
1 | # This migration comes from acts_as_taggable_on_engine (originally 3)
2 | class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
3 | def self.up
4 | add_column :tags, :taggings_count, :integer, default: 0
5 |
6 | ActsAsTaggableOn::Tag.reset_column_information
7 | ActsAsTaggableOn::Tag.find_each do |tag|
8 | ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
9 | end
10 | end
11 |
12 | def self.down
13 | remove_column :tags, :taggings_count
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/db/migrate/20140714053131_add_missing_taggable_index.acts_as_taggable_on_engine.rb:
--------------------------------------------------------------------------------
1 | # This migration comes from acts_as_taggable_on_engine (originally 4)
2 | class AddMissingTaggableIndex < ActiveRecord::Migration
3 | def self.up
4 | add_index :taggings, [:taggable_id, :taggable_type, :context]
5 | end
6 |
7 | def self.down
8 | remove_index :taggings, [:taggable_id, :taggable_type, :context]
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20140829025406_create_versions.rb:
--------------------------------------------------------------------------------
1 | class CreateVersions < ActiveRecord::Migration
2 | def change
3 | create_table :versions do |t|
4 | t.string :item_type, :null => false
5 | t.integer :item_id, :null => false
6 | t.string :event, :null => false
7 | t.string :whodunnit
8 | t.text :object
9 | t.datetime :created_at
10 | end
11 | add_index :versions, [:item_type, :item_id]
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20140829025407_add_object_changes_to_versions.rb:
--------------------------------------------------------------------------------
1 | class AddObjectChangesToVersions < ActiveRecord::Migration
2 | def change
3 | add_column :versions, :object_changes, :text
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
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: 20140829025407) do
15 |
16 | # These are extensions that must be enabled in order to support this database
17 | enable_extension "plpgsql"
18 |
19 | create_table "friendly_id_slugs", force: :cascade do |t|
20 | t.string "slug", null: false
21 | t.integer "sluggable_id", null: false
22 | t.string "sluggable_type", limit: 50
23 | t.string "scope"
24 | t.datetime "created_at"
25 | end
26 |
27 | add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true, using: :btree
28 | add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type", using: :btree
29 | add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id", using: :btree
30 | add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type", using: :btree
31 |
32 | create_table "roles", force: :cascade do |t|
33 | t.string "name"
34 | t.integer "resource_id"
35 | t.string "resource_type"
36 | t.datetime "created_at"
37 | t.datetime "updated_at"
38 | end
39 |
40 | add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id", using: :btree
41 | add_index "roles", ["name"], name: "index_roles_on_name", using: :btree
42 |
43 | create_table "taggings", force: :cascade do |t|
44 | t.integer "tag_id"
45 | t.integer "taggable_id"
46 | t.string "taggable_type"
47 | t.integer "tagger_id"
48 | t.string "tagger_type"
49 | t.string "context", limit: 128
50 | t.datetime "created_at"
51 | end
52 |
53 | add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
54 | add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
55 |
56 | create_table "tags", force: :cascade do |t|
57 | t.string "name"
58 | t.integer "taggings_count", default: 0
59 | end
60 |
61 | add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
62 |
63 | create_table "users", force: :cascade do |t|
64 | t.string "username", default: "", null: false
65 | t.string "email", default: "", null: false
66 | t.string "encrypted_password", default: "", null: false
67 | t.string "reset_password_token"
68 | t.datetime "reset_password_sent_at"
69 | t.datetime "remember_created_at"
70 | t.integer "sign_in_count", default: 0, null: false
71 | t.datetime "current_sign_in_at"
72 | t.datetime "last_sign_in_at"
73 | t.string "current_sign_in_ip"
74 | t.string "last_sign_in_ip"
75 | t.datetime "created_at"
76 | t.datetime "updated_at"
77 | end
78 |
79 | add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
80 | add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
81 | add_index "users", ["username"], name: "index_users_on_username", unique: true, using: :btree
82 |
83 | create_table "users_roles", id: false, force: :cascade do |t|
84 | t.integer "user_id"
85 | t.integer "role_id"
86 | end
87 |
88 | add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id", using: :btree
89 |
90 | create_table "versions", force: :cascade do |t|
91 | t.string "item_type", null: false
92 | t.integer "item_id", null: false
93 | t.string "event", null: false
94 | t.string "whodunnit"
95 | t.text "object"
96 | t.datetime "created_at"
97 | t.text "object_changes"
98 | end
99 |
100 | add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id", using: :btree
101 |
102 | end
103 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
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)
8 |
--------------------------------------------------------------------------------
/fig.yml:
--------------------------------------------------------------------------------
1 | db:
2 | image: postgres:9.3
3 | ports:
4 | - "5432"
5 | web:
6 | build: .
7 | command: bundle exec foreman start web
8 | volumes:
9 | - .:/var/www
10 | ports:
11 | - "5000:5000"
12 | links:
13 | - db
14 |
--------------------------------------------------------------------------------
/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lankz/gunzel/26e12f8ab7918423c7ac4858ce6945e6955ce1fa/lib/assets/.keep
--------------------------------------------------------------------------------
/lib/generators/gunzel/scaffold/scaffold_generator.rb:
--------------------------------------------------------------------------------
1 | require 'rails/generators/erb/scaffold/scaffold_generator'
2 |
3 | module Gunzel
4 | module Generators
5 | class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
6 | def self.source_root
7 | File.expand_path("../templates", __FILE__)
8 | end
9 |
10 | def visible_attributes
11 | attributes - hidden_attributes
12 | end
13 |
14 | def hidden_attributes
15 | attributes.index_by(&:name) \
16 | .slice(*hidden_attribute_names) \
17 | .values
18 | end
19 |
20 | def search_attributes
21 | attributes.select { |a| a.type == :string || a.type == :text }
22 | end
23 |
24 | def search_field
25 | "#{search_attributes.map(&:name).join('_or_')}_cont"
26 | end
27 |
28 | protected
29 |
30 | def available_views
31 | super + %w(_search _table _tabs)
32 | end
33 |
34 | def hidden_attribute_names
35 | %w(children_count deleted_at depth lft lock_version parent_id position
36 | rgt slug)
37 | end
38 | end
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/lib/generators/gunzel/scaffold/templates/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
2 | <%%= f.error_notification %>
3 |
4 | <%- visible_attributes.each do |attribute| -%>
5 | <%%= f.<%= attribute.reference? ? :association : :input %>(:<%= attribute.name %>) %>
6 | <%- end -%>
7 |
8 |
If you are the application owner check the logs for more information.
56 |
57 |
58 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lankz/gunzel/26e12f8ab7918423c7ac4858ce6945e6955ce1fa/public/favicon.ico
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/spec/factories/roles.rb:
--------------------------------------------------------------------------------
1 | # Read about factories at https://github.com/thoughtbot/factory_girl
2 |
3 | FactoryGirl.define do
4 | factory :role do
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/spec/factories/users.rb:
--------------------------------------------------------------------------------
1 | # Read about factories at https://github.com/thoughtbot/factory_girl
2 |
3 | FactoryGirl.define do
4 | factory :user do
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/spec/models/role_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | RSpec.describe Role, :type => :model do
4 | pending "add some examples to (or delete) #{__FILE__}"
5 | end
6 |
--------------------------------------------------------------------------------
/spec/models/user_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | RSpec.describe User, :type => :model do
4 | pending "add some examples to (or delete) #{__FILE__}"
5 | end
6 |
--------------------------------------------------------------------------------
/spec/rails_helper.rb:
--------------------------------------------------------------------------------
1 | # This file is copied to spec/ when you run 'rails generate rspec:install'
2 | ENV["RAILS_ENV"] ||= 'test'
3 | require 'spec_helper'
4 | require File.expand_path("../../config/environment", __FILE__)
5 | require 'rspec/rails'
6 |
7 | # Requires supporting ruby files with custom matchers and macros, etc, in
8 | # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
9 | # run as spec files by default. This means that files in spec/support that end
10 | # in _spec.rb will both be required and run as specs, causing the specs to be
11 | # run twice. It is recommended that you do not name files matching this glob to
12 | # end with _spec.rb. You can configure this pattern with with the --pattern
13 | # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
14 | Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
15 |
16 | # Checks for pending migrations before tests are run.
17 | # If you are not using ActiveRecord, you can remove this line.
18 | ActiveRecord::Migration.maintain_test_schema!
19 |
20 | RSpec.configure do |config|
21 | # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
22 | config.fixture_path = "#{::Rails.root}/spec/fixtures"
23 |
24 | # If you're not using ActiveRecord, or you'd prefer not to run each of your
25 | # examples within a transaction, remove the following line or assign false
26 | # instead of true.
27 | config.use_transactional_fixtures = true
28 |
29 | # RSpec Rails can automatically mix in different behaviours to your tests
30 | # based on their file location, for example enabling you to call `get` and
31 | # `post` in specs under `spec/controllers`.
32 | #
33 | # You can disable this behaviour by removing the line below, and instead
34 | # explicitly tag your specs with their type, e.g.:
35 | #
36 | # RSpec.describe UsersController, :type => :controller do
37 | # # ...
38 | # end
39 | #
40 | # The different available types are documented in the features, such as in
41 | # https://relishapp.com/rspec/rspec-rails/docs
42 | config.infer_spec_type_from_file_location!
43 |
44 | config.include FactoryGirl::Syntax::Methods
45 | config.include Devise::TestHelpers, :type => :controller
46 | end
47 |
--------------------------------------------------------------------------------
/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2 | # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3 | # The generated `.rspec` file contains `--require spec_helper` which will cause this
4 | # file to always be loaded, without a need to explicitly require it in any files.
5 | #
6 | # Given that it is always loaded, you are encouraged to keep this file as
7 | # light-weight as possible. Requiring heavyweight dependencies from this file
8 | # will add to the boot time of your test suite on EVERY test run, even for an
9 | # individual file that may not need all of that loaded. Instead, make a
10 | # separate helper file that requires this one and then use it only in the specs
11 | # that actually need it.
12 | #
13 | # The `.rspec` file also contains a few flags that are not defaults but that
14 | # users commonly want.
15 | #
16 | # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17 | RSpec.configure do |config|
18 | # The settings below are suggested to provide a good initial experience
19 | # with RSpec, but feel free to customize to your heart's content.
20 | =begin
21 | # These two settings work together to allow you to limit a spec run
22 | # to individual examples or groups you care about by tagging them with
23 | # `:focus` metadata. When nothing is tagged with `:focus`, all examples
24 | # get run.
25 | config.filter_run :focus
26 | config.run_all_when_everything_filtered = true
27 |
28 | # Many RSpec users commonly either run the entire suite or an individual
29 | # file, and it's useful to allow more verbose output when running an
30 | # individual spec file.
31 | if config.files_to_run.one?
32 | # Use the documentation formatter for detailed output,
33 | # unless a formatter has already been configured
34 | # (e.g. via a command-line flag).
35 | config.default_formatter = 'doc'
36 | end
37 |
38 | # Print the 10 slowest examples and example groups at the
39 | # end of the spec run, to help surface which specs are running
40 | # particularly slow.
41 | config.profile_examples = 10
42 | =end
43 | # Run specs in random order to surface order dependencies. If you find an
44 | # order dependency and want to debug it, you can fix the order by providing
45 | # the seed, which is printed after each run.
46 | # --seed 1234
47 | config.order = :random
48 |
49 | # Seed global randomization in this process using the `--seed` CLI option.
50 | # Setting this allows you to use `--seed` to deterministically reproduce
51 | # test failures related to randomization by passing the same `--seed` value
52 | # as the one that triggered the failure.
53 | Kernel.srand config.seed
54 | =begin
55 | # rspec-expectations config goes here. You can use an alternate
56 | # assertion/expectation library such as wrong or the stdlib/minitest
57 | # assertions if you prefer.
58 | config.expect_with :rspec do |expectations|
59 | # Enable only the newer, non-monkey-patching expect syntax.
60 | # For more details, see:
61 | # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
62 | expectations.syntax = :expect
63 | end
64 |
65 | # rspec-mocks config goes here. You can use an alternate test double
66 | # library (such as bogus or mocha) by changing the `mock_with` option here.
67 | config.mock_with :rspec do |mocks|
68 | # Enable only the newer, non-monkey-patching expect syntax.
69 | # For more details, see:
70 | # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
71 | mocks.syntax = :expect
72 |
73 | # Prevents you from mocking or stubbing a method that does not exist on
74 | # a real object. This is generally recommended.
75 | mocks.verify_partial_doubles = true
76 | end
77 | =end
78 | end
79 |
--------------------------------------------------------------------------------
/vendor/assets/javascripts/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lankz/gunzel/26e12f8ab7918423c7ac4858ce6945e6955ce1fa/vendor/assets/javascripts/.keep
--------------------------------------------------------------------------------
/vendor/assets/stylesheets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lankz/gunzel/26e12f8ab7918423c7ac4858ce6945e6955ce1fa/vendor/assets/stylesheets/.keep
--------------------------------------------------------------------------------