gollum_rails 1.4.0.rc3 → 1.4.1

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: a434e676dc3ae1204edb758d2d2918cbf35f84c4
4
- data.tar.gz: 8072921f43ce01ae3d757745618f1a881c1bb58d
3
+ metadata.gz: b9baab7df51ee264f15748a5a0545fb5b9b8260e
4
+ data.tar.gz: 102049591d936c7daf3aaa2fbc38c1cb88be46ef
5
5
  SHA512:
6
- metadata.gz: 91b19d14333e79f92bc1144d93c56ec506deb77e70bd4f21f3b1e5fa8e802650b2458a656f2cd2ed20127a5ee2d3c9fccf916efe5d6e6c622c31f4e949fdcdfb
7
- data.tar.gz: d70e90582b942e2c719bf533c6a3f6ad950c79f5c32c87cc3f07843eca84040337edc1a0c1f3aad38de1f563af2b7af758f51e7b35f24857fa5261ae337af0f7
6
+ metadata.gz: 5b6803db7979639b77e5a1b676427b45072c1ae8e990ec425e074bacc2c50b3be55e12709c5427124635fc72272606e6c34377f47272dfbd99833d07b5cb6d55
7
+ data.tar.gz: c449d6e1a6e6b48f814fe67e99e68b4b1d8e5bb37c791eb6febd35310e0f51074d2b1731ec5a28d104ac4e7692109d054c3d0df159533db5f7c92eb14a8d877e
data/Gemfile.lock CHANGED
@@ -1,32 +1,32 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gollum_rails (1.4.0.rc3)
5
- activemodel (~> 4.0.0.rc1)
4
+ gollum_rails (1.4.1)
5
+ activemodel (>= 4.0.0)
6
6
  gollum-lib (~> 1.0.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.0.0.rc1)
12
- actionpack (= 4.0.0.rc1)
11
+ actionmailer (4.0.0)
12
+ actionpack (= 4.0.0)
13
13
  mail (~> 2.5.3)
14
- actionpack (4.0.0.rc1)
15
- activesupport (= 4.0.0.rc1)
14
+ actionpack (4.0.0)
15
+ activesupport (= 4.0.0)
16
16
  builder (~> 3.1.0)
17
17
  erubis (~> 2.7.0)
18
18
  rack (~> 1.5.2)
19
19
  rack-test (~> 0.6.2)
20
- activemodel (4.0.0.rc1)
21
- activesupport (= 4.0.0.rc1)
20
+ activemodel (4.0.0)
21
+ activesupport (= 4.0.0)
22
22
  builder (~> 3.1.0)
23
- activerecord (4.0.0.rc1)
24
- activemodel (= 4.0.0.rc1)
23
+ activerecord (4.0.0)
24
+ activemodel (= 4.0.0)
25
25
  activerecord-deprecated_finders (~> 1.0.2)
26
- activesupport (= 4.0.0.rc1)
26
+ activesupport (= 4.0.0)
27
27
  arel (~> 4.0.0)
28
- activerecord-deprecated_finders (1.0.2)
29
- activesupport (4.0.0.rc1)
28
+ activerecord-deprecated_finders (1.0.3)
29
+ activesupport (4.0.0)
30
30
  i18n (~> 0.6, >= 0.6.4)
31
31
  minitest (~> 4.2)
32
32
  multi_json (~> 1.3)
@@ -46,52 +46,52 @@ GEM
46
46
  erubis (2.7.0)
47
47
  github-markdown (0.5.3)
48
48
  github-markup (0.7.5)
49
- gollum-lib (1.0.0)
49
+ gollum-lib (1.0.3)
50
50
  github-markdown (~> 0.5.3)
51
51
  github-markup (>= 0.7.5, < 1.0.0)
52
52
  grit (~> 2.5.0)
53
- nokogiri (~> 1.5.9)
54
- pygments.rb (~> 0.4.2)
55
- sanitize (~> 2.0.3)
53
+ nokogiri (~> 1.5.9, < 1.6.0)
54
+ pygments.rb (~> 0.5.0)
55
+ sanitize (~> 2.0.3, < 2.0.4)
56
56
  stringex (~> 1.5.1)
57
57
  grit (2.5.0)
58
58
  diff-lcs (~> 1.1)
59
59
  mime-types (~> 1.15)
60
60
  posix-spawn (~> 0.3.6)
61
- hike (1.2.2)
61
+ hike (1.2.3)
62
62
  i18n (0.6.4)
63
63
  mail (2.5.4)
64
64
  mime-types (~> 1.16)
65
65
  treetop (~> 1.4.8)
66
66
  mime-types (1.23)
67
- minitest (4.7.4)
67
+ minitest (4.7.5)
68
68
  multi_json (1.7.3)
