gollum 2.2.9 → 2.3.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.

data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
- gem "rake", "~> 0.9.2.2"
4
+ gem 'rake', '~> 0.9'
data/README.md CHANGED
@@ -2,6 +2,7 @@ gollum -- A wiki built on top of Git
2
2
  ====================================
3
3
 
4
4
  [![Build Status](https://secure.travis-ci.org/github/gollum.png?branch=master)](http://travis-ci.org/github/gollum)
5
+ [![Dependency Status](https://gemnasium.com/github/gollum.png)](https://gemnasium.com/github/gollum)
5
6
 
6
7
  ## DESCRIPTION
7
8
 
@@ -18,6 +19,11 @@ number of ways depending on your needs. You can edit your wiki locally:
18
19
  Gollum follows the rules of [Semantic Versioning](http://semver.org/) and uses
19
20
  [TomDoc](http://tomdoc.org/) for inline documentation.
20
21
 
22
+ ## SYSTEM REQUIREMENTS
23
+ - Python 2.5+ (2.7.3 recommended)
24
+ - Ruby 1.8.7+ (1.9.3 recommended)
25
+ - Unix like operating system (OS X, Ubuntu, Debian, and more)
26
+ - Will not work on Windows (because of [grit](https://github.com/github/grit))
21
27
 
22
28
  ## INSTALLATION
23
29
 
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
5
5
  s.required_ruby_version = ">= 1.8.7"
6
6
 
7
7
  s.name = 'gollum'
8
- s.version = '2.2.9'
9
- s.date = '2012-10-14'
8
+ s.version = '2.3.0'
9
+ s.date = '2012-10-21'
10
10
  s.rubyforge_project = 'gollum'
11
11
 
12
12
  s.summary = "A simple, Git-powered wiki."
@@ -26,22 +26,21 @@ Gem::Specification.new do |s|
26
26
  s.add_dependency('grit', '~> 2.5.0')
27
27
  s.add_dependency('github-markup', ['>= 0.7.4', '< 1.0.0'])
28
28
  s.add_dependency('github-markdown', '~> 0.5.1')
29
- s.add_dependency('pygments.rb', '~> 0.3.1')
30
- s.add_dependency('escape_utils', '0.2.4')
29
+ s.add_dependency('pygments.rb', '~> 0.3.2')
31
30
  s.add_dependency('sinatra', '~> 1.3.3')
32
31
  s.add_dependency('mustache', ['>= 0.99.4', '< 1.0.0'])
33
32
  s.add_dependency('sanitize', '~> 2.0.3')
34
33
  s.add_dependency('nokogiri', '~> 1.5.5')
35
- s.add_dependency('useragent', '~> 0.4.10')
34
+ s.add_dependency('useragent', '~> 0.4.12')
36
35
  s.add_dependency('stringex', '~> 1.4.0')
37
36
 
38
37
  s.add_development_dependency('RedCloth', '~> 4.2.9')
39
- s.add_development_dependency('mocha', '~> 0.12.6')
40
- s.add_development_dependency('org-ruby', '~> 0.7.1')
41
- s.add_development_dependency('shoulda', '~> 3.1.1')
38
+ s.add_development_dependency('mocha', '~> 0.12.7')
39
+ s.add_development_dependency('org-ruby', '~> 0.7.2')
40
+ s.add_development_dependency('shoulda', '~> 3.3.1')
42
41
  s.add_development_dependency('rack-test', '~> 0.6.2')
43
42
  s.add_development_dependency('wikicloth', '~> 0.8.0')
44
- s.add_development_dependency('rake', '~> 0.9.2.2')
43
+ s.add_development_dependency('rake', '~> 0.9')
45
44
 
46
45
  # = MANIFEST =
47
46
  s.files = %w[
@@ -458,7 +457,6 @@ Gem::Specification.new do |s|
458
457
  lib/gollum/page.rb
459
458
  lib/gollum/pagination.rb
460
459
  lib/gollum/sanitization.rb
461
- lib/gollum/tex.rb
462
460
  lib/gollum/web_sequence_diagram.rb
463
461
  lib/gollum/wiki.rb
464
462
  licenses/css_tree_menu_thecssninja/license.txt
@@ -470,4 +468,4 @@ Gem::Specification.new do |s|
470
468
  # = MANIFEST =
471
469
 
472
470
  s.test_files = s.files.select { |path| path =~ /^test\/test_.*\.rb/ }
473
- end
471
+ end
@@ -18,12 +18,11 @@ require File.expand_path('../gollum/file', __FILE__)
18
18
  require File.expand_path('../gollum/file_view', __FILE__)
19
19
  require File.expand_path('../gollum/markup', __FILE__)
20
20
  require File.expand_path('../gollum/sanitization', __FILE__)
21
- require File.expand_path('../gollum/tex', __FILE__)
22
21
  require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
23
22
  require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
24
23
 
25
24
  module Gollum
26
- VERSION = '2.2.9'
25
+ VERSION = '2.3.0'
27
26
 
28
27
  def self.assets_path
29
28
  ::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
@@ -18,7 +18,11 @@
18
18
  <script type="text/javascript" src="{{base_url}}/javascript/gollum.dialog.js"></script>
19
19
  <script type="text/javascript" src="{{base_url}}/javascript/gollum.placeholder.js"></script>
20
20
  <script type="text/javascript" src="{{base_url}}/javascript/editor/gollum.editor.js"></script>
21
- {{#mathjax}}<script>(function(d,j){
21
+ {{#mathjax}}
22
+ <script type="text/x-mathjax-config">
23
+ MathJax.Hub.Config({ TeX: { extensions: ["autoload-all.js"] }});
24
+ </script>
25
+ <script>(function(d,j){
22
26
  j = d.createElement('script');
23
27
  j.src = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
24
28
  (d.head || d.getElementsByTagName('head')[0]).appendChild(j);
@@ -33,7 +33,6 @@ module Gollum
33
33
  @dir = ::File.dirname(page.path)
34
34
  @tagmap = {}
35
35
  @codemap = {}
36
- @texmap = {}
37
36
  @wsdmap = {}
38
37
  @premap = {}
39
38
  @toc = nil
@@ -57,7 +56,6 @@ module Gollum
57
56
  data = extract_metadata(data)
58
57
  data = extract_gitcode(data)
59
58
  data = extract_code(data)
60
- data = extract_tex(data)
61
59
  data = extract_wsd(data)
62
60
  data = extract_tags(data)
63
61
  begin
@@ -79,7 +77,6 @@ module Gollum
79
77
  data = doc.to_xhtml
80
78
 
81
79
  data = process_toc_tags(data)
82
- data = process_tex(data)
83
80
  data = process_wsd(data)
84
81
  data.gsub!(/<p><\/p>/) do
85
82
  ''
@@ -126,47 +123,6 @@ module Gollum
126
123
  [doc, toc]
127
124
  end
128
125
 
129
- #########################################################################
130
- #
131
- # TeX
132
- #
133
- #########################################################################
134
-
135
- # Extract all TeX into the texmap and replace with placeholders.
136
- #
137
- # data - The raw String data.
138
- #
139
- # Returns the placeholder'd String data.
140
- def extract_tex(data)
141
- data.gsub(/\\\[\s*(.*?)\s*\\\]/m) do
142
- tag = CGI.escapeHTML($1)
143
- id = Digest::SHA1.hexdigest(tag)
144
- @texmap[id] = [:block, tag]
145
- id
146
- end.gsub(/\\\(\s*(.*?)\s*\\\)/m) do
147
- tag = CGI.escapeHTML($1)
148
- id = Digest::SHA1.hexdigest(tag)
149
- @texmap[id] = [:inline, tag]
150
- id
151
- end
152
- end
153
-
154
- # Process all TeX from the texmap and replace the placeholders with the
155
- # final markup.
156
- #
157
- # data - The String data (with placeholders).
158
- #
159
- # Returns the marked up String data.
160
- def process_tex(data)
161
- @texmap.each do |id, spec|
162
- type, tex = *spec
163
- data.gsub!(id) do
164
- Gollum::Tex.to_html(tex, type)
165
- end
166
- end
167
- data
168
- end
169
-
170
126
  #########################################################################
171
127
  #
172
128
  # Tags
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.2.9
4
+ version: 2.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-14 00:00:00.000000000 Z
13
+ date: 2012-10-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: grit
@@ -73,7 +73,7 @@ dependencies:
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: 0.3.1
76
+ version: 0.3.2
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
@@ -81,23 +81,7 @@ dependencies:
81
81
  requirements:
82
82
  - - ~>
83
83
  - !ruby/object:Gem::Version
84
- version: 0.3.1
85
- - !ruby/object:Gem::Dependency
86
- name: escape_utils
87
- requirement: !ruby/object:Gem::Requirement
88
- none: false
89
- requirements:
90
- - - '='
91
- - !ruby/object:Gem::Version
92
- version: 0.2.4
93
- type: :runtime
94
- prerelease: false
95
- version_requirements: !ruby/object:Gem::Requirement
96
- none: false
97
- requirements:
98
- - - '='
99
- - !ruby/object:Gem::Version
100
- version: 0.2.4
84
+ version: 0.3.2
101
85
  - !ruby/object:Gem::Dependency
102
86
  name: sinatra
103
87
  requirement: !ruby/object:Gem::Requirement
@@ -175,7 +159,7 @@ dependencies:
175
159
  requirements:
176
160
  - - ~>
177
161
  - !ruby/object:Gem::Version
178
- version: 0.4.10
162
+ version: 0.4.12
179
163
  type: :runtime
180
164
  prerelease: false
181
165
  version_requirements: !ruby/object:Gem::Requirement
@@ -183,7 +167,7 @@ dependencies:
183
167
  requirements:
184
168
  - - ~>
185
169
  - !ruby/object:Gem::Version
186
- version: 0.4.10
170
+ version: 0.4.12
187
171
  - !ruby/object:Gem::Dependency
188
172
  name: stringex
189
173
  requirement: !ruby/object:Gem::Requirement
@@ -223,7 +207,7 @@ dependencies:
223
207
  requirements:
224
208
  - - ~>
225
209
  - !ruby/object:Gem::Version
226
- version: 0.12.6
210
+ version: 0.12.7
227
211
  type: :development
228
212
  prerelease: false
229
213
  version_requirements: !ruby/object:Gem::Requirement
@@ -231,7 +215,7 @@ dependencies:
231
215
  requirements:
232
216
  - - ~>
233
217
  - !ruby/object:Gem::Version
234
- version: 0.12.6
218
+ version: 0.12.7
235
219
  - !ruby/object:Gem::Dependency
236
220
  name: org-ruby
237
221
  requirement: !ruby/object:Gem::Requirement
@@ -239,7 +223,7 @@ dependencies:
239
223
  requirements:
240
224
  - - ~>
241
225
  - !ruby/object:Gem::Version
242
- version: 0.7.1
226
+ version: 0.7.2
243
227
  type: :development
244
228
  prerelease: false
245
229
  version_requirements: !ruby/object:Gem::Requirement
@@ -247,7 +231,7 @@ dependencies:
247
231
  requirements:
248
232
  - - ~>
249
233
  - !ruby/object:Gem::Version
250
- version: 0.7.1
234
+ version: 0.7.2
251
235
  - !ruby/object:Gem::Dependency
252
236
  name: shoulda
253
237
  requirement: !ruby/object:Gem::Requirement
@@ -255,7 +239,7 @@ dependencies:
255
239
  requirements:
256
240
  - - ~>
257
241
  - !ruby/object:Gem::Version
258
- version: 3.1.1
242
+ version: 3.3.1
259
243
  type: :development
260
244
  prerelease: false
261
245
  version_requirements: !ruby/object:Gem::Requirement
@@ -263,7 +247,7 @@ dependencies:
263
247
  requirements:
264
248
  - - ~>
265
249
  - !ruby/object:Gem::Version
266
- version: 3.1.1
250
+ version: 3.3.1
267
251
  - !ruby/object:Gem::Dependency
268
252
  name: rack-test
269
253
  requirement: !ruby/object:Gem::Requirement
@@ -303,7 +287,7 @@ dependencies:
303
287
  requirements:
304
288
  - - ~>
305
289
  - !ruby/object:Gem::Version
306
- version: 0.9.2.2
290
+ version: '0.9'
307
291
  type: :development
308
292
  prerelease: false
309
293
  version_requirements: !ruby/object:Gem::Requirement
@@ -311,7 +295,7 @@ dependencies:
311
295
  requirements:
312
296
  - - ~>
313
297
  - !ruby/object:Gem::Version
314
- version: 0.9.2.2
298
+ version: '0.9'
315
299
  description: A simple, Git-powered wiki with a sweet API and local frontend.
316
300
  email: tom@github.com
317
301
  executables:
@@ -734,7 +718,6 @@ files:
734
718
  - lib/gollum/page.rb
735
719
  - lib/gollum/pagination.rb
736
720
  - lib/gollum/sanitization.rb
737
- - lib/gollum/tex.rb
738
721
  - lib/gollum/web_sequence_diagram.rb
739
722
  - lib/gollum/wiki.rb
740
723
  - licenses/css_tree_menu_thecssninja/license.txt
@@ -1,14 +0,0 @@
1
- require 'escape_utils'
2
-
3
- module Gollum
4
- module Tex
5
- TEX_URL = "http://www.mathtran.org/cgi-bin/toy/"
6
- TEX_SIZES = { :inline => 2, :block => 4 }
7
-
8
- def self.to_html(tex, type = :inline)
9
- tex_uri = EscapeUtils.escape_uri(tex)
10
- tex_alt = EscapeUtils.escape_html(tex)
11
- %{<img src="#{TEX_URL}?D=#{TEX_SIZES[type]};tex=#{tex_uri}" alt="#{tex_alt}">}
12
- end
13
- end
14
- end