ws-style 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8129ca5042c7cbc5c66815bca0812a7f5014c90d
4
+ data.tar.gz: 8be28eaf41bec9d103c4930d8d400b1cb6f5e714
5
+ SHA512:
6
+ metadata.gz: 41e7fc8f5afabd55b067938405d566cec48f4a9dd3b585902dd0ab44c21f8c5a52208406af5cbd7ef5359a463f007539b1dee3e6ff41493fb30ee803aa266071
7
+ data.tar.gz: 0f6a3f5d9c1ccc7f067fa91c6732ce44b0d3e73d11b92ed14eaadf7a90e0ea2a0e671dae07de091a02838f5839eaadf78c69c606cf80a56e57aab842fc397368
@@ -0,0 +1,14 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
3
+ version: 2
4
+ jobs:
5
+ build:
6
+ docker:
7
+ - image: circleci/ruby:2.4.1
8
+ working_directory: ~/repo
9
+ steps:
10
+ - checkout
11
+ - run: bundle install --jobs=4 --retry=3 --path vendor/bundle
12
+ - run: bundle exec bundle-audit update && bundle exec bundle-audit check
13
+ - run: bundle exec rubocop --config=default.yml
14
+ - run: bundle exec rspec
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.4.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in ws-style.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # ws-style [![CircleCI](https://circleci.com/gh/wealthsimple/ws-style.svg?style=svg)](https://circleci.com/gh/wealthsimple/ws-style)
2
+
3
+ Shared [rubocop](https://github.com/bbatsov/rubocop) config to enforce Ruby style consistently across Wealthsimple libraries and services.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile and execute `bundle`:
8
+
9
+ ```ruby
10
+ group :development, :test do
11
+ gem 'ws-style'
12
+ end
13
+ ```
14
+
15
+ Or, for a rubygem, add this to your `gemspec`:
16
+
17
+ ```ruby
18
+ spec.add_development_dependency 'ws-style'
19
+ ```
20
+
21
+ To update an existing installation, just run `bundle update ws-style`.
22
+
23
+ ## Usage
24
+
25
+ Create a `.rubocop.yml` with the following directives:
26
+
27
+ ```yaml
28
+ inherit_gem:
29
+ ws-style:
30
+ - default.yml
31
+
32
+ AllCops:
33
+ # Specify your target Ruby version here (only major/minor versions):
34
+ TargetRubyVersion: 2.3
35
+ ```
36
+
37
+ Check if it works by running `bundle exec rubocop`.
38
+
39
+ You can optionally override or specify additional style configurations in your `.rubocop.yml`, e.g.:
40
+
41
+ ```yaml
42
+ inherit_gem:
43
+ ws-style:
44
+ - default.yml
45
+
46
+ AllCops:
47
+ TargetRubyVersion: 2.4
48
+ Exclude:
49
+ - 'db/**/*'
50
+
51
+ Lint/RescueException:
52
+ Enabled: false
53
+
54
+ Style/HashSyntax:
55
+ EnforcedStyle: hash_rockets
56
+ ```
57
+
58
+ ## Development
59
+
60
+ 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.
61
+
62
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "ws/style"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/default.yml ADDED
@@ -0,0 +1,115 @@
1
+ # See documentation for details on definitions:
2
+ # https://rubocop.readthedocs.io
3
+
4
+ AllCops:
5
+ DisplayCopNames: true
6
+ Exclude:
7
+ - '*.gemspec'
8
+ - 'bin/**/*'
9
+ - 'db/schema.rb'
10
+ - 'db/seeds.rb'
11
+ - 'lib/tasks/circle_0.rake' # Ignore circleci code
12
+ - 'log/**/*'
13
+ - 'public/**/*'
14
+ - 'tmp/**/*'
15
+ - 'vendor/**/*'
16
+
17
+ Layout/DotPosition:
18
+ Enabled: false
19
+
20
+ Layout/ExtraSpacing:
21
+ Enabled: false
22
+
23
+ Layout/IndentHash:
24
+ Enabled: false
25
+
26
+ Layout/MultilineMethodCallIndentation:
27
+ Enabled: false
28
+
29
+ Layout/SpaceBeforeBlockBraces:
30
+ Enabled: false
31
+
32
+ Layout/SpaceBeforeFirstArg:
33
+ Enabled: false
34
+
35
+ Lint/AmbiguousBlockAssociation:
36
+ Enabled: false
37
+
38
+ Metrics/AbcSize:
39
+ Enabled: false
40
+
41
+ Metrics/BlockLength:
42
+ Enabled: false
43
+
44
+ Metrics/ClassLength:
45
+ Enabled: false
46
+
47
+ Metrics/CyclomaticComplexity:
48
+ Enabled: false
49
+
50
+ Metrics/LineLength:
51
+ Enabled: false
52
+
53
+ Metrics/MethodLength:
54
+ Enabled: false
55
+
56
+ Metrics/ModuleLength:
57
+ Enabled: false
58
+
59
+ Metrics/ParameterLists:
60
+ Enabled: false
61
+
62
+ Metrics/PerceivedComplexity:
63
+ Enabled: false
64
+
65
+ Style/Alias:
66
+ Enabled: false
67
+
68
+ Style/AndOr:
69
+ EnforcedStyle: conditionals
70
+
71
+ Style/BracesAroundHashParameters:
72
+ Enabled: false
73
+
74
+ Style/ClassVars:
75
+ Enabled: false
76
+
77
+ Style/CommentAnnotation:
78
+ Enabled: false
79
+
80
+ Style/Documentation:
81
+ Enabled: false
82
+
83
+ Style/FormatString:
84
+ Enabled: false
85
+
86
+ Style/FrozenStringLiteralComment:
87
+ Enabled: false
88
+
89
+ Style/GuardClause:
90
+ Enabled: false
91
+
92
+ Style/Lambda:
93
+ Enabled: false
94
+
95
+ Style/NumericPredicate:
96
+ Enabled: false
97
+
98
+ Style/PercentLiteralDelimiters:
99
+ Enabled: false
100
+
101
+ # Allow use of both single and double quotes for strings.
102
+ Style/StringLiterals:
103
+ Enabled: false
104
+
105
+ Style/SymbolArray:
106
+ Enabled: false
107
+
108
+ Style/TrailingCommaInArguments:
109
+ EnforcedStyleForMultiline: comma
110
+
111
+ Style/TrailingCommaInLiteral:
112
+ EnforcedStyleForMultiline: comma
113
+
114
+ Style/WordArray:
115
+ Enabled: false
data/lib/ws/style.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "ws/style/version"
2
+
3
+ module Ws
4
+ module Style
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Ws
2
+ module Style
3
+ VERSION = "0.1.0".freeze
4
+ end
5
+ end
data/ws-style.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "ws/style/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ws-style"
8
+ spec.version = Ws::Style::VERSION
9
+ spec.authors = ["Peter Graham"]
10
+ spec.email = ["peterghm@gmail.com"]
11
+
12
+ spec.summary = %q{Shared rubocop config}
13
+ spec.description = %q{Shared rubocop config to enforce Ruby style consistently across services.}
14
+ spec.homepage = "https://github.com/wealthsimple/ws-style"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_dependency "rubocop", "~> 0.49"
24
+
25
+ spec.add_development_dependency "bundler", "~> 1.15"
26
+ spec.add_development_dependency "rake", "~> 10.0"
27
+ spec.add_development_dependency "rspec", "~> 3.0"
28
+ spec.add_development_dependency "bundler-audit"
29
+ end
metadata ADDED
@@ -0,0 +1,126 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ws-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Peter Graham
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-08-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.49'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.49'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.15'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.15'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler-audit
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Shared rubocop config to enforce Ruby style consistently across services.
84
+ email:
85
+ - peterghm@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".circleci/config.yml"
91
+ - ".gitignore"
92
+ - ".rspec"
93
+ - ".ruby-version"
94
+ - Gemfile
95
+ - README.md
96
+ - Rakefile
97
+ - bin/console
98
+ - bin/setup
99
+ - default.yml
100
+ - lib/ws/style.rb
101
+ - lib/ws/style/version.rb
102
+ - ws-style.gemspec
103
+ homepage: https://github.com/wealthsimple/ws-style
104
+ licenses: []
105
+ metadata: {}
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubyforge_project:
122
+ rubygems_version: 2.6.11
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: Shared rubocop config
126
+ test_files: []