69
- nokogiri (1.5.9)
69
+ nokogiri (1.5.10)
70
70
  polyglot (0.3.3)
71
71
  posix-spawn (0.3.6)
72
- pygments.rb (0.4.2)
72
+ pygments.rb (0.5.1)
73
73
  posix-spawn (~> 0.3.6)
74
74
  yajl-ruby (~> 1.1.0)
75
75
  rack (1.5.2)
76
76
  rack-test (0.6.2)
77
77
  rack (>= 1.0)
78
- rails (4.0.0.rc1)
79
- actionmailer (= 4.0.0.rc1)
80
- actionpack (= 4.0.0.rc1)
81
- activerecord (= 4.0.0.rc1)
82
- activesupport (= 4.0.0.rc1)
78
+ rails (4.0.0)
79
+ actionmailer (= 4.0.0)
80
+ actionpack (= 4.0.0)
81
+ activerecord (= 4.0.0)
82
+ activesupport (= 4.0.0)
83
83
  bundler (>= 1.3.0, < 2.0)
84
- railties (= 4.0.0.rc1)
85
- sprockets-rails (~> 2.0.0.rc4)
86
- railties (4.0.0.rc1)
87
- actionpack (= 4.0.0.rc1)
88
- activesupport (= 4.0.0.rc1)
84
+ railties (= 4.0.0)
85
+ sprockets-rails (~> 2.0.0)
86
+ railties (4.0.0)
87
+ actionpack (= 4.0.0)
88
+ activesupport (= 4.0.0)
89
89
  rake (>= 0.8.7)
90
90
  thor (>= 0.18.1, < 2.0)
91
- rake (10.0.4)
91
+ rake (10.1.0)
92
92
  rest-client (1.6.7)
93
93
  mime-types (>= 1.16)
94
- rr (1.0.5)
94
+ rr (1.1.1)
95
95
  rspec (2.13.0)
96
96
  rspec-core (~> 2.13.0)
97
97
  rspec-expectations (~> 2.13.0)
@@ -106,12 +106,12 @@ GEM
106
106
  multi_json (~> 1.0)
107
107
  simplecov-html (~> 0.7.1)
108
108
  simplecov-html (0.7.1)
109
- sprockets (2.9.3)
109
+ sprockets (2.10.0)
110
110
  hike (~> 1.2)
111
111
  multi_json (~> 1.0)
112
112
  rack (~> 1.0)
113
113
  tilt (~> 1.1, != 1.3.0)
114
- sprockets-rails (2.0.0.rc4)
114
+ sprockets-rails (2.0.0)
115
115
  actionpack (>= 3.0)
116
116
  activesupport (>= 3.0)
117
117
  sprockets (~> 2.8)
@@ -120,7 +120,7 @@ GEM
120
120
  thread_safe (0.1.0)
121
121
  atomic
122
122
  tilt (1.4.1)
123
- treetop (1.4.12)
123
+ treetop (1.4.14)
124
124
  polyglot
125
125
  polyglot (>= 0.3.1)
126
126
  tzinfo (0.3.37)
@@ -132,6 +132,6 @@ PLATFORMS
132
132
  DEPENDENCIES
133
133
  coveralls
134
134
  gollum_rails!
135
- rails (~> 4.0.0.rc1)
136
- rr (~> 1.0.4)
135
+ rails (>= 4.0.0)
136
+ rr (~> 1.1.1)
137
137
  rspec (~> 2.13.0)
data/gollum_rails.gemspec CHANGED
@@ -4,21 +4,21 @@ Gem::Specification.new do |s|
4
4
  s.name = 'gollum_rails'
5
5
  s.rubyforge_project = s.name
6
6
 
7
- s.version = '1.4.0.rc3'
7
+ s.version = '1.4.1'
8
8
 
9
9
  s.summary = 'Combines Gollum and Rails'
10
10
  s.description= 'include Gollum into Rails with ease'
11
11
 
12
- s.add_dependency 'activemodel', '~> 4.0.0.rc1'
12
+ s.add_dependency 'activemodel', '>= 4.0.0'
13
13
  s.add_dependency 'gollum-lib', '~> 1.0.0'
14
14
 
15
15
  s.add_development_dependency 'rspec', '~> 2.13.0'
16
- s.add_development_dependency 'rr', '~> 1.0.4'
17
- s.add_development_dependency 'rails', '~> 4.0.0.rc1'
16
+ s.add_development_dependency 'rr', '~> 1.1.1'
17
+ s.add_development_dependency 'rails', '>= 4.0.0'
18
18
 
19
19
  s.author = 'Florian Kasper'
20
20
  s.email = 'mosny@zyg.li'
21
- s.homepage = 'http://gollum.zyg.li'
21
+ s.homepage = 'https://github.com/nirnanaaa/gollum_rails'
22
22
  s.license = 'AGPL'
