image_holder 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +32 -0
- data/lib/image_holder.rb +5 -0
- data/lib/image_holder/image_handling.rb +36 -0
- data/lib/image_holder/image_scaling.rb +16 -0
- data/lib/image_holder/version.rb +3 -0
- data/lib/tasks/image_holder_tasks.rake +4 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/users/1/logo1.jpg +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/users.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/assets/stylesheets/users.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/users_controller.rb +58 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/users_helper.rb +2 -0
- data/test/dummy/app/models/user.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/users/_form.html.erb +25 -0
- data/test/dummy/app/views/users/edit.html.erb +6 -0
- data/test/dummy/app/views/users/index.html.erb +29 -0
- data/test/dummy/app/views/users/new.html.erb +5 -0
- data/test/dummy/app/views/users/show.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130904081554_create_users.rb +10 -0
- data/test/dummy/db/schema.rb +23 -0
- data/test/dummy/log/development.log +190 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/test/controllers/users_controller_test.rb +49 -0
- data/test/dummy/test/fixtures/users.yml +9 -0
- data/test/dummy/test/helpers/users_helper_test.rb +4 -0
- data/test/dummy/test/models/user_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0800f54ee19cf3cee10b956fa9786799 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4050a4e5062ab95c9f32e9b6940821ea +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/44ed932298a15e744f836458162deebf +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/510da110ae528e2d22533be39ff696c5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5f1a0d05e77ca8b9a1fc2a47e17a8174 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6b271a015985ac298f3ee8d49c8dcc9f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/87b209c0c9da28094a8d5581a21262c6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cebc6db0bbb8120f430da3970b173d2f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f56253b5f374fff1a33fbbc9881c9124 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/image_holder_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +233 -0
@@ -0,0 +1,190 @@
|
|
1
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
2
|
+
[1m[35m (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
Migrating to CreateUsers (20130904081554)
|
5
|
+
[1m[35m (0.1ms)[0m begin transaction
|
6
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "logo" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
7
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130904081554"]]
|
8
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
9
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
10
|
+
|
11
|
+
|
12
|
+
Started GET "/" for 127.0.0.1 at 2013-09-04 13:46:16 +0530
|
13
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
14
|
+
Processing by Rails::WelcomeController#index as HTML
|
15
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/railties-4.0.0/lib/rails/templates/rails/welcome/index.html.erb (1.2ms)
|
16
|
+
Completed 200 OK in 6ms (Views: 6.1ms | ActiveRecord: 0.0ms)
|
17
|
+
|
18
|
+
|
19
|
+
Started GET "/users" for 127.0.0.1 at 2013-09-04 13:46:20 +0530
|
20
|
+
Processing by UsersController#index as HTML
|
21
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
22
|
+
Rendered users/index.html.erb within layouts/application (1.9ms)
|
23
|
+
Completed 200 OK in 54ms (Views: 51.4ms | ActiveRecord: 0.3ms)
|
24
|
+
|
25
|
+
|
26
|
+
Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-09-04 13:46:20 +0530
|
27
|
+
|
28
|
+
|
29
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-09-04 13:46:20 +0530
|
30
|
+
|
31
|
+
|
32
|
+
Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-09-04 13:46:20 +0530
|
33
|
+
|
34
|
+
|
35
|
+
Started GET "/assets/users.css?body=1" for 127.0.0.1 at 2013-09-04 13:46:20 +0530
|
36
|
+
|
37
|
+
|
38
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-09-04 13:46:20 +0530
|
39
|
+
|
40
|
+
|
41
|
+
Started GET "/users/new" for 127.0.0.1 at 2013-09-04 13:46:22 +0530
|
42
|
+
Processing by UsersController#new as HTML
|
43
|
+
Rendered users/_form.html.erb (20.7ms)
|
44
|
+
Rendered users/new.html.erb within layouts/application (23.6ms)
|
45
|
+
Completed 200 OK in 27ms (Views: 26.6ms | ActiveRecord: 0.1ms)
|
46
|
+
|
47
|
+
|
48
|
+
Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-09-04 13:46:22 +0530
|
49
|
+
|
50
|
+
|
51
|
+
Started GET "/users/new" for 127.0.0.1 at 2013-09-04 13:47:15 +0530
|
52
|
+
Processing by UsersController#new as HTML
|
53
|
+
Rendered users/_form.html.erb (35.3ms)
|
54
|
+
Rendered users/new.html.erb within layouts/application (36.0ms)
|
55
|
+
Completed 200 OK in 41ms (Views: 38.9ms | ActiveRecord: 0.4ms)
|
56
|
+
|
57
|
+
|
58
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-09-04 13:47:16 +0530
|
59
|
+
|
60
|
+
|
61
|
+
Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-09-04 13:47:16 +0530
|
62
|
+
|
63
|
+
|
64
|
+
Started GET "/assets/users.css?body=1" for 127.0.0.1 at 2013-09-04 13:47:16 +0530
|
65
|
+
|
66
|
+
|
67
|
+
Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-09-04 13:47:16 +0530
|
68
|
+
|
69
|
+
|
70
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-09-04 13:47:16 +0530
|
71
|
+
|
72
|
+
|
73
|
+
Started GET "/users/new" for 127.0.0.1 at 2013-09-04 13:47:31 +0530
|
74
|
+
Processing by UsersController#new as HTML
|
75
|
+
Rendered users/_form.html.erb (4.7ms)
|
76
|
+
Rendered users/new.html.erb within layouts/application (5.9ms)
|
77
|
+
Completed 200 OK in 11ms (Views: 10.6ms | ActiveRecord: 0.0ms)
|
78
|
+
|
79
|
+
|
80
|
+
Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-09-04 13:47:31 +0530
|
81
|
+
|
82
|
+
|
83
|
+
Started GET "/assets/users.css?body=1" for 127.0.0.1 at 2013-09-04 13:47:31 +0530
|
84
|
+
|
85
|
+
|
86
|
+
Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-09-04 13:47:31 +0530
|
87
|
+
|
88
|
+
|
89
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-09-04 13:47:31 +0530
|
90
|
+
|
91
|
+
|
92
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-09-04 13:47:31 +0530
|
93
|
+
|
94
|
+
|
95
|
+
Started POST "/users" for 127.0.0.1 at 2013-09-04 13:47:37 +0530
|
96
|
+
Processing by UsersController#create as HTML
|
97
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"fNjYyMvsDfogNoeQMBionALwuVxml91M+8atSa1nYr4=", "user"=>{"name"=>"", "logo"=>#<ActionDispatch::Http::UploadedFile:0x007ff81c341f68 @tempfile=#<Tempfile:/var/folders/m6/_kb2krw131g7w45htpwnq0dr0000gn/T/RackMultipart20130904-1048-jjwn56>, @original_filename="Folder.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[logo]\"; filename=\"Folder.jpg\"\r\nContent-Type: image/jpeg\r\n">}, "commit"=>"Create User"}
|
98
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
99
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
|
100
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
101
|
+
Completed 500 Internal Server Error in 16ms
|
102
|
+
|
103
|
+
NameError (uninitialized constant ImageHolder::ImageScaling::Magick):
|
104
|
+
app/controllers/users_controller.rb:26:in `create'
|
105
|
+
|
106
|
+
|
107
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.9ms)
|
108
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.3ms)
|
109
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.1ms)
|
110
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (14.8ms)
|
111
|
+
|
112
|
+
|
113
|
+
Started POST "/users" for 127.0.0.1 at 2013-09-04 13:48:30 +0530
|
114
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
115
|
+
Processing by UsersController#create as HTML
|
116
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"fNjYyMvsDfogNoeQMBionALwuVxml91M+8atSa1nYr4=", "user"=>{"name"=>"", "logo"=>#<ActionDispatch::Http::UploadedFile:0x007f9f8462e668 @tempfile=#<Tempfile:/var/folders/m6/_kb2krw131g7w45htpwnq0dr0000gn/T/RackMultipart20130904-1057-fr1dz3>, @original_filename="229787_169491046441247_918167_n.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[logo]\"; filename=\"229787_169491046441247_918167_n.jpg\"\r\nContent-Type: image/jpeg\r\n">}, "commit"=>"Create User"}
|
117
|
+
[1m[35m (0.1ms)[0m begin transaction
|
118
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1[0m
|
119
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
120
|
+
Completed 500 Internal Server Error in 41ms
|
121
|
+
|
122
|
+
NameError (uninitialized constant ImageHolder::ImageScaling::Magick):
|
123
|
+
app/controllers/users_controller.rb:26:in `create'
|
124
|
+
|
125
|
+
|
126
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_source.erb (0.6ms)
|
127
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.0ms)
|
128
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.1ms)
|
129
|
+
Rendered /Users/surajpratap/.rvm/gems/ruby-2.0.0-p195/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (12.3ms)
|
130
|
+
|
131
|
+
|
132
|
+
Started POST "/users" for 127.0.0.1 at 2013-09-04 13:49:25 +0530
|
133
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
134
|
+
Processing by UsersController#create as HTML
|
135
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"fNjYyMvsDfogNoeQMBionALwuVxml91M+8atSa1nYr4=", "user"=>{"name"=>"", "logo"=>#<ActionDispatch::Http::UploadedFile:0x007fed712a0150 @tempfile=#<Tempfile:/var/folders/m6/_kb2krw131g7w45htpwnq0dr0000gn/T/RackMultipart20130904-1061-1onzxia>, @original_filename="229787_169491046441247_918167_n.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"user[logo]\"; filename=\"229787_169491046441247_918167_n.jpg\"\r\nContent-Type: image/jpeg\r\n">}, "commit"=>"Create User"}
|
136
|
+
[1m[35m (0.1ms)[0m begin transaction
|
137
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1[0m
|
138
|
+
[1m[35mSQL (10.3ms)[0m INSERT INTO "users" ("created_at", "logo", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 04 Sep 2013 08:19:25 UTC +00:00], ["logo", "users/1/logo1.jpg"], ["name", ""], ["updated_at", Wed, 04 Sep 2013 08:19:25 UTC +00:00]]
|
139
|
+
[1m[36m (2.0ms)[0m [1mcommit transaction[0m
|
140
|
+
Redirected to http://localhost:3000/users/1
|
141
|
+
Completed 302 Found in 64ms (ActiveRecord: 12.9ms)
|
142
|
+
|
143
|
+
|
144
|
+
Started GET "/users/1" for 127.0.0.1 at 2013-09-04 13:49:25 +0530
|
145
|
+
Processing by UsersController#show as HTML
|
146
|
+
Parameters: {"id"=>"1"}
|
147
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]]
|
148
|
+
Rendered users/show.html.erb within layouts/application (1.9ms)
|
149
|
+
Completed 200 OK in 48ms (Views: 46.1ms | ActiveRecord: 0.2ms)
|
150
|
+
|
151
|
+
|
152
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-09-04 13:49:25 +0530
|
153
|
+
|
154
|
+
|
155
|
+
Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-09-04 13:49:25 +0530
|
156
|
+
|
157
|
+
|
158
|
+
Started GET "/assets/users.css?body=1" for 127.0.0.1 at 2013-09-04 13:49:25 +0530
|
159
|
+
|
160
|
+
|
161
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-09-04 13:49:25 +0530
|
162
|
+
|
163
|
+
|
164
|
+
Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-09-04 13:49:25 +0530
|
165
|
+
|
166
|
+
|
167
|
+
Started GET "/users/1" for 127.0.0.1 at 2013-09-04 13:49:43 +0530
|
168
|
+
Processing by UsersController#show as HTML
|
169
|
+
Parameters: {"id"=>"1"}
|
170
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", "1"]]
|
171
|
+
Rendered users/show.html.erb within layouts/application (4.3ms)
|
172
|
+
Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.2ms)
|
173
|
+
|
174
|
+
|
175
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-09-04 13:49:43 +0530
|
176
|
+
|
177
|
+
|
178
|
+
Started GET "/assets/users.js?body=1" for 127.0.0.1 at 2013-09-04 13:49:43 +0530
|
179
|
+
|
180
|
+
|
181
|
+
Started GET "/assets/scaffold.css?body=1" for 127.0.0.1 at 2013-09-04 13:49:43 +0530
|
182
|
+
|
183
|
+
|
184
|
+
Started GET "/assets/users.css?body=1" for 127.0.0.1 at 2013-09-04 13:49:43 +0530
|
185
|
+
|
186
|
+
|
187
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-09-04 13:49:43 +0530
|
188
|
+
|
189
|
+
|
190
|
+
Started GET "/assets/users/1/logo1.jpg" for 127.0.0.1 at 2013-09-04 13:49:43 +0530
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/404.html -->
|
52
|
+
<div class="dialog">
|
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>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/422.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The change you wanted was rejected.</h1>
|
54
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/500.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>We're sorry, but something went wrong.</h1>
|
54
|
+
</div>
|
55
|
+
<p>If you are the application owner check the logs for more information.</p>
|
56
|
+
</body>
|
57
|
+
</html>
|
File without changes
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class UsersControllerTest < ActionController::TestCase
|
4
|
+
setup do
|
5
|
+
@user = users(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get :index
|
10
|
+
assert_response :success
|
11
|
+
assert_not_nil assigns(:users)
|
12
|
+
end
|
13
|
+
|
14
|
+
test "should get new" do
|
15
|
+
get :new
|
16
|
+
assert_response :success
|
17
|
+
end
|
18
|
+
|
19
|
+
test "should create user" do
|
20
|
+
assert_difference('User.count') do
|
21
|
+
post :create, user: { logo: @user.logo, name: @user.name }
|
22
|
+
end
|
23
|
+
|
24
|
+
assert_redirected_to user_path(assigns(:user))
|
25
|
+
end
|
26
|
+
|
27
|
+
test "should show user" do
|
28
|
+
get :show, id: @user
|
29
|
+
assert_response :success
|
30
|
+
end
|
31
|
+
|
32
|
+
test "should get edit" do
|
33
|
+
get :edit, id: @user
|
34
|
+
assert_response :success
|
35
|
+
end
|
36
|
+
|
37
|
+
test "should update user" do
|
38
|
+
patch :update, id: @user, user: { logo: @user.logo, name: @user.name }
|
39
|
+
assert_redirected_to user_path(assigns(:user))
|
40
|
+
end
|
41
|
+
|
42
|
+
test "should destroy user" do
|
43
|
+
assert_difference('User.count', -1) do
|
44
|
+
delete :destroy, id: @user
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_redirected_to users_path
|
48
|
+
end
|
49
|
+
end
|