Skip to content

Commit

Permalink
Init commit with test setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanitoFatas committed Feb 8, 2015
0 parents commit 333e691
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
@@ -0,0 +1,14 @@
/.bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
*.bundle
*.so
*.o
*.a
mkmf.log
14 changes: 14 additions & 0 deletions Gemfile
@@ -0,0 +1,14 @@
source "https://rubygems.org"

# Specify your gem's dependencies in twemoji.gemspec
gemspec

group :development do
gem "rake"
gem "bundler"
gem "pry"
end

group :test do
gem "minitest", ">= 5.5"
end
22 changes: 22 additions & 0 deletions LICENSE
@@ -0,0 +1,22 @@
Copyright (c) 2015 Juanito Fatas

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 31 additions & 0 deletions README.md
@@ -0,0 +1,31 @@
# Html::Pipeline::RougeFilter

[Rouge](https://github.com/jneen/rouge) integration for [HTML::Pipeline](https://github.com/jch/html-pipeline)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'html-pipeline-rouge_filter'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install html-pipeline-rouge_filter

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it ( https://github.com/[my-github-username]/html-pipeline-rouge_filter/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
10 changes: 10 additions & 0 deletions Rakefile
@@ -0,0 +1,10 @@
require "bundler/gem_tasks"
require "rake/testtask"

Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/**/*_test.rb']
t.verbose = true
end

task default: :test
22 changes: 22 additions & 0 deletions html-pipeline-rouge_filter.gemspec
@@ -0,0 +1,22 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'html/pipeline/rouge_filter/version'

Gem::Specification.new do |spec|
spec.name = "html-pipeline-rouge_filter"
spec.version = HTML_Pipeline::RougeFilter::VERSION
spec.authors = ["Juanito Fatas"]
spec.email = ["katehuang0320@gmail.com"]
spec.summary = %q{Rouge integration with html-pipeline.}
spec.description = spec.summary
spec.homepage = "https://github.com/juanitofatas/html-pipeline-rouge_filter"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "html-pipeline", "~> 1.11"
spec.add_dependency "rouge", "~> 1.8"
end
12 changes: 12 additions & 0 deletions lib/html/pipeline/rouge_filter.rb
@@ -0,0 +1,12 @@
require "html/pipeline/rouge_filter/version"
require "html/pipeline/filter"

module HTML
class Pipeline
class RougeFilter < Filter
def call
end
end
end
end

7 changes: 7 additions & 0 deletions lib/html/pipeline/rouge_filter/version.rb
@@ -0,0 +1,7 @@
# NOTE use HTML_Pipeline since HTML::Pipeline is a class
# and we don't want to define it here inadvertently
module HTML_Pipeline
class RougeFilter
VERSION = "0.0.1"
end
end
13 changes: 13 additions & 0 deletions test/rouge_filter_test.rb
@@ -0,0 +1,13 @@
require "test_helper"
require "html/pipeline/rouge_filter"

class HTML::Pipeline::RougeFilterTest < Minitest::Test
RougeFilter = HTML::Pipeline::RougeFilter

def setup
end

def test_version
assert_equal HTML_Pipeline::RougeFilter::VERSION, "0.0.1"
end
end
8 changes: 8 additions & 0 deletions test/test_helper.rb
@@ -0,0 +1,8 @@
require "bundler/setup"
require "html/pipeline"
require "minitest/autorun"

module TestHelpers
end

Minitest::Test.send(:include, TestHelpers)

0 comments on commit 333e691

Please sign in to comment.