devise-authy 1.0.0 → 1.2.1

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 (104) hide show
  1. data/Gemfile +3 -1
  2. data/Gemfile.lock +90 -62
  3. data/Rakefile +1 -1
  4. data/VERSION +1 -1
  5. data/app/controllers/devise/devise_authy_controller.rb +23 -5
  6. data/app/views/devise/enable_authy.html.erb +2 -3
  7. data/app/views/devise/enable_authy.html.haml +2 -5
  8. data/app/views/devise/verify_authy.html.erb +5 -0
  9. data/app/views/devise/verify_authy.html.haml +3 -0
  10. data/authy-devise-demo/Gemfile +1 -0
  11. data/authy-devise-demo/Gemfile.lock +12 -3
  12. data/authy-devise-demo/app/views/devise/devise_authy/enable_authy.html.erb +2 -3
  13. data/authy-devise-demo/app/views/devise/devise_authy/verify_authy.html.erb +5 -0
  14. data/authy-devise-demo/app/views/layouts/application.html.erb +14 -2
  15. data/authy-devise-demo/config/initializers/devise.rb +7 -2
  16. data/authy-devise-demo/config/locales/devise.authy.en.yml +4 -1
  17. data/config/locales/en.yml +4 -1
  18. data/devise-authy.gemspec +62 -51
  19. data/lib/devise-authy.rb +3 -0
  20. data/lib/devise-authy/controllers/helpers.rb +40 -17
  21. data/lib/devise-authy/models/authy_authenticatable.rb +2 -0
  22. data/lib/generators/devise_authy/install_generator.rb +10 -3
  23. data/spec/controllers/devise_authy_controller_spec.rb +134 -45
  24. data/spec/features/authy_authenticatable_spec.rb +95 -0
  25. data/spec/generators_spec.rb +12 -6
  26. data/spec/orm/active_record.rb +1 -1
  27. data/spec/rails-app/Gemfile +8 -0
  28. data/spec/rails-app/Gemfile.lock +111 -0
  29. data/spec/{rails_app → rails-app}/Rakefile +2 -5
  30. data/spec/{rails_app → rails-app}/app/assets/images/rails.png +0 -0
  31. data/spec/rails-app/app/assets/javascripts/application.js +15 -0
  32. data/spec/rails-app/app/assets/javascripts/devise_authy.js +7 -0
  33. data/spec/rails-app/app/assets/javascripts/welcome.js +2 -0
  34. data/spec/rails-app/app/assets/stylesheets/application.css +13 -0
  35. data/spec/{rails_app → rails-app}/app/assets/stylesheets/devise_authy.css +0 -0
  36. data/spec/rails-app/app/assets/stylesheets/welcome.css.scss +3 -0
  37. data/spec/{rails_app → rails-app}/app/controllers/application_controller.rb +0 -1
  38. data/spec/rails-app/app/controllers/welcome_controller.rb +6 -0
  39. data/spec/{rails_app → rails-app}/app/helpers/application_helper.rb +0 -0
  40. data/spec/rails-app/app/helpers/welcome_helper.rb +2 -0
  41. data/spec/{rails_app → rails-app}/app/mailers/.gitkeep +0 -0
  42. data/spec/{rails_app → rails-app}/app/models/.gitkeep +0 -0
  43. data/spec/{rails_app → rails-app}/app/models/user.rb +4 -2
  44. data/spec/{rails_app/app/views/devise/devise_authy/register.html.erb → rails-app/app/views/devise/devise_authy/enable_authy.html.erb} +4 -6
  45. data/spec/rails-app/app/views/devise/devise_authy/verify_authy.html.erb +13 -0
  46. data/spec/rails-app/app/views/devise/devise_authy/verify_authy_installation.html.erb +10 -0
  47. data/spec/rails-app/app/views/layouts/application.html.erb +29 -0
  48. data/spec/rails-app/app/views/welcome/index.html.erb +5 -0
  49. data/spec/{rails_app → rails-app}/config.ru +0 -0
  50. data/spec/{rails_app → rails-app}/config/application.rb +18 -2
  51. data/spec/rails-app/config/boot.rb +6 -0
  52. data/spec/{rails_app → rails-app}/config/database.yml +6 -3
  53. data/spec/{rails_app → rails-app}/config/environment.rb +0 -0
  54. data/spec/{rails_app → rails-app}/config/environments/development.rb +2 -0
  55. data/spec/{rails_app → rails-app}/config/environments/production.rb +0 -0
  56. data/spec/{rails_app → rails-app}/config/environments/test.rb +0 -0
  57. data/spec/rails-app/config/initializers/authy.rb +2 -0
  58. data/spec/{rails_app → rails-app}/config/initializers/backtrace_silencers.rb +0 -0
  59. data/spec/{rails_app → rails-app}/config/initializers/devise.rb +13 -5
  60. data/spec/{rails_app → rails-app}/config/initializers/inflections.rb +5 -0
  61. data/spec/{rails_app → rails-app}/config/initializers/mime_types.rb +0 -0
  62. data/spec/{rails_app → rails-app}/config/initializers/secret_token.rb +1 -1
  63. data/spec/{rails_app → rails-app}/config/initializers/session_store.rb +2 -2
  64. data/spec/{rails_app → rails-app}/config/initializers/wrap_parameters.rb +0 -0
  65. data/spec/{rails_app → rails-app}/config/locales/devise.authy.en.yml +7 -2
  66. data/spec/rails-app/config/locales/devise.en.yml +59 -0
  67. data/spec/rails-app/config/locales/en.yml +5 -0
  68. data/spec/{rails_app → rails-app}/config/routes.rb +3 -2
  69. data/spec/rails-app/db/development.sqlite3 +0 -0
  70. data/spec/{rails_app/db/migrate/20121029205626_devise_create_users.rb → rails-app/db/migrate/20130419164907_devise_create_users.rb} +15 -1
  71. data/spec/{rails_app/db/migrate/20121029205628_devise_authy_add_to_users.rb → rails-app/db/migrate/20130419164936_devise_authy_add_to_users.rb} +5 -2
  72. data/spec/{rails_app → rails-app}/db/schema.rb +7 -12
  73. data/spec/rails-app/db/seeds.rb +7 -0
  74. data/spec/rails-app/lib/assets/.gitkeep +0 -0
  75. data/spec/rails-app/lib/tasks/.gitkeep +0 -0
  76. data/spec/rails-app/public/404.html +26 -0
  77. data/spec/rails-app/public/422.html +26 -0
  78. data/spec/rails-app/public/500.html +25 -0
  79. data/spec/rails-app/public/favicon.ico +0 -0
  80. data/spec/rails-app/public/robots.txt +5 -0
  81. data/spec/{rails_app → rails-app}/script/rails +0 -0
  82. data/spec/routing/routes_spec.rb +20 -8
  83. data/spec/spec_helper.rb +1 -2
  84. data/spec/support/helpers.rb +6 -1
  85. metadata +86 -62
  86. data/spec/integration/authy_authenticatable.rb +0 -88
  87. data/spec/rails_app/app/assets/javascripts/application.js +0 -10
  88. data/spec/rails_app/app/assets/stylesheets/application.css +0 -9
  89. data/spec/rails_app/app/assets/stylesheets/devise_authy.css.scss +0 -26
  90. data/spec/rails_app/app/assets/stylesheets/scaffolds.css.scss +0 -56
  91. data/spec/rails_app/app/controllers/posts_controller.rb +0 -83
  92. data/spec/rails_app/app/helpers/posts_helper.rb +0 -2
  93. data/spec/rails_app/app/models/post.rb +0 -2
  94. data/spec/rails_app/app/views/devise/devise_authy/show.html.erb +0 -10
  95. data/spec/rails_app/app/views/layouts/application.html.erb +0 -24
  96. data/spec/rails_app/app/views/posts/_form.html.erb +0 -25
  97. data/spec/rails_app/app/views/posts/edit.html.erb +0 -6
  98. data/spec/rails_app/app/views/posts/index.html.erb +0 -27
  99. data/spec/rails_app/app/views/posts/new.html.erb +0 -5
  100. data/spec/rails_app/app/views/posts/show.html.erb +0 -15
  101. data/spec/rails_app/config/boot.rb +0 -7
  102. data/spec/rails_app/config/initializers/authy.rb +0 -3
  103. data/spec/rails_app/db/migrate/20121029205627_create_posts.rb +0 -10
  104. data/spec/rails_app/public/favicon.ico +0 -0
