Switch Markdown library
Joel AZEMAR
committed Apr 15, 2014
commit c369c6b3e918e9a19e38adea941d1272a9332868
Showing 7
changed files with
28 additions
and 26 deletions
.travis.yml
+2
-1
| @@ | @@ -1,4 +1,5 @@ |
| language: ruby | |
| rvm: | |
| - 2.0.0 | |
| - | - 2.1.1 |
| \ No newline at end of file | |
| + | - 2.1.1 |
| + | - jruby-19mode |
| \ No newline at end of file | |
CHANGELOG.md
+10
-0
| @@ | @@ -1,3 +1,13 @@ |
| + | ### VERSION 0.1.2 |
| + | |
| + | * enhancements |
| + | * Change Markdown library from redcarpet to kramdown for support JRuby |
| + | |
| + | ### VERSION 0.1.1 |
| + | |
| + | * refactoring |
| + | * remove logger from core |
| + | |
| ### VERSION 0.0.1 | |
| * bug fix | |
Gemfile.lock
+3
-3
| @@ | @@ -1,14 +1,14 @@ |
| PATH | |
| remote: . | |
| specs: | |
| - | locomotivecms_steam (0.1.0) |
| + | locomotivecms_steam (0.1.2) |
| dragonfly (~> 1.0.3) | |
| + | kramdown (~> 1.3.3) |
| locomotivecms-solid | |
| locomotivecms_common (~> 0.0.1) | |
| locomotivecms_mounter | |
| moneta (~> 0.7.20) | |
| rack-cache (~> 1.1) | |
| - | redcarpet (~> 3.1) |
| sprockets (~> 2.0) | |
| sprockets-sass (~> 1.0) | |
| will_paginate (~> 3.0) | |
| @@ | @@ -66,6 +66,7 @@ GEM |
| iso (0.2.1) | |
| i18n | |
| json (1.8.1) | |
| + | kramdown (1.3.3) |
| launchy (2.4.2) | |
| addressable (~> 2.3) | |
| less (2.2.2) | |
| @@ | @@ -113,7 +114,6 @@ GEM |
| rack-test (0.6.2) | |
| rack (>= 1.0) | |
| rake (10.2.2) | |
| - | redcarpet (3.1.1) |
| rest-client (1.6.7) | |
| mime-types (>= 1.16) | |
| rspec (2.14.1) | |
bin/publish
+8
-8
| @@ | @@ -6,8 +6,8 @@ require_relative '../lib/steam' |
| class Publish | |
| - | def start version, rvm=false |
| - | system "rvm use #{rvm}" |
| + | def start # version, rvm=false |
| + | # system "rvm use #{rvm}" |
| system "bundle && bundle exec rspec" | |
| system "gem build locomotivecms_steam.gemspec" | |
| @@ | @@ -19,10 +19,10 @@ class Publish |
| end | |
| - | if ARGV.length != 1 # or !ARGV[0].match(/\d{1,3}.\d{1,3}.\d{1,3}/) |
| - | puts 'HELP: ' |
| - | puts '$ bin/publish [ruby-2.1.1@steam]' |
| - | exit 0 |
| - | end |
| + | # if ARGV.length != 1 # or !ARGV[0].match(/\d{1,3}.\d{1,3}.\d{1,3}/) |
| + | # puts 'HELP: ' |
| + | # puts '$ bin/publish [ruby-2.1.1@steam]' |
| + | # exit 0 |
| + | # end |
| - | Publish.new.start ARGV[0] |
| \ No newline at end of file | |
| + | Publish.new.start # ARGV[0] |
| \ No newline at end of file | |
locomotive/steam/services/markdown.rb b/lib/locomotive/steam/services/markdown.rb
+3
-12
| @@ | @@ -1,4 +1,4 @@ |
| - | require 'redcarpet' |
| + | require 'kramdown' |
| module Locomotive | |
| module Steam | |
| @@ | @@ -9,18 +9,9 @@ module Locomotive |
| self.class.parser.render(text) | |
| end | |
| + | # http://kramdown.gettalong.org/options.html |
| def self.parser | |
| - | @@markdown ||= Redcarpet::Markdown.new Redcarpet::Steam::HTML, { |
| - | autolink: true, |
| - | fenced_code: true, |
| - | generate_toc: true, |
| - | gh_blockcode: true, |
| - | hard_wrap: true, |
| - | no_intraemphasis: true, |
| - | strikethrough: true, |
| - | tables: true, |
| - | xhtml: true |
| - | } |
| + | @@markdown ||= Kramdown::Document.new(text).to_html |
| end | |
| end | |
locomotive/steam/version.rb b/lib/locomotive/steam/version.rb
+1
-1
| @@ | @@ -1,5 +1,5 @@ |
| module Locomotive | |
| module Steam | |
| - | VERSION = '0.1.0' |
| + | VERSION = '0.1.2' |
| end | |
| end | |
locomotivecms_steam.gemspec
+1
-1
| @@ | @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| |
| spec.add_dependency 'sprockets-sass', '~> 1.0' | |
| spec.add_dependency 'dragonfly', '~> 1.0.3' | |
| spec.add_dependency 'will_paginate', '~> 3.0' # TODO: move to kaminari | |
| - | spec.add_dependency 'redcarpet', '~> 3.1' |
| + | spec.add_dependency 'kramdown', '~> 1.3.3' |
| spec.add_dependency 'locomotivecms_mounter' | |
| spec.add_dependency 'locomotivecms-solid' | |