gollum_rails 1.5.9 → 1.5.10
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/setup/options.rb +12 -1
- data/lib/gollum_rails/store.rb +2 -1
- data/lib/gollum_rails.rb +1 -1
- data/spec/gollum_rails/page_spec.rb +1 -0
- data/spec/gollum_rails/setup_spec.rb +7 -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: c00fe61c117e9885588022ce58529d66056a004e
|
4
|
+
data.tar.gz: 15c7469f8d85879473f7a76193686a2ab767bfad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bb110256036daf9200c7c9504e6d05d29c6f93b220cda5519ee0e912279de07642ecfcc3bdbeb2d6ff2236f343b7e19c84fd9ba5dab809a339a70c1bf32fe9b
|
7
|
+
data.tar.gz: eba3fd0839d2c5c98e25ef30eebd58fea8bad59af893b426bca44abf9804af2af83129f8dcd2404baa0960390bc5c77048cd4bdf7a2b2a39be1820d66499bff9
|
data/Gemfile.lock
CHANGED
data/gollum_rails.gemspec
CHANGED
@@ -4,7 +4,18 @@ module GollumRails
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
module ClassMethods
|
7
|
-
|
7
|
+
|
8
|
+
# == Reads out the wiki options. Important is, that there needs to be some kind of hash to be present.
|
9
|
+
#
|
10
|
+
#
|
11
|
+
def wiki_options
|
12
|
+
@wiki_options ||= {}
|
13
|
+
return @wiki_options if @wiki_options.kind_of? Hash
|
14
|
+
raise InitializationError, "Options must be a kind of Hash. Found: #{@wiki_options.class}"
|
15
|
+
end
|
16
|
+
|
17
|
+
attr_writer :wiki_options
|
18
|
+
|
8
19
|
attr_accessor :repository
|
9
20
|
attr_accessor :startup
|
10
21
|
attr_accessor :options
|
data/lib/gollum_rails/store.rb
CHANGED
@@ -21,7 +21,8 @@ module GollumRails
|
|
21
21
|
# Gets the wiki instance
|
22
22
|
def wiki
|
23
23
|
raise InitializationError, "Wiki path was not initialized!" if Setup.wiki_path.nil?
|
24
|
-
|
24
|
+
raise InitializationError, "Options are invalid. Please consult the manual." unless Setup.wiki_options.kind_of? Hash
|
25
|
+
@wiki = Gollum::Wiki.new(Setup.wiki_path, Setup.wiki_options)
|
25
26
|
end
|
26
27
|
end
|
27
28
|
# Gets the pages format
|
data/lib/gollum_rails.rb
CHANGED
@@ -51,5 +51,12 @@ describe GollumRails::Setup do
|
|
51
51
|
}.not_to raise_error
|
52
52
|
end
|
53
53
|
|
54
|
+
it "should not accept empty options. or set it to default" do
|
55
|
+
expect{
|
56
|
+
GollumRails::Setup.build(wiki_options: nil)
|
57
|
+
}.not_to raise_error
|
58
|
+
expect(GollumRails::Setup.wiki_options).to be_kind_of Hash
|
59
|
+
end
|
60
|
+
|
54
61
|
|
55
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gollum_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Kasper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03
|
11
|
+
date: 2014-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|