markdown-scaffold 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20236981c0875673313b462ef2f549ad4da3cc4b
4
- data.tar.gz: 4025b03181b76ba173420426eefd2be42ae2ecc4
3
+ metadata.gz: 62f5ee64a8d8d01088f946a5f78a3bb04d7bba89
4
+ data.tar.gz: 419e0bcdf6d87afd25828ed78cf3e6f0f475bcc5
5
5
  SHA512:
6
- metadata.gz: ecd51e8c1e7870b415121f0e1a86127ba6cf7a6bdb67a742bc0688c2b1bfbee685796559f2d407ddb17ad278c4864cedaf184ddca2635bb6584fbbfe4494a51d
7
- data.tar.gz: cc681b471309a01a49653bfefeeadf08359ec1d056af6110148c3faf2607047d4d5d633fecc7648a86a8edb0bb14951e5307abe4b70fd51eb7b8ee271478bbc5
6
+ metadata.gz: 117a938a7aad0c5c97595da71530915c20ab481d77c1e9d81d12152218a66d1ff9c7a722b1e026e4cd07752f9df8f77222ef63813b95866f09bef891a25e8598
7
+ data.tar.gz: c4986e6649e399e2d5a43c8ef78e9eda345e320a9fb6053ec58e4a14eef77456d27e72d70a3518e5025054be27b5e2cfedc980aee84937f5e15e7c8393bdc080
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  require "markdown-scaffold/version"
3
2
  require 'rails/generators'
4
3
 
@@ -15,26 +14,22 @@ module Markdown
15
14
  # Generateコマンド実行処理
16
15
  def generate_scaffold
17
16
  # stylesheets/pygments.css
18
- copy_file( "templates/pygments.css", "app/assets/stylesheets/pygments.css" )
17
+ copy_file("templates/pygments.css", "app/assets/stylesheets/pygments.css")
19
18
 
20
19
  # models/html_with_pygments.rb
21
- copy_file( "templates/html_with_pygments.rb", "app/models/html_with_pygments.rb" )
20
+ copy_file("templates/html_with_pygments.rb", "app/models/html_with_pygments.rb")
22
21
 
23
22
  # controllers/application_controller.rb
24
23
  content = "\n"
25
- content += " #---------------#\n"
26
- content += " # show_markdown #\n"
27
- content += " #---------------#\n"
28
- content += " # Markdown変換\n"
29
- content += " def show_markdown( text )\n"
30
- content += " html_render = HtmlWithPygments.new( hard_wrap: true, filter_html: true )\n"
31
- content += " markdown = Redcarpet::Markdown.new( html_render, autolink: true, fenced_code_blocks: true, space_after_headers: true )\n"
24
+ content += " # Markdown変換表示\n"
25
+ content += " def show_markdown(text)\n"
26
+ content += " html_render = HtmlWithPygments.new(hard_wrap: true, filter_html: true)\n"
27
+ content += " markdown = Redcarpet::Markdown.new(html_render, autolink: true, fenced_code_blocks: true, space_after_headers: true)\n"
32
28
  content += "\n"
33
- content += " return markdown.render( text.to_s ) rescue text\n"
29
+ content += " return markdown.render(text.to_s) rescue text\n"
34
30
  content += " end\n"
35
31
  content += " helper_method :show_markdown\n"
36
-
37
- insert_into_file( "app/controllers/application_controller.rb", content.force_encoding('ASCII-8BIT'), after: "private\n" )
32
+ insert_into_file("app/controllers/application_controller.rb", content.force_encoding('ASCII-8BIT'), after: "private\n")
38
33
 
39
34
  # initializers/ruby_python.rb
40
35
  # copy_file( "templates/ruby_python.rb", "config/initializers/ruby_python.rb" )
@@ -1,11 +1,6 @@
1
- # coding: utf-8
2
1
  class HtmlWithPygments < Redcarpet::Render::HTML
3
-
4
- #------------#
5
- # block_code #
6
- #------------#
7
2
  # コードハイライト
8
- def block_code( code, language )
9
- Pygments.highlight( code, lexer: language, options: { encoding: 'utf-8' } )
3
+ def block_code(code, language)
4
+ Pygments.highlight(code, lexer: language, options: { encoding: 'utf-8' })
10
5
  end
11
6
  end
@@ -1,5 +1,5 @@
1
1
  module Markdown
2
2
  module Scaffold
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -1,12 +1,12 @@
1
- # -*- encoding: utf-8 -*-
2
1
  require File.expand_path('../lib/markdown-scaffold/version', __FILE__)
3
2
 
4
3
  Gem::Specification.new do |gem|
5
4
  gem.authors = ["Shun Matsumoto"]
6
- gem.email = ["shun.matsumoto@pixta.co.jp"]
5
+ gem.email = ["s.matsumoto0115@gmail.com"]
7
6
  gem.description = %q{Scaffold for Markdown.}
8
7
  gem.summary = %q{Markdown Scaffold}
9
8
  gem.homepage = "https://github.com/shu0115/markdown-scaffold"
9
+ gem.license = "MIT"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
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.5
4
+ version: 0.0.6
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-18 00:00:00.000000000 Z
11
+ date: 2013-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redcarpet
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  description: Scaffold for Markdown.
56
56
  email:
57
- - shun.matsumoto@pixta.co.jp
57
+ - s.matsumoto0115@gmail.com
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
@@ -71,7 +71,8 @@ files:
71
71
  - lib/markdown-scaffold/version.rb
72
72
  - markdown-scaffold.gemspec
73
73
  homepage: https://github.com/shu0115/markdown-scaffold
74
- licenses: []
74
+ licenses:
75
+ - MIT
75
76
  metadata: {}
76
77
  post_install_message:
77
78
  rdoc_options: []
@@ -89,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
90
  version: '0'
90
91
  requirements: []
91
92
  rubyforge_project:
92
- rubygems_version: 2.0.0
93
+ rubygems_version: 2.0.3
93
94
  signing_key:
94
95
  specification_version: 4
95
96
  summary: Markdown Scaffold