static_docs 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +17 -4
- data/app/models/static_docs/page.rb +4 -0
- data/config/routes.rb +1 -2
- data/lib/static_docs/capistrano.rb +14 -0
- data/lib/static_docs/engine.rb +1 -0
- data/lib/static_docs/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +4133 -0
- data/test/integration/navigation_test.rb +3 -2
- data/test/unit/static_docs/page_test.rb +7 -0
- metadata +5 -4
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class NavigationTest < ActionDispatch::IntegrationTest
|
4
|
+
self.fixture_path = File.expand_path("../../fixtures/", __FILE__)
|
4
5
|
fixtures :all
|
5
6
|
|
6
7
|
test 'browse pages' do
|
@@ -9,12 +10,12 @@ class NavigationTest < ActionDispatch::IntegrationTest
|
|
9
10
|
assert_select 'title', {:text => 'Dummy'}, 'Page must be rendered within application layout'
|
10
11
|
assert_select 'h3', {:text => 'This is home page'}
|
11
12
|
|
12
|
-
get
|
13
|
+
get static_docs.page_path(static_docs_pages(:first_level_page))
|
13
14
|
assert_response :success
|
14
15
|
assert_select 'h3', {:text => 'This is first level page'}
|
15
16
|
assert_select 'body', /This is first level page/
|
16
17
|
|
17
|
-
get
|
18
|
+
get static_docs.page_path(static_docs_pages(:namespaced_page))
|
18
19
|
assert_response :success
|
19
20
|
assert_select 'h3', {:text => 'This is namespaced page'}
|
20
21
|
|
@@ -50,5 +50,12 @@ module StaticDocs
|
|
50
50
|
assert_equal page.rendered_body(@view_context), 'testtesttest'
|
51
51
|
assert_equal page.meta[:test], 'test'
|
52
52
|
end
|
53
|
+
|
54
|
+
test 'to_param' do
|
55
|
+
assert_equal 'index', static_docs_pages(:home_page).to_param
|
56
|
+
assert_equal 'path/to/page', static_docs_pages(:deep_page).to_param
|
57
|
+
assert_equal 'namespace', static_docs_pages(:namespaced_index_page).to_param
|
58
|
+
assert_equal 'namespace/page', static_docs_pages(:namespaced_page).to_param
|
59
|
+
end
|
53
60
|
end
|
54
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: static_docs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
-
description: Static pages can be created, stored and edited as files. Then
|
46
|
+
description: Static pages can be created, stored and edited as files. Then they can
|
47
47
|
be imported into DB of your app and be shown within app's layout. Rules of displaying
|
48
48
|
are described in special manifest file, gem's initializer of app and in route file
|
49
49
|
email:
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- app/views/static_docs/pages/show.html.erb
|
65
65
|
- config/routes.rb
|
66
66
|
- db/migrate/20130502102206_create_static_docs_pages.rb
|
67
|
+
- lib/static_docs/capistrano.rb
|
67
68
|
- lib/static_docs/engine.rb
|
68
69
|
- lib/static_docs/importer.rb
|
69
70
|
- lib/static_docs/version.rb
|
@@ -137,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
138
|
version: '0'
|
138
139
|
segments:
|
139
140
|
- 0
|
140
|
-
hash:
|
141
|
+
hash: -2011613573326597361
|
141
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
143
|
none: false
|
143
144
|
requirements:
|
@@ -146,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
147
|
version: '0'
|
147
148
|
segments:
|
148
149
|
- 0
|
149
|
-
hash:
|
150
|
+
hash: -2011613573326597361
|
150
151
|
requirements: []
|
151
152
|
rubyforge_project:
|
152
153
|
rubygems_version: 1.8.25
|