File without changes
@@ -7,6 +7,7 @@ require "active_record/railtie"
7
7
  require 'sprockets/railtie'
8
8
 
9
9
  if defined?(Bundler)
10
+ #binding.pry
10
11
  # If you precompile assets before deploying to production, use this line
11
12
  Bundler.require(*Rails.groups(:assets => %w(development test)))
12
13
  # If you want your assets lazily compiled in production, use this line
@@ -19,11 +20,26 @@ require "devise-authy"
19
20
 
20
21
  module RailsApp
21
22
  class Application < Rails::Application
22
- config.filter_parameters << :password
23
-
24
23
  # Configure the default encoding used in templates for Ruby 1.9.
25
24
  config.encoding = "utf-8"
26
25
 
26
+ # Configure sensitive parameters which will be filtered from the log file.
27
+ config.filter_parameters += [:password]
28
+
29
+ # Enable escaping HTML in JSON.
30
+ config.active_support.escape_html_entities_in_json = true
31
+
32
+ # Use SQL instead of Active Record's schema dumper when creating the database.
33
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
34
+ # like if you have constraints or database-specific column types
35
+ # config.active_record.schema_format = :sql
36
+
37
+ # Enforce whitelist mode for mass assignment.
38
+ # This will create an empty whitelist of attributes available for mass-assignment for all models
39
+ # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
40
+ # parameters by using an attr_accessible or attr_protected declaration.
41
+ config.active_record.whitelist_attributes = true
42
+
27
43
  # Enable the asset pipeline
28
44
  config.assets.enabled = true
29
45
 
@@ -0,0 +1,6 @@
1
+ require 'rubygems'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5
+
6
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -1,8 +1,11 @@
1
1
  # SQLite version 3.x
2
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
3
6
  development:
4
7
  adapter: sqlite3
5
- database: "db/devise_authy_dev.sqlite3"
8
+ database: db/development.sqlite3
6
9
  pool: 5
7
10
  timeout: 5000
8
11
 
@@ -11,7 +14,7 @@ development:
11
14
  # Do not set this db to the same as development or production.
12
15
  test:
13
16
  adapter: sqlite3
14
- database: "db/devise_authy_test.sqlite3"
17
+ database: db/test.sqlite3
15
18
  pool: 5
16
19
  timeout: 5000
17
20
 
File without changes
@@ -34,4 +34,6 @@ RailsApp::Application.configure do
34
34
 
35
35
  # Expands the lines which load the assets
36
36
  config.assets.debug = true
37
+
38
+ config.action_mailer.default_url_options = { :host => 'localhost:3000' }
37
39
  end
@@ -0,0 +1,2 @@
1
+ Authy.api_key = 'bf12974d70818a08199d17d5e2bae630'
2
+ Authy.api_uri = 'http://sandbox-api.authy.com/'
@@ -82,7 +82,7 @@ Devise.setup do |config|
82
82
  config.stretches = Rails.env.test? ? 1 : 10
83
83
 
84
84
  # Setup a pepper to generate the encrypted password.
85
- # config.pepper = "b807b7f2d179d3fc2ec9e644f4428996106c56095ce5bb204d38e5ab2cc5e50b9a8b5a0907fb6d655f72e025461d7df2644a777a239d1c2a67bbb1b9c6d0fec1"
85
+ # config.pepper = "1fb52305f8a163568d583979061df5b184b724114fb7f98a93e7b110346b80c4ab05380379f946ea2315f74f2d31cd5c75b36bd8a9866c8ce83fd5a36a5b9da6"
86
86
 
87
87
  # ==> Configuration for :confirmable
88
88
  # A period that the user is allowed to access the website even without
@@ -92,6 +92,14 @@ Devise.setup do |config|
92
92
  # the user cannot access the website without confirming his account.
93
93
  # config.allow_unconfirmed_access_for = 2.days
94
94
 
