route_downcaser 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +6 -0
- data/lib/route_downcaser/downcase_route_middleware.rb +1 -1
- data/lib/route_downcaser/version.rb +1 -1
- data/test/integration/route_middleware_test.rb +31 -0
- data/test/rails421/Gemfile.lock +155 -0
- data/test/{dummy → rails421}/Rakefile +1 -2
- data/test/rails421/app/assets/javascripts/application.js +5 -0
- data/test/rails421/app/assets/stylesheets/application.css +15 -0
- data/test/rails421/app/controllers/application_controller.rb +5 -0
- data/test/{dummy → rails421}/app/controllers/hello_controller.rb +0 -0
- data/test/{dummy → rails421}/app/helpers/application_helper.rb +0 -0
- data/test/rails421/app/views/layouts/application.html.erb +14 -0
- data/test/rails421/bin/bundle +3 -0
- data/test/rails421/bin/rails +8 -0
- data/test/rails421/bin/rake +8 -0
- data/test/rails421/bin/setup +29 -0
- data/test/rails421/bin/spring +15 -0
- data/test/rails421/config.ru +4 -0
- data/test/rails421/config/application.rb +29 -0
- data/test/rails421/config/boot.rb +3 -0
- data/test/rails421/config/environment.rb +5 -0
- data/test/rails421/config/environments/development.rb +41 -0
- data/test/rails421/config/environments/production.rb +79 -0
- data/test/rails421/config/environments/test.rb +42 -0
- data/test/rails421/config/initializers/assets.rb +11 -0
- data/test/{dummy → rails421}/config/initializers/backtrace_silencers.rb +0 -0
- data/test/rails421/config/initializers/cookies_serializer.rb +3 -0
- data/test/rails421/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/{dummy → rails421}/config/initializers/inflections.rb +6 -5
- data/test/{dummy → rails421}/config/initializers/mime_types.rb +0 -1
- data/test/rails421/config/initializers/session_store.rb +3 -0
- data/test/{dummy → rails421}/config/initializers/wrap_parameters.rb +6 -6
- data/test/rails421/config/locales/en.yml +23 -0
- data/test/rails421/config/routes.rb +59 -0
- data/test/rails421/config/secrets.yml +22 -0
- data/test/rails421/log/test.log +1304 -0
- data/test/rails421/public/404.html +67 -0
- data/test/rails421/public/422.html +67 -0
- data/test/rails421/public/500.html +66 -0
- data/test/{dummy → rails421}/public/favicon.ico +0 -0
- data/test/rails421/public/robots.txt +5 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/2jDzo5HOHxVOwRibEcGKnT55XXjviWvj0E1Iwzs4mN8.cache +2 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/3pCA7DaYMP46uZn07pl_w27kArrswAA3tvzrIC2WmE0.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/4xF6jb8pt1JrMe3t48QWWhKPpk8dfzhsxgiMzaTY1ok.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/BErW_J8lSPIdyoA5vtyR1VyWkvQQ-f0me-WQjHWtlw8.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/BjMv9gJYW1venCI_GQVmtDw5q9n2Bx06h08Rbi0fM9s.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/CeEqaMz3fUfli1bPMc2rwGX-jGZsmHMDifWKfULqAok.cache +2 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/DQLYK0wtHp8ToQf57Safv6zTwrz-3QkAKXtRj1gW1q8.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/KkZ8IUd_OEBHljpcLmkv97Mt_6d2-DZOjKdjXORviEo.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/LcRrJkBNmIdWMtnGwqoigO8AfHnhGTGXPlhsBC32CGs.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/MJ45xEinHnGImcxnlkGslcDdiDRrktYp3f99xNSwGGE.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/NSr62-BAYmiO34_v5YxVmS79x6Inq0R2pbiMizt8FyY.cache +2 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/Nt2YSlMeU4OIwojHHEgti8UrveR5dPkvjaaP_4ruyJg.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/RGM5oaoP_BUzVqiX8uW-XdFoXYg1eNtpGBFEO5hdOw0.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/SSdO9RLwJSekdUKGeBA5RbaQd5YaZzr7z4g0VRlvpEk.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/VOp0pIv_pTt1jyD5JQn5Ee721CyQFQTGdnz4ODw38i4.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/XA6AQ1NE-Pc_BGWLMrP8d4iMzdopRS4MQresloyi3rE.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/ZMnkCa94Q8tnCKHeINnio_9JU8rGDJBbcEkIyMrWrTU.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/ZUR5gLn5GPkRb1JMgNuySMzRtnOoTs3O_XNBj4QdX_Y.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/_TVO1CHpcXMh7txH3GrjFl_Xexw67Su6zYiGPpNOgz0.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/bbBPLM0hwS2AwR3ucNZ58vggc3DqgYjf9P7lzdVCy7A.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/bjxU_VU5GnZT4tS0ruFuJiTGUYRL9UuwY1_9h315v1o.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/caf35PsodD2Alii0PGM3SSWKoQUFePOWL2PivgoJmu4.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/fgOQqfbDJIMMf-YMnkSSFLkmxMb3Otp8zIUa6hv3y5o.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/gNmlme94zwDj697jjcCIWWZ3rRGHoKGvGtczpQ8CdCs.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/kD30qkt_38BC0HwjlO7-n08vzIZNTeurUkDii8cfQhQ.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/nlKaqwJ2evKxWGWyGquaTL4rn6iQ_qgvsU-7ojCSskY.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/nnFu0giLaMG2rfics6eNzq0UTEtUo2MgqfY22xPGZ68.cache +2 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/qKeZyK3asQyCCqEshs5CjFJzxvOr3MXU6yMkOXSXhZA.cache +2 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/svLXYKRKUjkQO8bzIJNy9bltX_d0bifxGi0zhGxv0Ew.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/t_by265MJ-UH7rZBzDitqSnyDqoPp-oPBx6SKlr5q4A.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/velkb88qa1xH9KhkdjGH2GAHZ0Xe2HLz68gaj89wtj4.cache +1 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/w4vEtSpHS92CEciZd41-z8-kjBxvh-ar0OzCyADk0Tc.cache +2 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/xslWrko4K5Kfv7kwObEj857Gb7dQVqISpdgvyfYCl0g.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/yYKaKMDqidNStP2HDRD2AF63LyBr1QyheKVk0qjQjGI.cache +0 -0
- data/test/rails421/tmp/cache/assets/test/sprockets/v3.0/ysCcpRVW-14Az9ePa4ZvA4FnI9gCSNvdHas2qQenAzM.cache +2 -0
- data/test/route_downcaser_test.rb +12 -12
- data/test/test_helper.rb +2 -1
- metadata +145 -61
- data/test/dummy/app/assets/images/SpaceCat.jpeg +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -15
- data/test/dummy/app/assets/stylesheets/application.css +0 -13
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -64
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -36
- data/test/dummy/config/environments/production.rb +0 -69
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/secret_token.rb +0 -8
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -60
- data/test/dummy/log/test.log +0 -4660
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -25
- data/test/dummy/script/rails +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2635abfc0c082c7546488ef535c37f359e530dd9
|
|
4
|
+
data.tar.gz: 9b4d18ad22ff97119840e4caa4814ab09dceba20
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90711624b5545b191db420935483c3469e036375704e044bd330eafca62007edae44d4300bf8fa8de09b96e14a33dd70f81dd82e1c11edaae4a5630233883038
|
|
7
|
+
data.tar.gz: 2b15d9f93474697f7c3b6c553ec57c08edf57fc1dd101cb2cbd02d055609eb8e63661028bae73dc5b04011b90e86988e542a53a22b8704d546834374aff04828
|
data/README.rdoc
CHANGED
|
@@ -100,6 +100,12 @@ All it really does is to take the path and downcase it before dispatching. Query
|
|
|
100
100
|
|
|
101
101
|
== Changelog
|
|
102
102
|
|
|
103
|
+
=== 1.1.2
|
|
104
|
+
|
|
105
|
+
POST requests must never result in a redirect, even if the config.redirect is true
|
|
106
|
+
|
|
107
|
+
More robust test-cases have been added
|
|
108
|
+
|
|
103
109
|
=== 1.1.1
|
|
104
110
|
|
|
105
111
|
Fixed {issue #17}[https://github.com/carstengehling/route_downcaser/issues/17]. Thanks go to {TkiTDO}[https://github.com/TikiTDO]
|
|
@@ -24,7 +24,7 @@ module RouteDowncaser
|
|
|
24
24
|
|
|
25
25
|
# If redirect configured, then return redirect request,
|
|
26
26
|
# if either request_uri or path_info has changed
|
|
27
|
-
if RouteDowncaser.redirect
|
|
27
|
+
if RouteDowncaser.redirect && new_env['REQUEST_METHOD'] == "GET"
|
|
28
28
|
if new_env["REQUEST_URI"].present? and new_env["REQUEST_URI"] != env["REQUEST_URI"]
|
|
29
29
|
return redirect_header(new_env["REQUEST_URI"])
|
|
30
30
|
end
|
|
@@ -10,4 +10,35 @@ class RouteMiddlewareTest < ActionDispatch::IntegrationTest
|
|
|
10
10
|
assert_response :success
|
|
11
11
|
assert_equal("anybody out there?", @response.body)
|
|
12
12
|
end
|
|
13
|
+
|
|
14
|
+
test "Assets are served correctly" do
|
|
15
|
+
RouteDowncaser.configuration do |config|
|
|
16
|
+
config.redirect = false
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
get "/assets/application.js"
|
|
20
|
+
assert_response :success
|
|
21
|
+
assert(@response.body.include?("fancy manifest file"))
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
test "Redirect instead of rewrite" do
|
|
25
|
+
RouteDowncaser.configuration do |config|
|
|
26
|
+
config.redirect = true
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
get "/HELLO/WORLD"
|
|
30
|
+
assert_response :redirect
|
|
31
|
+
assert_redirected_to("/hello/world")
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
test "Only GET requests should be redirected, POST should rewrite" do
|
|
35
|
+
RouteDowncaser.configuration do |config|
|
|
36
|
+
config.redirect = true
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
post "/HELLO/WORLD"
|
|
40
|
+
assert_response :success
|
|
41
|
+
assert_equal("anybody out there?", @response.body)
|
|
42
|
+
end
|
|
43
|
+
|
|
13
44
|
end
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
actionmailer (4.2.1)
|
|
5
|
+
actionpack (= 4.2.1)
|
|
6
|
+
actionview (= 4.2.1)
|
|
7
|
+
activejob (= 4.2.1)
|
|
8
|
+
mail (~> 2.5, >= 2.5.4)
|
|
9
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
10
|
+
actionpack (4.2.1)
|
|
11
|
+
actionview (= 4.2.1)
|
|
12
|
+
activesupport (= 4.2.1)
|
|
13
|
+
rack (~> 1.6)
|
|
14
|
+
rack-test (~> 0.6.2)
|
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
|
17
|
+
actionview (4.2.1)
|
|
18
|
+
activesupport (= 4.2.1)
|
|
19
|
+
builder (~> 3.1)
|
|
20
|
+
erubis (~> 2.7.0)
|
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
|
23
|
+
activejob (4.2.1)
|
|
24
|
+
activesupport (= 4.2.1)
|
|
25
|
+
globalid (>= 0.3.0)
|
|
26
|
+
activemodel (4.2.1)
|
|
27
|
+
activesupport (= 4.2.1)
|
|
28
|
+
builder (~> 3.1)
|
|
29
|
+
activerecord (4.2.1)
|
|
30
|
+
activemodel (= 4.2.1)
|
|
31
|
+
activesupport (= 4.2.1)
|
|
32
|
+
arel (~> 6.0)
|
|
33
|
+
activesupport (4.2.1)
|
|
34
|
+
i18n (~> 0.7)
|
|
35
|
+
json (~> 1.7, >= 1.7.7)
|
|
36
|
+
minitest (~> 5.1)
|
|
37
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
38
|
+
tzinfo (~> 1.1)
|
|
39
|
+
arel (6.0.0)
|
|
40
|
+
binding_of_caller (0.7.2)
|
|
41
|
+
debug_inspector (>= 0.0.1)
|
|
42
|
+
builder (3.2.2)
|
|
43
|
+
byebug (5.0.0)
|
|
44
|
+
columnize (= 0.9.0)
|
|
45
|
+
coffee-rails (4.1.0)
|
|
46
|
+
coffee-script (>= 2.2.0)
|
|
47
|
+
railties (>= 4.0.0, < 5.0)
|
|
48
|
+
coffee-script (2.4.1)
|
|
49
|
+
coffee-script-source
|
|
50
|
+
execjs
|
|
51
|
+
coffee-script-source (1.9.1.1)
|
|
52
|
+
columnize (0.9.0)
|
|
53
|
+
debug_inspector (0.0.2)
|
|
54
|
+
erubis (2.7.0)
|
|
55
|
+
execjs (2.5.2)
|
|
56
|
+
globalid (0.3.5)
|
|
57
|
+
activesupport (>= 4.1.0)
|
|
58
|
+
i18n (0.7.0)
|
|
59
|
+
jbuilder (2.2.16)
|
|
60
|
+
activesupport (>= 3.0.0, < 5)
|
|
61
|
+
multi_json (~> 1.2)
|
|
62
|
+
jquery-rails (4.0.3)
|
|
63
|
+
rails-dom-testing (~> 1.0)
|
|
64
|
+
railties (>= 4.2.0)
|
|
65
|
+
thor (>= 0.14, < 2.0)
|
|
66
|
+
json (1.8.2)
|
|
67
|
+
loofah (2.0.2)
|
|
68
|
+
nokogiri (>= 1.5.9)
|
|
69
|
+
mail (2.6.3)
|
|
70
|
+
mime-types (>= 1.16, < 3)
|
|
71
|
+
mime-types (2.6.1)
|
|
72
|
+
mini_portile (0.6.2)
|
|
73
|
+
minitest (5.7.0)
|
|
74
|
+
multi_json (1.11.0)
|
|
75
|
+
nokogiri (1.6.6.2)
|
|
76
|
+
mini_portile (~> 0.6.0)
|
|
77
|
+
rack (1.6.1)
|
|
78
|
+
rack-test (0.6.3)
|
|
79
|
+
rack (>= 1.0)
|
|
80
|
+
rails (4.2.1)
|
|
81
|
+
actionmailer (= 4.2.1)
|
|
82
|
+
actionpack (= 4.2.1)
|
|
83
|
+
actionview (= 4.2.1)
|
|
84
|
+
activejob (= 4.2.1)
|
|
85
|
+
activemodel (= 4.2.1)
|
|
86
|
+
activerecord (= 4.2.1)
|
|
87
|
+
activesupport (= 4.2.1)
|
|
88
|
+
bundler (>= 1.3.0, < 2.0)
|
|
89
|
+
railties (= 4.2.1)
|
|
90
|
+
sprockets-rails
|
|
91
|
+
rails-deprecated_sanitizer (1.0.3)
|
|
92
|
+
activesupport (>= 4.2.0.alpha)
|
|
93
|
+
rails-dom-testing (1.0.6)
|
|
94
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
|
95
|
+
nokogiri (~> 1.6.0)
|
|
96
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
|
97
|
+
rails-html-sanitizer (1.0.2)
|
|
98
|
+
loofah (~> 2.0)
|
|
99
|
+
railties (4.2.1)
|
|
100
|
+
actionpack (= 4.2.1)
|
|
101
|
+
activesupport (= 4.2.1)
|
|
102
|
+
rake (>= 0.8.7)
|
|
103
|
+
thor (>= 0.18.1, < 2.0)
|
|
104
|
+
rake (10.4.2)
|
|
105
|
+
rdoc (4.2.0)
|
|
106
|
+
sass (3.4.14)
|
|
107
|
+
sass-rails (5.0.3)
|
|
108
|
+
railties (>= 4.0.0, < 5.0)
|
|
109
|
+
sass (~> 3.1)
|
|
110
|
+
sprockets (>= 2.8, < 4.0)
|
|
111
|
+
sprockets-rails (>= 2.0, < 4.0)
|
|
112
|
+
tilt (~> 1.1)
|
|
113
|
+
sdoc (0.4.1)
|
|
114
|
+
json (~> 1.7, >= 1.7.7)
|
|
115
|
+
rdoc (~> 4.0)
|
|
116
|
+
spring (1.3.6)
|
|
117
|
+
sprockets (3.1.0)
|
|
118
|
+
rack (~> 1.0)
|
|
119
|
+
sprockets-rails (2.3.1)
|
|
120
|
+
actionpack (>= 3.0)
|
|
121
|
+
activesupport (>= 3.0)
|
|
122
|
+
sprockets (>= 2.8, < 4.0)
|
|
123
|
+
sqlite3 (1.3.10)
|
|
124
|
+
thor (0.19.1)
|
|
125
|
+
thread_safe (0.3.5)
|
|
126
|
+
tilt (1.4.1)
|
|
127
|
+
turbolinks (2.5.3)
|
|
128
|
+
coffee-rails
|
|
129
|
+
tzinfo (1.2.2)
|
|
130
|
+
thread_safe (~> 0.1)
|
|
131
|
+
uglifier (2.7.1)
|
|
132
|
+
execjs (>= 0.3.0)
|
|
133
|
+
json (>= 1.8.0)
|
|
134
|
+
web-console (2.1.2)
|
|
135
|
+
activemodel (>= 4.0)
|
|
136
|
+
binding_of_caller (>= 0.7.2)
|
|
137
|
+
railties (>= 4.0)
|
|
138
|
+
sprockets-rails (>= 2.0, < 4.0)
|
|
139
|
+
|
|
140
|
+
PLATFORMS
|
|
141
|
+
ruby
|
|
142
|
+
|
|
143
|
+
DEPENDENCIES
|
|
144
|
+
byebug
|
|
145
|
+
coffee-rails (~> 4.1.0)
|
|
146
|
+
jbuilder (~> 2.0)
|
|
147
|
+
jquery-rails
|
|
148
|
+
rails (= 4.2.1)
|
|
149
|
+
sass-rails (~> 5.0)
|
|
150
|
+
sdoc (~> 0.4.0)
|
|
151
|
+
spring
|
|
152
|
+
sqlite3
|
|
153
|
+
turbolinks
|
|
154
|
+
uglifier (>= 1.3.0)
|
|
155
|
+
web-console (~> 2.0)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env rake
|
|
2
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
|
3
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
|
4
3
|
|
|
5
4
|
require File.expand_path('../config/application', __FILE__)
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
Rails.application.load_tasks
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
|
11
|
+
* file per style scope.
|
|
12
|
+
*
|
|
13
|
+
*= require_tree .
|
|
14
|
+
*= require_self
|
|
15
|
+
*/
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Rails421</title>
|
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
|
7
|
+
<%= csrf_meta_tags %>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<%= yield %>
|
|
12
|
+
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require 'pathname'
|
|
3
|
+
|
|
4
|
+
# path to your application root.
|
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
|
6
|
+
|
|
7
|
+
Dir.chdir APP_ROOT do
|
|
8
|
+
# This script is a starting point to setup your application.
|
|
9
|
+
# Add necessary setup steps to this file:
|
|
10
|
+
|
|
11
|
+
puts "== Installing dependencies =="
|
|
12
|
+
system "gem install bundler --conservative"
|
|
13
|
+
system "bundle check || bundle install"
|
|
14
|
+
|
|
15
|
+
# puts "\n== Copying sample files =="
|
|
16
|
+
# unless File.exist?("config/database.yml")
|
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
|
18
|
+
# end
|
|
19
|
+
|
|
20
|
+
puts "\n== Preparing database =="
|
|
21
|
+
system "bin/rake db:setup"
|
|
22
|
+
|
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
|
24
|
+
system "rm -f log/*"
|
|
25
|
+
system "rm -rf tmp/cache"
|
|
26
|
+
|
|
27
|
+
puts "\n== Restarting application server =="
|
|
28
|
+
system "touch tmp/restart.txt"
|
|
29
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
# This file loads spring without using Bundler, in order to be fast.
|
|
4
|
+
# It gets overwritten when you run the `spring binstub` command.
|
|
5
|
+
|
|
6
|
+
unless defined?(Spring)
|
|
7
|
+
require "rubygems"
|
|
8
|
+
require "bundler"
|
|
9
|
+
|
|
10
|
+
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
|
|
11
|
+
Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq }
|
|
12
|
+
gem "spring", match[1]
|
|
13
|
+
require "spring/binstub"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
|
|
3
|
+
#require 'rails/all'
|
|
4
|
+
require "action_controller/railtie"
|
|
5
|
+
require "action_mailer/railtie"
|
|
6
|
+
require "sprockets/railtie"
|
|
7
|
+
require "rails/test_unit/railtie"
|
|
8
|
+
# Require the gems listed in Gemfile, including any gems
|
|
9
|
+
# you've limited to :test, :development, or :production.
|
|
10
|
+
Bundler.require(*Rails.groups)
|
|
11
|
+
|
|
12
|
+
module Rails421
|
|
13
|
+
class Application < Rails::Application
|
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
|
15
|
+
# Application configuration should go into files in config/initializers
|
|
16
|
+
# -- all .rb files in that directory are automatically loaded.
|
|
17
|
+
|
|
18
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
19
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
20
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
|
21
|
+
|
|
22
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
23
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
24
|
+
# config.i18n.default_locale = :de
|
|
25
|
+
|
|
26
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
|
27
|
+
#config.active_record.raise_in_transactional_callbacks = true
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Rails.application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
+
|
|
4
|
+
# In the development environment your application's code is reloaded on
|
|
5
|
+
# every request. This slows down response time but is perfect for development
|
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
|
7
|
+
config.cache_classes = false
|
|
8
|
+
|
|
9
|
+
# Do not eager load code on boot.
|
|
10
|
+
config.eager_load = false
|
|
11
|
+
|
|
12
|
+
# Show full error reports and disable caching.
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
config.action_controller.perform_caching = false
|
|
15
|
+
|
|
16
|
+
# Don't care if the mailer can't send.
|
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
|
18
|
+
|
|
19
|
+
# Print deprecation notices to the Rails logger.
|
|
20
|
+
config.active_support.deprecation = :log
|
|
21
|
+
|
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
|
23
|
+
config.active_record.migration_error = :page_load
|
|
24
|
+
|
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
|
27
|
+
# number of complex assets.
|
|
28
|
+
config.assets.debug = true
|
|
29
|
+
|
|
30
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
|
31
|
+
# yet still be able to expire them through the digest params.
|
|
32
|
+
config.assets.digest = true
|
|
33
|
+
|
|
34
|
+
# Adds additional error checking when serving assets at runtime.
|
|
35
|
+
# Checks for improperly declared sprockets dependencies.
|
|
36
|
+
# Raises helpful error messages.
|
|
37
|
+
config.assets.raise_runtime_errors = true
|
|
38
|
+
|
|
39
|
+
# Raises error for missing translations
|
|
40
|
+
# config.action_view.raise_on_missing_translations = true
|
|
41
|
+
end
|