netzke-testing 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +106 -0
  6. data/Rakefile +1 -0
  7. data/app/assets/javascripts/netzke/.keep +0 -0
  8. data/app/assets/javascripts/netzke/testing/helpers/actions.js.coffee +74 -0
  9. data/app/assets/javascripts/netzke/testing/helpers/expectations.js.coffee +14 -0
  10. data/app/assets/javascripts/netzke/testing/helpers/form.js.coffee +7 -0
  11. data/app/assets/javascripts/netzke/testing/helpers/grid.js.coffee +107 -0
  12. data/app/assets/javascripts/netzke/testing/helpers/queries.js.coffee +88 -0
  13. data/app/assets/vendor/javascripts/expect/expect.js +1253 -0
  14. data/app/assets/vendor/javascripts/mocha/mocha.js +5340 -0
  15. data/app/assets/vendor/stylesheets/mocha/mocha.css +231 -0
  16. data/app/controllers/.keep +0 -0
  17. data/app/controllers/netzke/netzke/testing_controller.rb +28 -0
  18. data/app/helpers/.keep +0 -0
  19. data/app/helpers/netzke_testing_helper.rb +2 -0
  20. data/app/mailers/.keep +0 -0
  21. data/app/models/.keep +0 -0
  22. data/app/views/.keep +0 -0
  23. data/app/views/layouts/netzke/testing.html.erb +35 -0
  24. data/app/views/netzke/index.html.erb +2 -0
  25. data/config/routes.rb +8 -0
  26. data/lib/netzke/testing/engine.rb +6 -0
  27. data/lib/netzke/testing/helpers.rb +47 -0
  28. data/lib/netzke/testing/version.rb +5 -0
  29. data/lib/netzke/testing.rb +22 -0
  30. data/lib/netzke-testing.rb +1 -0
  31. data/netzke-testing.gemspec +23 -0
  32. data/test/controllers/netzke_testing_controller_test.rb +9 -0
  33. data/test/dummy/README.rdoc +28 -0
  34. data/test/dummy/Rakefile +6 -0
  35. data/test/dummy/app/assets/images/.keep +0 -0
  36. data/test/dummy/app/assets/javascripts/application.js +13 -0
  37. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  38. data/test/dummy/app/components/foo.rb +6 -0
  39. data/test/dummy/app/controllers/application_controller.rb +5 -0
  40. data/test/dummy/app/controllers/concerns/.keep +0 -0
  41. data/test/dummy/app/helpers/application_helper.rb +2 -0
  42. data/test/dummy/app/mailers/.keep +0 -0
  43. data/test/dummy/app/models/.keep +0 -0
  44. data/test/dummy/app/models/concerns/.keep +0 -0
  45. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  46. data/test/dummy/bin/bundle +3 -0
  47. data/test/dummy/bin/rails +4 -0
  48. data/test/dummy/bin/rake +4 -0
  49. data/test/dummy/config/application.rb +24 -0
  50. data/test/dummy/config/boot.rb +5 -0
  51. data/test/dummy/config/database.yml +25 -0
  52. data/test/dummy/config/environment.rb +5 -0
  53. data/test/dummy/config/environments/development.rb +23 -0
  54. data/test/dummy/config/environments/production.rb +80 -0
  55. data/test/dummy/config/environments/test.rb +36 -0
  56. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  57. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  58. data/test/dummy/config/initializers/inflections.rb +16 -0
  59. data/test/dummy/config/initializers/mime_types.rb +5 -0
  60. data/test/dummy/config/initializers/secret_token.rb +12 -0
  61. data/test/dummy/config/initializers/session_store.rb +3 -0
  62. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  63. data/test/dummy/config/locales/en.yml +23 -0
  64. data/test/dummy/config/routes.rb +58 -0
  65. data/test/dummy/config.ru +4 -0
  66. data/test/dummy/lib/assets/.keep +0 -0
  67. data/test/dummy/log/.keep +0 -0
  68. data/test/dummy/public/404.html +58 -0
  69. data/test/dummy/public/422.html +58 -0
  70. data/test/dummy/public/500.html +57 -0
  71. data/test/dummy/public/favicon.ico +0 -0
  72. data/test/dummy/spec/javascripts/foo.js.coffee +3 -0
  73. data/test/helpers/netzke_testing_helper_test.rb +4 -0
  74. data/test/integration/navigation_test.rb +10 -0
  75. data/test/netzke_testing_test.rb +7 -0
  76. data/test/test_helper.rb +15 -0
  77. metadata +193 -0
@@ -0,0 +1,231 @@
1
+ @charset "utf-8";
2
+
3
+ body {
4
+ font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
5
+ padding: 60px 50px;
6
+ }
7
+
8
+ #mocha ul, #mocha li {
9
+ margin: 0;
10
+ padding: 0;
11
+ }
12
+
13
+ #mocha ul {
14
+ list-style: none;
15
+ }
16
+
17
+ #mocha h1, #mocha h2 {
18
+ margin: 0;
19
+ }
20
+
21
+ #mocha h1 {
22
+ margin-top: 15px;
23
+ font-size: 1em;
24
+ font-weight: 200;
25
+ }
26
+
27
+ #mocha h1 a {
28
+ text-decoration: none;
29
+ color: inherit;
30
+ }
31
+
32
+ #mocha h1 a:hover {
33
+ text-decoration: underline;
34
+ }
35
+
36
+ #mocha .suite .suite h1 {
37
+ margin-top: 0;
38
+ font-size: .8em;
39
+ }
40
+
41
+ .hidden {
42
+ display: none;
43
+ }
44
+
45
+ #mocha h2 {
46
+ font-size: 12px;
47
+ font-weight: normal;
48
+ cursor: pointer;
49
+ }
50
+
51
+ #mocha .suite {
52
+ margin-left: 15px;
53
+ }
54
+
55
+ #mocha .test {
56
+ margin-left: 15px;
57
+ overflow: hidden;
58
+ }
59
+
60
+ #mocha .test.pending:hover h2::after {
61
+ content: '(pending)';
62
+ font-family: arial;
63
+ }
64
+
65
+ #mocha .test.pass.medium .duration {
66
+ background: #C09853;
67
+ }
68
+
69
+ #mocha .test.pass.slow .duration {
70
+ background: #B94A48;
71
+ }
72
+
73
+ #mocha .test.pass::before {
74
+ content: '✓';
75
+ font-size: 12px;
76
+ display: block;
77
+ float: left;
78
+ margin-right: 5px;
79
+ color: #00d6b2;
80
+ }
81
+
82
+ #mocha .test.pass .duration {
83
+ font-size: 9px;
84
+ margin-left: 5px;
85
+ padding: 2px 5px;
86
+ color: white;
87
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
88
+ -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
89
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
90
+ -webkit-border-radius: 5px;
91
+ -moz-border-radius: 5px;
92
+ -ms-border-radius: 5px;
93
+ -o-border-radius: 5px;
94
+ border-radius: 5px;
95
+ }
96
+
97
+ #mocha .test.pass.fast .duration {
98
+ display: none;
99
+ }
100
+
101
+ #mocha .test.pending {
102
+ color: #0b97c4;
103
+ }
104
+
105
+ #mocha .test.pending::before {
106
+ content: '◦';
107
+ color: #0b97c4;
108
+ }
109
+
110
+ #mocha .test.fail {
111
+ color: #c00;
112
+ }
113
+
114
+ #mocha .test.fail pre {
115
+ color: black;
116
+ }
117
+
118
+ #mocha .test.fail::before {
119
+ content: '✖';
120
+ font-size: 12px;
121
+ display: block;
122
+ float: left;
123
+ margin-right: 5px;
124
+ color: #c00;
125
+ }
126
+
127
+ #mocha .test pre.error {
128
+ color: #c00;
129
+ max-height: 300px;
130
+ overflow: auto;
131
+ }
132
+
133
+ #mocha .test pre {
134
+ display: block;
135
+ float: left;
136
+ clear: left;
137
+ font: 12px/1.5 monaco, monospace;
138
+ margin: 5px;
139
+ padding: 15px;
140
+ border: 1px solid #eee;
141
+ border-bottom-color: #ddd;
142
+ -webkit-border-radius: 3px;
143
+ -webkit-box-shadow: 0 1px 3px #eee;
144
+ -moz-border-radius: 3px;
145
+ -moz-box-shadow: 0 1px 3px #eee;
146
+ }
147
+
148
+ #mocha .test h2 {
149
+ position: relative;
150
+ }
151
+
152
+ #mocha .test a.replay {
153
+ position: absolute;
154
+ top: 3px;
155
+ right: 0;
156
+ text-decoration: none;
157
+ vertical-align: middle;
158
+ display: block;
159
+ width: 15px;
160
+ height: 15px;
161
+ line-height: 15px;
162
+ text-align: center;
163
+ background: #eee;
164
+ font-size: 15px;
165
+ -moz-border-radius: 15px;
166
+ border-radius: 15px;
167
+ -webkit-transition: opacity 200ms;
168
+ -moz-transition: opacity 200ms;
169
+ transition: opacity 200ms;
170
+ opacity: 0.3;
171
+ color: #888;
172
+ }
173
+
174
+ #mocha .test:hover a.replay {
175
+ opacity: 1;
176
+ }
177
+
178
+ #mocha-report.pass .test.fail {
179
+ display: none;
180
+ }
181
+
182
+ #mocha-report.fail .test.pass {
183
+ display: none;
184
+ }
185
+
186
+ #mocha-error {
187
+ color: #c00;
188
+ font-size: 1.5 em;
189
+ font-weight: 100;
190
+ letter-spacing: 1px;
191
+ }
192
+
193
+ #mocha-stats {
194
+ position: fixed;
195
+ top: 15px;
196
+ right: 10px;
197
+ font-size: 12px;
198
+ margin: 0;
199
+ color: #888;
200
+ }
201
+
202
+ #mocha-stats .progress {
203
+ float: right;
204
+ padding-top: 0;
205
+ }
206
+
207
+ #mocha-stats em {
208
+ color: black;
209
+ }
210
+
211
+ #mocha-stats a {
212
+ text-decoration: none;
213
+ color: inherit;
214
+ }
215
+
216
+ #mocha-stats a:hover {
217
+ border-bottom: 1px solid #eee;
218
+ }
219
+
220
+ #mocha-stats li {
221
+ display: inline-block;
222
+ margin: 0 5px;
223
+ list-style: none;
224
+ padding-top: 11px;
225
+ }
226
+
227
+ code .comment { color: #ddd }
228
+ code .init { color: #2F6FAD }
229
+ code .string { color: #5890AD }
230
+ code .keyword { color: #8A6343 }
231
+ code .number { color: #2F6FAD }
File without changes
@@ -0,0 +1,28 @@
1
+ require 'coffee-script'
2
+
3
+ class Netzke::TestingController < ApplicationController
4
+ def components
5
+ component_name = params[:class].gsub("::", "_").underscore
6
+ render :inline => "<%= netzke :#{component_name}, :class_name => '#{params[:class]}', :height => #{params[:height] || 400} %>",
7
+ :layout => true
8
+ end
9
+
10
+ def specs
11
+ coffee = spec_file(params[:name])
12
+ render text: CoffeeScript.compile(coffee)
13
+ end
14
+
15
+ private
16
+
17
+ def spec_file(name)
18
+ spec_root = Pathname.new(Netzke::Testing.spec_root || Rails.root)
19
+
20
+ path = spec_root.join "spec/javascripts/#{name}_spec.js.coffee"
21
+
22
+ if !File.exists?(File.expand_path(path, __FILE__))
23
+ path = spec_root.join "spec/javascripts/#{name}.js.coffee"
24
+ end
25
+
26
+ File.read(File.expand_path(path, __FILE__))
27
+ end
28
+ end
data/app/helpers/.keep ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ module NetzkeTestingHelper
2
+ end
data/app/mailers/.keep ADDED
File without changes
data/app/models/.keep ADDED
File without changes
data/app/views/.keep ADDED
File without changes
@@ -0,0 +1,35 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Netzke Testing</title>
5
+ <%= csrf_meta_tag %>
6
+ <%= load_netzke %>
7
+
8
+ <% if params[:spec] %>
9
+ <%= javascript_include_tag "/assets/javascripts/expect/expect.js" %>
10
+ <%= javascript_include_tag "/assets/javascripts/mocha/mocha.js" %>
11
+ <%= stylesheet_link_tag "/assets/stylesheets/mocha/mocha.css" %>
12
+ <script>
13
+ mocha.setup('bdd');
14
+ mocha.setup({ignoreLeaks: true, slow: 500});
15
+ Ext.onReady(function(){
16
+ Netzke.mochaRunner = mocha.run(function(){Netzke.mochaDone = true;});
17
+ });
18
+ </script>
19
+ <% if params["no-helpers"].nil? %>
20
+ <%= javascript_include_tag "/assets/netzke/testing/helpers/actions" %>
21
+ <%= javascript_include_tag "/assets/netzke/testing/helpers/queries" %>
22
+ <%= javascript_include_tag "/assets/netzke/testing/helpers/expectations" %>
23
+ <%= javascript_include_tag "/assets/netzke/testing/helpers/grid" %>
24
+ <%= javascript_include_tag "/assets/netzke/testing/helpers/form" %>
25
+ <% end %>
26
+ <%= javascript_include_tag "/netzke/specs/#{params[:spec]}" %>
27
+ <% end %>
28
+
29
+ </head>
30
+ <body>
31
+
32
+ <%= yield %>
33
+ <div id="mocha"></div>
34
+ </body>
35
+ </html>
@@ -0,0 +1,2 @@
1
+ <h1>NetzkeTesting#index</h1>
2
+ <p>Find me in app/views/netzke_testing/index.html.erb</p>
data/config/routes.rb ADDED
@@ -0,0 +1,8 @@
1
+ Rails.application.routes.draw do
2
+ # get "netzke_testing/components/:component", controller: :netzke_testing, action: :components
3
+ # get "netzke_testing/specs"
4
+ if Rails.env.test? || Rails.env.development?
5
+ get 'netzke/components/:class' => 'netzke/testing#components', as: :netzke_components
6
+ get 'netzke/specs/*name' => 'netzke/testing#specs', as: :netzke_specs
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module Netzke
2
+ module Testing
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,47 @@
1
+ module Netzke::Testing::Helpers
2
+ def run_mocha_spec(path, options = {})
3
+ component = options[:component] || path.camelcase
4
+ locale = options[:locale]
5
+ url = netzke_components_path(class: component, spec: path)
6
+ url << "&locale=#{locale}" if locale
7
+
8
+ visit url
9
+
10
+ # Wait while the test is running
11
+ wait_for_javascript
12
+
13
+ assert_mocha_results
14
+ end
15
+
16
+ def wait_for_javascript
17
+ start = Time.now
18
+ loop do
19
+ page.execute_script("return Netzke.mochaDone;") ? break : sleep(0.1)
20
+
21
+ # no specs are supposed to run longer than 10 seconds
22
+ raise "Timeout running JavaScript specs for #{component}" if Time.now > start + 10.seconds
23
+ end
24
+
25
+ rescue Selenium::WebDriver::Error::JavascriptError => e
26
+ # give some time for visual examination of the problem
27
+ # (TODO: make configurable)
28
+ sleep 5
29
+
30
+ raise e
31
+ end
32
+
33
+ def assert_mocha_results
34
+ success = page.execute_script(<<-JS)
35
+ var stats = Netzke.mochaRunner.stats;
36
+ return stats.failures == 0 && stats.tests !=0
37
+ JS
38
+
39
+ if !success
40
+ # give some time for visual examination of the problem
41
+ # (TODO: make configurable)
42
+ sleep 5
43
+
44
+ raise "JS expectations failed"
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,5 @@
1
+ module Netzke
2
+ module Testing
3
+ VERSION = "0.9.0"
4
+ end
5
+ end
@@ -0,0 +1,22 @@
1
+ require "netzke/testing/version"
2
+ require "netzke/testing/helpers"
3
+ require "active_support/core_ext"
4
+
5
+ if defined? ::Rails
6
+ require "netzke/testing/engine"
7
+ end
8
+
9
+ module Netzke
10
+ module Testing
11
+ mattr_accessor :spec_root
12
+
13
+ def self.rspec_init(rspec_config)
14
+ @@spec_root = Pathname.new(caller.first).join("../..")
15
+ rspec_config.include(Netzke::Testing::Helpers)
16
+ end
17
+
18
+ def self.setup
19
+ yield self
20
+ end
21
+ end
22
+ end
@@ -0,0 +1 @@
1
+ require 'netzke/testing'
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'netzke/testing/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "netzke-testing"
8
+ spec.version = Netzke::Testing::VERSION
9
+ spec.authors = ["Max Gorin"]
10
+ spec.email = ["gorinme@gmail.com"]
11
+ spec.summary = "Testing helpers for Netzke applications and gems"
12
+ spec.description = "Provides help with developing and testing Netzke components"
13
+ spec.homepage = "http://netzke.org"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+
3
+ class NetzkeTestingControllerTest < ActionController::TestCase
4
+ test "should get index" do
5
+ get :index
6
+ assert_response :success
7
+ end
8
+
9
+ 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
+ Dummy::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 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,13 @@
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 top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,6 @@
1
+ class Foo < Netzke::Base
2
+ def configure(c)
3
+ super
4
+ c.title = 'Test component'
5
+ end
6
+ end
@@ -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,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </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,24 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require "action_controller/railtie"
4
+ require "sprockets/railtie"
5
+
6
+ Bundler.require(*Rails.groups)
7
+ require "netzke_testing"
8
+
9
+ module Dummy
10
+ class Application < Rails::Application
11
+ # Settings in config/environments/* take precedence over those specified here.
12
+ # Application configuration should go into files in config/initializers
13
+ # -- all .rb files in that directory are automatically loaded.
14
+
15
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
+ # config.time_zone = 'Central Time (US & Canada)'
18
+
19
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21
+ # config.i18n.default_locale = :de
22
+ end
23
+ end
24
+
@@ -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.exists?(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
+ 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
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Dummy::Application.initialize!
@@ -0,0 +1,23 @@
1
+ Dummy::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
+ # Print deprecation notices to the Rails logger.
17
+ config.active_support.deprecation = :log
18
+
19
+ # Debug mode disables concatenation and preprocessing of assets.
20
+ # This option may cause significant delays in view rendering with a large
21
+ # number of complex assets.
22
+ config.assets.debug = true
23
+ end