Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update sinatra version, so we can use tilt and it's preferred markdow…

…n engine redcloth instead of bluecloth
  • Loading branch information...
commit 313aff76d429be1e412db582d3a80cc86ab89b5e 1 parent 335e142
@timfel timfel authored
View
7 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"
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
@@ -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"
View
2  lib/showoff_utils.rb
@@ -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
#
View
4 showoff.gemspec
@@ -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")
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')

0 comments on commit 313aff7

Please sign in to comment.
Something went wrong with that request. Please try again.