95
+ # A period that the user is allowed to confirm their account before their
96
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
97
+ # their account within 3 days after the mail was sent, but on the fourth day
98
+ # their account can't be confirmed with the token any more.
99
+ # Default is nil, meaning there is no restriction on how long a user can take
100
+ # before confirming their account.
101
+ # config.confirm_within = 3.days
102
+
95
103
  # If true, requires any email changes to be confirmed (exactly the same way as
96
104
  # initial account confirmation) to be applied. Requires additional unconfirmed_email
97
105
  # db field (see migrations). Until confirmed new email is stored in
@@ -113,8 +121,8 @@ Devise.setup do |config|
113
121
  # config.rememberable_options = {}
114
122
 
115
123
  # ==> Configuration for :validatable
116
- # Range for password length. Default is 6..128.
117
- # config.password_length = 6..128
124
+ # Range for password length. Default is 8..128.
125
+ config.password_length = 8..128
118
126
 
119
127
  # Email regex used to validate email formats. It simply asserts that
120
128
  # an one (and only one) @ exists in the given string. This is mainly
@@ -231,7 +239,7 @@ Devise.setup do |config|
231
239
  # config.omniauth_path_prefix = "/my_engine/users/auth"
232
240
 
233
241
  # ==> Devise Authy Authentication Extension
234
- # Configure extension for devise
235
-
242
+ # How long should the user's device be remembered for.
243
+ # config.authy_remember_device = 1.month
236
244
 
237
245
  end
@@ -8,3 +8,8 @@
8
8
  # inflect.irregular 'person', 'people'
9
9
  # inflect.uncountable %w( fish sheep )
10
10
  # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
@@ -4,4 +4,4 @@
4
4
  # If you change this key, all old signed cookies will become invalid!
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
- RailsApp::Application.config.secret_token = '4ca65f35554ff587273162868e8912766dbfad18a51a3674df31e4cad80b0b6d51c8d66500c81b838ebbf279309ec9c56097510f7111c9d28c5266a9d0af769d'
7
+ RailsApp::Application.config.secret_token = '338e169c5d170a06d8ecb2bcf494f683d69dc832c1b3f241ff2c3aca795806e03e7bf29a9a4be970fdd4502b5530a014e644d4ea96d5908e8b578596f740297e'
@@ -1,8 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- RailsApp::Application.config.session_store :cookie_store, key: '_devise_authy_session'
3
+ RailsApp::Application.config.session_store :cookie_store, key: '_rails-app_session'
4
4
 
5
5
  # Use the database for sessions instead of the cookie-based default,
6
6
  # which shouldn't be used to store highly confidential information
7
7
  # (create the session table with "rails generate session_migration")
8
- # GauthApp2::Application.config.session_store :active_record_store
8
+ # RailsApp::Application.config.session_store :active_record_store
@@ -6,9 +6,14 @@ en:
6
6
  enable_authy: 'Enable'
7
7
  cellphone: 'Enter your cellphone'
8
8
  country: 'Enter you country'
9
+ request_sms: 'Request SMS'
10
+
11
+ authy_verify_installation_title: "Verify your account"
12
+ enable_my_account: 'Enable my account'
9
13
 
10
14
  devise_authy:
11
15
  user:
12
- enabled: 'Two factor authentication was enable'
16
+ enabled: 'Two factor authentication was enabled'
13
17
  not_enabled: 'Something went wrong while enabling two factor authentication'
14
- signed_in: 'Signed in with Authy successfully.'
18
+ signed_in: 'Signed in with Authy successfully.'
19
+ invalid_token: 'The entered token is invalid'
@@ -0,0 +1,59 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your account was successfully confirmed. You are now signed in."
7
+ send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account was not activated yet."
12
+ invalid: "Invalid email or password."
13
+ invalid_token: "Invalid authentication token."
14
+ locked: "Your account is locked."
15
+ not_found_in_database: "Invalid email or password."
16
+ timeout: "Your session expired, please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your account before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock Instructions"
26
+ omniauth_callbacks:
27
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
28
+ success: "Successfully authenticated from %{kind} account."
29
+ passwords:
30
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
31
+ send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
32
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
33
+ updated: "Your password was changed successfully. You are now signed in."
34
+ updated_not_active: "Your password was changed successfully."
35
+ registrations:
36
+ destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
37
+ signed_up: "Welcome! You have signed up successfully."
38
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
39
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
40
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
41
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
42
+ updated: "You updated your account successfully."
43
+ sessions:
44
+ signed_in: "Signed in successfully."
45
+ signed_out: "Signed out successfully."
46
+ unlocks:
47
+ send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
48
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
49
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
50
+ errors:
51
+ messages:
52
+ already_confirmed: "was already confirmed, please try signing in"
53
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
54
+ expired: "has expired, please request a new one"
55
+ not_found: "not found"
56
+ not_locked: "was not locked"
57
+ not_saved:
58
+ one: "1 error prohibited this %{resource} from being saved:"
59
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -1,6 +1,7 @@
1
1
  RailsApp::Application.routes.draw do
