rough_swal 0.0.2 → 0.0.3

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +40 -66
  3. data/lib/rough_swal/version.rb +1 -1
  4. data/lib/rough_swal.rb +25 -22
  5. data/spec/dummy/Rakefile +1 -1
  6. data/spec/dummy/app/assets/javascripts/application.js +2 -3
  7. data/spec/dummy/app/assets/stylesheets/application.css +4 -7
  8. data/spec/dummy/app/controllers/alerts_controller.rb +5 -1
  9. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  10. data/spec/dummy/bin/rails +1 -1
  11. data/spec/dummy/config/application.rb +0 -14
  12. data/spec/dummy/config/boot.rb +1 -1
  13. data/spec/dummy/config/environment.rb +1 -1
  14. data/spec/dummy/config/environments/development.rb +2 -14
  15. data/spec/dummy/config/environments/production.rb +21 -20
  16. data/spec/dummy/config/environments/test.rb +4 -10
  17. data/spec/dummy/config/initializers/mime_types.rb +1 -0
  18. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  19. data/spec/dummy/config/initializers/session_store.rb +1 -1
  20. data/spec/dummy/config.ru +1 -1
  21. data/spec/dummy/public/404.html +11 -20
  22. data/spec/dummy/public/422.html +11 -20
  23. data/spec/dummy/public/500.html +10 -19
  24. data/spec/rails_helper.rb +1 -1
  25. data/spec/requests/alerts_request_spec.rb +4 -1
  26. metadata +2 -9
  27. data/app/assets/javascripts/sweetalert.min.js +0 -1
  28. data/app/assets/stylesheets/sweetalert.css +0 -715
  29. data/spec/dummy/app/assets/javascripts/sweetalert.min.js +0 -1
  30. data/spec/dummy/app/assets/stylesheets/sweetalert.css +0 -715
  31. data/spec/dummy/bin/setup +0 -29
  32. data/spec/dummy/config/initializers/assets.rb +0 -11
  33. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -3
  34. data/spec/dummy/config/secrets.yml +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9416bce733c16e7b2c01072f87ed8ae662fe1d9d
4
- data.tar.gz: 6ce09c589c9e4157b2e84d6668c8bd7fe96d6793
3
+ metadata.gz: d1351bd26619b558faeb186959fa75343d3c6518
4
+ data.tar.gz: 236b61ab3a03f1088c4ca12520249936dfae8a7c
5
5
  SHA512:
6
- metadata.gz: 4185c813feeb3f073caba723fe654064c230386c6422fec49b02193b32a0afa8a3a0b1fe542d29b56c799b8a421a6780766cf30a2ee72255cf2aa5f58a57d1f9
7
- data.tar.gz: 492ef5763d0109ab0b47cceddae0b48f9b17dfc5a56c69077e100e4be2657e2ddcd4746a7faac461fdb47336290653f2df4e225c1607f38217190dd703511e10
6
+ metadata.gz: 89e4a90c9fbb9a4450f09bc4d630928e5c1563820046725e0aa80a7b2108cad89e152c9687b320c594d84240a638531f8383b412b60f45bf3b6b0265dd13874a
7
+ data.tar.gz: b48b603b200293c025f15598c98443f8112e5e087c2c641a8aaa7ed50039b326c22abbbb93a1cae87525b1a6d4f703b8ae5723d76787649e99af76fbcc1767cb
data/Gemfile.lock CHANGED
@@ -1,49 +1,38 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rough_swal (0.0.1)
5
- rails (~> 4.2.1)
4
+ rough_swal (0.0.2)
5
+ rails (~> 4.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.2.3)
11
- actionpack (= 4.2.3)
12
- actionview (= 4.2.3)
13
- activejob (= 4.2.3)
10
+ actionmailer (4.0.13)
11
+ actionpack (= 4.0.13)
14
12
  mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.3)
17
- actionview (= 4.2.3)
18
- activesupport (= 4.2.3)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.3)
24
- activesupport (= 4.2.3)
25
- builder (~> 3.1)
13
+ actionpack (4.0.13)
14
+ activesupport (= 4.0.13)
15
+ builder (~> 3.1.0)
26
16
  erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- activejob (4.2.3)
