Skip to content

Commit

Permalink
Merge branch 'release/v0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
janlindblom committed May 15, 2020
2 parents 5d7f74b + fa55de9 commit b3ffd5b
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 128 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
35 changes: 35 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
inherit_from: .rubocop_todo.yml

Metrics/ClassLength:
Exclude:
- lib/quaternion.rb

Naming/MethodParameterName:
Exclude:
- lib/quaternion.rb

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Style/SlicingWithRange:
Enabled: true

Layout/SpaceAroundMethodCallOperator:
Enabled: true

Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Style/ExponentialNotation:
Enabled: true

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true
125 changes: 18 additions & 107 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,130 +1,41 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-03-01 15:33:54 +0200 using RuboCop version 0.60.0.
# on 2020-05-15 13:48:29 +0300 using RuboCop version 0.82.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
# Include: **/*.gemspec
Gemspec/OrderedDependencies:
Exclude:
- 'quaternion.gemspec'

# Offense count: 1
# Configuration parameters: EnforcedStyle.
# SupportedStyles: native, lf, crlf
Layout/EndOfLine:
Exclude:
- 'Rakefile'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Layout/ExtraSpacing:
Exclude:
- 'Rakefile'

# Offense count: 1
# Cop supports --auto-correct.
Layout/LeadingBlankLines:
Exclude:
- 'quaternion.gemspec'

# Offense count: 9
# Cop supports --auto-correct.
Layout/SpaceAfterComma:
Exclude:
- 'spec/quaternion_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Layout/SpaceAroundOperators:
Exclude:
- 'Rakefile'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideBlockBraces:
Exclude:
- 'Gemfile'

# Offense count: 1
Lint/ParenthesesAsGroupedExpression:
Exclude:
- 'spec/quaternion_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
Lint/ScriptPermission:
Exclude:
- 'bin/console'

# Offense count: 2
Metrics/AbcSize:
Max: 45

# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 111
Max: 103

# Offense count: 4
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db
Naming/UncommunicativeMethodParamName:
Exclude:
- 'lib/quaternion.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/ExpandPathArguments:
Exclude:
- 'quaternion.gemspec'

# Offense count: 11
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
#Naming/MethodParameterName:
# Exclude:
# - 'lib/quaternion.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Exclude:
- 'quaternion.gemspec'

# Offense count: 34
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'Gemfile'
- 'Rakefile'
- 'bin/console'
- 'quaternion.gemspec'
- 'spec/quaternion_spec.rb'
- 'spec/spec_helper.rb'
# Configuration parameters: UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
Style/HashSyntax:
EnforcedStyle: hash_rockets

# Offense count: 1
# Cop supports --auto-correct.
Style/UnneededPercentQ:
Exclude:
- 'quaternion.gemspec'
# Configuration parameters: MinSize.
# SupportedStyles: percent, brackets
Style/SymbolArray:
EnforcedStyle: brackets

# Offense count: 4
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 155
Layout/LineLength:
Max: 80
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][Keep a Changelog] and this project adheres to [Semantic Versioning][Semantic Versioning].

## [0.1.0] - 2020-05-15

- This is the first "release" of sorts.

## [Unreleased]

### Added

- Full documentation

---

[Keep a Changelog]: https://keepachangelog.com/
[Semantic Versioning]: https://semver.org/

[Unreleased]: https://bitbucket.org/janlindblom/ruby-quaternion/src/master/
[0.1.0]: https://github.com/janlindblom/ruby-quaternion/src/v0.1.0
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Quaternion

TODO: Describe the gem.
The Quaternion gem adds Quaternions to your Ruby project.

## Installation

Add this line to your application's Gemfile:

```ruby
```
gem 'quaternion'
```

Expand All @@ -20,7 +20,15 @@ Or install it yourself as:

## Usage

TODO: Write usage instructions here
```
# Zero Quaternion
q_zero = Quaternion.zero
q_a = Quaternion.new(1,2,3,4)
a_b = Quaternion.new(5,6,7,8)
q_sum = q_a + q_b
```

## Development

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ YARD::Rake::YardocTask.new do |t|
t.stats_options = ['--list-undoc']
end

task :default => :spec
task :default => [:spec, :yard, :rubocop, :build]
10 changes: 9 additions & 1 deletion bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ pipelines:
- bundle exec rake spec
- step:
name: Check style and docs
deployment: staging
caches:
- bundler
script:
Expand All @@ -47,12 +46,21 @@ pipelines:
feature/*:
- step:
name: Test and check style
deployment: staging
caches:
- bundler
script:
- bundle install --path ./vendor
- bundle exec rake spec
- bundle exec rake rubocop
release/*:
- step:
name: Test and build gem
caches:
- bundler
script:
- bundle install --path ./vendor
- bundle exec rake

default:
- step:
Expand Down
Loading

0 comments on commit b3ffd5b

Please sign in to comment.