kitt 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rspec +4 -0
  4. data/CHANGELOG.md +3 -0
  5. data/Gemfile +9 -0
  6. data/Gemfile.lock +142 -0
  7. data/LICENSE.txt +20 -0
  8. data/README.md +11 -0
  9. data/Rakefile +6 -0
  10. data/app/assets/images/kitt/.keep +0 -0
  11. data/app/assets/stylesheets/kitt/application.css +15 -0
  12. data/app/controllers/kitt/application_controller.rb +4 -0
  13. data/app/controllers/kitt/commands_controller.rb +30 -0
  14. data/app/helpers/kitt/application_helper.rb +4 -0
  15. data/app/views/layouts/kitt/application.html.erb +14 -0
  16. data/bin/rails +12 -0
  17. data/config/routes.rb +3 -0
  18. data/kitt.gemspec +20 -0
  19. data/lib/kitt/engine.rb +11 -0
  20. data/lib/kitt.rb +6 -0
  21. data/lib/tasks/kitt_tasks.rake +4 -0
  22. data/spec/dummy/README.rdoc +28 -0
  23. data/spec/dummy/Rakefile +6 -0
  24. data/spec/dummy/app/assets/images/.keep +0 -0
  25. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  26. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  27. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  28. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  29. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  30. data/spec/dummy/app/mailers/.keep +0 -0
  31. data/spec/dummy/app/models/.keep +0 -0
  32. data/spec/dummy/app/models/concerns/.keep +0 -0
  33. data/spec/dummy/app/views/layouts/application.html.erb +13 -0
  34. data/spec/dummy/bin/bundle +3 -0
  35. data/spec/dummy/bin/rails +4 -0
  36. data/spec/dummy/bin/rake +4 -0
  37. data/spec/dummy/bin/setup +29 -0
  38. data/spec/dummy/config/application.rb +32 -0
  39. data/spec/dummy/config/boot.rb +5 -0
  40. data/spec/dummy/config/database.yml +21 -0
  41. data/spec/dummy/config/environment.rb +5 -0
  42. data/spec/dummy/config/environments/development.rb +41 -0
  43. data/spec/dummy/config/environments/production.rb +79 -0
  44. data/spec/dummy/config/environments/test.rb +42 -0
  45. data/spec/dummy/config/initializers/assets.rb +11 -0
  46. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  47. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  48. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  49. data/spec/dummy/config/initializers/inflections.rb +16 -0
  50. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  51. data/spec/dummy/config/initializers/session_store.rb +3 -0
  52. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  53. data/spec/dummy/config/locales/en.yml +23 -0
  54. data/spec/dummy/config/routes.rb +4 -0
  55. data/spec/dummy/config/secrets.yml +22 -0
  56. data/spec/dummy/config.ru +4 -0
  57. data/spec/dummy/lib/assets/.keep +0 -0
  58. data/spec/dummy/log/.keep +0 -0
  59. data/spec/dummy/public/404.html +67 -0
  60. data/spec/dummy/public/422.html +67 -0
  61. data/spec/dummy/public/500.html +66 -0
  62. data/spec/dummy/public/favicon.ico +0 -0
  63. data/spec/requests/highfive_spec.rb +86 -0
  64. data/spec/spec_helper.rb +28 -0
  65. metadata +205 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a2c1ed99c91616ab19c82281e3956185091c8d0a
