hashids_rails 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 +33 -0
- data/Rakefile +34 -0
- data/lib/hashids_rails/version.rb +3 -0
- data/lib/hashids_rails.rb +83 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/comments.js +2 -0
- data/test/dummy/app/assets/javascripts/posts.js +2 -0
- data/test/dummy/app/assets/javascripts/users.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/assets/stylesheets/comments.css +4 -0
- data/test/dummy/app/assets/stylesheets/posts.css +4 -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/comments_controller.rb +58 -0
- data/test/dummy/app/controllers/posts_controller.rb +58 -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/comments_helper.rb +2 -0
- data/test/dummy/app/helpers/posts_helper.rb +2 -0
- data/test/dummy/app/helpers/users_helper.rb +2 -0
- data/test/dummy/app/models/comment.rb +2 -0
- data/test/dummy/app/models/post.rb +2 -0
- data/test/dummy/app/models/user.rb +2 -0
- data/test/dummy/app/views/comments/_form.html.erb +25 -0
- data/test/dummy/app/views/comments/edit.html.erb +6 -0
- data/test/dummy/app/views/comments/index.html.erb +29 -0
- data/test/dummy/app/views/comments/new.html.erb +5 -0
- data/test/dummy/app/views/comments/show.html.erb +14 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/posts/_form.html.erb +21 -0
- data/test/dummy/app/views/posts/edit.html.erb +6 -0
- data/test/dummy/app/views/posts/index.html.erb +27 -0
- data/test/dummy/app/views/posts/new.html.erb +5 -0
- data/test/dummy/app/views/posts/show.html.erb +9 -0
- data/test/dummy/app/views/users/_form.html.erb +21 -0
- data/test/dummy/app/views/users/edit.html.erb +6 -0
- data/test/dummy/app/views/users/index.html.erb +27 -0
- data/test/dummy/app/views/users/new.html.erb +5 -0
- data/test/dummy/app/views/users/show.html.erb +9 -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/bin/setup +29 -0
- data/test/dummy/config/application.rb +26 -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 +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -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 +4 -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 +59 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150420195726_create_users.rb +9 -0
- data/test/dummy/db/migrate/20150420195757_create_posts.rb +9 -0
- data/test/dummy/db/migrate/20150420195818_create_comments.rb +10 -0
- data/test/dummy/db/schema.rb +35 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +20 -0
- data/test/dummy/log/test.log +132 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/hashids_rails_test.rb +7 -0
- data/test/test_helper.rb +19 -0
- metadata +241 -0
@@ -0,0 +1,35 @@
|
|
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: 20150420195818) do
|
15
|
+
|
16
|
+
create_table "comments", force: :cascade do |t|
|
17
|
+
t.string "content"
|
18
|
+
t.integer "post_id"
|
19
|
+
t.datetime "created_at", null: false
|
20
|
+
t.datetime "updated_at", null: false
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table "posts", force: :cascade do |t|
|
24
|
+
t.string "content"
|
25
|
+
t.datetime "created_at", null: false
|
26
|
+
t.datetime "updated_at", null: false
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "users", force: :cascade do |t|
|
30
|
+
t.string "name"
|
31
|
+
t.datetime "created_at", null: false
|
32
|
+
t.datetime "updated_at", null: false
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
[1m[36m (242.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (255.9ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.3ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
Migrating to CreateUsers (20150420195726)
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
8
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150420195726"]]
|
9
|
+
[1m[35m (262.0ms)[0m commit transaction
|
10
|
+
Migrating to CreatePosts (20150420195757)
|
11
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
12
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
13
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150420195757"]]
|
14
|
+
[1m[35m (272.2ms)[0m commit transaction
|
15
|
+
Migrating to CreateComments (20150420195818)
|
16
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
17
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar, "post_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
18
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150420195818"]]
|
19
|
+
[1m[35m (429.8ms)[0m commit transaction
|
20
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
@@ -0,0 +1,132 @@
|
|
1
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
2
|
+
----------------------------
|
3
|
+
HashidsRailsTest: test_truth
|
4
|
+
----------------------------
|
5
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
6
|
+
[1m[36m (265.6ms)[0m [1mCREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar, "post_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
7
|
+
[1m[35m (267.9ms)[0m CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
8
|
+
[1m[36m (291.4ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
9
|
+
[1m[35m (218.6ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
10
|
+
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
11
|
+
[1m[35m (222.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
12
|
+
[1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
13
|
+
[1m[35m (278.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150420195818')
|
14
|
+
[1m[36m (268.4ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150420195757')[0m
|
15
|
+
[1m[35m (278.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150420195726')
|
16
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
17
|
+
[1m[35m (0.2ms)[0m begin transaction
|
18
|
+
--------------------------------------------
|
19
|
+
UsersControllerTest: test_should_update_user
|
20
|
+
--------------------------------------------
|
21
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
22
|
+
[1m[35m (0.1ms)[0m begin transaction
|
23
|
+
----------------------------------------
|
24
|
+
UsersControllerTest: test_should_get_new
|
25
|
+
----------------------------------------
|
26
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
27
|
+
[1m[35m (0.1ms)[0m begin transaction
|
28
|
+
------------------------------------------
|
29
|
+
UsersControllerTest: test_should_show_user
|
30
|
+
------------------------------------------
|
31
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
32
|
+
[1m[35m (0.1ms)[0m begin transaction
|
33
|
+
-----------------------------------------
|
34
|
+
UsersControllerTest: test_should_get_edit
|
35
|
+
-----------------------------------------
|
36
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
37
|
+
[1m[35m (0.1ms)[0m begin transaction
|
38
|
+
--------------------------------------------
|
39
|
+
UsersControllerTest: test_should_create_user
|
40
|
+
--------------------------------------------
|
41
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
42
|
+
[1m[35m (0.1ms)[0m begin transaction
|
43
|
+
---------------------------------------------
|
44
|
+
UsersControllerTest: test_should_destroy_user
|
45
|
+
---------------------------------------------
|
46
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
47
|
+
[1m[35m (0.1ms)[0m begin transaction
|
48
|
+
------------------------------------------
|
49
|
+
UsersControllerTest: test_should_get_index
|
50
|
+
------------------------------------------
|
51
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
52
|
+
[1m[35m (0.3ms)[0m begin transaction
|
53
|
+
---------------------------------------------------
|
54
|
+
CommentsControllerTest: test_should_destroy_comment
|
55
|
+
---------------------------------------------------
|
56
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
57
|
+
[1m[35m (0.1ms)[0m begin transaction
|
58
|
+
--------------------------------------------
|
59
|
+
CommentsControllerTest: test_should_get_edit
|
60
|
+
--------------------------------------------
|
61
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
62
|
+
[1m[35m (0.1ms)[0m begin transaction
|
63
|
+
------------------------------------------------
|
64
|
+
CommentsControllerTest: test_should_show_comment
|
65
|
+
------------------------------------------------
|
66
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
67
|
+
[1m[35m (0.1ms)[0m begin transaction
|
68
|
+
--------------------------------------------------
|
69
|
+
CommentsControllerTest: test_should_create_comment
|
70
|
+
--------------------------------------------------
|
71
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
72
|
+
[1m[35m (0.1ms)[0m begin transaction
|
73
|
+
-------------------------------------------
|
74
|
+
CommentsControllerTest: test_should_get_new
|
75
|
+
-------------------------------------------
|
76
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
77
|
+
[1m[35m (0.2ms)[0m begin transaction
|
78
|
+
---------------------------------------------
|
79
|
+
CommentsControllerTest: test_should_get_index
|
80
|
+
---------------------------------------------
|
81
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
82
|
+
[1m[35m (0.1ms)[0m begin transaction
|
83
|
+
--------------------------------------------------
|
84
|
+
CommentsControllerTest: test_should_update_comment
|
85
|
+
--------------------------------------------------
|
86
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
87
|
+
[1m[35m (0.2ms)[0m begin transaction
|
88
|
+
-----------------------------------------
|
89
|
+
PostsControllerTest: test_should_get_edit
|
90
|
+
-----------------------------------------
|
91
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
92
|
+
[1m[35m (0.1ms)[0m begin transaction
|
93
|
+
--------------------------------------------
|
94
|
+
PostsControllerTest: test_should_update_post
|
95
|
+
--------------------------------------------
|
96
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
97
|
+
[1m[35m (0.1ms)[0m begin transaction
|
98
|
+
---------------------------------------------
|
99
|
+
PostsControllerTest: test_should_destroy_post
|
100
|
+
---------------------------------------------
|
101
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
102
|
+
[1m[35m (0.1ms)[0m begin transaction
|
103
|
+
------------------------------------------
|
104
|
+
PostsControllerTest: test_should_get_index
|
105
|
+
------------------------------------------
|
106
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
107
|
+
[1m[35m (0.1ms)[0m begin transaction
|
108
|
+
----------------------------------------
|
109
|
+
PostsControllerTest: test_should_get_new
|
110
|
+
----------------------------------------
|
111
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
112
|
+
[1m[35m (0.1ms)[0m begin transaction
|
113
|
+
------------------------------------------
|
114
|
+
PostsControllerTest: test_should_show_post
|
115
|
+
------------------------------------------
|
116
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
117
|
+
[1m[35m (0.1ms)[0m begin transaction
|
118
|
+
--------------------------------------------
|
119
|
+
PostsControllerTest: test_should_create_post
|
120
|
+
--------------------------------------------
|
121
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
122
|
+
[1m[35m (0.2ms)[0m begin transaction
|
123
|
+
----------------------------
|
124
|
+
HashidsRailsTest: test_truth
|
125
|
+
----------------------------
|
126
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
127
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
128
|
+
[1m[35m (0.3ms)[0m begin transaction
|
129
|
+
----------------------------
|
130
|
+
HashidsRailsTest: test_truth
|
131
|
+
----------------------------
|
132
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
@@ -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
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
+
require "rails/test_help"
|
7
|
+
|
8
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
+
# to be shown.
|
10
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
11
|
+
|
12
|
+
# Load support files
|
13
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
14
|
+
|
15
|
+
# Load fixtures from the engine
|
16
|
+
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
17
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
|
+
ActiveSupport::TestCase.fixtures :all
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,241 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hashids_rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Brian Petro
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashids
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Store ActiveRecord IDs non-obviously in URL using hashids.
|
56
|
+
email:
|
57
|
+
- brian@linkplugapp.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- MIT-LICENSE
|
63
|
+
- README.rdoc
|
64
|
+
- Rakefile
|
65
|
+
- lib/hashids_rails.rb
|
66
|
+
- lib/hashids_rails/version.rb
|
67
|
+
- test/dummy/README.rdoc
|
68
|
+
- test/dummy/Rakefile
|
69
|
+
- test/dummy/app/assets/javascripts/application.js
|
70
|
+
- test/dummy/app/assets/javascripts/comments.js
|
71
|
+
- test/dummy/app/assets/javascripts/posts.js
|
72
|
+
- test/dummy/app/assets/javascripts/users.js
|
73
|
+
- test/dummy/app/assets/stylesheets/application.css
|
74
|
+
- test/dummy/app/assets/stylesheets/comments.css
|
75
|
+
- test/dummy/app/assets/stylesheets/posts.css
|
76
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
77
|
+
- test/dummy/app/assets/stylesheets/users.css
|
78
|
+
- test/dummy/app/controllers/application_controller.rb
|
79
|
+
- test/dummy/app/controllers/comments_controller.rb
|
80
|
+
- test/dummy/app/controllers/posts_controller.rb
|
81
|
+
- test/dummy/app/controllers/users_controller.rb
|
82
|
+
- test/dummy/app/helpers/application_helper.rb
|
83
|
+
- test/dummy/app/helpers/comments_helper.rb
|
84
|
+
- test/dummy/app/helpers/posts_helper.rb
|
85
|
+
- test/dummy/app/helpers/users_helper.rb
|
86
|
+
- test/dummy/app/models/comment.rb
|
87
|
+
- test/dummy/app/models/post.rb
|
88
|
+
- test/dummy/app/models/user.rb
|
89
|
+
- test/dummy/app/views/comments/_form.html.erb
|
90
|
+
- test/dummy/app/views/comments/edit.html.erb
|
91
|
+
- test/dummy/app/views/comments/index.html.erb
|
92
|
+
- test/dummy/app/views/comments/new.html.erb
|
93
|
+
- test/dummy/app/views/comments/show.html.erb
|
94
|
+
- test/dummy/app/views/layouts/application.html.erb
|
95
|
+
- test/dummy/app/views/posts/_form.html.erb
|
96
|
+
- test/dummy/app/views/posts/edit.html.erb
|
97
|
+
- test/dummy/app/views/posts/index.html.erb
|
98
|
+
- test/dummy/app/views/posts/new.html.erb
|
99
|
+
- test/dummy/app/views/posts/show.html.erb
|
100
|
+
- test/dummy/app/views/users/_form.html.erb
|
101
|
+
- test/dummy/app/views/users/edit.html.erb
|
102
|
+
- test/dummy/app/views/users/index.html.erb
|
103
|
+
- test/dummy/app/views/users/new.html.erb
|
104
|
+
- test/dummy/app/views/users/show.html.erb
|
105
|
+
- test/dummy/bin/bundle
|
106
|
+
- test/dummy/bin/rails
|
107
|
+
- test/dummy/bin/rake
|
108
|
+
- test/dummy/bin/setup
|
109
|
+
- test/dummy/config.ru
|
110
|
+
- test/dummy/config/application.rb
|
111
|
+
- test/dummy/config/boot.rb
|
112
|
+
- test/dummy/config/database.yml
|
113
|
+
- test/dummy/config/environment.rb
|
114
|
+
- test/dummy/config/environments/development.rb
|
115
|
+
- test/dummy/config/environments/production.rb
|
116
|
+
- test/dummy/config/environments/test.rb
|
117
|
+
- test/dummy/config/initializers/assets.rb
|
118
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
119
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
120
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
121
|
+
- test/dummy/config/initializers/inflections.rb
|
122
|
+
- test/dummy/config/initializers/mime_types.rb
|
123
|
+
- test/dummy/config/initializers/session_store.rb
|
124
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
125
|
+
- test/dummy/config/locales/en.yml
|
126
|
+
- test/dummy/config/routes.rb
|
127
|
+
- test/dummy/config/secrets.yml
|
128
|
+
- test/dummy/db/development.sqlite3
|
129
|
+
- test/dummy/db/migrate/20150420195726_create_users.rb
|
130
|
+
- test/dummy/db/migrate/20150420195757_create_posts.rb
|
131
|
+
- test/dummy/db/migrate/20150420195818_create_comments.rb
|
132
|
+
- test/dummy/db/schema.rb
|
133
|
+
- test/dummy/db/test.sqlite3
|
134
|
+
- test/dummy/log/development.log
|
135
|
+
- test/dummy/log/test.log
|
136
|
+
- test/dummy/public/404.html
|
137
|
+
- test/dummy/public/422.html
|
138
|
+
- test/dummy/public/500.html
|
139
|
+
- test/dummy/public/favicon.ico
|
140
|
+
- test/hashids_rails_test.rb
|
141
|
+
- test/test_helper.rb
|
142
|
+
homepage: https://github.com/brianpetro/hashids_rails
|
143
|
+
licenses:
|
144
|
+
- MIT
|
145
|
+
metadata: {}
|
146
|
+
post_install_message:
|
147
|
+
rdoc_options: []
|
148
|
+
require_paths:
|
149
|
+
- lib
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
155
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
requirements: []
|
161
|
+
rubyforge_project:
|
162
|
+
rubygems_version: 2.4.6
|
163
|
+
signing_key:
|
164
|
+
specification_version: 4
|
165
|
+
summary: Use hashids to mask ActiveRecord IDs in URL.
|
166
|
+
test_files:
|
167
|
+
- test/test_helper.rb
|
168
|
+
- test/dummy/public/500.html
|
169
|
+
- test/dummy/public/favicon.ico
|
170
|
+
- test/dummy/public/404.html
|
171
|
+
- test/dummy/public/422.html
|
172
|
+
- test/dummy/README.rdoc
|
173
|
+
- test/dummy/config/secrets.yml
|
174
|
+
- test/dummy/config/boot.rb
|
175
|
+
- test/dummy/config/environment.rb
|
176
|
+
- test/dummy/config/routes.rb
|
177
|
+
- test/dummy/config/database.yml
|
178
|
+
- test/dummy/config/application.rb
|
179
|
+
- test/dummy/config/environments/test.rb
|
180
|
+
- test/dummy/config/environments/development.rb
|
181
|
+
- test/dummy/config/environments/production.rb
|
182
|
+
- test/dummy/config/locales/en.yml
|
183
|
+
- test/dummy/config/initializers/assets.rb
|
184
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
185
|
+
- test/dummy/config/initializers/mime_types.rb
|
186
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
187
|
+
- test/dummy/config/initializers/cookies_serializer.rb
|
188
|
+
- test/dummy/config/initializers/session_store.rb
|
189
|
+
- test/dummy/config/initializers/inflections.rb
|
190
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
191
|
+
- test/dummy/bin/bundle
|
192
|
+
- test/dummy/bin/rails
|
193
|
+
- test/dummy/bin/setup
|
194
|
+
- test/dummy/bin/rake
|
195
|
+
- test/dummy/app/assets/javascripts/application.js
|
196
|
+
- test/dummy/app/assets/javascripts/users.js
|
197
|
+
- test/dummy/app/assets/javascripts/comments.js
|
198
|
+
- test/dummy/app/assets/javascripts/posts.js
|
199
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
200
|
+
- test/dummy/app/assets/stylesheets/comments.css
|
201
|
+
- test/dummy/app/assets/stylesheets/application.css
|
202
|
+
- test/dummy/app/assets/stylesheets/users.css
|
203
|
+
- test/dummy/app/assets/stylesheets/posts.css
|
204
|
+
- test/dummy/app/models/user.rb
|
205
|
+
- test/dummy/app/models/post.rb
|
206
|
+
- test/dummy/app/models/comment.rb
|
207
|
+
- test/dummy/app/controllers/posts_controller.rb
|
208
|
+
- test/dummy/app/controllers/comments_controller.rb
|
209
|
+
- test/dummy/app/controllers/application_controller.rb
|
210
|
+
- test/dummy/app/controllers/users_controller.rb
|
211
|
+
- test/dummy/app/views/posts/show.html.erb
|
212
|
+
- test/dummy/app/views/posts/index.html.erb
|
213
|
+
- test/dummy/app/views/posts/_form.html.erb
|
214
|
+
- test/dummy/app/views/posts/edit.html.erb
|
215
|
+
- test/dummy/app/views/posts/new.html.erb
|
216
|
+
- test/dummy/app/views/layouts/application.html.erb
|
217
|
+
- test/dummy/app/views/comments/show.html.erb
|
218
|
+
- test/dummy/app/views/comments/index.html.erb
|
219
|
+
- test/dummy/app/views/comments/_form.html.erb
|
220
|
+
- test/dummy/app/views/comments/edit.html.erb
|
221
|
+
- test/dummy/app/views/comments/new.html.erb
|
222
|
+
- test/dummy/app/views/users/show.html.erb
|
223
|
+
- test/dummy/app/views/users/index.html.erb
|
224
|
+
- test/dummy/app/views/users/_form.html.erb
|
225
|
+
- test/dummy/app/views/users/edit.html.erb
|
226
|
+
- test/dummy/app/views/users/new.html.erb
|
227
|
+
- test/dummy/app/helpers/application_helper.rb
|
228
|
+
- test/dummy/app/helpers/users_helper.rb
|
229
|
+
- test/dummy/app/helpers/comments_helper.rb
|
230
|
+
- test/dummy/app/helpers/posts_helper.rb
|
231
|
+
- test/dummy/config.ru
|
232
|
+
- test/dummy/log/development.log
|
233
|
+
- test/dummy/log/test.log
|
234
|
+
- test/dummy/db/schema.rb
|
235
|
+
- test/dummy/db/development.sqlite3
|
236
|
+
- test/dummy/db/migrate/20150420195757_create_posts.rb
|
237
|
+
- test/dummy/db/migrate/20150420195726_create_users.rb
|
238
|
+
- test/dummy/db/migrate/20150420195818_create_comments.rb
|
239
|
+
- test/dummy/db/test.sqlite3
|
240
|
+
- test/dummy/Rakefile
|
241
|
+
- test/hashids_rails_test.rb
|