path_rewrite 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +26 -0
  4. data/app/controllers/path_rewrite/path_controller.rb +15 -0
  5. data/app/models/path_rewrite/path_translation.rb +4 -0
  6. data/config/routes.rb +7 -0
  7. data/db/migrate/20150618003028_create_path_rewrite_path_translations.rb +10 -0
  8. data/lib/path_rewrite.rb +6 -0
  9. data/lib/path_rewrite/configuration.rb +27 -0
  10. data/lib/path_rewrite/engine.rb +10 -0
  11. data/lib/path_rewrite/version.rb +3 -0
  12. data/lib/tasks/path_rewrite_tasks.rake +4 -0
  13. data/spec/controllers/path_rewrite/path_controller_spec.rb +30 -0
  14. data/spec/lib/path_rewrite/configuration_spec.rb +33 -0
  15. data/spec/rails_helper.rb +50 -0
  16. data/spec/rcov_exclude_list.rb +4 -0
  17. data/spec/routing/routes_spec.rb +51 -0
  18. data/spec/spec_helper.rb +83 -0
  19. data/spec/test_app/README.rdoc +28 -0
  20. data/spec/test_app/Rakefile +6 -0
  21. data/spec/test_app/app/assets/javascripts/application.js +13 -0
  22. data/spec/test_app/app/assets/stylesheets/application.css +15 -0
  23. data/spec/test_app/app/controllers/application_controller.rb +5 -0
  24. data/spec/test_app/app/helpers/application_helper.rb +2 -0
  25. data/spec/test_app/app/views/layouts/application.html.erb +14 -0
  26. data/spec/test_app/bin/bundle +3 -0
  27. data/spec/test_app/bin/rails +4 -0
  28. data/spec/test_app/bin/rake +4 -0
  29. data/spec/test_app/bin/setup +29 -0
  30. data/spec/test_app/config.ru +4 -0
  31. data/spec/test_app/config/application.rb +32 -0
  32. data/spec/test_app/config/boot.rb +5 -0
  33. data/spec/test_app/config/database.yml +25 -0
  34. data/spec/test_app/config/environment.rb +5 -0
  35. data/spec/test_app/config/environments/development.rb +41 -0
  36. data/spec/test_app/config/environments/production.rb +79 -0
  37. data/spec/test_app/config/environments/test.rb +42 -0
  38. data/spec/test_app/config/initializers/assets.rb +11 -0
  39. data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  40. data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
  41. data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  42. data/spec/test_app/config/initializers/inflections.rb +16 -0
  43. data/spec/test_app/config/initializers/mime_types.rb +4 -0
  44. data/spec/test_app/config/initializers/session_store.rb +3 -0
  45. data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
  46. data/spec/test_app/config/locales/en.yml +23 -0
  47. data/spec/test_app/config/routes.rb +5 -0
  48. data/spec/test_app/config/secrets.yml +22 -0
  49. data/spec/test_app/db/development.sqlite3 +0 -0
  50. data/spec/test_app/db/schema.rb +23 -0
  51. data/spec/test_app/db/test.sqlite3 +0 -0
  52. data/spec/test_app/log/development.log +121 -0
  53. data/spec/test_app/log/test.log +760 -0
  54. data/spec/test_app/public/404.html +67 -0
  55. data/spec/test_app/public/422.html +67 -0
  56. data/spec/test_app/public/500.html +66 -0
  57. data/spec/test_app/public/favicon.ico +0 -0
  58. metadata +231 -0
