rfix 1.0.4 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 003dccd4e5281a8cddfa6375834b6226a2993ac7062ca2f148c1b7d5d19092a8
4
- data.tar.gz: bcac8a8ff19a9711ba149eb607b205d8f9a359f9490197ce08d6b70f324c30ed
3
+ metadata.gz: 62646c9f16e2ab955a7a9991bdb352f746abc64fe40935748d1f46102a377a71
4
+ data.tar.gz: 4887ecd7aa14ca41aa06905d3eb2213ee91a58b9e7578e7bb0a87d30331598f3
5
5
  SHA512:
6
- metadata.gz: 27750bd45baf9fbd8e9b812b64ef690bb43ca3eb09e781b377367040cc413a2fe7c795fec365c2c86d01937325c69a8c047d71632d33cda8928efb4d922e5427
7
- data.tar.gz: bbff0c57f54ac5a65e1d56afb0d3ee4d947ebf62c05a8ad7bf785f566a205a90158abe3a74eee2d763cf8a1d71ba673dcdc94b4486672eabeb946220eedb2d2a
6
+ metadata.gz: acac0bbc26cda8e39742b91abde14386c0d6cb8f252aa7de3de65c69421f93c3db4ffb3026c6763f3328f901ba148451c7c3ee1fb71ca7548d09922f0e5c9b41
7
+ data.tar.gz: b65b8dde72ab2ad7796a402d60ac2e351009adab266509797e71654129bcd7577edf821ef15bd5b6b065defaf6284a8cf7b827e975f9314146cf68772ff68a5b
@@ -27,4 +27,15 @@ install:
27
27
  script:
28
28
  - bundle exec rake spec
29
29
  - bundle exec rake install
30
- - rfix --help
30
+ - rfix info
31
+ jobs:
32
+ include:
33
+ deploy:
34
+ provider: rubygems
35
+ api_key:
36
+ secure: SJ5rZtQxDnY7aeWIb+gZ1OEV2rDHz8jvMBStHtzPDVtpQeUoo6DJB4FN4Vt5i7VaVk1otkAdOgyANzOQDSB0/1mMBUcy902zKrrUISALeIXp2FpsvjijRdKD0hLJaeX00n/MEJpw671NbzCNboEdiMnCrxSgd775qeQibcv72iRGIY07xv/BLUCtLTmqtjQFQAvcYEFpMQsRE6XEnkRSEOigSsYvNKZrygG4AgUaNY4rcOPqP+Yl26BFHw833GBQeuGgD5a310k3xYwpPc+9I+pTVHcpc4qh2m9kPcNuyDE3OjAMqE3XVn9WXeciZnQR6AQ94n6+5CJyTD3NEv5n58i4kyCLB71YfmPJjO+04+EiCUSZjeECkwACNguzOisdV8Z/vDzfNhI5tvNL7lv3jU05F/lw8LXKR30GBte5BquPY4DjjjXKgKoKl0tbo1bBT0u8LItEaFYoGqRmUiXiHFQNaH02pjBFkjUsyyEgnscWTDtoPxEjyP4aLnW+ESxnJxpwMHHiHPmplrPmK+3hYrTYz9saZyIajLIfcxcGcSSWEHXt2gV5i80pHJFQCc1qV/9d3g8s8sy3N9eKzV6SMYspFTtdKe2Pf7m/nwFt235/ibx0Z4Gyb1TZKze7phv9yAzvAaIb28I3Ye6S2S/ALemlKiu1A/XWtNtOxo8xMNE=
37
+ gem: rfix
38
+ on:
39
+ repo: oleander/rfix-rb
40
+ tags: false
41
+ cleanup: 'false'
@@ -21,7 +21,7 @@ GIT
21
21
  PATH
22
22
  remote: .
23
23
  specs:
24
- rfix (1.0.4)
24
+ rfix (1.0.7)
25
25
  rainbow (~> 3.0)
26
26
  rouge (~> 3.20)
27
27
  rubocop (~> 0.80)
@@ -110,7 +110,7 @@ GEM
110
110
  notiffany (0.1.3)
111
111
  nenv (~> 0.1)
112
112
  shellany (~> 0.0)
113
- parallel (1.19.1)
113
+ parallel (1.19.2)
114
114
  parser (2.7.1.3)
115
115
  ast (~> 2.4.0)
