gollum 2.2.2 → 2.2.3

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/README.md CHANGED
@@ -547,8 +547,13 @@ your changes merged back into core is as follows:
547
547
  1. Send a pull request to the github/gollum project.
548
548
 
549
549
  ## RELEASING
550
+ For x.y releases:
550
551
  Update VERSION in lib/gollum.rb
551
552
  $ rake gemspec
553
+
554
+ For z releases:
555
+ $ rake bump
556
+
552
557
  $ git tag vX.Y.Z
553
558
  $ git push origin vX.Y.Z
554
559
  $ gem build gollum.gemspec
data/Rakefile CHANGED
@@ -17,6 +17,27 @@ def version
17
17
  line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
18
18
  end
19
19
 
20
+ # assumes x.y.z all digit version
21
+ def next_version
22
+ # x.y.z
23
+ v = version.split '.'
24
+ # bump z
25
+ v[-1] = v[-1].to_i + 1
26
+ v.join '.'
27
+ end
28
+
29
+ def bump_version
30
+ old_file = File.read("lib/#{name}.rb")
31
+ old_version_line = old_file[/^\s*VERSION\s*=\s*.*/]
32
+ new_version = next_version
33
+ # replace first match of old vesion with new version
34
+ old_file.sub!(old_version_line, " VERSION = '#{new_version}'")
35
+
36
+ File.write("lib/#{name}.rb", old_file)
37
+
38
+ new_version
39
+ end
40
+
20
41
  def date
21
42
  Date.today.to_s
22
43
  end
@@ -71,7 +92,14 @@ end
71
92
  #
72
93
  #############################################################################
73
94
 
74
-
95
+ desc "Update version number and gemspec"
96
+ task :bump do
97
+ puts "Updated version to #{bump_version}"
98
+ # Execute does not invoke dependencies.
99
+ # Manually invoke gemspec then validate.
100
+ Rake::Task[:gemspec].execute
101
+ Rake::Task[:validate].execute
102
+ end
75
103
 
76
104
  #############################################################################
77
105
  #
@@ -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.2'
9
- s.date = '2012-10-04'
8
+ s.version = '2.2.3'
9
+ s.date = '2012-10-10'
10
10
  s.rubyforge_project = 'gollum'
11
11
 
12
12
  s.summary = "A simple, Git-powered wiki."
@@ -23,7 +23,7 @@ require File.expand_path('../gollum/web_sequence_diagram', __FILE__)
23
23
  require File.expand_path('../gollum/frontend/uri_encode_component', __FILE__)
24
24
 
25
25
  module Gollum
26
- VERSION = '2.2.2'
26
+ VERSION = '2.2.3'
27
27
 
28
28
  def self.assets_path
29
29
  ::File.expand_path('gollum/frontend/public', ::File.dirname(__FILE__))
@@ -195,12 +195,13 @@ var previewSet = function( text ) {
195
195
  };
196
196
 
197
197
  // 'c', 'c++', 'cpp' are github specific and transformed to c_cpp for Ace.
198
- var languages = [ 'c', 'c++', 'cpp', 'clojure', 'coffee', 'coldfusion',
199
- 'csharp', 'css', 'diff', 'golang', 'groovy', 'haxe', 'html',
200
- 'java', 'javascript', 'json', 'latex', 'less', 'liquid',
201
- 'lua', 'markdown', 'ocaml', 'perl', 'pgsql', 'php', 'powershell',
202
- 'python', 'ruby', 'scad', 'scala', 'scss', 'sh', 'sql', 'svg',
203
- 'textile', 'text', 'xml', 'xquery', 'yaml' ];
198
+ // 'coffeescript' is transformed to 'coffee' for Ace.
199
+ var languages = [ 'c', 'c++', 'cpp', 'clojure', 'coffee',
200
+ 'coffeescript', 'coldfusion', 'csharp', 'css', 'diff', 'golang',
201
+ 'groovy', 'haxe', 'html', 'java', 'javascript', 'json', 'latex',
202
+ 'less', 'liquid', 'lua', 'markdown', 'ocaml', 'perl', 'pgsql', 'php',
203
+ 'powershell', 'python', 'ruby', 'scad', 'scala', 'scss', 'sh', 'sql',
204
+ 'svg', 'textile', 'text', 'xml', 'xquery', 'yaml' ];
204
205
 
205
206
  var staticHighlight = require( 'ace/ext/static_highlight' );
206
207
  var githubTheme = require( 'ace/theme/github' );
@@ -303,6 +304,12 @@ var makePreviewHtml = function () {
303
304
  aceMode = 'c_cpp';
304
305
  }
305
306
 
307
+ // Pygments's name for CoffeeScript is 'coffeescript', but Ace
308
+ // calls it 'coffee'.
309
+ if ( declaredLanguage === 'coffeescript' ) {
310
+ aceMode = 'coffee';
311
+ }
312
+
306
313
  if ( $.inArray( declaredLanguage, languages ) === -1 ) {
307
314
  // Unsupported language.
308
315
  skipped++;
@@ -558,12 +558,12 @@ module Gollum
558
558
  encoding ||= 'utf-8'
559
559
  begin
560
560
  hl_code = Pygments.highlight(code, :lexer => lang, :options => {:encoding => encoding.to_s})
561
- rescue ::RubyPython::PythonError
561
+ rescue
562
562
  hl_code = code
563
563
  end
564
564
  highlighted << hl_code
565
565
  end
566
-
566
+
567
567
  @codemap.each do |id, spec|
568
568
  body = spec[:output] || begin
569
569
  if (body = highlighted.shift.to_s).size > 0
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.2
4
+ version: 2.2.3
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-04 00:00:00.000000000 Z
13
+ date: 2012-10-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: grit