4
+ data.tar.gz: c933a4bbf51a290598bc277a5fc200ff5f5f2022
5
+ SHA512:
6
+ metadata.gz: 226107af852c93d061f7c1952405ba5c8b1657b0c127490695ced7b07af31728afc87f848c089c41966c17ac7a76553fbb16ae3b96bf15e9142e76e7544c582f
7
+ data.tar.gz: cd409aa52fb1e5740674814f14eba75fbd3404927ea8a9d293adc639bf73d058fbf1420d0ea857fce905944c967dcb5900e1cad4366780e642d6dea3471af6d2
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .bundle/
2
+ pkg/
3
+ spec/dummy/db/*.sqlite3
4
+ spec/dummy/log/*.log
5
+ spec/dummy/tmp/
6
+ spec/examples.txt
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --format documentation
3
+ --order random
4
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ ## 1.0.0 / 2015-10-30
2
+
3
+ * Initial release!
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem "pry-rails"
7
+ gem "rspec-rails"
8
+ gem "sqlite3"
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,142 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ kitt (1.0.0)
5
+ rails (~> 4.2.4)
6
+ slack-notifier (~> 1.4)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (4.2.4)
12
+ actionpack (= 4.2.4)
13
+ actionview (= 4.2.4)
14
+ activejob (= 4.2.4)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ rails-dom-testing (~> 1.0, >= 1.0.5)
17
+ actionpack (4.2.4)
18
+ actionview (= 4.2.4)
19
+ activesupport (= 4.2.4)
20
+ rack (~> 1.6)
21
+ rack-test (~> 0.6.2)
22
+ rails-dom-testing (~> 1.0, >= 1.0.5)
23
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
+ actionview (4.2.4)
25
+ activesupport (= 4.2.4)
26
+ builder (~> 3.1)
27
+ erubis (~> 2.7.0)
28
+ rails-dom-testing (~> 1.0, >= 1.0.5)
29
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
+ activejob (4.2.4)
31
+ activesupport (= 4.2.4)
32
+ globalid (>= 0.3.0)
33
+ activemodel (4.2.4)
34
+ activesupport (= 4.2.4)
35
+ builder (~> 3.1)
36
+ activerecord (4.2.4)
37
+ activemodel (= 4.2.4)
38
+ activesupport (= 4.2.4)
39
+ arel (~> 6.0)
40
+ activesupport (4.2.4)
41
+ i18n (~> 0.7)
42
+ json (~> 1.7, >= 1.7.7)
43
+ minitest (~> 5.1)
44
+ thread_safe (~> 0.3, >= 0.3.4)
45
+ tzinfo (~> 1.1)
46
+ arel (6.0.3)
47
+ builder (3.2.2)
48
+ coderay (1.1.0)
49
+ diff-lcs (1.2.5)
50
+ erubis (2.7.0)
51
+ globalid (0.3.6)
52
+ activesupport (>= 4.1.0)
53
+ i18n (0.7.0)
54
+ json (1.8.3)
55
+ loofah (2.0.3)
56
+ nokogiri (>= 1.5.9)
57
+ mail (2.6.3)
58
+ mime-types (>= 1.16, < 3)
59
+ method_source (0.8.2)
60
+ mime-types (2.6.2)
61
+ mini_portile (0.6.2)
62
+ minitest (5.8.1)
63
+ nokogiri (1.6.6.2)
64
+ mini_portile (~> 0.6.0)
65
+ pry (0.10.3)
66
+ coderay (~> 1.1.0)
67
+ method_source (~> 0.8.1)
68
+ slop (~> 3.4)
69
+ pry-rails (0.3.4)
70
+ pry (>= 0.9.10)
71
+ rack (1.6.4)
72
+ rack-test (0.6.3)
73
+ rack (>= 1.0)
74
+ rails (4.2.4)
75
+ actionmailer (= 4.2.4)
76
+ actionpack (= 4.2.4)
77
+ actionview (= 4.2.4)
78
+ activejob (= 4.2.4)
79
+ activemodel (= 4.2.4)
80
+ activerecord (= 4.2.4)
81
+ activesupport (= 4.2.4)
82
+ bundler (>= 1.3.0, < 2.0)
83
+ railties (= 4.2.4)
84
+ sprockets-rails
85
+ rails-deprecated_sanitizer (1.0.3)
86
+ activesupport (>= 4.2.0.alpha)
87
+ rails-dom-testing (1.0.7)
88
+ activesupport (>= 4.2.0.beta, < 5.0)
89
+ nokogiri (~> 1.6.0)
90
+ rails-deprecated_sanitizer (>= 1.0.1)
91
+ rails-html-sanitizer (1.0.2)
92
+ loofah (~> 2.0)
93
+ railties (4.2.4)
94
+ actionpack (= 4.2.4)
95
+ activesupport (= 4.2.4)
96
+ rake (>= 0.8.7)
97
+ thor (>= 0.18.1, < 2.0)
98
+ rake (10.4.2)
99
+ rspec-core (3.3.2)
100
+ rspec-support (~> 3.3.0)
101
+ rspec-expectations (3.3.1)
102
+ diff-lcs (>= 1.2.0, < 2.0)
103
+ rspec-support (~> 3.3.0)
104
+ rspec-mocks (3.3.2)
105
+ diff-lcs (>= 1.2.0, < 2.0)
106
+ rspec-support (~> 3.3.0)
107
+ rspec-rails (3.3.3)
108
+ actionpack (>= 3.0, < 4.3)
109
+ activesupport (>= 3.0, < 4.3)
110
+ railties (>= 3.0, < 4.3)
111
+ rspec-core (~> 3.3.0)
112
+ rspec-expectations (~> 3.3.0)
113
+ rspec-mocks (~> 3.3.0)
114
+ rspec-support (~> 3.3.0)
115
+ rspec-support (3.3.0)
116
+ slack-notifier (1.4.0)
117
+ slop (3.6.0)
118
+ sprockets (3.4.0)
119
+ rack (> 1, < 3)
120
+ sprockets-rails (2.3.3)
121
+ actionpack (>= 3.0)
122
+ activesupport (>= 3.0)
123
+ sprockets (>= 2.8, < 4.0)
124
+ sqlite3 (1.3.11)
125
+ thor (0.19.1)
126
+ thread_safe (0.3.5)
127
+ tzinfo (1.2.2)
128
+ thread_safe (~> 0.1)
129
+
130
+ PLATFORMS
131
+ ruby
132
+
133
+ DEPENDENCIES
134
+ bundler
135
+ kitt!
136
+ pry-rails
137
+ rake
138
+ rspec-rails
139
+ sqlite3
140
+
141
+ BUNDLED WITH
142
+ 1.10.6
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2015 Steve Richert
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # KITT
2
+
3
+ KITT is an experimental Ruby engine for handling Slack commands.
4
+
5
+ [![Gem Version](https://img.shields.io/gem/v/kitt.svg?style=flat-square)](https://rubygems.org/gems/kitt)
6
+ [![Build Status](https://img.shields.io/travis/laserlemon/kitt/master.svg?style=flat-square)](https://travis-ci.org/laserlemon/kitt)
7
+ [![Code Climate](https://img.shields.io/codeclimate/github/laserlemon/kitt.svg?style=flat-square)](https://codeclimate.com/github/laserlemon/kitt)
8
+ [![Coverage Status](https://img.shields.io/codeclimate/coverage/github/laserlemon/kitt.svg?style=flat-square)](https://codeclimate.com/github/laserlemon/kitt)
9
+ [![Dependency Status](https://img.shields.io/gemnasium/laserlemon/kitt.svg?style=flat-square)](https://gemnasium.com/laserlemon/kitt)
10
+
11
+ ![KITT](https://cloud.githubusercontent.com/assets/34264/10855891/8a6ac394-7f1a-11e5-80b5-b182a17f838d.jpg)
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
File without changes
@@ -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 any plugin's vendor/assets/stylesheets directory 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,4 @@
1
+ module KITT
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,30 @@
1
+ module KITT
2
+ class CommandsController < KITT::ApplicationController
3
+ def highfive
4
+ slug = if params[:text].present?
5
+ params[:text].parameterize
6
+ elsif params[:channel_name].in?(%w(directmessage privategroup))
7
+ SecureRandom.uuid
8
+ else
9
+ params[:channel_name]
10
+ end
11
+
12
+ url = "#{params[:team_domain]}.highfive.com/#{slug}"
13
+ text = "Join <@#{params[:user_name]}>'s call at: <https://#{url}|#{url}>"
14
+
15
+ slack.ping(text, {
16
+ channel: params[:channel_id],
17
+ icon_emoji: ":highfive:",
18
+ username: "Highfive"
19
+ })
20
+
21
+ head :ok
22
+ end
23
+
24
+ private
25
+
26
+ def slack
27
+ @slack ||= Slack::Notifier.new(ENV["KITT_INCOMING_WEBHOOK_URL"])
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,4 @@
1
+ module KITT
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>KITT</title>
5
+ <%= stylesheet_link_tag "kitt/application", media: "all" %>
6
+ <%= javascript_include_tag "kitt/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
data/bin/rails ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
3
+
4
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
+ ENGINE_PATH = File.expand_path('../../lib/kitt/engine', __FILE__)
6
+
7
+ # Set up gems listed in the Gemfile.
8
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
9
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
10
+
11
+ require 'rails/all'
12
+ require 'rails/engine/commands'
data/config/routes.rb ADDED
@@ -0,0 +1,3 @@
1
+ KITT::Engine.routes.draw do
2
+ post "highfive" => "commands#highfive"
3
+ end
data/kitt.gemspec ADDED
@@ -0,0 +1,20 @@
1
+ Gem::Specification.new do |spec|
2
+ spec.name = "kitt"
3
+ spec.version = "1.0.0"
4
+
5
+ spec.author = "Steve Richert"
6
+ spec.email = "steve.richert@gmail.com"
7
+ spec.summary = "A Slack command Ruby engine"
8
+ spec.description = "KITT is an experimental Ruby engine for handling Slack commands."
9
+ spec.homepage = "https://github.com/laserlemon/kitt"
10
+ spec.license = "MIT"
11
+
12
+ spec.files = `git ls-files -z`.split("\x0")
13
+ spec.test_files = spec.files.grep(/^spec/)
14
+
15
+ spec.add_dependency "rails", "~> 4.2.4"
16
+ spec.add_dependency "slack-notifier", "~> 1.4"
17
+
18
+ spec.add_development_dependency "bundler"
19
+ spec.add_development_dependency "rake"
20
+ end
@@ -0,0 +1,11 @@
1
+ module KITT
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace KITT
4
+
5
+ initializer "inflections" do
6
+ ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ inflect.acronym "KITT"
8
+ end
9
+ end
10
+ end
11
+ end
data/lib/kitt.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "slack-notifier"
2
+
3
+ require "kitt/engine"
4
+
5
+ module KITT
6
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :kitt 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
File without changes
@@ -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 any plugin's vendor/assets/javascripts directory 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/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -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 any plugin's vendor/assets/stylesheets directory 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
File without changes
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all' %>
6
+ <%= csrf_meta_tags %>
7
+ </head>
8
+ <body>
9
+
10
+ <%= yield %>
11
+
12
+ </body>
13
+ </html>
@@ -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,29 @@
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
@@ -0,0 +1,32 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ require "active_record/railtie"
5
+ require "action_controller/railtie"
6
+ require "action_mailer/railtie"
7
+ require "action_view/railtie"
8
+ # require "sprockets/railtie"
9
+ # require "rails/test_unit/railtie"
10
+
11
+ Bundler.require(*Rails.groups)
12
+ require "kitt"
13
+
14
+ module Dummy
15
+ class Application < Rails::Application
16
+ # Settings in config/environments/* take precedence over those specified here.
17
+ # Application configuration should go into files in config/initializers
18
+ # -- all .rb files in that directory are automatically loaded.
19
+
20
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
21
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
22
+ # config.time_zone = 'Central Time (US & Canada)'
23
+
24
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
25
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
26
+ # config.i18n.default_locale = :de
27
+
28
+ # Do not swallow errors in after_commit/after_rollback callbacks.
29
+ config.active_record.raise_in_transactional_callbacks = true
30
+ end
31
+ end
32
+
@@ -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,21 @@
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
@@ -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,41 @@
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
+ # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31
+ # yet still be able to expire them through the digest params.
32
+ config.assets.digest = true
33
+
34
+ # Adds additional error checking when serving assets at runtime.
35
+ # Checks for improperly declared sprockets dependencies.
36
+ # Raises helpful error messages.
37
+ config.assets.raise_runtime_errors = true
38
+
39
+ # Raises error for missing translations
40
+ # config.action_view.raise_on_missing_translations = true
41
+ end