middleman-renderers-qiita_template 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 15d52a8012432993e15f640bf918a958a2c84575
4
+ data.tar.gz: e5062ad23c0096c87018f1291f2b1d0db0646147
5
+ SHA512:
6
+ metadata.gz: 03e5a2782fb5623c95dc1d85138d0d48aa1502c494b18670cbb19725cbc54cfe86aba1e865c157af718854d8cd194aaa6f04c696bec14853644632ef4d3fa4b8
7
+ data.tar.gz: 4eaf89e58a045ff9132e9d57289cd598c700e93e0fbbab08cbc9b93b4b2dd4c0fa040348c1236a9737144612d9b64381c1ee65613b0c1ecdcf3f2e45b8f4208e
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,66 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+ Exclude:
4
+ DisplayCopNames: true
5
+
6
+ Documentation:
7
+ Enabled: false
8
+
9
+ Lint/AssignmentInCondition:
10
+ Enabled: false
11
+
12
+ Lint/HandleExceptions:
13
+ Enabled: false
14
+
15
+ Lint/UnderscorePrefixedVariableName:
16
+ Enabled: false
17
+
18
+ Lint/UnusedBlockArgument:
19
+ Enabled: false
20
+
21
+ Lint/UnusedMethodArgument:
22
+ Enabled: false
23
+
24
+ Style/AccessorMethodName:
25
+ Enabled: false
26
+
27
+ Style/Documentation:
28
+ Enabled: false
29
+
30
+ Style/DoubleNegation:
31
+ Enabled: false
32
+
33
+ Style/FormatString:
34
+ EnforcedStyle: percent
35
+
36
+ Style/GuardClause:
37
+ MinBodyLength: 4
38
+
39
+ Style/IfUnlessModifier:
40
+ Enabled: false
41
+
42
+ Style/MultilineBlockChain:
43
+ Enabled: false
44
+
45
+ Style/NumericLiterals:
46
+ MinDigits: 7
47
+
48
+ Style/PredicateName:
49
+ NamePrefixBlacklist:
50
+ - "is_"
51
+ - "have_"
52
+
53
+ Style/SignalException:
54
+ EnforcedStyle: only_raise
55
+
56
+ Style/SingleLineBlockParams:
57
+ Enabled: false
58
+
59
+ Style/SpaceAroundOperators:
60
+ AllowForAlignment: true
61
+
62
+ Style/StringLiterals:
63
+ EnforcedStyle: double_quotes
64
+
65
+ Style/TrailingCommaInLiteral:
66
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.12.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in middleman-renderers-qiita_template.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 TODO: Write your name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # Middleman::Renderers::QiitaTemplate
2
+
3
+ [Qiita::Markdown](https://github.com/increments/qiita-markdown) for [Middleman](https://middlemanapp.com/)
4
+
5
+ ## Usage
6
+ Add `gem 'middleman-renderers-qiita_template'` into your `Gemfile`
7
+
8
+ Set options in `config.rb`:
9
+
10
+ ```rb
11
+ set :markdown_engine_prefix, Middleman::Renderers
12
+ set :markdown_engine, :qiita
13
+ ```
14
+
15
+ ## Development
16
+
17
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
18
+
19
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
20
+
21
+ ## Contributing
22
+
23
+ Bug reports and pull requests are welcome on GitHub at https://github.com/nownabe/middleman-renderers-qiita_template.
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "middleman/renderers/qiita_template"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tilt"
4
+ require "tilt/qiita_template"
5
+
6
+ module Middleman
7
+ module Renderers
8
+ class QiitaTemplate < ::Tilt::QiitaTemplate
9
+ VERSION = "0.1.0"
10
+ end
11
+
12
+ ::Tilt.register QiitaTemplate, "markdown", "mkd", "md"
13
+ end
14
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tilt/template"
4
+ require "qiita/markdown"
5
+
6
+ module Tilt
7
+ class QiitaTemplate < Template
8
+ self.default_mime_type = "text/html"
9
+
10
+ def self.engine_initialized?
11
+ defined? Qiita::Markdown::Processor
12
+ end
13
+
14
+ def prepare
15
+ @engine = Qiita::Markdown::Processor.new(context)
16
+ @engine.filters.concat(filters)
17
+ @output = nil
18
+ end
19
+
20
+ def evaluate(scope, locals, &block)
21
+ @output ||= @engine.call(data)[:output].to_s
22
+ end
23
+
24
+ private
25
+
26
+ def context
27
+ # @options[:context] || {}
28
+ {}
29
+ end
30
+
31
+ def filters
32
+ @options[:filters] || []
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'middleman/renderers/qiita_template'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "middleman-renderers-qiita_template"
8
+ spec.version = Middleman::Renderers::QiitaTemplate::VERSION
9
+ spec.authors = ["nownabe"]
10
+ spec.email = ["nownabe@gmail.com"]
11
+
12
+ spec.summary = %q{Qiita::Markdown for Middleman}
13
+ spec.homepage = "https://github.com/nownabe/middleman-renderers-qiita_template"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
16
+ spec.bindir = "exe"
17
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "activesupport", "~> 4.2"
21
+ spec.add_dependency "tilt", "~> 1.4.1"
22
+ spec.add_dependency "qiita-markdown"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.12"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "rspec", "~> 3.0"
27
+ end
metadata ADDED
@@ -0,0 +1,140 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: middleman-renderers-qiita_template
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - nownabe
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-07-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: tilt
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.4.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.4.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: qiita-markdown
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.12'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.12'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ description:
98
+ email:
99
+ - nownabe@gmail.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".rubocop.yml"
107
+ - ".travis.yml"
108
+ - Gemfile
109
+ - LICENSE.txt
110
+ - README.md
111
+ - Rakefile
112
+ - bin/console
113
+ - bin/setup
114
+ - lib/middleman/renderers/qiita_template.rb
115
+ - lib/tilt/qiita_template.rb
116
+ - middleman-renderers-qiita_template.gemspec
117
+ homepage: https://github.com/nownabe/middleman-renderers-qiita_template
118
+ licenses: []
119
+ metadata: {}
120
+ post_install_message:
121
+ rdoc_options: []
122
+ require_paths:
123
+ - lib
124
+ required_ruby_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ requirements: []
135
+ rubyforge_project:
136
+ rubygems_version: 2.5.1
137
+ signing_key:
138
+ specification_version: 4
139
+ summary: Qiita::Markdown for Middleman
140
+ test_files: []