Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace BlueCloth, it's broken #140

Merged
merged 1 commit into from Nov 20, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions Gemfile
@@ -1,11 +1,6 @@
source :rubygems

gem "sinatra"
gem "bluecloth"
gem "nokogiri"
gem "json"
gem "gli",">= 1.2.5"
gem "parslet"
gemspec

group :development do
gem "mg"
Expand Down
10 changes: 2 additions & 8 deletions lib/showoff.rb
Expand Up @@ -21,13 +21,7 @@
$stderr.puts 'pdf generation disabled - install pdfkit'
end

begin
require 'rdiscount'
rescue LoadError
require 'bluecloth'
Object.send(:remove_const,:Markdown)
Markdown = BlueCloth
end
require 'tilt'

class ShowOff < Sinatra::Application

Expand Down Expand Up @@ -166,7 +160,7 @@ def process_markdown(name, content, static=false, pdf=false)
else
md += "<div class=\"#{content_classes.join(' ')}\" ref=\"#{name}\">\n"
end
sl = Markdown.new(slide.text).to_html
sl = Tilt[:markdown].new { slide.text }.render
sl = update_image_paths(name, sl, static, pdf)
md += sl
md += "</div>\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/showoff_utils.rb
Expand Up @@ -294,7 +294,7 @@ def self.lang(source_file)
EXTENSIONS[ext] || ext
end

REQUIRED_GEMS = %w(bluecloth nokogiri showoff gli heroku)
REQUIRED_GEMS = %w(redcarpet showoff heroku)

# Creates the file that lists the gems for heroku
#
Expand Down
4 changes: 2 additions & 2 deletions showoff.gemspec
Expand Up @@ -15,8 +15,8 @@ Gem::Specification.new do |s|
s.files += Dir.glob("bin/**/*")
s.files += Dir.glob("views/**/*")
s.files += Dir.glob("public/**/*")
s.add_dependency "sinatra"
s.add_dependency "bluecloth"
s.add_dependency "sinatra", "~> 1.3"
s.add_dependency "redcarpet"
s.add_dependency "nokogiri"
s.add_dependency "json"
s.add_dependency("gli",">= 1.3.2")
Expand Down
3 changes: 0 additions & 3 deletions test/utils_test.rb
Expand Up @@ -21,10 +21,7 @@
ShowOffUtils.heroku('test')
files = Dir.glob('**/*')
content = File.read('Gemfile')
assert_match 'bluecloth', content
assert_match 'nokogiri', content
assert_match 'showoff', content
assert_match 'gli', content
assert_match 'heroku', content
end
assert files.include?('config.ru')
Expand Down