23
23
  s.platform = Gem::Platform::RUBY
24
24
  s.required_ruby_version = '>=1.9.3'
@@ -65,7 +65,6 @@ Gem::Specification.new do |s|
65
65
  spec/gollum_rails/respository_spec.rb
66
66
  spec/gollum_rails/setup_spec.rb
67
67
  spec/gollum_rails/wiki_spec.rb
68
- spec/gollum_rails_spec.rb
69
68
  spec/spec.opts
70
69
  spec/spec_helper.rb
71
70
  ]
@@ -24,11 +24,18 @@ module GollumRails
24
24
  # Gets / Sets the wiki
25
25
  attr_accessor :wiki
26
26
 
27
- # Initializer
28
- def initialize
29
- @wiki = Connector.wiki_class
30
- end
27
+ class << self
28
+
29
+ # finds all versions of a page
30
+ #
31
+ # name - the pagename to search
32
+ #
33
+ # Returns the Gollum::Page class
34
+ def find_page(name)
35
+ Connector.wiki_class.page ::Gollum::Page.cname(name)
36
+ end
31
37
 
38
+ end
32
39
 
33
40
  # creates a new Page
34
41
  #
@@ -39,8 +46,8 @@ module GollumRails
39
46
  #
40
47
  # Returns the commit id
41
48
  def new_page( name, content,type=:markdown, commit={} )
42
- @wiki.write_page name.to_s, type, content, commit if name
43
- @page = @wiki.page name
49
+ Connector.wiki_class.write_page name.to_s, type, content, commit if name
50
+ @page = Connector.wiki_class.page name
44
51
  @page
45
52
  end
46
53
 
@@ -53,7 +60,7 @@ module GollumRails
53
60
  # Returns the commit id
54
61
  def update_page( new, commit={}, old=nil)
55
62
  if new.is_a?(Hash)
56
- commit_id = @wiki.update_page (old||@page),
63
+ commit_id = Connector.wiki_class.update_page (old||@page),
57
64
  new[:name]||@page.name,
58
65
  new[:format]||@page.format,
59
66
  new[:content]||@page.raw_data,
@@ -74,7 +81,7 @@ module GollumRails
74
81
  #
75
82
  # Returns the commit id
76
83
  def delete_page( commit={}, page = nil )
77
- @wiki.delete_page (page||@page), commit
84
+ Connector.wiki_class.delete_page (page||@page), commit
78
85
  end
79
86
 
80
87
  # renames an existing page
@@ -94,7 +101,8 @@ module GollumRails
94
101
  #
95
102
  # Returns the Gollum::Page class
96
103
  def find_page(name)
97
- @wiki.page ::Gollum::Page.cname(name)
104
+ puts "DEPRECATED! Use Page.find_page instead"
105
+ self.class.find_page(name)
98
106
  end
99
107
 
100
108
  # moves an existing page
@@ -12,13 +12,14 @@ module GollumRails
12
12
  # * new
13
13
  # * save
14
14
  # * delete
15
- # * find_or_initialize_by_naname
15
+ # * find_or_initialize_by_name
16
16
  #
17
17
  class Page
18
- extend ::ActiveModel::Callbacks
19
- include ::ActiveModel::Validations
20
- include ::ActiveModel::Conversion
21
- extend ::ActiveModel::Naming
18
+ # extend ::ActiveModel::Callbacks
19
+ # include ::ActiveModel::Validations
20
+ # include ::ActiveModel::Conversion
21
+ # extend ::ActiveModel::Naming
22
+ include ::ActiveModel::Model
22
23
 
23
24
 
24
25
  # Callback for save
@@ -46,8 +47,8 @@ module GollumRails
46
47
  #
47
48
  # Returns self
48
49
  def find_or_initialize_by_name(name, commit)
49
- result_for_find = self.find(name)
50
- self.create({:format => :markdown, :name => name, :content => ".", :commit => commit })
50
+ result_for_find = find(name)
51
+ create({:format => :markdown, :name => name, :content => ".", :commit => commit })
51
52
  end
52
53
 
53
54
  # Checks if the fileformat is supported
@@ -79,8 +80,7 @@ module GollumRails
79
80
  #
80
81
  # Returns an instance of Gollum::Page
81
82
  def create!(hash)
82
- action = self.create(hash)
83
- action
83
+ create(hash)
84
84
  end
85
85
 
86
86
  # Finds a page based on the name and specified version
@@ -89,13 +89,12 @@ module GollumRails
89
89
  #
90
90
  # Return an instance of Gollum::Page
91
91
  def find(name)
92
- page = GollumRails::Adapters::Gollum::Page.new
93
- page.find_page name
92
+ GollumRails::Adapters::Gollum::Page.find_page name
94
93
  end
95
94
 