2
+ get "welcome/index"
3
+
2
4
  devise_for :users
3
5
 
4
- resources :posts
5
- root :to => 'posts#index'
6
+ root :to => 'welcome#index'
6
7
  end
@@ -1,7 +1,6 @@
1
1
  class DeviseCreateUsers < ActiveRecord::Migration
2
2
  def change
3
3
  create_table(:users) do |t|
4
-
5
4
  ## Database authenticatable
6
5
  t.string :email, :null => false, :default => ""
7
6
  t.string :encrypted_password, :null => false, :default => ""
@@ -20,6 +19,21 @@ class DeviseCreateUsers < ActiveRecord::Migration
20
19
  t.string :current_sign_in_ip
21
20
  t.string :last_sign_in_ip
22
21
 
22
+ ## Confirmable
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
25
+ # t.datetime :confirmation_sent_at
26
+ # t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
32
+
33
+ ## Token authenticatable
34
+ # t.string :authentication_token
35
+
36
+
23
37
  t.timestamps
24
38
  end
25
39
 
@@ -1,15 +1,18 @@
1
1
  class DeviseAuthyAddToUsers < ActiveRecord::Migration
2
2
  def self.up
3
3
  change_table :users do |t|
4
- t.string :authy_id
4
+ t.string :authy_id
5
5
  t.datetime :last_sign_in_with_authy
6
+ t.boolean :authy_enabled, :default => false
6
7
  end
7
8
 
9
+ add_index :users, :authy_id
8
10
  end
9
11
 
10
12
  def self.down
11
13
  change_table :users do |t|
12
- t.remove :authy_id, :last_sign_in_with_authy
14
+ t.remove :authy_id, :last_sign_in_with_authy, :authy_enabled
13
15
  end
14
16
  end
15
17
  end
18
+
@@ -11,18 +11,11 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20121029205628) do
15
-
16
- create_table "posts", :force => true do |t|
17
- t.string "title"
18
- t.text "body"
19
- t.datetime "created_at", :null => false
20
- t.datetime "updated_at", :null => false
21
- end
14
+ ActiveRecord::Schema.define(:version => 20130419164936) do
22
15
 
23
16
  create_table "users", :force => true do |t|
24
- t.string "email", :default => "", :null => false
25
- t.string "encrypted_password", :default => "", :null => false
17
+ t.string "email", :default => "", :null => false
18
+ t.string "encrypted_password", :default => "", :null => false
26
19
  t.string "reset_password_token"
27
20
  t.datetime "reset_password_sent_at"
28
21
  t.datetime "remember_created_at"
@@ -31,12 +24,14 @@ ActiveRecord::Schema.define(:version => 20121029205628) do
31
24
  t.datetime "last_sign_in_at"
32
25
  t.string "current_sign_in_ip"
33
26
  t.string "last_sign_in_ip"
34
- t.datetime "created_at", :null => false
35
- t.datetime "updated_at", :null => false
27
+ t.datetime "created_at", :null => false
28
+ t.datetime "updated_at", :null => false
36
29
  t.string "authy_id"
37
30
  t.datetime "last_sign_in_with_authy"
31
+ t.boolean "authy_enabled", :default => false
38
32
  end
39
33
 
34
+ add_index "users", ["authy_id"], :name => "index_users_on_authy_id"
40
35
  add_index "users", ["email"], :name => "index_users_on_email", :unique => true
41
36
  add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
42
37
 
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)
File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>