Permalink
Browse files

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

…into a-team-replace-bluecloth

Conflicts:
	Gemfile
  • Loading branch information...
goncalossilva committed Nov 20, 2011
2 parents f119482 + 313aff7 commit 0384f7ba3760dec5286cb94692538f8981a1ea19
Showing with 7 additions and 21 deletions.
  1. +1 −6 Gemfile
  2. +2 −8 lib/showoff.rb
  3. +1 −1 lib/showoff_utils.rb
  4. +3 −3 showoff.gemspec
  5. +0 −3 test/utils_test.rb
View
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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')

0 comments on commit 0384f7b

Please sign in to comment.