markdown-scaffold 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7442183b119c79bf6af1f12a0daddeb84a9757c7
4
- data.tar.gz: 5d8a2a0746605f92cfebf5303093a2460350cc58
3
+ metadata.gz: 20236981c0875673313b462ef2f549ad4da3cc4b
4
+ data.tar.gz: 4025b03181b76ba173420426eefd2be42ae2ecc4
5
5
  SHA512:
6
- metadata.gz: 5503d3ff17150c115648fb280ea5e74663e13fec36266e6541d1d8ab73a77f8afa8910314d8779a7b24ff890b2ec0ae1b719373202e62f279bbe0c8937ecd0b2
7
- data.tar.gz: ee65aafe6b566a4daa980730e68336c922de4ef29ed3bb3814e6f6b9e5d17cadf78952ea634a2660097d4ebd1f7f2b3e85949e40b2732cb9ccb148e8df704a04
6
+ metadata.gz: ecd51e8c1e7870b415121f0e1a86127ba6cf7a6bdb67a742bc0688c2b1bfbee685796559f2d407ddb17ad278c4864cedaf184ddca2635bb6584fbbfe4494a51d
7
+ data.tar.gz: cc681b471309a01a49653bfefeeadf08359ec1d056af6110148c3faf2607047d4d5d633fecc7648a86a8edb0bb14951e5307abe4b70fd51eb7b8ee271478bbc5
data/README.md CHANGED
@@ -7,7 +7,7 @@ Scaffold for Markdown.
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- # For Markdown
10
+ # Markdown
11
11
  gem 'markdown-scaffold'
12
12
  ```
13
13
 
@@ -25,7 +25,6 @@ rails g markdown:scaffold
25
25
  create app/assets/stylesheets/pygments.css
26
26
  create app/models/html_with_pygments.rb
27
27
  insert app/controllers/application_controller.rb
28
- create config/initializers/ruby_python.rb
29
28
  ----------
30
29
  ```
31
30
 
@@ -9,13 +9,10 @@ require 'rubypython'
9
9
  module Markdown
10
10
  module Generators
11
11
  class ScaffoldGenerator < ::Rails::Generators::Base
12
-
13
12
  source_root File.expand_path("../markdown-scaffold", __FILE__)
14
13
  desc "This generator scaffold for Markdown"
15
14
 
16
- #-------------------#
17
- # generate_scaffold #
18
- #-------------------#
15
+ # Generateコマンド実行処理
19
16
  def generate_scaffold
20
17
  # stylesheets/pygments.css
21
18
  copy_file( "templates/pygments.css", "app/assets/stylesheets/pygments.css" )
@@ -33,16 +30,15 @@ module Markdown
33
30
  content += " html_render = HtmlWithPygments.new( hard_wrap: true, filter_html: true )\n"
34
31
  content += " markdown = Redcarpet::Markdown.new( html_render, autolink: true, fenced_code_blocks: true, space_after_headers: true )\n"
35
32
  content += "\n"
36
- content += " return markdown.render( text.to_s )\n"
33
+ content += " return markdown.render( text.to_s ) rescue text\n"
37
34
  content += " end\n"
38
35
  content += " helper_method :show_markdown\n"
39
36
 
40
37
  insert_into_file( "app/controllers/application_controller.rb", content.force_encoding('ASCII-8BIT'), after: "private\n" )
41
38
 
42
39
  # initializers/ruby_python.rb
43
- copy_file( "templates/ruby_python.rb", "config/initializers/ruby_python.rb" )
40
+ # copy_file( "templates/ruby_python.rb", "config/initializers/ruby_python.rb" )
44
41
  end
45
-
46
42
  end
47
43
  end
48
44
  end
@@ -8,5 +8,4 @@ class HtmlWithPygments < Redcarpet::Render::HTML
8
8
  def block_code( code, language )
9
9
  Pygments.highlight( code, lexer: language, options: { encoding: 'utf-8' } )
10
10
  end
11
-
12
11
  end
@@ -1,5 +1,5 @@
1
1
  module Markdown
2
2
  module Scaffold
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -16,6 +16,8 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Markdown::Scaffold::VERSION
17
17
 
18
18
  gem.add_dependency 'redcarpet'
19
- gem.add_dependency 'pygments.rb', "0.2.3"
20
- gem.add_dependency 'rubypython', "0.5.1"
19
+ # gem.add_dependency 'pygments.rb', "0.2.3"
20
+ # gem.add_dependency 'rubypython', "0.5.1"
21
+ gem.add_dependency 'pygments.rb'
22
+ gem.add_dependency 'rubypython'
21
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown-scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shun Matsumoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-13 00:00:00.000000000 Z
11
+ date: 2013-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet
@@ -28,30 +28,30 @@ dependencies:
28
28
  name: pygments.rb
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.3
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.2.3
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubypython
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.5.1
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.5.1
54
+ version: '0'
55
55
  description: Scaffold for Markdown.
56
56
  email:
57
57
  - shun.matsumoto@pixta.co.jp