semi_static 0.7.1 → 0.7.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/CHANGELOG.md +4 -0
- data/lib/semi_static/controller/page.rb +1 -1
- data/lib/semi_static/version.rb +1 -1
- data/spec/features/custom_controllers_spec.rb +12 -0
- data/spec/features/fake/app/models/faq.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22ad4aec347a42f10830a054fcb8041a8bc87a8a
|
4
|
+
data.tar.gz: 4ceba7117165aef6d8f34bcd72e194361dd144a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: faf505ca278d1980efacac781c4703bf47e1857288cdbe743d0ad95fd21cd0395807279317e1494b143360ac171902af25491c87f6dac9da34fa3f9c39b301a8
|
7
|
+
data.tar.gz: 965c9e62c788f9ca5c7132f9f0f0a9a6c8ce9021882972bec400358e318facf28f8addf742db9e2c18c4582546282e4f1094d13594d274c9743b31017dbe5281
|
data/CHANGELOG.md
CHANGED
@@ -12,7 +12,7 @@ module SemiStatic::Controller::Page
|
|
12
12
|
raise ActionController::RoutingError.new(url_for(:id => params[:id], :only_path => true))
|
13
13
|
end
|
14
14
|
unless params[:id] == @article.to_param
|
15
|
-
redirect_to @article, :
|
15
|
+
redirect_to({id: @article}, status: :moved_permanently)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
data/lib/semi_static/version.rb
CHANGED
@@ -12,8 +12,20 @@ feature 'custom controllers', type: :feature do
|
|
12
12
|
expect(find("h1").text).to eq("チェックイン端末とはなんですか?")
|
13
13
|
end
|
14
14
|
|
15
|
+
scenario "partial match redirects" do
|
16
|
+
visit faq_path("チェックイン端末")
|
17
|
+
expect(page.current_path).to eq(faq_path("チェックイン端末とはなんですか"))
|
18
|
+
expect(find("h1").text).to eq("チェックイン端末とはなんですか?")
|
19
|
+
end
|
20
|
+
|
15
21
|
scenario "namespaced controller" do
|
16
22
|
visit admin_faqs_path
|
17
23
|
expect(find("body").text).to eq("Namespaced")
|
18
24
|
end
|
25
|
+
|
26
|
+
scenario "namespaced controller redirects" do
|
27
|
+
visit admin_faq_path("チェックイン端末")
|
28
|
+
expect(page.current_path).to eq(admin_faq_path("チェックイン端末とはなんですか"))
|
29
|
+
expect(find("h1").text).to eq("チェックイン端末とはなんですか?")
|
30
|
+
end
|
19
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semi_static
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul McMahon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|