Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1 #15

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

v1 #15

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gem_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bump:
file: lib/imatcher/version.rb
skip_ci: true
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: palkan

---

## What did you do?

## What did you expect to happen?

## What actually happened?

## Additional context

## Environment

**Ruby Version:**

**Framework Version (Rails, whatever):**

**Imatcher Version:**
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: palkan

---

## Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
First of all, thanks for contributing!

If it's a typo fix or minor documentation update feel free to skip the rest of this template!
-->

## What is the purpose of this pull request?

<!--
If it's a bug fix, then link it to the issue, for example:

Fixes #xxx
-->

## What changes did you make? (overview)

## Is there anything you'd like reviewers to focus on?

## Checklist

- [ ] I've added tests for this change
- [ ] I've added a Changelog entry
- [ ] I've updated a documentation
61 changes: 61 additions & 0 deletions .github/workflows/docs-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Lint Docs

on:
push:
branches:
- master
paths:
- "*.md"
- "**/*.md"
pull_request:
paths:
- "*.md"
- "**/*.md"

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Lint Markdown files with RuboCop
run: |
gem install bundler
bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3
bundle exec --gemfile gemfiles/rubocop.gemfile rubocop -c .rubocop-md.yml
forspell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Hunspell
run: |
sudo apt-get install hunspell
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Cache installed gems
uses: actions/cache@v1
with:
path: /home/runner/.rubies/ruby-2.7.0/lib/ruby/gems/2.7.0
key: gems-cache-${{ runner.os }}
- name: Install Forspell
run: gem install forspell
- name: Run Forspell
run: forspell *.md .github/**/*.md
liche:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x
- name: Run liche
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go get -u github.com/raviqqe/liche
liche README.md CHANGELOG.md
28 changes: 28 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
push:
branches:
- master
pull_request:

jobs:
rspec:
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
CI: true
strategy:
fail-fast: false
matrix:
ruby: ["2.6", "2.7", "3.0", "3.1"]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run RSpec
run: |
bundle exec rspec
21 changes: 21 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint Ruby

on:
push:
branches:
- master
pull_request:

jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Lint Ruby code with RuboCop
run: |
gem install bundler
bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3
bundle exec --gemfile gemfiles/rubocop.gemfile rubocop
25 changes: 16 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,21 @@
.settings
.tmproj
Thumbs.db

.bundle/
log/*.log
pkg/
spec/dummy/db/*.sqlite3
spec/dummy/db/*.sqlite3-journal
spec/dummy/tmp/

Gemfile.lock
Gemfile.local
.rspec
.ruby-version
*.gem

/.bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
tmp/
.rbnext/

gemfiles/*.lock
1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rules "~MD013", "~MD033", "~MD029", "~MD034"
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--format documentation
-f d
--color
8 changes: 8 additions & 0 deletions .rubocop-md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
inherit_from: ".rubocop.yml"

require:
- rubocop-md

AllCops:
Include:
- '**/*.md'
61 changes: 19 additions & 42 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,25 @@
AllCops:
# Include gemspec and Rakefile
Include:
- 'lib/**/*.rb'
- 'lib/**/*.rake'
- 'spec/**/*.rb'
Exclude:
- 'bin/**/*'
- 'spec/dummy/**/*'
Rails:
Enabled: false
DisplayCopNames: true
StyleGuideCopsOnly: false

Style/AccessorMethodName:
Enabled: false

Style/TrivialAccessors:
Enabled: false

Style/Documentation:
Exclude:
- 'spec/**/*.rb'
require:
- standard/cop/block_single_line_braces

Style/StringLiterals:
Enabled: false

Style/SpaceInsideStringInterpolation:
EnforcedStyle: no_space
inherit_gem:
standard: config/base.yml

Style/BlockDelimiters:
AllCops:
Exclude:
- 'spec/**/*.rb'

Style/ParallelAssignment:
Enabled: false
- 'bin/*'
- 'tmp/**/*'
- 'Gemfile'
- 'vendor/**/*'
- 'gemfiles/**/*'
- 'lib/.rbnext/**/*'
- 'lib/generators/**/templates/*.rb'
- '.github/**/*'
DisplayCopNames: true
SuggestExtensions: false
TargetRubyVersion: 2.6

Lint/AmbiguousRegexpLiteral:
Standard/BlockSingleLineBraces:
Enabled: false

Metrics/MethodLength:
Exclude:
- 'spec/**/*.rb'

Metrics/LineLength:
max: 100
Exclude:
- 'spec/**/*.rb'
Style/FrozenStringLiteralComment:
Enabled: true
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change log

## master

- Add `lower_threshold:` option to specify the lower bound for the expected difference. ([@palkan][])

- Ruby 3.1 compatibility.

- Drop JRuby support (for now).

[@palkan]: https://github.com/palkan
22 changes: 11 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
source 'https://rubygems.org'
# frozen_string_literal: true

gem "rake", "~> 10.0"
gem "rspec", "~> 3.0"
source "https://rubygems.org"

if RUBY_PLATFORM =~ /java/
gem "chunky_png", "~> 1.3.5"
else
gem "oily_png", "~> 1.2"
end
gem "pry-byebug", platform: :mri

gem "oily_png"

gemspec

eval_gemfile "gemfiles/rubocop.gemfile"

gem 'pry-byebug' if RUBY_VERSION >= "2.0.0" && RUBY_PLATFORM != 'java'
local_gemfile = 'Gemfile.local'
local_gemfile = "#{File.dirname(__FILE__)}/Gemfile.local"

if File.exist?(local_gemfile)
eval(File.read(local_gemfile)) # rubocop:disable Lint/Eval
eval(File.read(local_gemfile)) # rubocop:disable Security/Eval
end
Loading