gollum 2.5.2 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gollum might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5e671e9e3556522997ba960c4ab1e5d1ae7b29e
4
- data.tar.gz: a1184728ef1ebdf0afd72259b6e226226f17e60e
3
+ metadata.gz: 4f1fd022c60a1f76f6089b8abf1ce266c614c0c5
4
+ data.tar.gz: acd811fd1f8208bbce1c0478d76fbadf01384c70
5
5
  SHA512:
6
- metadata.gz: 3af45d3ac496d93ff54f4c967c284e9d41718aa0ef23d81fdc0095c64564ba786870b0cb7cbf60893a62763f08332ef29c6ef276da194b02cf78721359ef0e15
7
- data.tar.gz: 8406d6b1001336d90c71b5ec0861ec38f0c5c1c0cc4236f1377bff6269ba05a0483fdcf081fe19e922c1c69944dd3f383133ca0369c46cefde6feb771daca02f
6
+ metadata.gz: dab40d9d3d84550c9d3ee33189645d95d63cd60b4b98e5dc4ee4e9a00d24e11ccf0fccac1eb9a0efe3df22a29e3f382b640cacc4f85ce3a9045c6b1cc906f898
7
+ data.tar.gz: 840edf30f8f864272f7a241d642d7553589b4d5f4527a00724ae8eb27e62381fda76f8a3b0391dc43568544ff76711e9a73f31e334693f13f16fcad805a33839
data/bin/gollum CHANGED
@@ -56,6 +56,10 @@ opts = OptionParser.new do |opts|
56
56
  wiki_options[:js] = true
57
57
  end
58
58
 
59
+ opts.on("--template-dir [PATH]", "Specify custom template directory") do |path|
60
+ wiki_options[:template_dir] = path
61
+ end
62
+
59
63
  opts.on("--page-file-dir [PATH]", "Specify the sub directory for all page files (default: repository root).") do |path|
60
64
  wiki_options[:page_file_dir] = path
61
65
  end
@@ -168,6 +172,7 @@ else
168
172
  require 'gollum/app'
169
173
  Precious::App.set(:gollum_path, gollum_path)
170
174
  Precious::App.set(:wiki_options, wiki_options)
175
+ Precious::App.settings.mustache[:templates] = wiki_options[:template_dir] if wiki_options[:template_dir]
171
176
 
172
177
  if cfg = options['config']
173
178
  # If the path begins with a '/' it will be considered an absolute path,
data/gollum.gemspec CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.required_ruby_version = ">= 1.9"
6
6
 
7
7
  s.name = 'gollum'
8
- s.version = '2.5.2'
9
- s.date = '2013-11-02'
8
+ s.version = '2.6.0'
9
+ s.date = '2014-01-02'
10
10
  s.rubyforge_project = 'gollum'
11
11
  s.license = 'MIT'
12
12
 
@@ -24,14 +24,14 @@ Gem::Specification.new do |s|
24
24
  s.rdoc_options = ["--charset=UTF-8"]
25
25
  s.extra_rdoc_files = %w[README.md LICENSE]
26
26
 
27
- s.add_dependency 'gollum-lib', '~> 1.0.9'
27
+ s.add_dependency 'gollum-lib', '~> 1.0', '>= 1.0.9'
28
28
  s.add_dependency 'github-markdown', '~> 0.5.5'
29
- s.add_dependency 'sinatra', '~> 1.4.3'
29
+ s.add_dependency 'sinatra', '~> 1.4', '>= 1.4.3'
30
30
  s.add_dependency 'mustache', ['>= 0.99.4', '< 1.0.0']
31
31
  s.add_dependency 'useragent', '~> 0.8.2'
32
32
 
33
33
  s.add_development_dependency 'rack-test', '~> 0.6.2'
34
- s.add_development_dependency 'shoulda', ['>= 3.4.0', '< 3.5.0']
34
+ s.add_development_dependency 'shoulda', '~> 3.4.0'
35
35
  s.add_development_dependency 'minitest-reporters', '~> 0.14.16'
36
36
 
37
37
  # = MANIFEST =
data/lib/gollum/app.rb CHANGED
@@ -289,6 +289,8 @@ module Precious
289
289
  format = params[:format].intern
290
290
  wiki = wiki_new
291
291
 
292
+ path.gsub!(/^\//, '')
293
+
292
294
  begin
293
295
  wiki.write_page(name, format, params[:content], commit_message, path)
294
296
 
@@ -300,15 +302,14 @@ module Precious
300
302
  end
301
303
  end
302
304
 
303
- post '/revert/:page/*' do
304
- wikip = wiki_page(params[:page])
305
+ post '/revert/*/:sha1/:sha2' do
306
+ wikip = wiki_page(params[:splat].first)
305
307
  @path = wikip.path
306
308
  @name = wikip.name
307
309
  wiki = wikip.wiki
308
310
  @page = wiki.paged(@name,@path)
309
- shas = params[:splat].first.split("/")
310
- sha1 = shas.shift
311
- sha2 = shas.shift
311
+ sha1 = params[:sha1]
312
+ sha2 = params[:sha2]
312
313
 
313
314
  commit = commit_message
314
315
  commit[:message] = "Revert commit #{sha1.chars.take(7).join}"
@@ -387,6 +388,7 @@ module Precious
387
388
  @page = page
388
389
  @name = name
389
390
  @content = page.formatted_data
391
+ @version = version
390
392
  mustache :page
391
393
  else
392
394
  halt 404
@@ -179,6 +179,7 @@
179
179
  duration: 200,
180
180
  complete: function() {
181
181
  $('#gollum-dialog-dialog').removeClass('active');
182
+ $('#gollum-dialog-dialog').css('display', 'none');
182
183
  }
183
184
  });
