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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f5c86a6b0816f75daf382d0731715df5d7274a9
4
- data.tar.gz: 99cd7e69fdf571ebbf48c98b7a2eff01b71d3e62
3
+ metadata.gz: c00fe61c117e9885588022ce58529d66056a004e
4
+ data.tar.gz: 15c7469f8d85879473f7a76193686a2ab767bfad
5
5
  SHA512:
6
- metadata.gz: eee8f381165c7de6ce549301dec98dcb31d2d4d2cdb38622e16d7a4bb5eafc5b8cf5bfee8bae7ff08a1a9758e2371594f0fc01f0dacc656cb8a27a3ad25d1e71
7
- data.tar.gz: 2ee5cbf8c04839498b6483094a7b34e3fe3a3a435e9f8f34c7b0dbb03d93ce98b6853e1633827f91d57307e8ec71ba380504f23e81a74fd311f94ce8c12fd891
6
+ metadata.gz: 5bb110256036daf9200c7c9504e6d05d29c6f93b220cda5519ee0e912279de07642ecfcc3bdbeb2d6ff2236f343b7e19c84fd9ba5dab809a339a70c1bf32fe9b
7
+ data.tar.gz: eba3fd0839d2c5c98e25ef30eebd58fea8bad59af893b426bca44abf9804af2af83129f8dcd2404baa0960390bc5c77048cd4bdf7a2b2a39be1820d66499bff9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gollum_rails (1.5.9)
4
+ gollum_rails (1.5.10)
5
5
  activemodel (>= 3.2.11)
6
6
  activesupport (>= 3.2.11)
7
7
  gollum-lib (~> 2.0.0)
data/gollum_rails.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.name = 'gollum_rails'
5
5
  s.rubyforge_project = s.name
6
6
 
7
- s.version = '1.5.9'
7
+ s.version = '1.5.10'
8
8
 
9
9
  s.summary = 'Combines Gollum and Rails'
10
10
  s.description= 'include Gollum into Rails with ease'
@@ -4,7 +4,18 @@ module GollumRails
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  module ClassMethods
7
- attr_accessor :wiki_options
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
@@ -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
- @wiki = Gollum::Wiki.new(Setup.wiki_path, Setup.wiki_options )
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
@@ -41,7 +41,7 @@ module GollumRails
41
41
  autoload :Meta
42
42
 
43
43
  # GollumRails version string
44
- VERSION = '1.5.9'
44
+ VERSION = '1.5.10'
45
45
 
46
46
  end
47
47
 
@@ -529,6 +529,7 @@ describe "Gollum Page" do
529
529
  expect(Fns.search('content').first[:count]).to be(1)
530
530
  res.destroy
531
531
  end
532
+
532
533
  end
533
534
 
534
535
 
@@ -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.9
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-13 00:00:00.000000000 Z
11
+ date: 2014-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel