carwow_rubocop 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9f51ef1a6cb31d807bb95a8d88c77bb666f04dfc
4
+ data.tar.gz: 8a489d7d17c7959da825d7b391a385938c61aca2
5
+ SHA512:
6
+ metadata.gz: 9288325861d8fb6ac6f45f04845ced9704379ae0a1e65e86b988a85fbf340a664edcae5afc7e2e0d68f6a573e27e344f2c806131bcd8a95167da8c7c88897857
7
+ data.tar.gz: 5c2c37ba77da61143c7d8a1aa983def82cd01f4b8d3d6ce17266fc1c064f3ff980adf5dd86591d2e58d3884dc2d7c369c299503c80b50322f70e63944704d978
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.gem
@@ -0,0 +1 @@
1
+ inherit_from: default.yml
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in carwow_rubocop.gemspec
6
+ gemspec
@@ -0,0 +1,38 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ carwow_rubocop (0.1.0)
5
+ rubocop (~> 0.58)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.0)
11
+ jaro_winkler (1.5.1)
12
+ parallel (1.12.1)
13
+ parser (2.5.1.2)
14
+ ast (~> 2.4.0)
15
+ powerpack (0.1.2)
16
+ rainbow (3.0.0)
17
+ rake (10.5.0)
18
+ rubocop (0.58.2)
19
+ jaro_winkler (~> 1.5.1)
20
+ parallel (~> 1.10)
21
+ parser (>= 2.5, != 2.5.1.1)
22
+ powerpack (~> 0.1)
23
+ rainbow (>= 2.2.2, < 4.0)
24
+ ruby-progressbar (~> 1.7)
25
+ unicode-display_width (~> 1.0, >= 1.0.1)
26
+ ruby-progressbar (1.10.0)
27
+ unicode-display_width (1.4.0)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ bundler (~> 1.16)
34
+ carwow_rubocop!
35
+ rake (~> 10.0)
36
+
37
+ BUNDLED WITH
38
+ 1.16.1
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Federico Rebora
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # CarwowRubocop
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/carwow_rubocop`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'carwow_rubocop'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install carwow_rubocop
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/carwow_rubocop.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,40 @@
1
+ require 'bundler/gem_tasks'
2
+ task default: :spec
3
+
4
+ desc "Upload to rubygems"
5
+ task :upload => :build do
6
+ # Check if tag with v#{ResearchSiteApiClient::VERSION} version exists, if so, return with error
7
+
8
+ if tag_exists?(current_tag_name)
9
+ puts "Tag exists, did you run rake increase_revision_number after merging with master?"
10
+ exit 1
11
+ end
12
+
13
+ create_tag(current_tag_name)
14
+ Rake::Task[:release].invoke
15
+ end
16
+
17
+ desc "Increase the revision number"
18
+ task :increase_revision_number do
19
+ version_file = "lib/carwow_rubocop/version.rb"
20
+ file_content = File.read(version_file)
21
+ rule = /(\d+\.\d+\.)(\d+)/
22
+ new_revision_number = rule.match(file_content)[2].to_i + 1
23
+ new_file_content = file_content.sub(rule, '\1' + new_revision_number.to_s)
24
+
25
+ File.open(version_file, 'w') { |file| file.write(new_file_content) }
26
+ end
27
+
28
+ def tag_exists?(tag_name)
29
+ result = `git tag | grep #{tag_name}`.strip
30
+ result == tag_name
31
+ end
32
+
33
+ def create_tag(tag_name)
34
+ sh "git tag -a #{tag_name} -m \"Released version #{tag_name}\""
35
+ sh "git push origin #{tag_name}"
36
+ end
37
+
38
+ def current_tag_name
39
+ "v#{CarwowRubocop::VERSION}"
40
+ end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'carwow_rubocop'
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__)
@@ -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
@@ -0,0 +1,33 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'carwow_rubocop/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'carwow_rubocop'
7
+ spec.version = CarwowRubocop::VERSION
8
+ spec.authors = ['carwow Developers']
9
+ spec.email = ['developers@carwow.co.uk']
10
+
11
+ spec.summary = "carwow's rubocop configuration"
12
+ spec.description = "All carwow's ruby projects will follow these rules"
13
+ spec.homepage = 'https://github.com/carwow/carwow_rubocop'
14
+ spec.license = 'MIT'
15
+
16
+ if spec.respond_to?(:metadata)
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+ else
19
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
20
+ 'public gem pushes.'
21
+ end
22
+
23
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
+ f.match(%r{^(test|spec|features)/})
25
+ end
26
+ spec.bindir = 'exe'
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ['lib']
29
+
30
+ spec.add_development_dependency 'bundler', '~> 1.16'
31
+ spec.add_development_dependency 'rake', '~> 10.0'
32
+ spec.add_dependency 'rubocop', '~> 0.58'
33
+ end
@@ -0,0 +1,46 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+ Exclude:
4
+ - 'Rakefile'
5
+ - 'vendor/**/*'
6
+ - 'db/*'
7
+ - 'node_modules/**/*'
8
+ - 'bin/*'
9
+ - 'tmp/*'
10
+
11
+ Layout/AlignParameters:
12
+ EnforcedStyle: with_fixed_indentation
13
+
14
+ # Currently buggy - spits out false positives and causes infinite loops when
15
+ # autocorrecting certain cases. Renable on next version upgrade.
16
+ Layout/EmptyLinesAroundArguments:
17
+ Enabled: false
18
+
19
+ Layout/MultilineMethodCallBraceLayout:
20
+ EnforcedStyle: new_line
21
+
22
+ Layout/MultilineMethodCallIndentation:
23
+ EnforcedStyle: indented
24
+
25
+ Lint/BigDecimalNew:
26
+ Exclude:
27
+ - 'spec/factories/*'
28
+
29
+ Metrics/BlockLength:
30
+ Exclude:
31
+ - 'config/routes.rb'
32
+ - 'spec/**/*'
33
+ - '**/*.rake'
34
+ - 'config/environments/production.rb'
35
+
36
+ Style/Documentation:
37
+ Enabled: false
38
+
39
+ Style/FrozenStringLiteralComment:
40
+ Enabled: false
41
+
42
+ Style/DoubleNegation:
43
+ Enabled: false
44
+
45
+ Layout/MultilineMethodCallIndentation:
46
+ Enabled: false
@@ -0,0 +1,5 @@
1
+ require 'carwow_rubocop/version'
2
+
3
+ module CarwowRubocop
4
+ # Nothing to do here
5
+ end
@@ -0,0 +1,3 @@
1
+ module CarwowRubocop
2
+ VERSION = '0.1.3'.freeze
3
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: carwow_rubocop
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - carwow Developers
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-08-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.58'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.58'
55
+ description: All carwow's ruby projects will follow these rules
56
+ email:
57
+ - developers@carwow.co.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rubocop.yml"
64
+ - Gemfile
65
+ - Gemfile.lock
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - bin/console
70
+ - bin/setup
71
+ - carwow_rubocop.gemspec
72
+ - default.yml
73
+ - lib/carwow_rubocop.rb
74
+ - lib/carwow_rubocop/version.rb
75
+ homepage: https://github.com/carwow/carwow_rubocop
76
+ licenses:
77
+ - MIT
78
+ metadata:
79
+ allowed_push_host: https://rubygems.org
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ requirements: []
95
+ rubyforge_project:
96
+ rubygems_version: 2.6.14.1
97
+ signing_key:
98
+ specification_version: 4
99
+ summary: carwow's rubocop configuration
100
+ test_files: []