introspective_admin 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +279 -0
  5. data/LICENSE +22 -0
  6. data/MIT-LICENSE +20 -0
  7. data/README.md +52 -0
  8. data/Rakefile +26 -0
  9. data/bin/rails +12 -0
  10. data/introspective_admin.gemspec +38 -0
  11. data/lib/introspective_admin/base.rb +170 -0
  12. data/lib/introspective_admin/version.rb +3 -0
  13. data/lib/introspective_admin.rb +4 -0
  14. data/lib/tasks/introspective_admin_tasks.rake +4 -0
  15. data/spec/admin/company_admin_spec.rb +72 -0
  16. data/spec/admin/job_admin_spec.rb +61 -0
  17. data/spec/admin/location_admin_spec.rb +65 -0
  18. data/spec/admin/project__admin_spec.rb +71 -0
  19. data/spec/dummy/README.rdoc +28 -0
  20. data/spec/dummy/Rakefile +6 -0
  21. data/spec/dummy/app/admin/company_admin.rb +4 -0
  22. data/spec/dummy/app/admin/job_admin.rb +4 -0
  23. data/spec/dummy/app/admin/location_admin.rb +4 -0
  24. data/spec/dummy/app/admin/project_admin.rb +6 -0
  25. data/spec/dummy/app/admin/role_admin.rb +5 -0
  26. data/spec/dummy/app/admin/user_admin.rb +9 -0
  27. data/spec/dummy/app/assets/images/.keep +0 -0
  28. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  29. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  30. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  31. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  32. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  33. data/spec/dummy/app/mailers/.keep +0 -0
  34. data/spec/dummy/app/models/.keep +0 -0
  35. data/spec/dummy/app/models/abstract_adapter.rb +13 -0
  36. data/spec/dummy/app/models/admin_user.rb +6 -0
  37. data/spec/dummy/app/models/chat.rb +18 -0
  38. data/spec/dummy/app/models/chat_message.rb +34 -0
  39. data/spec/dummy/app/models/chat_message_user.rb +17 -0
  40. data/spec/dummy/app/models/chat_user.rb +16 -0
  41. data/spec/dummy/app/models/company.rb +12 -0
  42. data/spec/dummy/app/models/concerns/.keep +0 -0
  43. data/spec/dummy/app/models/job.rb +10 -0
  44. data/spec/dummy/app/models/locatable.rb +6 -0
  45. data/spec/dummy/app/models/location.rb +26 -0
  46. data/spec/dummy/app/models/location_beacon.rb +16 -0
  47. data/spec/dummy/app/models/location_gps.rb +64 -0
  48. data/spec/dummy/app/models/project.rb +20 -0
  49. data/spec/dummy/app/models/project_job.rb +7 -0
  50. data/spec/dummy/app/models/role.rb +25 -0
  51. data/spec/dummy/app/models/team.rb +9 -0
  52. data/spec/dummy/app/models/team_user.rb +13 -0
  53. data/spec/dummy/app/models/user/chatter.rb +79 -0
  54. data/spec/dummy/app/models/user.rb +75 -0
  55. data/spec/dummy/app/models/user_location.rb +28 -0
  56. data/spec/dummy/app/models/user_project_job.rb +16 -0
  57. data/spec/dummy/app/views/layouts/application.html.erb +13 -0
  58. data/spec/dummy/bin/bundle +3 -0
  59. data/spec/dummy/bin/rails +4 -0
  60. data/spec/dummy/bin/rake +4 -0
  61. data/spec/dummy/bin/setup +29 -0
  62. data/spec/dummy/config/application.rb +32 -0
  63. data/spec/dummy/config/boot.rb +5 -0
  64. data/spec/dummy/config/database.yml +18 -0
  65. data/spec/dummy/config/environment.rb +11 -0
  66. data/spec/dummy/config/environments/development.rb +41 -0
  67. data/spec/dummy/config/environments/production.rb +79 -0
  68. data/spec/dummy/config/environments/test.rb +43 -0
  69. data/spec/dummy/config/initializers/active_admin.rb +7 -0
  70. data/spec/dummy/config/initializers/assets.rb +11 -0
  71. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  72. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  73. data/spec/dummy/config/initializers/devise.rb +260 -0
  74. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  75. data/spec/dummy/config/initializers/inflections.rb +16 -0
  76. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  77. data/spec/dummy/config/initializers/session_store.rb +3 -0
  78. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  79. data/spec/dummy/config/locales/en.yml +23 -0
  80. data/spec/dummy/config/routes.rb +9 -0
  81. data/spec/dummy/config/secrets.yml +22 -0
  82. data/spec/dummy/config.ru +4 -0
  83. data/spec/dummy/db/development.sqlite3 +0 -0
  84. data/spec/dummy/db/migrate/20141002205024_devise_create_users.rb +42 -0
  85. data/spec/dummy/db/migrate/20141002211055_devise_create_admin_users.rb +48 -0
  86. data/spec/dummy/db/migrate/20141002211057_create_active_admin_comments.rb +19 -0
  87. data/spec/dummy/db/migrate/20141002220722_add_lockable_to_users.rb +8 -0
  88. data/spec/dummy/db/migrate/20150406213646_create_companies.rb +11 -0
  89. data/spec/dummy/db/migrate/20150414213154_add_user_authentication_token.rb +11 -0
  90. data/spec/dummy/db/migrate/20150415222005_create_roles.rb +12 -0
  91. data/spec/dummy/db/migrate/20150505181635_create_chats.rb +9 -0
  92. data/spec/dummy/db/migrate/20150505181636_create_chat_users.rb +11 -0
  93. data/spec/dummy/db/migrate/20150505181640_create_chat_messages.rb +11 -0
  94. data/spec/dummy/db/migrate/20150507191529_create_chat_message_users.rb +11 -0
  95. data/spec/dummy/db/migrate/20150601200526_create_locations.rb +12 -0
  96. data/spec/dummy/db/migrate/20150601200533_create_locatables.rb +10 -0
  97. data/spec/dummy/db/migrate/20150601212924_create_location_beacons.rb +15 -0
  98. data/spec/dummy/db/migrate/20150601213542_create_location_gps.rb +12 -0
  99. data/spec/dummy/db/migrate/20150609201823_create_user_locations.rb +14 -0
  100. data/spec/dummy/db/migrate/20150617232519_create_projects.rb +10 -0
  101. data/spec/dummy/db/migrate/20150617232521_create_jobs.rb +9 -0
  102. data/spec/dummy/db/migrate/20150617232522_create_project_jobs.rb +11 -0
  103. data/spec/dummy/db/migrate/20150623170133_create_user_project_jobs.rb +12 -0
  104. data/spec/dummy/db/migrate/20150701234929_create_teams.rb +11 -0
  105. data/spec/dummy/db/migrate/20150701234930_create_team_users.rb +11 -0
  106. data/spec/dummy/db/migrate/20150727214950_add_confirmable_to_devise.rb +11 -0
  107. data/spec/dummy/db/migrate/20150820190524_add_user_names.rb +6 -0
  108. data/spec/dummy/db/migrate/20150909225019_add_password_to_project.rb +5 -0
  109. data/spec/dummy/db/schema.rb +261 -0
  110. data/spec/dummy/lib/assets/.keep +0 -0
  111. data/spec/dummy/log/.keep +0 -0
  112. data/spec/dummy/public/404.html +67 -0
  113. data/spec/dummy/public/422.html +67 -0
  114. data/spec/dummy/public/500.html +66 -0
  115. data/spec/dummy/public/favicon.ico +0 -0
  116. data/spec/rails_helper.rb +13 -0
  117. data/spec/support/blueprints.rb +119 -0
  118. data/spec/support/location_helper.rb +56 -0
  119. metadata +420 -0