184
185
  }
@@ -155,7 +155,8 @@ $(document).ready(function() {
155
155
  fields: [
156
156
  {
157
157
  type: 'file',
158
- context: 'Your uploaded file will be accessible at /uploads/[filename]'
158
+ context: 'Your uploaded file will be accessible at /uploads/[filename]',
159
+ action: baseUrl + '/uploadFile'
159
160
  }
160
161
  ],
161
162
  OK: function( res ) {
@@ -7,6 +7,7 @@
7
7
  <link rel="stylesheet" type="text/css" href="{{base_url}}/css/dialog.css" media="all">
8
8
  <link rel="stylesheet" type="text/css" href="{{base_url}}/css/template.css" media="all">
9
9
  {{#css}}<link rel="stylesheet" type="text/css" href="{{base_url}}/custom.css" media="all">{{/css}}
10
+ {{#noindex}}<meta name="robots" content="noindex, nofollow" />{{/noindex}}
10
11
 
11
12
  <!--[if IE 7]>
12
13
  <link rel="stylesheet" type="text/css" href="{{base_url}}/css/ie7.css" media="all">
@@ -35,6 +35,10 @@ module Precious
35
35
  first.authored_date.strftime(DATE_FORMAT)
36
36
  end
37
37
 
38
+ def noindex
39
+ @version ? true : false
40
+ end
41
+
38
42
  def editable
39
43
  @editable
40
44
  end
data/lib/gollum.rb CHANGED
@@ -16,7 +16,7 @@ require File.expand_path('../gollum/uri_encode_component', __FILE__)
16
16
  $KCODE = 'U' if RUBY_VERSION[0,3] == '1.8'
17
17
 
18
18
  module Gollum
19
- VERSION = '2.5.2'
19
+ VERSION = '2.6.0'
20
20
 
21
21
  def self.assets_path
22
22
  ::File.expand_path('gollum/public', ::File.dirname(__FILE__))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gollum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -9,13 +9,16 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-02 00:00:00.000000000 Z
12
+ date: 2014-01-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gollum-lib
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: '1.0'
21
+ - - '>='
19
22
  - !ruby/object:Gem::Version
20
23
  version: 1.0.9
21
24
  type: :runtime
@@ -23,6 +26,9 @@ dependencies:
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
28
  - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: '1.0'
31
+ - - '>='
26
32
  - !ruby/object:Gem::Version
27
33
  version: 1.0.9
28
34
  - !ruby/object:Gem::Dependency
@@ -44,6 +50,9 @@ dependencies:
44
50
  requirement: !ruby/object:Gem::Requirement
45
51
  requirements:
46
52
  - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '1.4'
55
+ - - '>='
47
56
  - !ruby/object:Gem::Version
48
57
  version: 1.4.3
49
58
  type: :runtime
@@ -51,6 +60,9 @@ dependencies:
51
60
  version_requirements: !ruby/object:Gem::Requirement
52
61
  requirements:
53
62
  - - ~>
63
+ - !ruby/object:Gem::Version
64
+ version: '1.4'
65
+ - - '>='
54
66
  - !ruby/object:Gem::Version
55
67
  version: 1.4.3
56
68
  - !ruby/object:Gem::Dependency
@@ -105,22 +117,16 @@ dependencies:
105
117
  name: shoulda
106
118
  requirement: !ruby/object:Gem::Requirement
107
119
  requirements:
108
- - - '>='
120
+ - - ~>
109
121
  - !ruby/object:Gem::Version
110
122
  version: 3.4.0
111
- - - <
112
- - !ruby/object:Gem::Version
113
- version: 3.5.0
114
123
  type: :development
115
124
  prerelease: false
116
125
  version_requirements: !ruby/object:Gem::Requirement
117
126
  requirements:
118
- - - '>='
127
+ - - ~>
119
128
  - !ruby/object:Gem::Version
120
129
  version: 3.4.0
121
- - - <
122
- - !ruby/object:Gem::Version
123
- version: 3.5.0
124
130
  - !ruby/object:Gem::Dependency
125
131
  name: minitest-reporters
126
132
  requirement: !ruby/object:Gem::Requirement
@@ -663,8 +669,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
663
669
  version: '0'
664
670
  requirements: []
665
671
  rubyforge_project: gollum
666
- rubygems_version: 2.0.6
672
+ rubygems_version: 2.1.11
667
673
  signing_key:
668
674
  specification_version: 2
669
675
  summary: A simple, Git-powered wiki.
670
676
  test_files: []
677
+ has_rdoc: