expense_gun 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +34 -0
  3. data/app/assets/javascripts/expense_gun/application.js +4 -0
  4. data/app/assets/stylesheets/expense_gun/application.sass +4 -0
  5. data/app/assets/stylesheets/expense_gun/expenses.sass +20 -0
  6. data/app/assets/stylesheets/expense_gun/layout.sass +2 -0
  7. data/app/controllers/expense_gun/application_controller.rb +7 -0
  8. data/app/controllers/expense_gun/expense_lines_controller.rb +64 -0
  9. data/app/controllers/expense_gun/expenses_controller.rb +107 -0
  10. data/app/helpers/expense_gun/application_helper.rb +4 -0
  11. data/app/helpers/expense_gun/form_helper.rb +11 -0
  12. data/app/models/expense_gun/ability.rb +30 -0
  13. data/app/models/expense_gun/category.rb +5 -0
  14. data/app/models/expense_gun/expense.rb +62 -0
  15. data/app/models/expense_gun/expense_line.rb +26 -0
  16. data/app/views/expense_gun/expense_lines/_form.html.slim +16 -0
  17. data/app/views/expense_gun/expense_lines/edit.html.slim +4 -0
  18. data/app/views/expense_gun/expense_lines/new.html.slim +4 -0
  19. data/app/views/expense_gun/expenses/_form.html.slim +5 -0
  20. data/app/views/expense_gun/expenses/edit.html.slim +4 -0
  21. data/app/views/expense_gun/expenses/index.html.slim +63 -0
  22. data/app/views/expense_gun/expenses/new.html.slim +4 -0
  23. data/app/views/expense_gun/expenses/show.html.slim +84 -0
  24. data/app/views/kaminari/bootstrap3/_gap.html.slim +2 -0
  25. data/app/views/kaminari/bootstrap3/_page.html.slim +6 -0
  26. data/app/views/kaminari/bootstrap3/_paginator.html.slim +8 -0
  27. data/config/cucumber.yml +8 -0
  28. data/config/initializers/formtastic.rb +78 -0
  29. data/config/routes.rb +13 -0
  30. data/db/migrate/20141201092102_create_expense_gun_expenses.rb +8 -0
  31. data/db/migrate/20141201100548_expenses_add_state.rb +5 -0
  32. data/db/migrate/20141201111528_create_expense_gun_expense_lines.rb +13 -0
  33. data/db/migrate/20141201115918_create_expense_gun_categories.rb +9 -0
  34. data/db/migrate/20141201145608_expense_lines_add_category_id.rb +5 -0
  35. data/db/migrate/20141202143656_categories_rename_tax.rb +5 -0
  36. data/db/migrate/20141202151845_expenses_add_date.rb +5 -0
  37. data/db/migrate/20141203153649_field_names_like_billing_machine.rb +7 -0
  38. data/lib/expense_gun/admin/category.rb +12 -0
  39. data/lib/expense_gun/engine.rb +9 -0
  40. data/lib/expense_gun/version.rb +3 -0
  41. data/lib/expense_gun.rb +8 -0
  42. data/lib/tasks/cucumber.rake +65 -0
  43. data/lib/tasks/expense_gun_tasks.rake +4 -0
  44. data/spec/dummy/README.rdoc +28 -0
  45. data/spec/dummy/Rakefile +6 -0
  46. data/spec/dummy/app/admin/dashboard.rb +33 -0
  47. data/spec/dummy/app/assets/javascripts/active_admin.js.coffee +1 -0
  48. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  49. data/spec/dummy/app/assets/stylesheets/active_admin.css.scss +17 -0
  50. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  51. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  52. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  53. data/spec/dummy/app/views/layouts/expense_gun/application.html.slim +20 -0
  54. data/spec/dummy/bin/bundle +3 -0
  55. data/spec/dummy/bin/rails +4 -0
  56. data/spec/dummy/bin/rake +4 -0
  57. data/spec/dummy/config/application.rb +23 -0
  58. data/spec/dummy/config/boot.rb +5 -0
  59. data/spec/dummy/config/database.yml +25 -0
  60. data/spec/dummy/config/environment.rb +5 -0
  61. data/spec/dummy/config/environments/development.rb +37 -0
  62. data/spec/dummy/config/environments/production.rb +78 -0
  63. data/spec/dummy/config/environments/test.rb +39 -0
  64. data/spec/dummy/config/initializers/active_admin.rb +233 -0
  65. data/spec/dummy/config/initializers/assets.rb +8 -0
  66. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  67. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  68. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  69. data/spec/dummy/config/initializers/inflections.rb +16 -0
  70. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  71. data/spec/dummy/config/initializers/session_store.rb +3 -0
  72. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  73. data/spec/dummy/config/locales/en.yml +23 -0
  74. data/spec/dummy/config/routes.rb +4 -0
  75. data/spec/dummy/config/secrets.yml +22 -0
  76. data/spec/dummy/config.ru +4 -0
  77. data/spec/dummy/db/schema.rb +42 -0
  78. data/spec/dummy/public/404.html +67 -0
  79. data/spec/dummy/public/422.html +67 -0
  80. data/spec/dummy/public/500.html +66 -0
  81. data/spec/dummy/public/favicon.ico +0 -0
  82. data/spec/factories/expense_gun_category.rb +7 -0
  83. data/spec/factories/expense_gun_expense.rb +11 -0
  84. data/spec/factories/expense_gun_expense_line.rb +10 -0
  85. data/spec/factories.rb +5 -0
  86. data/spec/models/category_spec.rb +12 -0
  87. data/spec/models/expense_line_spec.rb +81 -0
  88. data/spec/models/expense_spec.rb +171 -0
  89. data/spec/rails_helper.rb +52 -0
  90. data/spec/spec_helper.rb +85 -0
  91. metadata +319 -0