116
116
  progressbar (0.21.0)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rfix [![Build Status](https://travis-ci.org/oleander/rfix-rb.svg?branch=master)](https://travis-ci.org/oleander/rfix-rb)
1
+ # Rfix [![Build Status](https://travis-ci.org/oleander/rfix-rb.svg?branch=master)](https://travis-ci.org/oleander/rfix-rb) ![Gem](https://img.shields.io/gem/dt/rfix)
2
2
 
3
3
  RuboCop CLI that only complains about your latest changes
4
4
 
@@ -18,6 +18,17 @@ $ rfix [--dry] [--help]
18
18
  - `bundle exec rake local`
19
19
  - `bundle exec rake spec`
20
20
 
21
+ ## Overcommit
22
+
23
+ ``` yaml
24
+ PreCommit:
25
+ RFix:
26
+ enabled: true
27
+ command: ["rfix", "local", "--untracked", "--dry"]
28
+ description: "Lint changes since last push using RuboCop"
29
+ parallelize: true
30
+ ```
31
+
21
32
  ## Contributing
22
33
 
23
34
  Bug reports and pull requests are welcome on GitHub at https://github.com/oleander/rfix.
@@ -16,7 +16,7 @@ module Rfix::Cmd
16
16
  say_error "[Cmd] {{italic:#{args.join(" ")}}}"
17
17
  say_error "[Pwd] {{italic:#{Dir.pwd}}}"
18
18
  say_error "[Err] {{error:#{err.strip}}}"
19
-
19
+
20
20
  exit status.exitstatus
21
21
  end
22
22
 
@@ -9,8 +9,8 @@ module Rfix::GitHelper
9
9
  include Rfix::Log
10
10
  include Rfix::Cmd
11
11
 
12
- def git(*args)
13
- cmd("git", *args)
12
+ def git(*args, &block)
13
+ cmd("git", *args, &block)
14
14
  end
15
15
 
16
16
  def params
@@ -88,7 +88,9 @@ module Rfix
88
88
 
89
89
  # Ref since last push
90
90
  def ref_since_push
91
- git("rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}").first
91
+ git("rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}") do
92
+ [ref_since_origin]
93
+ end.first
92
94
  end
93
95
 
94
96
  # Original branch, usually master
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rfix
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.7"
5
5
  end
@@ -5,12 +5,31 @@ require_relative "lib/rfix/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "rfix"
8
- spec.version = Rfix::VERSION
8
+
9
+ if ENV["TRAVIS"]
10
+ spec.version = "#{Rfix::VERSION}-#{ENV.fetch('TRAVIS_BUILD_NUMBER')}"
11
+ else
12
+ # rubocop:disable Gemspec/DuplicatedAssignment
13
+ spec.version = Rfix::VERSION
14
+ # rubocop:enable Gemspec/DuplicatedAssignment
15
+ end
16
+
9
17
  spec.authors = ["Linus Oleander"]
10
18
  spec.email = ["linus@oleander.nu"]
11
19
 
12
20
  spec.summary = "RuboCop CLI that only complains about your latest changes"
13
- spec.description = "$ rfix local|branch|origin|info|all [--dry] [--help]"
21
+ spec.description = <<~TEXT
22
+ #{spec.summary}
23
+ Uses 'git diff' to determine what changes were made then runs RuboCop against them
24
+
25
+ $ rfix branch <branch> -- Fix changes made between HEAD and <branch>
26
+ $ rfix origin -- Fix changes made between HEAD and origin branch
27
+ $ rfix local -- Fix changes not yet pushed to upstream branch
28
+ $ rfix info -- Display runtime dependencies and their versions
29
+ $ rfix all -- Fix all files in this repository (not recommended)
30
+
31
+ Optional args: --dry --help --list-files --limit-files --config --untracked
32
+ TEXT
14
33
  spec.homepage = "https://github.com/oleander/rfix-rb"
15
34
  spec.license = "MIT"
16
35
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linus Oleander
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-16 00:00:00.000000000 Z
11
+ date: 2020-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -52,7 +52,14 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.80'
55
- description: "$ rfix local|branch|origin|info|all [--dry] [--help]"
55
+ description: "RuboCop CLI that only complains about your latest changes\nUses 'git
56
+ diff' to determine what changes were made then runs RuboCop against them\n\n\t$
57
+ rfix branch <branch> -- Fix changes made between HEAD and <branch>\n\t$ rfix origin
58
+ \ -- Fix changes made between HEAD and origin branch\n\t$ rfix local --
59
+ Fix changes not yet pushed to upstream branch\n\t$ rfix info -- Display
60
+ runtime dependencies and their versions\n\t$ rfix all -- Fix all files
61
+ in this repository (not recommended)\n\nOptional args: --dry --help --list-files
62
+ --limit-files --config --untracked\n"
56
63
  email:
57
64
  - linus@oleander.nu
58
65
  executables: