kinokero 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +44 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +49 -0
  7. data/Gemfile_mock +8 -0
  8. data/LICENSE +20 -0
  9. data/README.md +955 -0
  10. data/Rakefile +1 -0
  11. data/console/.ruby-gemset +1 -0
  12. data/console/.ruby-version +1 -0
  13. data/console/Gemfile +6 -0
  14. data/console/Gemfile.lock +63 -0
  15. data/console/README.md +34 -0
  16. data/console/config/application_configuration.rb +39 -0
  17. data/console/config/gcp_seed.yml +73 -0
  18. data/console/config/kinokero_initializer_template.rb +108 -0
  19. data/console/console +2 -0
  20. data/console/irb_console +2 -0
  21. data/console/lib/appliance_common.rb +73 -0
  22. data/console/twiga.rb +579 -0
  23. data/hp-check.log +244 -0
  24. data/kinokero.gemspec +35 -0
  25. data/lib/kinokero.rb +183 -0
  26. data/lib/kinokero/blank.rb +105 -0
  27. data/lib/kinokero/cloudprint.rb +1159 -0
  28. data/lib/kinokero/device.rb +6 -0
  29. data/lib/kinokero/jingle.rb +176 -0
  30. data/lib/kinokero/log.rb +157 -0
  31. data/lib/kinokero/printer.rb +313 -0
  32. data/lib/kinokero/proxy.rb +341 -0
  33. data/lib/kinokero/ruby_extensions.rb +21 -0
  34. data/lib/kinokero/sasl_xoauth2.rb +164 -0
  35. data/lib/kinokero/version.rb +3 -0
  36. data/lib/proto/cloud_device_description.proto +18 -0
  37. data/lib/proto/cloud_device_state.proto +30 -0
  38. data/lib/proto/cloud_device_state_type.proto +20 -0
  39. data/lib/proto/cloud_device_ui_state.proto +42 -0
  40. data/lib/proto/cloud_device_ui_state_severity.proto +12 -0
  41. data/lib/proto/cloud_job_ticket.proto +18 -0
  42. data/lib/proto/collate.proto +4 -0
  43. data/lib/proto/collate_ticket_item.proto +5 -0
  44. data/lib/proto/color.proto +42 -0
  45. data/lib/proto/color_ticket_item.proto +12 -0
  46. data/lib/proto/copies.proto +6 -0
  47. data/lib/proto/copies_ticket_item.proto +5 -0
  48. data/lib/proto/cover.proto +31 -0
  49. data/lib/proto/cover_state.proto +25 -0
  50. data/lib/proto/device_action_cause.proto +19 -0
  51. data/lib/proto/dpi.proto +27 -0
  52. data/lib/proto/dpi_ticket_item.proto +13 -0
  53. data/lib/proto/duplex.proto +15 -0
  54. data/lib/proto/duplex_ticket_item.proto +8 -0
  55. data/lib/proto/fit_to_page.proto +20 -0
  56. data/lib/proto/fit_to_page_ticket_item.proto +8 -0
  57. data/lib/proto/input_tray_state.proto +31 -0
  58. data/lib/proto/input_tray_unit.proto +35 -0
  59. data/lib/proto/job_state.proto +143 -0
  60. data/lib/proto/local_settings.proto +36 -0
  61. data/lib/proto/localized_string.proto +119 -0
  62. data/lib/proto/margins.proto +33 -0
  63. data/lib/proto/margins_ticket_item.proto +14 -0
  64. data/lib/proto/marker.proto +62 -0
  65. data/lib/proto/marker_state.proto +31 -0
  66. data/lib/proto/media_path.proto +6 -0
  67. data/lib/proto/media_path_state.proto +25 -0
  68. data/lib/proto/media_size.proto +216 -0
  69. data/lib/proto/media_size_ticket_item.proto +17 -0
  70. data/lib/proto/output_bin_state.proto +31 -0
  71. data/lib/proto/output_bin_unit.proto +32 -0
  72. data/lib/proto/page_orientation.proto +16 -0
  73. data/lib/proto/page_orientation_ticket_item.proto +9 -0
  74. data/lib/proto/page_range.proto +15 -0
  75. data/lib/proto/page_range_ticket_item.proto +7 -0
  76. data/lib/proto/print_job_state.proto +18 -0
  77. data/lib/proto/print_job_state_diff.proto +13 -0
  78. data/lib/proto/print_job_ui_state.proto +24 -0
  79. data/lib/proto/print_ticket_section.proto +30 -0
  80. data/lib/proto/printer_description_section.proto +107 -0
  81. data/lib/proto/printer_state_section.proto +49 -0
  82. data/lib/proto/printer_ui_state_section.proto +39 -0
  83. data/lib/proto/printing_speed.proto +35 -0
  84. data/lib/proto/pwg_raster_config.proto +176 -0
  85. data/lib/proto/range_capability.proto +14 -0
  86. data/lib/proto/reverse_order.proto +5 -0
  87. data/lib/proto/reverse_order_ticket_item.proto +5 -0
  88. data/lib/proto/scanner_description_section.proto +5 -0
  89. data/lib/proto/scanner_state_section.proto +25 -0
  90. data/lib/proto/select_capability.proto +31 -0
  91. data/lib/proto/supported_content_type.proto +12 -0
  92. data/lib/proto/typed_value_capability.proto +15 -0
  93. data/lib/proto/vendor_capability.proto +40 -0
  94. data/lib/proto/vendor_state.proto +26 -0
  95. data/lib/proto/vendor_ticket_item.proto +9 -0
  96. data/lib/proto_lib/cloud_device_state.pb.rb +21 -0
  97. data/lib/proto_lib/cloud_device_state_type.pb.rb +16 -0
  98. data/lib/proto_lib/cloud_device_ui_state.pb.rb +22 -0
  99. data/lib/proto_lib/cloud_device_ui_state_severity.pb.rb +17 -0
  100. data/lib/proto_lib/collate.pb.rb +11 -0
  101. data/lib/proto_lib/color.pb.rb +31 -0
  102. data/lib/proto_lib/copies.pb.rb +12 -0
  103. data/lib/proto_lib/cover.pb.rb +21 -0
  104. data/lib/proto_lib/cover_state.pb.rb +27 -0
  105. data/lib/proto_lib/device_action_cause.pb.rb +18 -0
  106. data/lib/proto_lib/dpi.pb.rb +27 -0
  107. data/lib/proto_lib/duplex.pb.rb +26 -0
  108. data/lib/proto_lib/fit_to_page.pb.rb +28 -0
  109. data/lib/proto_lib/input_tray_state.pb.rb +30 -0
  110. data/lib/proto_lib/input_tray_unit.pb.rb +25 -0
  111. data/lib/proto_lib/job_state.pb.rb +99 -0
  112. data/lib/proto_lib/localized_string.pb.rb +118 -0
  113. data/lib/proto_lib/margins.pb.rb +30 -0
  114. data/lib/proto_lib/marker.pb.rb +45 -0
  115. data/lib/proto_lib/marker_state.pb.rb +30 -0
  116. data/lib/proto_lib/media_path.pb.rb +11 -0
  117. data/lib/proto_lib/media_path_state.pb.rb +27 -0
  118. data/lib/proto_lib/media_size.pb.rb +198 -0
  119. data/lib/proto_lib/output_bin_state.pb.rb +30 -0
  120. data/lib/proto_lib/output_bin_unit.pb.rb +22 -0
  121. data/lib/proto_lib/page_orientation.pb.rb +26 -0
  122. data/lib/proto_lib/page_range.pb.rb +20 -0
  123. data/lib/proto_lib/print_job_state_diff.pb.rb +12 -0
  124. data/lib/proto_lib/printer_description_section.pb.rb +30 -0
  125. data/lib/proto_lib/printer_state_section.pb.rb +23 -0
  126. data/lib/proto_lib/printer_ui_state_section.pb.rb +28 -0
  127. data/lib/proto_lib/printing_speed.pb.rb +21 -0
  128. data/lib/proto_lib/pwg_raster_config.pb.rb +103 -0
  129. data/lib/proto_lib/range_capability.pb.rb +19 -0
  130. data/lib/proto_lib/reverse_order.pb.rb +11 -0
  131. data/lib/proto_lib/scanner_description_section.pb.rb +10 -0
  132. data/lib/proto_lib/scanner_state_section.pb.rb +17 -0
  133. data/lib/proto_lib/select_capability.pb.rb +22 -0
  134. data/lib/proto_lib/supported_content_type.pb.rb +13 -0
  135. data/lib/proto_lib/typed_value_capability.pb.rb +19 -0
  136. data/lib/proto_lib/vendor_capability.pb.rb +23 -0
  137. data/lib/proto_lib/vendor_state.pb.rb +27 -0
  138. data/test/.ruby-gemset +1 -0
  139. data/test/.ruby-version +1 -0
  140. data/test/Gemfile +68 -0
  141. data/test/Gemfile.lock +269 -0
  142. data/test/README.md +2 -0
  143. data/test/Rakefile +6 -0
  144. data/test/app/assets/javascripts/application.js +16 -0
  145. data/test/app/assets/stylesheets/application.css +13 -0
  146. data/test/app/controllers/application_controller.rb +13 -0
  147. data/test/app/controllers/home_controller.rb +10 -0
  148. data/test/app/helpers/application_helper.rb +2 -0
  149. data/test/app/views/home/index.html.erb +2 -0
  150. data/test/app/views/home/show.html.erb +2 -0
  151. data/test/app/views/layouts/application.html.erb +14 -0
  152. data/test/bin/bundle +3 -0
  153. data/test/bin/rails +4 -0
  154. data/test/bin/rake +4 -0
  155. data/test/config/application.rb +29 -0
  156. data/test/config/boot.rb +4 -0
  157. data/test/config/database.yml +25 -0
  158. data/test/config/environment.rb +5 -0
  159. data/test/config/environments/development.rb +48 -0
  160. data/test/config/environments/production.rb +95 -0
  161. data/test/config/environments/test.rb +42 -0
  162. data/test/config/initializers/backtrace_silencers.rb +7 -0
  163. data/test/config/initializers/filter_parameter_logging.rb +4 -0
  164. data/test/config/initializers/inflections.rb +16 -0
  165. data/test/config/initializers/mime_types.rb +5 -0
  166. data/test/config/initializers/secret_token.rb +12 -0
  167. data/test/config/initializers/session_store.rb +3 -0
  168. data/test/config/initializers/wrap_parameters.rb +14 -0
  169. data/test/config/locales/en.yml +23 -0
  170. data/test/config/routes.rb +65 -0
  171. data/test/db/development.sqlite3 +0 -0
  172. data/test/db/migrate/20111012050200_add_sessions_table.rb +12 -0
  173. data/test/db/schema.rb +26 -0
  174. data/test/db/seeds.rb +7 -0
  175. data/test/db/test.sqlite3 +0 -0
  176. data/test/log/development.log +0 -0
  177. data/test/log/test.log +0 -0
  178. data/test/test/controllers/home_controller_test.rb +133 -0
  179. data/test/test/ctlr_test_helper.rb +7 -0
  180. data/test/test/fixtures/gcp_seed.yml +51 -0
  181. data/test/test/models/cloudprint_test.rb +186 -0
  182. data/test/test/models/jingle_test.rb +44 -0
  183. data/test/test/models/printer_test.rb +99 -0
  184. data/test/test/models/proxy_test.rb +102 -0
  185. data/test/test/test_helper.rb +31 -0
  186. data/test/test/test_kinokero.rb +234 -0
  187. metadata +462 -0