@@ -0,0 +1,78 @@
1
+ # encoding: utf-8
2
+
3
+ # Set the default text field size when input is a string. Default is nil.
4
+ # Formtastic::FormBuilder.default_text_field_size = 50
5
+
6
+ # Set the default text area height when input is a text. Default is 20.
7
+ Formtastic::FormBuilder.default_text_area_height = nil
8
+
9
+ # Set the default text area width when input is a text. Default is nil.
10
+ Formtastic::FormBuilder.default_text_area_width = nil
11
+
12
+ # Should all fields be considered "required" by default?
13
+ # Defaults to true.
14
+ Formtastic::FormBuilder.all_fields_required_by_default = false
15
+
16
+ # Should select fields have a blank option/prompt by default?
17
+ # Defaults to true.
18
+ Formtastic::FormBuilder.include_blank_for_select_by_default = false
19
+
20
+ # Set the string that will be appended to the labels/fieldsets which are required
21
+ # It accepts string or procs and the default is a localized version of
22
+ # '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
23
+ # in your locale, it will replace the abbr title properly. But if you don't want to use
24
+ # abbr tag, you can simply give a string as below
25
+ Formtastic::FormBuilder.required_string = "*"
26
+
27
+ # Set the string that will be appended to the labels/fieldsets which are optional
28
+ # Defaults to an empty string ("") and also accepts procs (see required_string above)
29
+ # Formtastic::FormBuilder.optional_string = "(optional)"
30
+
31
+ # Set the way inline errors will be displayed.
32
+ # Defaults to :sentence, valid options are :sentence, :list, :first and :none
33
+ # Formtastic::FormBuilder.inline_errors = :sentence
34
+ # Formtastic uses the following classes as default for hints, inline_errors and error list
35
+
36
+ # If you override the class here, please ensure to override it in your stylesheets as well
37
+ # Formtastic::FormBuilder.default_hint_class = "inline-hints"
38
+ # Formtastic::FormBuilder.default_inline_error_class = "inline-errors"
39
+ # Formtastic::FormBuilder.default_error_list_class = "errors"
40
+
41
+ # Set the method to call on label text to transform or format it for human-friendly
42
+ # reading when formtastic is used without object. Defaults to :humanize.
43
+ # Formtastic::FormBuilder.label_str_method = :humanize
44
+
45
+ # Set the array of methods to try calling on parent objects in :select and :radio inputs
46
+ # for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
47
+ # that is found on the object will be used.
48
+ # Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
49
+ # Formtastic::FormBuilder.collection_label_methods = [
50
+ # "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
51
+
52
+ # Specifies if labels/hints for input fields automatically be looked up using I18n.
53
+ # Default value: true. Overridden for specific fields by setting value to true,
54
+ # i.e. :label => true, or :hint => true (or opposite depending on initialized value)
55
+ Formtastic::FormBuilder.i18n_lookups_by_default = {label: true, hint: true}
56
+
57
+ # Specifies if I18n lookups of the default I18n Localizer should be cached to improve performance.
58
+ # Defaults to true.
59
+ Formtastic::FormBuilder.i18n_cache_lookups = false
60
+
61
+ # Specifies the class to use for localization lookups. You can create your own
62
+ # class and use it instead by subclassing Formtastic::Localizer (which is the default).
63
+ # Formtastic::FormBuilder.i18n_localizer = MyOwnLocalizer
64
+
65
+ # You can add custom inputs or override parts of Formtastic by subclassing Formtastic::FormBuilder and
66
+ # specifying that class here. Defaults to Formtastic::FormBuilder.
67
+ Formtastic::Helpers::FormHelper.builder = FormtasticBootstrap::FormBuilder
68
+
69
+ # You can opt-in to Formtastic's use of the HTML5 `required` attribute on `<input>`, `<select>`
70
+ # and `<textarea>` tags by setting this to false (defaults to true).
71
+ Formtastic::FormBuilder.use_required_attribute = false
72
+
73
+ # You can opt-in to new HTML5 browser validations (for things like email and url inputs) by setting
74
+ # this to false. Doing so will add a `novalidate` attribute to the `<form>` tag.
75
+ # See http://diveintohtml5.org/forms.html#validation for more info.
76
+ # Formtastic::FormBuilder.perform_browser_validations = true
77
+
78
+ Formtastic::FormBuilder.escape_html_entities_in_hints_and_labels = false
data/config/routes.rb ADDED
@@ -0,0 +1,13 @@
1
+ ExpenseGun::Engine.routes.draw do
2
+ resources :expenses, except: [:destroy] do
3
+ resources :expense_lines
4
+ member do
5
+ %w(submit accept refuse cancel).map { |action| patch action }
6
+ end
7
+ end
8
+
9
+ get "/expenses/state/:state" => "expenses#index"
10
+ get "/expenses/state/:state/page/:page" => "expenses#index"
11
+
12
+ get "/" => redirect{ ExpenseGun::Engine.routes.url_helpers.expenses_path }
13
+ end
@@ -0,0 +1,8 @@
1
+ class CreateExpenseGunExpenses < ActiveRecord::Migration
2
+ def change
3
+ create_table :expense_gun_expenses do |t|
4
+ t.string :name
5
+ t.timestamps
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ class ExpensesAddState < ActiveRecord::Migration
2
+ def change
3
+ add_column :expense_gun_expenses, :state, :string, after: :name
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ class CreateExpenseGunExpenseLines < ActiveRecord::Migration
2
+ def change
3
+ create_table :expense_gun_expense_lines do |t|
4
+ t.integer :expense_id
5
+ t.string :name
6
+ t.date :date
7
+ t.float :amount
8
+ t.float :tax_part
9
+ t.float :company_part
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ class CreateExpenseGunCategories < ActiveRecord::Migration
2
+ def change
3
+ create_table :expense_gun_categories do |t|
4
+ t.string :name
5
+ t.string :code
6
+ t.boolean :tax
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class ExpenseLinesAddCategoryId < ActiveRecord::Migration
2
+ def change
3
+ add_column :expense_gun_expense_lines, :category_id, :integer, after: :expense_id
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class CategoriesRenameTax < ActiveRecord::Migration
2
+ def change
3
+ rename_column :expense_gun_categories, :tax, :tax_deductible
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class ExpensesAddDate < ActiveRecord::Migration
2
+ def change
3
+ add_column :expense_gun_expenses, :date, :date, after: :name
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ class FieldNamesLikeBillingMachine < ActiveRecord::Migration
2
+ def change
3
+ rename_column :expense_gun_expense_lines, :amount, :total_all_taxes
4
+ rename_column :expense_gun_expense_lines, :tax_part, :vat
5
+ rename_column :expense_gun_categories, :tax_deductible, :vat_deductible
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ ActiveAdmin.register ExpenseGun::Category do
2
+ scope :all, default: true
3
+
4
+ permit_params :name, :code, :tax_deductible
5
+
6
+ index do
7
+ column :name
8
+ column :code
9
+ column :tax_deductible
10
+ actions
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ module ExpenseGun
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace ExpenseGun
4
+
5
+ initializer :expense_gun do
6
+ ActiveAdmin.application.load_paths.unshift File.expand_path("../admin", __FILE__)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ module ExpenseGun
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1,8 @@
1
+ Gem.loaded_specs["expense_gun"].dependencies.each do |d|
2
+ require d.name
3
+ end
4
+
5
+ require "expense_gun/engine"
6
+
7
+ module ExpenseGun
8
+ end
@@ -0,0 +1,65 @@
1
+ # IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
2
+ # It is recommended to regenerate this file in the future when you upgrade to a
3
+ # newer version of cucumber-rails. Consider adding your own code to a new file
4
+ # instead of editing this one. Cucumber will automatically load all features/**/*.rb
5
+ # files.
6
+
7
+
8
+ unless ARGV.any? {|a| a =~ /^gems/} # Don't load anything when running the gems:* tasks
9
+
10
+ vendored_cucumber_bin = Dir["#{Rails.root}/vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
11
+ $LOAD_PATH.unshift(File.dirname(vendored_cucumber_bin) + '/../lib') unless vendored_cucumber_bin.nil?
12
+
13
+ begin
14
+ require 'cucumber/rake/task'
15
+
16
+ namespace :cucumber do
17
+ Cucumber::Rake::Task.new({:ok => 'test:prepare'}, 'Run features that should pass') do |t|
18
+ t.binary = vendored_cucumber_bin # If nil, the gem's binary is used.
19
+ t.fork = true # You may get faster startup if you set this to false
20
+ t.profile = 'default'
21
+ end
22
+
23
+ Cucumber::Rake::Task.new({:wip => 'test:prepare'}, 'Run features that are being worked on') do |t|
24
+ t.binary = vendored_cucumber_bin
25
+ t.fork = true # You may get faster startup if you set this to false
26
+ t.profile = 'wip'
27
+ end
28
+
29
+ Cucumber::Rake::Task.new({:rerun => 'test:prepare'}, 'Record failing features and run only them if any exist') do |t|
30
+ t.binary = vendored_cucumber_bin
31
+ t.fork = true # You may get faster startup if you set this to false
32
+ t.profile = 'rerun'
33
+ end
34
+
35
+ desc 'Run all features'
36
+ task :all => [:ok, :wip]
37
+
38
+ task :statsetup do
39
+ require 'rails/code_statistics'
40
+ ::STATS_DIRECTORIES << %w(Cucumber\ features features) if File.exist?('features')
41
+ ::CodeStatistics::TEST_TYPES << "Cucumber features" if File.exist?('features')
42
+ end
43
+ end
44
+ desc 'Alias for cucumber:ok'
45
+ task :cucumber => 'cucumber:ok'
46
+
47
+ task :default => :cucumber
48
+
49
+ task :features => :cucumber do
50
+ STDERR.puts "*** The 'features' task is deprecated. See rake -T cucumber ***"
51
+ end
52
+
53
+ # In case we don't have the generic Rails test:prepare hook, append a no-op task that we can depend upon.
54
+ task 'test:prepare' do
55
+ end
56
+
57
+ task :stats => 'cucumber:statsetup'
58
+ rescue LoadError
59
+ desc 'cucumber rake task not available (cucumber not installed)'
60
+ task :cucumber do
61
+ abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
62
+ end
63
+ end
64
+
65
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :expense_gun do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,33 @@
1
+ ActiveAdmin.register_page "Dashboard" do
2
+
3
+ menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }
4
+
5
+ content title: proc{ I18n.t("active_admin.dashboard") } do
6
+ div class: "blank_slate_container", id: "dashboard_default_message" do
7
+ span class: "blank_slate" do
8
+ span I18n.t("active_admin.dashboard_welcome.welcome")
9
+ small I18n.t("active_admin.dashboard_welcome.call_to_action")
10
+ end
11
+ end
12
+
13
+ # Here is an example of a simple dashboard with columns and panels.
14
+ #
15
+ # columns do
16
+ # column do
17
+ # panel "Recent Posts" do
18
+ # ul do
19
+ # Post.recent(5).map do |post|
20
+ # li link_to(post.title, admin_post_path(post))
21
+ # end
22
+ # end
23
+ # end
24
+ # end
25
+
26
+ # column do
27
+ # panel "Info" do
28
+ # para "Welcome to ActiveAdmin."
29
+ # end
30
+ # end
31
+ # end
32
+ end # content
33
+ end
@@ -0,0 +1 @@
1
+ #= require active_admin/base
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,17 @@
1
+ // SASS variable overrides must be declared before loading up Active Admin's styles.
2
+ //
3
+ // To view the variables that Active Admin provides, take a look at
4
+ // `app/assets/stylesheets/active_admin/mixins/_variables.css.scss` in the
5
+ // Active Admin source.
6
+ //
7
+ // For example, to change the sidebar width:
8
+ // $sidebar-width: 242px;
9
+
10
+ // Active Admin's got SASS!
11
+ @import "active_admin/mixins";
12
+ @import "active_admin/base";
13
+
14
+ // Overriding any non-variable SASS must be done after the fact.
15
+ // For example, to change the default status-tag color:
16
+ //
17
+ // .status_tag { background: #6090DB; }
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,20 @@
1
+ doctype 5
2
+ html
3
+ head
4
+ meta charset="utf-8"
5
+ meta name="viewport" content="width=device-width, initial-scale=1"
6
+ title Expense Gun
7
+ = stylesheet_link_tag "expense_gun/application", media: "all"
8
+ = javascript_include_tag "expense_gun/application"
9
+ = csrf_meta_tags
10
+ body
11
+ .container
12
+ #flash
13
+ - flash.each do |name, msg|
14
+ p class="alert alert-#{name}"
15
+ = msg
16
+ button.close data-dismiss="alert"
17
+ span aria-hidden="true" &times;
18
+ span class="sr-only" Close
19
+
20
+ main == yield
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "expense_gun"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+ end
22
+ end
23
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
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
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,37 @@
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
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
+
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
37
+ end
@@ -0,0 +1,78 @@
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 nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
36
+
37
+ # Specifies the header that your server uses for sending files.
38
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
+
41
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42
+ # config.force_ssl = true
43
+
44
+ # Set to :debug to see everything in the log.
45
+ config.log_level = :info
46
+
47
+ # Prepend all log lines with the following tags.
48
+ # config.log_tags = [ :subdomain, :uuid ]
49
+
50
+ # Use a different logger for distributed setups.
51
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
52
+
53
+ # Use a different cache store in production.
54
+ # config.cache_store = :mem_cache_store
55
+
56
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57
+ # config.action_controller.asset_host = "http://assets.example.com"
58
+
59
+ # Ignore bad email addresses and do not raise email delivery errors.
60
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
61
+ # config.action_mailer.raise_delivery_errors = false
62
+
63
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
64
+ # the I18n.default_locale when a translation cannot be found).
65
+ config.i18n.fallbacks = true
66
+
67
+ # Send deprecation notices to registered listeners.
68
+ config.active_support.deprecation = :notify
69
+
70
+ # Disable automatic flushing of the log to improve performance.
71
+ # config.autoflush_log = false
72
+
73
+ # Use default logging formatter so that PID and timestamp are not suppressed.
74
+ config.log_formatter = ::Logger::Formatter.new
75
+
76
+ # Do not dump schema after migrations.
77
+ config.active_record.dump_schema_after_migration = false
78
+ end