@@ -0,0 +1,9 @@
1
+ class CreateJobs < ActiveRecord::Migration
2
+ def change
3
+ create_table :jobs do |t|
4
+ t.string :title, null: false
5
+
6
+ t.timestamps null: false
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class CreateProjectJobs < ActiveRecord::Migration
2
+ def change
3
+ create_table :project_jobs do |t|
4
+ t.references :project, index: true, null: false, foreign_key: true
5
+ t.references :job, index: true, null: false, foreign_key: true
6
+
7
+ t.timestamps null: false
8
+ end
9
+ add_index :project_jobs, [:project_id,:job_id], unique: true
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ class CreateUserProjectJobs < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_project_jobs do |t|
4
+ t.references :user, index: true, foreign_key: true, null: false
5
+ t.references :project, index: true, foreign_key: true, null: false
6
+ t.references :job, index: true, foreign_key: true, null: false
7
+
8
+ t.timestamps null: false
9
+ end
10
+ add_index :user_project_jobs, [:user_id,:project_id,:job_id], unique: true
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ class CreateTeams < ActiveRecord::Migration
2
+ def change
3
+ create_table :teams do |t|
4
+ t.string :name
5
+ t.references :project, index: true, foreign_key: true
6
+ t.references :creator, references: :users, index: true, foreign_key: true
7
+
8
+ t.timestamps null: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateTeamUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :team_users do |t|
4
+ t.references :user, index: true, foreign_key: true
5
+ t.references :team, index: true, foreign_key: true
6
+
7
+ t.timestamps null: false
8
+ end
9
+ add_index :team_users, [:user_id,:team_id], unique: true
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class AddConfirmableToDevise < ActiveRecord::Migration
2
+ def change
3
+ change_table(:users) do |t|
4
+ t.string :confirmation_token
5
+ t.datetime :confirmed_at
6
+ t.datetime :confirmation_sent_at
7
+ t.string :unconfirmed_email
8
+ end
9
+ add_index :users, :confirmation_token, unique: true
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ class AddUserNames < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :first_name, :string
4
+ add_column :users, :last_name, :string
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class AddPasswordToProject < ActiveRecord::Migration
2
+ def change
3
+ add_column :projects, :default_password, :string
4
+ end
5
+ end
@@ -0,0 +1,261 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20150909225019) do
15
+
16
+ create_table "active_admin_comments", force: :cascade do |t|
17
+ t.string "namespace"
18
+ t.text "body"
19
+ t.string "resource_id", null: false
20
+ t.string "resource_type", null: false
21
+ t.integer "author_id"
22
+ t.string "author_type"
23
+ t.datetime "created_at", null: false
24
+ t.datetime "updated_at", null: false
25
+ end
26
+
27
+ add_index "active_admin_comments", ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id"
28
+ add_index "active_admin_comments", ["namespace"], name: "index_active_admin_comments_on_namespace"
29
+ add_index "active_admin_comments", ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id"
30
+
31
+ create_table "admin_users", force: :cascade do |t|
32
+ t.string "email", default: "", null: false
33
+ t.string "encrypted_password", default: "", null: false
34
+ t.string "reset_password_token"
35
+ t.datetime "reset_password_sent_at"
36
+ t.datetime "remember_created_at"
37
+ t.integer "sign_in_count", default: 0, null: false
38
+ t.datetime "current_sign_in_at"
39
+ t.datetime "last_sign_in_at"
40
+ t.string "current_sign_in_ip"
41
+ t.string "last_sign_in_ip"
42
+ t.datetime "created_at", null: false
43
+ t.datetime "updated_at", null: false
44
+ end
45
+
46
+ add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true
47
+ add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true
48
+
49
+ create_table "chat_message_users", force: :cascade do |t|
50
+ t.integer "chat_message_id"
51
+ t.integer "user_id"
52
+ t.datetime "read_at"
53
+ t.datetime "created_at", null: false
54
+ t.datetime "updated_at", null: false
55
+ end
56
+
57
+ add_index "chat_message_users", ["chat_message_id"], name: "index_chat_message_users_on_chat_message_id"
58
+ add_index "chat_message_users", ["user_id"], name: "index_chat_message_users_on_user_id"
59
+
60
+ create_table "chat_messages", force: :cascade do |t|
61
+ t.integer "chat_id"
62
+ t.integer "author_id"
63
+ t.text "message"
64
+ t.datetime "created_at", null: false
65
+ t.datetime "updated_at", null: false
66
+ end
67
+
68
+ add_index "chat_messages", ["author_id"], name: "index_chat_messages_on_author_id"
69
+ add_index "chat_messages", ["chat_id"], name: "index_chat_messages_on_chat_id"
70
+
71
+ create_table "chat_users", force: :cascade do |t|
72
+ t.integer "chat_id"
73
+ t.integer "user_id"
74
+ t.datetime "departed_at"
75
+ t.datetime "created_at", null: false
76
+ t.datetime "updated_at", null: false
77
+ end
78
+
79
+ add_index "chat_users", ["chat_id"], name: "index_chat_users_on_chat_id"
80
+ add_index "chat_users", ["user_id"], name: "index_chat_users_on_user_id"
81
+
82
+ create_table "chats", force: :cascade do |t|
83
+ t.integer "creator_id"
84
+ t.datetime "created_at", null: false
85
+ t.datetime "updated_at", null: false
86
+ end
87
+
88
+ create_table "companies", force: :cascade do |t|
89
+ t.string "name", limit: 256, null: false
90
+ t.string "short_name", limit: 10, null: false
91
+ t.datetime "created_at", null: false
92
+ t.datetime "updated_at", null: false
93
+ end
94
+
95
+ add_index "companies", ["name"], name: "index_companies_on_name", unique: true
96
+
97
+ create_table "jobs", force: :cascade do |t|
98
+ t.string "title", null: false
99
+ t.datetime "created_at", null: false
100
+ t.datetime "updated_at", null: false
101
+ end
102
+
103
+ create_table "locatables", force: :cascade do |t|
104
+ t.integer "location_id"
105
+ t.integer "locatable_id"
106
+ t.string "locatable_type"
107
+ t.datetime "created_at", null: false
108
+ t.datetime "updated_at", null: false
109
+ end
110
+
111
+ add_index "locatables", ["locatable_type", "locatable_id"], name: "index_locatables_on_locatable_type_and_locatable_id"
112
+
113
+ create_table "location_beacons", force: :cascade do |t|
114
+ t.integer "location_id"
115
+ t.integer "company_id", null: false
116
+ t.string "mac_address", limit: 12
117
+ t.string "uuid", limit: 32, null: false
118
+ t.integer "major", null: false
119
+ t.integer "minor", null: false
120
+ t.datetime "created_at", null: false
121
+ t.datetime "updated_at", null: false
122
+ end
123
+
124
+ add_index "location_beacons", ["company_id", "uuid", "major", "minor"], name: "index_location_beacons_unique_company_identifier", unique: true
125
+
126
+ create_table "location_gps", force: :cascade do |t|
127
+ t.integer "location_id"
128
+ t.float "lat", null: false
129
+ t.float "lng", null: false
130
+ t.float "alt", default: 0.0
131
+ t.datetime "created_at", null: false
132
+ t.datetime "updated_at", null: false
133
+ end
134
+
135
+ add_index "location_gps", ["location_id"], name: "index_location_gps_on_location_id"
136
+
137
+ create_table "locations", force: :cascade do |t|
138
+ t.string "name", null: false
139
+ t.string "kind"
140
+ t.integer "parent_location_id"
141
+ t.datetime "created_at", null: false
142
+ t.datetime "updated_at", null: false
143
+ end
144
+
145
+ add_index "locations", ["parent_location_id", "kind", "name"], name: "index_locations_on_parent_location_id_and_kind_and_name", unique: true
146
+ add_index "locations", ["parent_location_id"], name: "index_locations_on_parent_location_id"
147
+
148
+ create_table "project_jobs", force: :cascade do |t|
149
+ t.integer "project_id", null: false
150
+ t.integer "job_id", null: false
151
+ t.datetime "created_at", null: false
152
+ t.datetime "updated_at", null: false
153
+ end
154
+
155
+ add_index "project_jobs", ["job_id"], name: "index_project_jobs_on_job_id"
156
+ add_index "project_jobs", ["project_id", "job_id"], name: "index_project_jobs_on_project_id_and_job_id", unique: true
157
+ add_index "project_jobs", ["project_id"], name: "index_project_jobs_on_project_id"
158
+
159
+ create_table "projects", force: :cascade do |t|
160
+ t.string "name", null: false
161
+ t.integer "owner_id"
162
+ t.datetime "created_at", null: false
163
+ t.datetime "updated_at", null: false
164
+ t.string "default_password"
165
+ end
166
+
167
+ add_index "projects", ["owner_id"], name: "index_projects_on_owner_id"
168
+
169
+ create_table "roles", force: :cascade do |t|
170
+ t.integer "user_id", null: false
171
+ t.integer "ownable_id"
172
+ t.string "ownable_type"
173
+ t.datetime "created_at", null: false
174
+ t.datetime "updated_at", null: false
175
+ end
176
+
177
+ add_index "roles", ["ownable_type", "ownable_id"], name: "index_roles_on_ownable_type_and_ownable_id"
178
+ add_index "roles", ["user_id", "ownable_type", "ownable_id"], name: "index_roles_on_user_id_and_ownable_type_and_ownable_id", unique: true
179
+
180
+ create_table "team_users", force: :cascade do |t|
181
+ t.integer "user_id"
182
+ t.integer "team_id"
183
+ t.datetime "created_at", null: false
184
+ t.datetime "updated_at", null: false
185
+ end
186
+
187
+ add_index "team_users", ["team_id"], name: "index_team_users_on_team_id"
188
+ add_index "team_users", ["user_id", "team_id"], name: "index_team_users_on_user_id_and_team_id", unique: true
189
+ add_index "team_users", ["user_id"], name: "index_team_users_on_user_id"
190
+
191
+ create_table "teams", force: :cascade do |t|
192
+ t.string "name"
193
+ t.integer "project_id"
194
+ t.integer "creator_id"
195
+ t.datetime "created_at", null: false
196
+ t.datetime "updated_at", null: false
197
+ end
198
+
199
+ add_index "teams", ["creator_id"], name: "index_teams_on_creator_id"
200
+ add_index "teams", ["project_id"], name: "index_teams_on_project_id"
201
+
202
+ create_table "user_locations", force: :cascade do |t|
203
+ t.integer "user_id"
204
+ t.integer "location_id"
205
+ t.integer "detectable_id"
206
+ t.string "detectable_type"
207
+ t.float "lat"
208
+ t.float "lng"
209
+ t.float "alt"
210
+ t.datetime "created_at", null: false
211
+ t.datetime "updated_at", null: false
212
+ end
213
+
214
+ add_index "user_locations", ["detectable_type", "detectable_id"], name: "index_user_locations_on_detectable_type_and_detectable_id"
215
+ add_index "user_locations", ["location_id"], name: "index_user_locations_on_location_id"
216
+ add_index "user_locations", ["user_id"], name: "index_user_locations_on_user_id"
217
+
218
+ create_table "user_project_jobs", force: :cascade do |t|
219
+ t.integer "user_id", null: false
220
+ t.integer "project_id", null: false
221
+ t.integer "job_id", null: false
222
+ t.datetime "created_at", null: false
223
+ t.datetime "updated_at", null: false
224
+ end
225
+
226
+ add_index "user_project_jobs", ["job_id"], name: "index_user_project_jobs_on_job_id"
227
+ add_index "user_project_jobs", ["project_id"], name: "index_user_project_jobs_on_project_id"
228
+ add_index "user_project_jobs", ["user_id", "project_id", "job_id"], name: "index_user_project_jobs_on_user_id_and_project_id_and_job_id", unique: true
229
+ add_index "user_project_jobs", ["user_id"], name: "index_user_project_jobs_on_user_id"
230
+
231
+ create_table "users", force: :cascade do |t|
232
+ t.string "email", default: "", null: false
233
+ t.string "encrypted_password", default: "", null: false
234
+ t.string "reset_password_token"
235
+ t.datetime "reset_password_sent_at"
236
+ t.datetime "remember_created_at"
237
+ t.integer "sign_in_count", default: 0, null: false
238
+ t.datetime "current_sign_in_at"
239
+ t.datetime "last_sign_in_at"
240
+ t.string "current_sign_in_ip"
241
+ t.string "last_sign_in_ip"
242
+ t.datetime "created_at", null: false
243
+ t.datetime "updated_at", null: false
244
+ t.integer "failed_attempts", default: 0, null: false
245
+ t.string "unlock_token"
246
+ t.datetime "locked_at"
247
+ t.string "authentication_token"
248
+ t.string "confirmation_token"
249
+ t.datetime "confirmed_at"
250
+ t.datetime "confirmation_sent_at"
251
+ t.string "unconfirmed_email"
252
+ t.string "first_name"
253
+ t.string "last_name"
254
+ end
255
+
256
+ add_index "users", ["authentication_token"], name: "index_users_on_authentication_token", unique: true
257
+ add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
258
+ add_index "users", ["email"], name: "index_users_on_email", unique: true
259
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
260
+
261
+ end
File without changes
File without changes
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
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
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <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>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,13 @@
1
+ require 'byebug'
2
+
3
+ ENV["RAILS_ENV"] ||= 'test'
4
+ require File.expand_path("../dummy/config/environment", __FILE__)
5
+ require 'rspec/rails'
6
+ Dir[Rails.root.join("../support/**/*.rb")].each { |f| require f }
7
+
8
+ RSpec.configure do |config|
9
+ config.include Devise::TestHelpers, type: :controller
10
+ config.use_transactional_fixtures = true
11
+ config.infer_spec_type_from_file_location!
12
+ config.expect_with(:rspec) { |c| c.syntax = :should }
13
+ end