@@ -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
metadata ADDED
@@ -0,0 +1,231 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: path_rewrite
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Michael Tucker
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-19 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.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
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: rspec-rails
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
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-rcov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: require_all
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: Preserve SEO of your site by redirecting old non-working paths to new
98
+ active application paths
99
+ email:
100
+ - mtucker@godaddy.com
101
+ executables: []
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - MIT-LICENSE
106
+ - Rakefile
107
+ - app/controllers/path_rewrite/path_controller.rb
108
+ - app/models/path_rewrite/path_translation.rb
109
+ - config/routes.rb
110
+ - db/migrate/20150618003028_create_path_rewrite_path_translations.rb
111
+ - lib/path_rewrite.rb
112
+ - lib/path_rewrite/configuration.rb
113
+ - lib/path_rewrite/engine.rb
114
+ - lib/path_rewrite/version.rb
115
+ - lib/tasks/path_rewrite_tasks.rake
116
+ - spec/controllers/path_rewrite/path_controller_spec.rb
117
+ - spec/lib/path_rewrite/configuration_spec.rb
118
+ - spec/rails_helper.rb
119
+ - spec/rcov_exclude_list.rb
120
+ - spec/routing/routes_spec.rb
121
+ - spec/spec_helper.rb
122
+ - spec/test_app/README.rdoc
123
+ - spec/test_app/Rakefile
124
+ - spec/test_app/app/assets/javascripts/application.js
125
+ - spec/test_app/app/assets/stylesheets/application.css
126
+ - spec/test_app/app/controllers/application_controller.rb
127
+ - spec/test_app/app/helpers/application_helper.rb
128
+ - spec/test_app/app/views/layouts/application.html.erb
129
+ - spec/test_app/bin/bundle
130
+ - spec/test_app/bin/rails
131
+ - spec/test_app/bin/rake
132
+ - spec/test_app/bin/setup
133
+ - spec/test_app/config.ru
134
+ - spec/test_app/config/application.rb
135
+ - spec/test_app/config/boot.rb
136
+ - spec/test_app/config/database.yml
137
+ - spec/test_app/config/environment.rb
138
+ - spec/test_app/config/environments/development.rb
139
+ - spec/test_app/config/environments/production.rb
140
+ - spec/test_app/config/environments/test.rb
141
+ - spec/test_app/config/initializers/assets.rb
142
+ - spec/test_app/config/initializers/backtrace_silencers.rb
143
+ - spec/test_app/config/initializers/cookies_serializer.rb
144
+ - spec/test_app/config/initializers/filter_parameter_logging.rb
145
+ - spec/test_app/config/initializers/inflections.rb
146
+ - spec/test_app/config/initializers/mime_types.rb
147
+ - spec/test_app/config/initializers/session_store.rb
148
+ - spec/test_app/config/initializers/wrap_parameters.rb
149
+ - spec/test_app/config/locales/en.yml
150
+ - spec/test_app/config/routes.rb
151
+ - spec/test_app/config/secrets.yml
152
+ - spec/test_app/db/development.sqlite3
153
+ - spec/test_app/db/schema.rb
154
+ - spec/test_app/db/test.sqlite3
155
+ - spec/test_app/log/development.log
156
+ - spec/test_app/log/test.log
157
+ - spec/test_app/public/404.html
158
+ - spec/test_app/public/422.html
159
+ - spec/test_app/public/500.html
160
+ - spec/test_app/public/favicon.ico
161
+ homepage: https://github.com/godaddy/path_rewrite
162
+ licenses:
163
+ - MIT
164
+ metadata: {}
165
+ post_install_message:
166
+ rdoc_options: []
167
+ require_paths:
168
+ - lib
169
+ required_ruby_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ requirements: []
180
+ rubyforge_project:
181
+ rubygems_version: 2.4.8
182
+ signing_key:
183
+ specification_version: 4
184
+ summary: Mountable engine to support dynamic registration of application paths for
185
+ 301 redirects.
186
+ test_files:
187
+ - spec/controllers/path_rewrite/path_controller_spec.rb
188
+ - spec/lib/path_rewrite/configuration_spec.rb
189
+ - spec/rails_helper.rb
190
+ - spec/rcov_exclude_list.rb
191
+ - spec/routing/routes_spec.rb
192
+ - spec/spec_helper.rb
193
+ - spec/test_app/app/assets/javascripts/application.js
194
+ - spec/test_app/app/assets/stylesheets/application.css
195
+ - spec/test_app/app/controllers/application_controller.rb
196
+ - spec/test_app/app/helpers/application_helper.rb
197
+ - spec/test_app/app/views/layouts/application.html.erb
198
+ - spec/test_app/bin/bundle
199
+ - spec/test_app/bin/rails
200
+ - spec/test_app/bin/rake
201
+ - spec/test_app/bin/setup
202
+ - spec/test_app/config/application.rb
203
+ - spec/test_app/config/boot.rb
204
+ - spec/test_app/config/database.yml
205
+ - spec/test_app/config/environment.rb
206
+ - spec/test_app/config/environments/development.rb
207
+ - spec/test_app/config/environments/production.rb
208
+ - spec/test_app/config/environments/test.rb
209
+ - spec/test_app/config/initializers/assets.rb
210
+ - spec/test_app/config/initializers/backtrace_silencers.rb
211
+ - spec/test_app/config/initializers/cookies_serializer.rb
212
+ - spec/test_app/config/initializers/filter_parameter_logging.rb
213
+ - spec/test_app/config/initializers/inflections.rb
214
+ - spec/test_app/config/initializers/mime_types.rb
215
+ - spec/test_app/config/initializers/session_store.rb
216
+ - spec/test_app/config/initializers/wrap_parameters.rb
217
+ - spec/test_app/config/locales/en.yml
218
+ - spec/test_app/config/routes.rb
219
+ - spec/test_app/config/secrets.yml
220
+ - spec/test_app/config.ru
221
+ - spec/test_app/db/development.sqlite3
222
+ - spec/test_app/db/schema.rb
223
+ - spec/test_app/db/test.sqlite3
224
+ - spec/test_app/log/development.log
225
+ - spec/test_app/log/test.log
226
+ - spec/test_app/public/404.html
227
+ - spec/test_app/public/422.html
228
+ - spec/test_app/public/500.html
229
+ - spec/test_app/public/favicon.ico
230
+ - spec/test_app/Rakefile
231
+ - spec/test_app/README.rdoc