Compare commits

...

18 Commits

Author SHA1 Message Date
bootstraponline 3fd16daeca Release 2.6.0 2014-01-02 23:32:41 -05:00
bootstraponline d9b38c3b73 Use baseUrl for /uploadFile
Thanks @mpalmer
https://github.com/gollum/gollum/pull/780
2014-01-02 23:03:33 -05:00
bootstraponline 0a5176c1ee Merge pull request #780 from peterkeen/upload-base-path
Base upload button action on home page url
2014-01-02 19:50:35 -08:00
Pete Keen b836b0e273 Base upload button action on home page url 2014-01-01 17:05:32 -05:00
bootstraponline 9a41e2a65d Merge pull request #772 from zorun/master
Prevent indexing of old versions of a page (fixes #768)
2014-01-01 09:05:07 -08:00
bootstraponline cb1b74ed7b Merge pull request #776 from eucher/first_slash_in_create
First slash in create
2014-01-01 09:02:58 -08:00
bootstraponline e25e5d9768 Merge pull request #779 from anchor/semantic-versioning
Fix version specifiers
2014-01-01 09:02:14 -08:00
Matt Palmer 9f3766952f Fix version specifiers
Adjusted the version specs on the two gems that explicitly state they are
SemVer compliant, and fixed up the one dependency that correctly *could* have
used ~> but didn't.
2013-12-31 15:18:15 +11:00
bootstraponline cb4471b07f Merge pull request #778 from jhogendorn/baddialog
Fixes dialog hiding so it doesnt block the UI
2013-12-08 08:55:28 -08:00
Joshua Hogendorn 9fa7eac41f Fixes dialog hiding so it doesnt block the UI 2013-12-08 20:15:59 +10:00
zorun 94fa985550 Add a test for issue #772 2013-12-06 02:46:15 +01:00
Evgeni Cherdancev 1c498ead35 gsub before begin 2013-11-28 12:32:08 +07:00
Evgeni Cherdancev 5abc983172 write_page first slash fix 2013-11-28 12:26:06 +07:00
zorun 7a0d4919b0 Prevent indexing of old versions of a page (fixes #768) 2013-11-22 12:49:42 +01:00
bootstraponline d5e9183877 Merge pull request #762 from pdenes/add_template_dir_option
add option to specify custom template directory
2013-11-11 14:25:27 -08:00
bootstraponline 9b39a51e9f Merge pull request #758 from samer/master
Fix revert for pages in directories
2013-11-11 14:25:10 -08:00
pdenes bec7eabd1c add option to specify custom template directory 2013-11-06 21:46:54 +00:00
Samer N cd3791087f Fix revert for pages in directories, as seen in issue #736 2013-11-04 13:03:31 +02:00
9 changed files with 40 additions and 13 deletions
+5
View File
@@ -56,6 +56,10 @@ opts = OptionParser.new do |opts|
wiki_options[:js] = true
end
opts.on("--template-dir [PATH]", "Specify custom template directory") do |path|
wiki_options[:template_dir] = path
end
opts.on("--page-file-dir [PATH]", "Specify the sub directory for all page files (default: repository root).") do |path|
wiki_options[:page_file_dir] = path
end
@@ -168,6 +172,7 @@ else
require 'gollum/app'
Precious::App.set(:gollum_path, gollum_path)
Precious::App.set(:wiki_options, wiki_options)
Precious::App.settings.mustache[:templates] = wiki_options[:template_dir] if wiki_options[:template_dir]
if cfg = options['config']
# If the path begins with a '/' it will be considered an absolute path,
+5 -5
View File
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
s.required_ruby_version = ">= 1.9"
s.name = 'gollum'
s.version = '2.5.2'
s.date = '2013-11-02'
s.version = '2.6.0'
s.date = '2014-01-02'
s.rubyforge_project = 'gollum'
s.license = 'MIT'
@@ -24,14 +24,14 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.extra_rdoc_files = %w[README.md LICENSE]
s.add_dependency 'gollum-lib', '~> 1.0.9'
s.add_dependency 'gollum-lib', '~> 1.0', '>= 1.0.9'
s.add_dependency 'github-markdown', '~> 0.5.5'
s.add_dependency 'sinatra', '~> 1.4.3'
s.add_dependency 'sinatra', '~> 1.4', '>= 1.4.3'
s.add_dependency 'mustache', ['>= 0.99.4', '< 1.0.0']
s.add_dependency 'useragent', '~> 0.8.2'
s.add_development_dependency 'rack-test', '~> 0.6.2'
s.add_development_dependency 'shoulda', ['>= 3.4.0', '< 3.5.0']
s.add_development_dependency 'shoulda', '~> 3.4.0'
s.add_development_dependency 'minitest-reporters', '~> 0.14.16'
# = MANIFEST =
+1 -1
View File
@@ -16,7 +16,7 @@ require File.expand_path('../gollum/uri_encode_component', __FILE__)
$KCODE = 'U' if RUBY_VERSION[0,3] == '1.8'
module Gollum
VERSION = '2.5.2'
VERSION = '2.6.0'
def self.assets_path
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
+7 -5
View File
@@ -289,6 +289,8 @@ module Precious
format = params[:format].intern
wiki = wiki_new
path.gsub!(/^\//, '')
begin
wiki.write_page(name, format, params[:content], commit_message, path)
@@ -300,15 +302,14 @@ module Precious
end
end
post '/revert/:page/*' do
wikip = wiki_page(params[:page])
post '/revert/*/:sha1/:sha2' do
wikip = wiki_page(params[:splat].first)
@path = wikip.path
@name = wikip.name
wiki = wikip.wiki
@page = wiki.paged(@name,@path)
shas = params[:splat].first.split("/")
sha1 = shas.shift
sha2 = shas.shift
sha1 = params[:sha1]
sha2 = params[:sha2]
commit = commit_message
commit[:message] = "Revert commit #{sha1.chars.take(7).join}"
@@ -387,6 +388,7 @@ module Precious
@page = page
@name = name
@content = page.formatted_data
@version = version
mustache :page
else
halt 404
@@ -179,6 +179,7 @@
duration: 200,
complete: function() {
$('#gollum-dialog-dialog').removeClass('active');
$('#gollum-dialog-dialog').css('display', 'none');
}
});
}
@@ -155,7 +155,8 @@ $(document).ready(function() {
fields: [
{
type: 'file',
context: 'Your uploaded file will be accessible at /uploads/[filename]'
context: 'Your uploaded file will be accessible at /uploads/[filename]',
action: baseUrl + '/uploadFile'
}
],
OK: function( res ) {
+1
View File
@@ -7,6 +7,7 @@
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/dialog.css" media="all">
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/template.css" media="all">
{{#css}}<link rel="stylesheet" type="text/css" href="{{base_url}}/custom.css" media="all">{{/css}}
{{#noindex}}<meta name="robots" content="noindex, nofollow" />{{/noindex}}
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{{base_url}}/css/ie7.css" media="all">
+4
View File
@@ -35,6 +35,10 @@ module Precious
first.authored_date.strftime(DATE_FORMAT)
end
def noindex
@version ? true : false
end
def editable
@editable
end
+14 -1
View File
@@ -429,7 +429,7 @@ context "Frontend" do
assert_equal "INITIAL", page2.raw_data.strip
end
=end
=begin
test "cannot revert conflicting commit" do
page1 = @wiki.page('A')
@@ -440,6 +440,7 @@ context "Frontend" do
page2 = @wiki.page('A')
assert_equal page1.version.sha, page2.version.sha
end
=end
=begin
# redirects are now handled by class MapGollum in bin/gollum
# they should be set in config.ru
@@ -522,6 +523,18 @@ context "Frontend" do
assert_match /スイカ/, last_response.body
end
test "add noindex tags to history pages" do
get "A"
assert last_response.ok?
assert_no_match /meta name="robots" content="noindex, nofollow"/, last_response.body
get "A/fc66539528eb96f21b2bbdbf557788fe8a1196ac"
assert last_response.ok?
assert_match /meta name="robots" content="noindex, nofollow"/, last_response.body
end
def app
Precious::App
end