gollum_rails 1.5.7 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/gollum_rails.gemspec +1 -1
- data/lib/gollum_rails.rb +1 -1
- data/lib/gollum_rails/core.rb +0 -15
- data/spec/gollum_rails/page_spec.rb +0 -25
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f50bda67c1494f2a78ba4b911358604be522e49
|
4
|
+
data.tar.gz: ed0b30bf49b6471b1c76f61d941e43dadb6ecefe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c73c57f7bbae447b6c8515535e99ecbc664dbbe9d7ac34b76deec4363762804f559f622e2dff5f7b80a0bf74266d6f1c412a9a4b1e2f9ee845215c97e19aa49
|
7
|
+
data.tar.gz: a10fa13ceed5c82695fce2815fda8d77c27eb16a4c87d259cac630bb3d77529ea82e9f91a8a1e95cfca216858850694e0fb0d2b73e13870db15fac5f8f44fd15
|
data/Gemfile.lock
CHANGED
data/gollum_rails.gemspec
CHANGED
data/lib/gollum_rails.rb
CHANGED
data/lib/gollum_rails/core.rb
CHANGED
@@ -61,21 +61,6 @@ module GollumRails
|
|
61
61
|
full_path.last
|
62
62
|
end
|
63
63
|
|
64
|
-
# Gets the next subfolder for current pathname
|
65
|
-
def next_folder(previous)
|
66
|
-
path = url
|
67
|
-
previous = File.split(previous).join('/').gsub(/^\/+/, '')
|
68
|
-
path.gsub!(/#{previous}/i, '')
|
69
|
-
ngxpath = File.split(path).first #use path only cuz we want the next folder not file
|
70
|
-
new_path = ngxpath.split('/').reject { |c| c.empty? }
|
71
|
-
px = new_path.join
|
72
|
-
if px == '.' || px.empty?
|
73
|
-
return nil
|
74
|
-
end
|
75
|
-
px
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
64
|
def cname
|
80
65
|
Gollum::Page.cname(self.name)
|
81
66
|
end
|
@@ -79,31 +79,6 @@ describe "Gollum Page" do
|
|
79
79
|
expect(@rr.file_name).to match 'page'
|
80
80
|
@rr.destroy
|
81
81
|
end
|
82
|
-
it "has a path name" do
|
83
|
-
@rr.name = '/home/page/test/page'
|
84
|
-
@rr.save
|
85
|
-
|
86
|
-
expect(@rr.path_name).to match 'home/page/test'
|
87
|
-
@rr.destroy
|
88
|
-
end
|
89
|
-
it "can get the next subfolder" do
|
90
|
-
@rr.name = '/home/page/test/page'
|
91
|
-
@rr.save
|
92
|
-
expect(@rr.next_folder('/home/page')).to match 'test'
|
93
|
-
@rr.destroy
|
94
|
-
end
|
95
|
-
it "can get the next subfolder again" do
|
96
|
-
@rr.name = '/home/page'
|
97
|
-
@rr.save
|
98
|
-
expect(@rr.next_folder("/home")).to be_nil
|
99
|
-
@rr.destroy
|
100
|
-
end
|
101
|
-
it "cannot get the next subfolder" do
|
102
|
-
@rr.name = 'page'
|
103
|
-
@rr.save
|
104
|
-
expect(@rr.next_folder("/")).to be_nil
|
105
|
-
@rr.destroy
|
106
|
-
end
|
107
82
|
it "was last changed by me" do
|
108
83
|
@rr.save
|
109
84
|
@rr.last_changed_by.should == 'flo <mosny@zyg.li>'
|