Skip to content

Commit

Permalink
Merge branch 'release/v1.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
janlindblom committed Nov 29, 2022
2 parents b7181cf + 6658fec commit 6d59f2c
Show file tree
Hide file tree
Showing 12 changed files with 230 additions and 57 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Dependency Review'
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
31 changes: 31 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Ruby

on:
push:
branches: [ "master", develop ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.1']

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa # v1.115.3
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake spec
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,5 @@ $RECYCLE.BIN/


# End of https://www.gitignore.io/api/vim,ruby,linux,emacs,macos,windows,visualstudiocode

test-reports/
10 changes: 7 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ before_script:
- bundle install --jobs $(nproc) "${FLAGS[@]}"

build:
stage: build
script:
- bundle exec rake build
artifacts:
Expand All @@ -18,16 +19,19 @@ build:

test:
stage: test
needs: ["build"]
script:
- bundle exec rake spec
artifacts:
paths:
- spec/reports/rspec.xml
- test-reports/rspec.xml
reports:
junit: spec/reports/rspec.xml
junit: test-reports/rspec.xml

verification:
stage: test
stage: verify
needs: ["build"]
parallel: 2
script:
- bundle exec rake yard
- bundle exec rake rubocop
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--format documentation
--format RspecJunitFormatter
--out spec/reports/rspec.xml
--out test-reports/rspec.xml
--color
--require spec_helper
76 changes: 76 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
inherit_from: .rubocop_todo.yml

AllCops:
NewCops: enable

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/SpaceAroundMethodCallOperator:
Expand All @@ -26,3 +29,76 @@ Style/RedundantRegexpEscape:
Enabled: true
Style/SlicingWithRange:
Enabled: true

Layout/BeginEndAlignment: # (new in 0.91)
Enabled: true
Lint/BinaryOperatorWithIdenticalOperands: # (new in 0.89)
Enabled: true
Lint/ConstantDefinitionInBlock: # (new in 0.91)
Enabled: true
Lint/DuplicateElsifCondition: # (new in 0.88)
Enabled: true
Lint/DuplicateRequire: # (new in 0.90)
Enabled: true
Lint/DuplicateRescueException: # (new in 0.89)
Enabled: true
Lint/EmptyConditionalBody: # (new in 0.89)
Enabled: true
Lint/EmptyFile: # (new in 0.90)
Enabled: true
Lint/FloatComparison: # (new in 0.89)
Enabled: true
Lint/IdentityComparison: # (new in 0.91)
Enabled: true
Lint/MissingSuper: # (new in 0.89)
Enabled: true
Lint/OutOfRangeRegexpRef: # (new in 0.89)
Enabled: true
Lint/SelfAssignment: # (new in 0.89)
Enabled: true
Lint/TopLevelReturnWithArgument: # (new in 0.89)
Enabled: true
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
Enabled: true
Lint/UnreachableLoop: # (new in 0.89)
Enabled: true
Lint/UselessMethodDefinition: # (new in 0.90)
Enabled: true
Lint/UselessTimes: # (new in 0.91)
Enabled: true
Style/AccessorGrouping: # (new in 0.87)
Enabled: true
Style/ArrayCoercion: # (new in 0.88)
Enabled: true
Style/BisectedAttrAccessor: # (new in 0.87)
Enabled: true
Style/CaseLikeIf: # (new in 0.88)
Enabled: true
Style/CombinableLoops: # (new in 0.90)
Enabled: true
Style/ExplicitBlockArgument: # (new in 0.89)
Enabled: true
Style/GlobalStdStream: # (new in 0.89)
Enabled: true
Style/HashAsLastArrayItem: # (new in 0.88)
Enabled: true
Style/HashLikeCase: # (new in 0.88)
Enabled: true
Style/KeywordParametersOrder: # (new in 0.90)
Enabled: true
Style/OptionalBooleanParameter: # (new in 0.89)
Enabled: true
Style/RedundantAssignment: # (new in 0.87)
Enabled: true
Style/RedundantFetchBlock: # (new in 0.86)
Enabled: true
Style/RedundantFileExtensionInRequire: # (new in 0.88)
Enabled: true
Style/RedundantSelfAssignment: # (new in 0.90)
Enabled: true
Style/SingleArgumentDig: # (new in 0.89)
Enabled: true
Style/SoleNestedConditional: # (new in 0.89)
Enabled: true
Style/StringConcatenation: # (new in 0.89)
Enabled: true
47 changes: 47 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
pipeline {
agent {
label 'ruby'
}

stages {
stage('Setup') {
steps {
sh 'bundle install'
}
}

stage('Build') {
steps {
sh 'bundle exec rake build'
}
}

stage('Test production branch') {
when {
branch 'master'
}
steps {
sh 'bundle exec rake yard'
sh 'bundle exec rake rubocop'
sh 'bundle exec rake spec'
}
}

stage('Test development branch') {
when {
not {
branch 'master'
}
}
steps {
sh 'bundle exec rake spec'
}
}
}

post {
always {
junit 'test-reports/*.xml'
}
}
}
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Jan Lindblom
Copyright (c) 2022 Jan Lindblom ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Quadtree

![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoidk1aMm1Ya212SjRsU1pVdWNVZ2FRTDVPUXlVM2NsY0dWU2UxL1dEUlh2VTdxdURhcmxRK1JDTGg5OXJxeURKeFRiZXV5VEtTbmRBZCt6bTdDTms1Rm5ZPSIsIml2UGFyYW1ldGVyU3BlYyI6ImlUamttMGtUckZRT0tvM0EiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)
[![Bitbucket Pipelines](https://img.shields.io/bitbucket/pipelines/janlindblom/ruby-quadtree.png)](https://bitbucket.org/janlindblom/ruby-quadtree)
[![Gem](https://img.shields.io/gem/v/quadtree.png)](https://rubygems.org/gems/quadtree)
[![Documentation](https://img.shields.io/badge/docs-rdoc.info-yellow.png)](http://www.rubydoc.info/gems/quadtree/frames)

Expand All @@ -17,11 +15,15 @@ gem 'quadtree'

And then execute:

$ bundle
```bash
bundle
```

Or install it yourself as:

$ gem install quadtree
```bash
gem install quadtree
```

## Usage

Expand Down Expand Up @@ -56,12 +58,12 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on Bitbucket at https://bitbucket.org/janlindblom/ruby-quadtree. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on Github at <https://github.com/janlindblom/ruby-quadtree>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
The gem is available as open source under the terms of the [MIT License](https://github.com/janlindblom/ruby-quadtree/blob/master/LICENSE.txt).

## Code of Conduct

Everyone interacting in the Quadtree project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://bitbucket.org/janlindblom/ruby-quadtree/src/master/CODE_OF_CONDUCT.md).
Everyone interacting in the Quadtree project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/janlindblom/ruby-quadtree/blob/master/CODE_OF_CONDUCT.md).
23 changes: 13 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@ spec = Gem::Specification.new do |s|
s.email = ["[email protected]"]

s.summary = %q{Quadtrees in Ruby.}
s.homepage = "https://bitbucket.org/janlindblom/ruby-quadtree"
s.homepage = "https://github.com/janlindblom/ruby-quadtree"
s.license = "MIT"

s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(bin|test|spec|features)/}) ||
f.match(%r{^(bin|test|spec|features|.github)/}) ||
f == ".travis.yml" ||
f == ".gitignore" ||
f == ".editorconfig" ||
f == ".rspec" ||
f == "bitbucket-pipelines.yml" ||
f == "buildspec.yml" ||
f == ".gitlab-ci.yml"
f == ".gitlab-ci.yml" ||
f == ".rubocop.yml" ||
f == ".rubocop_todo.yml" ||
f == "Jenkinsfile"
end
s.bindir = "exe"
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
Expand All @@ -38,14 +41,14 @@ spec = Gem::Specification.new do |s|
s.required_ruby_version = '>= 2.3.0'

s.add_development_dependency "bundler", "~> 2"
s.add_development_dependency "rake", "~> 13.0"
s.add_development_dependency "rspec", "~> 3.9"
s.add_development_dependency "pry", "~> 0.13"
s.add_development_dependency "rake", "~> 13"
s.add_development_dependency "rspec", "~> 3"
s.add_development_dependency "pry", "~> 0.14"
s.add_development_dependency "yard", "~> 0.9"
s.add_development_dependency "simplecov", "~> 0.18"
s.add_development_dependency "rspec_junit_formatter", "~> 0.4"
s.add_development_dependency "rubocop", "~> 0.85"
s.add_runtime_dependency "version", "~> 1.1"
s.add_development_dependency "simplecov", "~> 0.21"
s.add_development_dependency "rspec_junit_formatter", "~> 0.6"
s.add_development_dependency "rubocop", "~> 1"
s.add_runtime_dependency "version", "~> 1"
end

Rake::VersionTask.new do |task|
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.8
1.0.9
Loading

0 comments on commit 6d59f2c

Please sign in to comment.