Sha256: 4a6d9f14d96f3ca9f8662d3dafcb9a6dccdaf6d3f303f7b3e6bed7096dd01b0f

Contents?: true

Size: 1.73 KB

Versions: 23

Compression:

Stored size: 1.73 KB

Contents

# ws-style [![CircleCI](https://circleci.com/gh/wealthsimple/ws-style.svg?style=svg)](https://circleci.com/gh/wealthsimple/ws-style) [![Gem Version](https://badge.fury.io/rb/ws-style.svg)](https://rubygems.org/gems/ws-style)

Shared [rubocop](https://github.com/bbatsov/rubocop) config to enforce Ruby style consistently across Wealthsimple libraries and services.

# Upgrading to 3.x

1.x adds a number of Cops to our default.yml. See the relevant Quip for more information on how to upgrade.

## Installation

Add this line to your application's Gemfile and execute `bundle`:

```ruby
group :development, :test do
  gem 'ws-style'
end
```

Or, for a rubygem, add this to your `gemspec`:

```ruby
spec.add_development_dependency 'ws-style'
```

To update an existing installation, just run `bundle update ws-style`.

## Usage

Create a `.rubocop.yml` with the following directives:

```yaml
inherit_gem:
  ws-style:
    - default.yml

AllCops:
  # Specify your target Ruby version here (only major/minor versions):
  TargetRubyVersion: 2.3
```

Check if it works by running `bundle exec rubocop`.

You can optionally override or specify additional style configurations in your `.rubocop.yml`, e.g.:

```yaml
inherit_gem:
  ws-style:
    - default.yml

AllCops:
  TargetRubyVersion: 2.4
  Include:
    - 'db/**/*'

Lint/RescueException:
  Enabled: false

Style/HashSyntax:
  EnforcedStyle: hash_rockets
```

## Development

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.

To install this gem onto your local machine, run `bundle exec rake install`.

New versions are automatically released by CI when merged to `master`.

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ws-style-6.0.4 README.md
ws-style-6.0.3 README.md
ws-style-6.0.2 README.md
ws-style-6.0.1 README.md
ws-style-6.0.0 README.md
ws-style-5.4.2 README.md
ws-style-5.4.1 README.md
ws-style-5.4.0 README.md
ws-style-5.3.1 README.md
ws-style-5.3.0 README.md
ws-style-5.2.5 README.md
ws-style-5.2.4 README.md
ws-style-5.2.2 README.md
ws-style-5.2.1 README.md
ws-style-5.2.0 README.md
ws-style-5.1.0 README.md
ws-style-5.0.0 README.md
ws-style-4.1.1 README.md
ws-style-4.1.0 README.md
ws-style-4.0.0 README.md