@@ -0,0 +1,2 @@
1
+ # Kinokero unit & functional testing
2
+
@@ -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
+ Kinokerotest::Application.load_tasks
@@ -0,0 +1,16 @@
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 jquery
14
+ //= require jquery_ujs
15
+ // require turbolinks
16
+ //= 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,13 @@
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
+
6
+ before_action :authenticate_tenant!
7
+
8
+ ## milia defines a default max_tenants, invalid_tenant exception handling
9
+ ## but you can override these if you wish to handle directly
10
+ rescue_from ::Milia::Control::MaxTenantExceeded, :with => :max_tenants
11
+ rescue_from ::Milia::Control::InvalidTenantAccess, :with => :invalid_tenant
12
+
13
+ end
@@ -0,0 +1,10 @@
1
+ class HomeController < ApplicationController
2
+ skip_before_action :authenticate_tenant!, :only => [ :index ]
3
+
4
+ def index
5
+ end
6
+
7
+ def show
8
+ end
9
+
10
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ <h1>Home#index</h1>
2
+ <p>Find me in app/views/home/index.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Home#show</h1>
2
+ <p>Find me in app/views/home/show.html.erb</p>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Kinokerotest</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,29 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(:default, Rails.env)
8
+
9
+ module Kinokerotest
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
+ # uncomment to ensure a common layout for devise forms
15
+
16
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
17
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
18
+ config.time_zone = 'Pacific Time (US & Canada)'
19
+
20
+ # if you want to skip the locale validation or don't care about locales
21
+ # set this to false
22
+ config.i18n.enforce_available_locales = false
23
+
24
+
25
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
26
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
27
+ # config.i18n.default_locale = :de
28
+ end
29
+ end
@@ -0,0 +1,4 @@
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'])
@@ -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
+ Kinokerotest::Application.initialize!
@@ -0,0 +1,48 @@
1
+ Kinokerotest::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # devise says to define default url
5
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
6
+
7
+ # set up for email sending even in dev mode
8
+ # Don't care if the mailer can't send
9
+ config.action_mailer.raise_delivery_errors = false
10
+
11
+ config.action_mailer.delivery_method = :smtp
12
+
13
+ ActionMailer::Base.smtp_settings = {
14
+ :address => "smtp.gmail.com",
15
+ :port => "587",
16
+ :authentication => :plain,
17
+ :user_name => "sender@example.com",
18
+ :password => ENV["SMTP_ENTRY"],
19
+ :enable_starttls_auto => true
20
+ }
21
+
22
+
23
+ # In the development environment your application's code is reloaded on
24
+ # every request. This slows down response time but is perfect for development
25
+ # since you don't have to restart the web server when you make code changes.
26
+ config.cache_classes = false
27
+
28
+ # Do not eager load code on boot.
29
+ config.eager_load = false
30
+
31
+ # Show full error reports and disable caching.
32
+ config.consider_all_requests_local = true
33
+ config.action_controller.perform_caching = false
34
+
35
+ # Don't care if the mailer can't send.
36
+ config.action_mailer.raise_delivery_errors = false
37
+
38
+ # Print deprecation notices to the Rails logger.
39
+ config.active_support.deprecation = :log
40
+
41
+ # Raise an error on page load if there are pending migrations
42
+ config.active_record.migration_error = :page_load
43
+
44
+ # Debug mode disables concatenation and preprocessing of assets.
45
+ # This option may cause significant delays in view rendering with a large
46
+ # number of complex assets.
47
+ config.assets.debug = true
48
+ end
@@ -0,0 +1,95 @@
1
+ Kinokerotest::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # devise says to define default url
5
+ config.action_mailer.default_url_options = { :host => 'secure.simple-milia-app.com', :protocol => 'https' }
6
+
7
+ ActionMailer::Base.delivery_method = :smtp
8
+
9
+ ActionMailer::Base.smtp_settings = {
10
+ :address => 'smtp.sendgrid.net',
11
+ :port => '587',
12
+ :authentication => :plain,
13
+ :user_name => ENV['SENDGRID_USERNAME'],
14
+ :password => ENV['SENDGRID_PASSWORD'],
15
+ :domain => 'heroku.com'
16
+ }
17
+
18
+
19
+ # Code is not reloaded between requests.
20
+ config.cache_classes = true
21
+
22
+ # Eager load code on boot. This eager loads most of Rails and
23
+ # your application in memory, allowing both thread web servers
24
+ # and those relying on copy on write to perform better.
25
+ # Rake tasks automatically ignore this option for performance.
26
+ config.eager_load = true
27
+
28
+ # Full error reports are disabled and caching is turned on.
29
+ config.consider_all_requests_local = false
30
+ config.action_controller.perform_caching = true
31
+
32
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
33
+ # Add `rack-cache` to your Gemfile before enabling this.
34
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
35
+ # config.action_dispatch.rack_cache = true
36
+
37
+ # Disable Rails's static asset server (Apache or nginx will already do this).
38
+ config.serve_static_assets = false
39
+
40
+ # Compress JavaScripts and CSS.
41
+ config.assets.js_compressor = :uglifier
42
+ # config.assets.css_compressor = :sass
43
+
44
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
45
+ config.assets.compile = false
46
+
47
+ # Generate digests for assets URLs.
48
+ config.assets.digest = true
49
+
50
+ # Version of your assets, change this if you want to expire all your assets.
51
+ config.assets.version = '1.0'
52
+
53
+ # Specifies the header that your server uses for sending files.
54
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
55
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
56
+
57
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
58
+ # config.force_ssl = true
59
+
60
+ # Set to :debug to see everything in the log.
61
+ config.log_level = :info
62
+
63
+ # Prepend all log lines with the following tags.
64
+ # config.log_tags = [ :subdomain, :uuid ]
65
+
66
+ # Use a different logger for distributed setups.
67
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
68
+
69
+ # Use a different cache store in production.
70
+ # config.cache_store = :mem_cache_store
71
+
72
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
73
+ # config.action_controller.asset_host = "http://assets.example.com"
74
+
75
+ # Precompile additional assets.
76
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
77
+ # config.assets.precompile += %w( search.js )
78
+
79
+ # Ignore bad email addresses and do not raise email delivery errors.
80
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
81
+ # config.action_mailer.raise_delivery_errors = false
82
+
83
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
84
+ # the I18n.default_locale when a translation can not be found).
85
+ config.i18n.fallbacks = true
86
+
87
+ # Send deprecation notices to registered listeners.
88
+ config.active_support.deprecation = :notify
89
+
90
+ # Disable automatic flushing of the log to improve performance.
91
+ # config.autoflush_log = false
92
+
93
+ # Use default logging formatter so that PID and timestamp are not suppressed.
94
+ config.log_formatter = ::Logger::Formatter.new
95
+ end
@@ -0,0 +1,42 @@
1
+ Kinokerotest::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # devise says to define default url
5
+ config.action_mailer.default_url_options = { :host => "www.example.com" }
6
+
7
+
8
+ # The test environment is used exclusively to run your application's
9
+ # test suite. You never need to work with it otherwise. Remember that
10
+ # your test database is "scratch space" for the test suite and is wiped
11
+ # and recreated between test runs. Don't rely on the data there!
12
+ config.cache_classes = true
13
+
14
+ # Do not eager load code on boot. This avoids loading your whole application
15
+ # just for the purpose of running a single test. If you are using a tool that
16
+ # preloads Rails for running tests, you may have to set it to true.
17
+ config.eager_load = false
18
+
19
+ # Configure static asset server for tests with Cache-Control for performance.
20
+ config.serve_static_assets = true
21
+ config.static_cache_control = "public, max-age=3600"
22
+
23
+ # Show full error reports and disable caching.
24
+ config.consider_all_requests_local = true
25
+ config.action_controller.perform_caching = false
26
+
27
+ # Raise exceptions instead of rendering exception templates.
28
+ config.action_dispatch.show_exceptions = false
29
+
30
+ # Disable request forgery protection in test environment.
31
+ config.action_controller.allow_forgery_protection = false
32
+
33
+ # Tell Action Mailer not to deliver emails to the real world.
34
+ # The :test delivery method accumulates sent emails in the
35
+ # ActionMailer::Base.deliveries array.
36
+ config.action_mailer.delivery_method = :test
37
+
38
+ config.active_record.logger = nil
39
+
40
+ # Print deprecation notices to the stderr.
41
+ config.active_support.deprecation = :stderr
42
+ end
@@ -0,0 +1,7 @@
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!
@@ -0,0 +1,4 @@
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]
@@ -0,0 +1,16 @@
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
@@ -0,0 +1,5 @@
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
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Kinokerotest::Application.config.secret_key_base = '42f28d89f645d0a758edeed938703a7479f51f160de255d78792739eb5ab3796346ef8bc37d9526237208f8a994e0e780a9dbc35c672b5336d19bc718ea9b57f'
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Kinokerotest::Application.config.session_store :cookie_store, key: '_miliatest_session'
@@ -0,0 +1,14 @@
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