Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'replace-bluecloth' of https://github.com/a-team/showoff

…into a-team-replace-bluecloth

Conflicts:
	Gemfile
  • Loading branch information...
commit 0384f7ba3760dec5286cb94692538f8981a1ea19 2 parents f119482 + 313aff7
@goncalossilva goncalossilva authored
View
7 Gemfile
@@ -1,11 +1,6 @@
source :rubygems
-gem "sinatra", "~> 1.3"
-gem "bluecloth"
-gem "nokogiri"
-gem "json"
-gem "gli",">= 1.2.5"
-gem "parslet"
+gemspec
group :development do
gem "mg"
View
10 lib/showoff.rb
@@ -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
@@ -164,7 +158,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"
View
2  lib/showoff_utils.rb
@@ -308,7 +308,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
#
View
6 showoff.gemspec
@@ -17,11 +17,11 @@ 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")
+ s.add_dependency "gli",">= 1.3.2"
s.add_dependency "parslet"
s.add_development_dependency "mg"
s.description = <<-desc
View
3  test/utils_test.rb
@@ -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')
Please sign in to comment.
Something went wrong with that request. Please try again.