96
95
  # Gets all pages in the wiki
97
96
  def all
98
- self.wiki.pages
97
+ wiki.pages
99
98
  end
100
99
  alias_method :find_all, :all
101
100
 
@@ -185,7 +184,7 @@ module GollumRails
185
184
  begin
186
185
  page.new_page(name,content,format,commit)
187
186
  rescue ::Gollum::DuplicatePageError => e
188
- page.page = page.find_page(name)
187
+ page.page = Adapters::Gollum::Connector.page_class.find_page(name)
189
188
  end
190
189
  return page.page
191
190
  end
data/lib/gollum_rails.rb CHANGED
@@ -23,7 +23,7 @@ module GollumRails
23
23
  autoload :Setup, 'gollum_rails/setup'
24
24
 
25
25
  # GollumRails version string
26
- VERSION = '1.4.0.rc3'
26
+ VERSION = '1.4.1'
27
27
 
28
28
  # Simplified error
29
29
  class Error < StandardError; end
@@ -31,6 +31,7 @@ module GollumRails
31
31
  # All Gollum internal exceptions will be redirected to this
32
32
  class GollumInternalError < Error
33
33
 
34
+
34
35
  attr_accessor :name
35
36
  attr_accessor :message
36
37
  attr_accessor :target
@@ -17,7 +17,6 @@ describe GollumRails::Adapters::Gollum::Page do
17
17
  repo = Grit::Repo.init_bare location
18
18
  wiki = GollumRails::Adapters::Gollum::Wiki.new repo
19
19
  page = GollumRails::Adapters::Gollum::Page.new
20
- page.wiki.should be_instance_of Gollum::Wiki
21
20
  end
22
21
  it "should create a new page" do
23
22
  location = "#{File.dirname(__FILE__)}/../../../utils/wiki.git"
@@ -65,7 +64,7 @@ describe GollumRails::Adapters::Gollum::Page do
65
64
  it "should find a page" do
66
65
  @page.new_page 'content_page', 'content', :markdown, @commit
67
66
 
68
- @page.find_page("content_page")
67
+ GollumRails::Adapters::Gollum::Page.find_page("content_page")
69
68
  @page.delete_page(@commit)
70
69
  end
71
70
  it "should test the commit methods" do
@@ -40,5 +40,21 @@ describe GollumRails::Setup do
40
40
  expect{setup.startup=true}.to raise_error
41
41
  end
42
42
  end
43
+ it "should test the Rails configuration" do
44
+ GollumRails::Setup.build do |setup|
45
+
46
+ # => The repository path to the
47
+ #
48
+ #
49
+ setup.repository = :application
50
+
51
+ #setup.wiki.use = :default
52
+ expect{setup.startup=(true)}.to raise_error(NoMethodError, "undefined method `config' for nil:NilClass")
53
+
54
+ #setup.repository = nil
55
+ #expect{setup.startup=true}.to raise_error GollumRails::GollumInternalError
56
+
57
+ end
58
+ end
43
59
 
44
60
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.rc3
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Kasper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-28 00:00:00.000000000 Z
11
+ date: 2013-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0.rc1
19
+ version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.0.rc1
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gollum-lib
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.4
61
+ version: 1.1.1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.4
68
+ version: 1.1.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
- version: 4.0.0.rc1
75
+ version: 4.0.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
- version: 4.0.0.rc1
82
+ version: 4.0.0
83
83
  description: include Gollum into Rails with ease
84
84
  email: mosny@zyg.li
85
85
  executables: []
@@ -125,10 +125,9 @@ files:
125
125
  - spec/gollum_rails/respository_spec.rb
126
126
  - spec/gollum_rails/setup_spec.rb
127
127
  - spec/gollum_rails/wiki_spec.rb
128
- - spec/gollum_rails_spec.rb
129
128
  - spec/spec.opts
130
129
  - spec/spec_helper.rb
131
- homepage: http://gollum.zyg.li
130
+ homepage: https://github.com/nirnanaaa/gollum_rails
132
131
  licenses:
133
132
  - AGPL
134
133
  metadata: {}
@@ -146,9 +145,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
145
  version: 1.9.3
147
146
  required_rubygems_version: !ruby/object:Gem::Requirement
148
147
  requirements:
149
- - - '>'
148
+ - - '>='
150
149
  - !ruby/object:Gem::Version
151
- version: 1.3.1
150
+ version: '0'
152
151
  requirements: []
153
152
  rubyforge_project: gollum_rails
154
153
  rubygems_version: 2.0.3
@@ -1,9 +0,0 @@
1
- # Setup testing
2
- require 'spec_helper'
3
- describe GollumRails do
4
-
5
- it "should equal the current version" do
6
- GollumRails::VERSION.should == "1.4.0.rc3"
7
- end
8
-
9
- end