30
- activesupport (= 4.2.3)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.3)
33
- activesupport (= 4.2.3)
34
- builder (~> 3.1)
35
- activerecord (4.2.3)
36
- activemodel (= 4.2.3)
37
- activesupport (= 4.2.3)
38
- arel (~> 6.0)
39
- activesupport (4.2.3)
40
- i18n (~> 0.7)
41
- json (~> 1.7, >= 1.7.7)
42
- minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
- tzinfo (~> 1.1)
45
- arel (6.0.0)
46
- builder (3.2.2)
17
+ rack (~> 1.5.2)
18
+ rack-test (~> 0.6.2)
19
+ activemodel (4.0.13)
20
+ activesupport (= 4.0.13)
21
+ builder (~> 3.1.0)
22
+ activerecord (4.0.13)
23
+ activemodel (= 4.0.13)
24
+ activerecord-deprecated_finders (~> 1.0.2)
25
+ activesupport (= 4.0.13)
26
+ arel (~> 4.0.0)
27
+ activerecord-deprecated_finders (1.0.4)
28
+ activesupport (4.0.13)
29
+ i18n (~> 0.6, >= 0.6.9)
30
+ minitest (~> 4.2)
31
+ multi_json (~> 1.3)
32
+ thread_safe (~> 0.1)
33
+ tzinfo (~> 0.3.37)
34
+ arel (4.0.2)
35
+ builder (3.1.4)
47
36
  coveralls (0.8.2)
48
37
  json (~> 1.8)
49
38
  rest-client (>= 1.6.8, < 2)
@@ -60,47 +49,33 @@ GEM
60
49
  factory_girl_rails (4.5.0)
61
50
  factory_girl (~> 4.5.0)
62
51
  railties (>= 3.0.0)
63
- globalid (0.3.5)
64
- activesupport (>= 4.1.0)
65
52
  http-cookie (1.0.2)
66
53
  domain_name (~> 0.5)
67
54
  i18n (0.7.0)
68
55
  json (1.8.3)
69
- loofah (2.0.2)
70
- nokogiri (>= 1.5.9)
71
56
  mail (2.6.3)
72
57
  mime-types (>= 1.16, < 3)
73
58
  mime-types (2.6.1)
74
59
  mini_portile (0.6.2)
75
- minitest (5.7.0)
60
+ minitest (4.7.5)
61
+ multi_json (1.11.1)
76
62
  netrc (0.10.3)
77
63
  nokogiri (1.6.6.2)
78
64
  mini_portile (~> 0.6.0)
79
- rack (1.6.4)
65
+ rack (1.5.5)
80
66
  rack-test (0.6.3)
81
67
  rack (>= 1.0)
82
- rails (4.2.3)
83
- actionmailer (= 4.2.3)
84
- actionpack (= 4.2.3)
85
- actionview (= 4.2.3)
86
- activejob (= 4.2.3)
87
- activemodel (= 4.2.3)
88
- activerecord (= 4.2.3)
89
- activesupport (= 4.2.3)
68
+ rails (4.0.13)
69
+ actionmailer (= 4.0.13)
70
+ actionpack (= 4.0.13)
71
+ activerecord (= 4.0.13)
72
+ activesupport (= 4.0.13)
90
73
  bundler (>= 1.3.0, < 2.0)
91
- railties (= 4.2.3)
92
- sprockets-rails
93
- rails-deprecated_sanitizer (1.0.3)
94
- activesupport (>= 4.2.0.alpha)
95
- rails-dom-testing (1.0.6)
96
- activesupport (>= 4.2.0.beta, < 5.0)
97
- nokogiri (~> 1.6.0)
98
- rails-deprecated_sanitizer (>= 1.0.1)
99
- rails-html-sanitizer (1.0.2)
100
- loofah (~> 2.0)
101
- railties (4.2.3)
102
- actionpack (= 4.2.3)
103
- activesupport (= 4.2.3)
74
+ railties (= 4.0.13)
75
+ sprockets-rails (~> 2.0)
76
+ railties (4.0.13)
77
+ actionpack (= 4.0.13)
78
+ activesupport (= 4.0.13)
104
79
  rake (>= 0.8.7)
105
80
  thor (>= 0.18.1, < 2.0)
106
81
  rake (10.4.2)
@@ -149,8 +124,7 @@ GEM
149
124
  thor (0.19.1)
150
125
  thread_safe (0.3.5)
151
126
  tins (1.5.4)
152
- tzinfo (1.2.2)
153
- thread_safe (~> 0.1)
127
+ tzinfo (0.3.44)
154
128
  unf (0.1.4)
155
129
  unf_ext
156
130
  unf_ext (0.0.7.1)
@@ -1,3 +1,3 @@
1
1
  module RoughSwal
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/rough_swal.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module RoughSwal
2
- PARAMETERS = [
2
+ SWAL_PARAMETERS = [
3
3
  :title,
4
4
  :text,
5
5
  :type,
@@ -25,13 +25,8 @@ module RoughSwal
25
25
  ]
26
26
 
27
27
 
28
- def self.configure(&block)
29
- Configure.(&block) if block_given?
30
- end
31
-
32
-
33
28
  module ParamsSetter
34
- RoughSwal::PARAMETERS.each do |name|
29
+ RoughSwal::SWAL_PARAMETERS.each do |name|
35
30
  class_eval <<-EOS
36
31
  def #{name}(value)
37
32
  @swal_params['#{name}'] = value
@@ -90,15 +85,16 @@ module RoughSwal
90
85
  class Default
91
86
  include ParamsSetter
92
87
 
93
-
94
- def self.call(&block)
95
- @default = new
96
- @default.instance_eval(&block)
97
- end
88
+ class << self
89
+ def call(&block)
90
+ @default = new
91
+ @default.instance_eval(&block)
92
+ end
98
93
 
99
94
 
100
- def self.params
101
- @default ? @default.params : {}
95
+ def params
96
+ @default ? @default.params : {}
97
+ end
102
98
  end
103
99
 
104
100
 
@@ -108,22 +104,24 @@ module RoughSwal
108
104
 
109
105
 
110
106
  def params
111
- @swal_params || {}
107
+ @swal_params
112
108
  end
113
109
  end
114
110
 
115
111
 
116
112
  class Preset
117
- def self.call(name, &block)
118
- @preset ||= {}
119
- @preset[name] = Default.new.tap do |preset|
120
- preset.instance_eval(&block)
113
+ class << self
114
+ def call(name, &block)
115
+ @preset ||= {}
116
+ @preset[name] = Default.new.tap do |preset|
117
+ preset.instance_eval(&block)
118
+ end
121
119
  end
122
- end
123
120
 
124
121
 
125
- def self.find(name)
126
- @preset[name].try(:params) || (raise NotFound)
122
+ def find(name)
123
+ @preset[name].try(:params) || (raise NotFound)
124
+ end
127
125
  end
128
126
 
129
127
 
@@ -175,6 +173,11 @@ module RoughSwal
175
173
  end
176
174
 
177
175
 
176
+ def self.configure(&block)
177
+ Configure.(&block) if block_given?
178
+ end
179
+
180
+
178
181
  self.configure do
179
182
  preset(:success) { type :success }
180
183
  preset(:info) { type :info }
data/spec/dummy/Rakefile CHANGED
@@ -3,4 +3,4 @@
3
3
 
4
4
  require File.expand_path('../config/application', __FILE__)
5
5
 
6
- Rails.application.load_tasks
6
+ Dummy::Application.load_tasks
@@ -2,13 +2,12 @@
2
2
  // listed below.
3
3
  //
4
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.
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
6
  //
7
7
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
8
  // compiled file.
9
9
  //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
11
  // about supported directives.
12
12
  //
13
13
  //= require_tree .
14
- //= require sweetalert.min
@@ -3,14 +3,11 @@
3
3
  * listed below.
4
4
  *
5
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.
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
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.
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.
12
10
  *
13
- *= require_tree .
14
11
  *= require_self
15
- *= require sweetalert.css
12
+ *= require_tree .
16
13
  */
@@ -1,4 +1,8 @@
1
1
  class AlertsController < ApplicationController
2
+ def index
3
+
4
+ end
5
+
2
6
  def direct
3
7
  swal {
4
8
  success 'direct', 'direct rendering'
@@ -8,7 +12,7 @@ class AlertsController < ApplicationController
8
12
  when 'json'
9
13
  render json: {json: :json}
10
14
  when 'text'
11
- render plain: 'text'
15
+ render text: 'text'
12
16
  when 'xml'
13
17
  render xml: '<xml><body>html</body></xml>'
14
18
  else
@@ -2,8 +2,8 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
7
  <%= csrf_meta_tags %>
8
8
  </head>
9
9
  <body>
data/spec/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
3
  require_relative '../config/boot'
4
4
  require 'rails/commands'
@@ -4,7 +4,6 @@ require File.expand_path('../boot', __FILE__)
4
4
  require "active_record/railtie"
5
5
  require "action_controller/railtie"
6
6
  require "action_mailer/railtie"
7
- require "action_view/railtie"
8
7
  require "sprockets/railtie"
9
8
  # require "rails/test_unit/railtie"
10
9
 
@@ -24,19 +23,6 @@ module Dummy
24
23
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
25
24
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
26
25
  # 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
-
31
- config.generators do |g|
32
- g.assets false
33
- g.helper false
34
- g.view false
35
-
36
- g.test_framework :rspec, fixtures: true, view_specs: false, helper_specs: false, routing_specs:
37
- false, controller_specs: true, request_specs: true
38
- g.fixture_replacement :factory_girl, dir: 'spec/factories'
39
- end
40
26
  end
41
27
  end
42
28
 
@@ -1,5 +1,5 @@
1
1
  # Set up gems listed in the Gemfile.
2
2
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
3
 
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
5
  $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -2,4 +2,4 @@
2
2
  require File.expand_path('../application', __FILE__)
3
3
 
4
4
  # Initialize the Rails application.
5
- Rails.application.initialize!
5
+ Dummy::Application.initialize!
@@ -1,4 +1,4 @@
1
- Rails.application.configure do
1
+ Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # In the development environment your application's code is reloaded on
@@ -19,23 +19,11 @@ Rails.application.configure do
19
19
  # Print deprecation notices to the Rails logger.
20
20
  config.active_support.deprecation = :log
21
21
 
22
- # Raise an error on page load if there are pending migrations.
22
+ # Raise an error on page load if there are pending migrations
23
23
  config.active_record.migration_error = :page_load
24
24
 
25
25
  # Debug mode disables concatenation and preprocessing of assets.
26
26
  # This option may cause significant delays in view rendering with a large
27
27
  # number of complex assets.
28
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
29
  end
@@ -1,11 +1,11 @@
1
- Rails.application.configure do
1
+ Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # Code is not reloaded between requests.
5
5
  config.cache_classes = true
6
6
 
7
7
  # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
8
+ # your application in memory, allowing both thread web servers
9
9
  # and those relying on copy on write to perform better.
10
10
  # Rake tasks automatically ignore this option for performance.
11
11
  config.eager_load = true
@@ -16,13 +16,11 @@ Rails.application.configure do
16
16
 
17
17
  # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
18
  # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like
20
- # NGINX, varnish or squid.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
21
20
  # config.action_dispatch.rack_cache = true
22
21
 
23
- # Disable serving static files from the `/public` folder by default since
24
- # Apache or NGINX already handles this.
25
- config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
26
24
 
27
25
  # Compress JavaScripts and CSS.
28
26
  config.assets.js_compressor = :uglifier
@@ -31,22 +29,21 @@ Rails.application.configure do
31
29
  # Do not fallback to assets pipeline if a precompiled asset is missed.
32
30
  config.assets.compile = false
33
31
 
34
- # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35
- # yet still be able to expire them through the digest params.
32
+ # Generate digests for assets URLs.
36
33
  config.assets.digest = true
37
34
 
38
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
35
+ # Version of your assets, change this if you want to expire all your assets.
36
+ config.assets.version = '1.0'
39
37
 
40
38
  # Specifies the header that your server uses for sending files.
41
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
39
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
43
41
 
44
42
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45
43
  # config.force_ssl = true
46
44
 
47
- # Use the lowest log level to ensure availability of diagnostic information
48
- # when problems arise.
49
- config.log_level = :debug
45
+ # Set to :debug to see everything in the log.
46
+ config.log_level = :info
50
47
 
51
48
  # Prepend all log lines with the following tags.
52
49
  # config.log_tags = [ :subdomain, :uuid ]
@@ -58,22 +55,26 @@ Rails.application.configure do
58
55
  # config.cache_store = :mem_cache_store
59
56
 
60
57
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61
- # config.action_controller.asset_host = 'http://assets.example.com'
58
+ # config.action_controller.asset_host = "http://assets.example.com"
59
+
60
+ # Precompile additional assets.
61
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
62
+ # config.assets.precompile += %w( search.js )
62
63
 
63
64
  # Ignore bad email addresses and do not raise email delivery errors.
64
65
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65
66
  # config.action_mailer.raise_delivery_errors = false
66
67
 
67
68
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68
- # the I18n.default_locale when a translation cannot be found).
69
+ # the I18n.default_locale when a translation can not be found).
69
70
  config.i18n.fallbacks = true
70
71
 
71
72
  # Send deprecation notices to registered listeners.
72
73
  config.active_support.deprecation = :notify
73
74
 
75
+ # Disable automatic flushing of the log to improve performance.
76
+ # config.autoflush_log = false
77
+
74
78
  # Use default logging formatter so that PID and timestamp are not suppressed.
75
79
  config.log_formatter = ::Logger::Formatter.new
76
-
77
- # Do not dump schema after migrations.
78
- config.active_record.dump_schema_after_migration = false
79
80
  end
@@ -1,4 +1,4 @@
1
- Rails.application.configure do
1
+ Dummy::Application.configure do
2
2
  # Settings specified here will take precedence over those in config/application.rb.
3
3
 
4
4
  # The test environment is used exclusively to run your application's
@@ -12,9 +12,9 @@ Rails.application.configure do
12
12
  # preloads Rails for running tests, you may have to set it to true.
13
13
  config.eager_load = false
14
14
 
15
- # Configure static file server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
17
- config.static_cache_control = 'public, max-age=3600'
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = "public, max-age=3600"
18
18
 
19
19
  # Show full error reports and disable caching.
20
20
  config.consider_all_requests_local = true
@@ -31,12 +31,6 @@ Rails.application.configure do
31
31
  # ActionMailer::Base.deliveries array.
32
32
  config.action_mailer.delivery_method = :test
33
33
 
34
- # Randomize the order test cases are executed.
35
- config.active_support.test_order = :random
36
-
37
34
  # Print deprecation notices to the stderr.
38
35
  config.active_support.deprecation = :stderr
39
-
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
42
36
  end
@@ -2,3 +2,4 @@
2
2
 
3
3
  # Add new mime types for use in respond_to blocks:
4
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
+ Dummy::Application.config.secret_key_base = '5fcfcc24968ae616c842b536576e020042915f711178a5f0755e1d1f9c06161ce4c1ec2a97e24cb9d345ffc5b48dc4403451229d45ecab720b10980ae1cffdd0'
@@ -1,3 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
data/spec/dummy/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
- require ::File.expand_path('../config/environment', __FILE__)
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
4
  run Rails.application
@@ -2,23 +2,17 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>The page you were looking for doesn't exist (404)</title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
5
  <style>
7
6
  body {
8
7
  background-color: #EFEFEF;
9
8
  color: #2E2F30;
10
9
  text-align: center;
11
10
  font-family: arial, sans-serif;
12
- margin: 0;
13
11
  }
14
12
 
15
13
  div.dialog {
16
- width: 95%;
17
- max-width: 33em;
18
- margin: 4em auto 0;
19
- }
20
-
21
- div.dialog > div {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
22
16
  border: 1px solid #CCC;
23
17
  border-right-color: #999;
24
18
  border-left-color: #999;
@@ -27,8 +21,7 @@
27
21
  border-top-left-radius: 9px;
28
22
  border-top-right-radius: 9px;
29
23
  background-color: white;
30
- padding: 7px 12% 0;
31
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
24
+ padding: 7px 4em 0 4em;
32
25
  }
33
26
 
34
27
  h1 {
@@ -37,19 +30,19 @@
37
30
  line-height: 1.5em;
38
31
  }
39
32
 
40
- div.dialog > p {
41
- margin: 0 0 1em;
42
- padding: 1em;
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
43
37
  background-color: #F7F7F7;
44
38
  border: 1px solid #CCC;
45
39
  border-right-color: #999;
46
- border-left-color: #999;
47
40
  border-bottom-color: #999;
48
41
  border-bottom-left-radius: 4px;
49
42
  border-bottom-right-radius: 4px;
50
43
  border-top-color: #DADADA;
51
44
  color: #666;
52
- box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
53
46
  }
54
47
  </style>
55
48
  </head>
@@ -57,11 +50,9 @@
57
50
  <body>
58
51
  <!-- This file lives in public/404.html -->
59
52
  <div class="dialog">
60
- <div>
61
- <h1>The page you were looking for doesn't exist.</h1>
62
- <p>You may have mistyped the address or the page may have moved.</p>
63
- </div>
64
- <p>If you are the application owner check the logs for more information.</p>
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
65
55
  </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
66
57
  </body>
67
58
  </html>