git-multi 2.1.0 → 2.2.0

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
- SHA256:
3
- metadata.gz: c1bda879ee8b1b3320c8d5490201645cf2f686f8e82cb8200fb1b0a2f8538588
4
- data.tar.gz: 072b2cfb7ed429f2a8f78b969ce808a4a0365ab37575c86deceb02c2bbe85701
2
+ SHA1:
3
+ metadata.gz: c94b94babdacd0fd6a8a8c6c6c64c4d61dfe48fb
4
+ data.tar.gz: a9950a275c9ab1925c8276a7c5bb73ac41e28f6e
5
5
  SHA512:
6
- metadata.gz: 2565edfd604e66bbcfeda950c83e5da58ac5f4fbda2173e1705dd56ff98ad8c04b2f757edcaa8c4a45e37e7ab184361db8b3ff2645c95f3b3fd1c100ab7f2279
7
- data.tar.gz: 3d56e12752052a25dc64fed40684ae88125d6f330930efbd3a553b1874127a6d721e249306c1b8d2090f102b7cd836d565ca182dba2fd94412687232492dd846
6
+ metadata.gz: 9f0ce4a1f02fa57cee715f6f33f7d367045f2fe0493133f46fa62bdef7698f2abc11f11a0c0b49f7712aa8ef17d2a80bb8011be0cfcd3a6ec04ba3f6e3b1f3ba
7
+ data.tar.gz: 86d32baff6d2b86528d6db715981838728c89f89eab192715b23ca8a7b9d8749d2a7f8b2d9cd675de3af37fe522e82c1b6a238fffcdd97b4ddb4625372aef5d5
data/.pryrc CHANGED
@@ -1,5 +1,5 @@
1
1
  # this loads all of "git-multi"
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path('lib', __dir__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'git/multi'
5
5
 
data/.rubocop.yml CHANGED
@@ -25,9 +25,13 @@ Style/Lambda:
25
25
  Enabled: false
26
26
  Style/NestedTernaryOperator:
27
27
  Enabled: false
28
+ Style/RedundantBegin:
29
+ Enabled: false
28
30
  Style/SingleLineMethods:
29
31
  Enabled: false
30
32
  Style/TrailingCommaInArguments:
31
33
  Enabled: false
32
- Style/TrailingCommaInLiteral:
34
+ Style/TrailingCommaInArrayLiteral:
35
+ Enabled: false
36
+ Style/TrailingCommaInHashLiteral:
33
37
  Enabled: false
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Peter Vandenberk
3
+ Copyright (c) 2015-2018 Peter Vandenberk
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/exe/git-multi CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- lib = File.expand_path('../../lib', __FILE__)
3
+ lib = File.expand_path('../lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'git/multi'
6
6
 
data/git-multi.gemspec CHANGED
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'bundler'
31
31
  spec.add_development_dependency 'pry'
32
32
  spec.add_development_dependency 'rake'
33
+ spec.add_development_dependency 'rubocop'
33
34
  end
data/lib/git/hub.rb CHANGED
@@ -26,37 +26,35 @@ module Git
26
26
  )
27
27
  end
28
28
 
29
- class << self
30
- private :client
31
- end
29
+ private_class_method :client
32
30
 
33
31
  def connected?
34
32
  @connected ||= begin
35
- client.validate_credentials
36
- true
37
- rescue Faraday::ConnectionFailed
38
- false
39
- end
33
+ client.validate_credentials
34
+ true
35
+ rescue Faraday::ConnectionFailed
36
+ false
37
+ end
40
38
  end
41
39
 
42
40
  # FIXME: update login as part of `--refresh`
43
41
 
44
42
  def login
45
43
  @login ||= begin
46
- client.user.login
47
- rescue Octokit::Unauthorized, Faraday::ConnectionFailed
48
- nil
49
- end
44
+ client.user.login
45
+ rescue Octokit::Unauthorized, Faraday::ConnectionFailed
46
+ nil
47
+ end
50
48
  end
51
49
 
52
50
  # FIXME: update orgs as part of `--refresh`
53
51
 
54
52
  def orgs
55
53
  @orgs ||= begin
56
- client.organizations.map(&:login)
57
- rescue Octokit::Unauthorized, Faraday::ConnectionFailed
58
- []
59
- end
54
+ client.organizations.map(&:login)
55
+ rescue Octokit::Unauthorized, Faraday::ConnectionFailed
56
+ []
57
+ end
60
58
  end
61
59
 
62
60
  # pick a (semi-)random repo from GitHub
@@ -122,15 +122,17 @@ module Git
122
122
  def find(commands, multi_repo = nil)
123
123
  Git::Multi.cloned_repositories_for(multi_repo).each do |repository|
124
124
  Dir.chdir(repository.local_path) do
125
- if repo.instance_eval(commands.join(' && '))
126
- repo.just_do_it(
127
- ->(_repo) { nil },
128
- ->(repo) { puts repo.full_name },
129
- )
125
+ begin
126
+ if repo.instance_eval(commands.join(' && '))
127
+ repo.just_do_it(
128
+ ->(_repo) { nil },
129
+ ->(repo) { puts repo.full_name },
130
+ )
131
+ end
132
+ rescue Octokit::NotFound
133
+ # repository no longer exists on GitHub
134
+ # consider running "git multi --stale"!
130
135
  end
131
- rescue Octokit::NotFound
132
- # repository no longer exists on GitHub
133
- # consider running "git multi --stale"!
134
136
  end
135
137
  end
136
138
  end
@@ -138,10 +140,12 @@ module Git
138
140
  def eval(commands, multi_repo)
139
141
  Git::Multi.cloned_repositories_for(multi_repo).each do |repo|
140
142
  Dir.chdir(repo.local_path) do
141
- repo.instance_eval(commands.join(' ; '))
142
- rescue Octokit::NotFound
143
- # repository no longer exists on GitHub
144
- # consider running "git multi --stale"!
143
+ begin
144
+ repo.instance_eval(commands.join(' ; '))
145
+ rescue Octokit::NotFound
146
+ # repository no longer exists on GitHub
147
+ # consider running "git multi --stale"!
148
+ end
145
149
  end
146
150
  end
147
151
  end
@@ -23,7 +23,7 @@ module Git
23
23
  end
24
24
 
25
25
  def env_var(name, default = nil)
26
- value = ENV[name].dup.freeze
26
+ value = ENV[name]
27
27
  (value.nil? || value.empty?) && default ? default : value
28
28
  end
29
29
 
@@ -6,7 +6,7 @@ require 'addressable'
6
6
  module Git
7
7
  module Multi
8
8
  NAME = 'git-multi'.freeze
9
- VERSION = '2.1.0'.freeze
9
+ VERSION = '2.2.0'.freeze
10
10
 
11
11
  DEPENDENCY_VERSIONS = [
12
12
  "octokit.rb v#{Octokit::VERSION}",
data/man/git-multi.1 CHANGED
@@ -31,7 +31,7 @@
31
31
  git-multi \- execute the same git command in multiple repositories
32
32
  .SH "VERSION"
33
33
  .sp
34
- This is \fBv2\&.1\&.0\fR of \fIgit multi\fR \&... hooray!
34
+ This is \fBv2\&.2\&.0\fR of \fIgit multi\fR \&... hooray!
35
35
  .SH "SYNOPSIS"
36
36
  .sp
37
37
  There are some options for \fBgit multi\fR itself, in which case it is invoked as follows:
data/man/git-multi.html CHANGED
@@ -748,7 +748,7 @@ git-multi(1) Manual Page
748
748
  <div class="sect1">
749
749
  <h2 id="_version">VERSION</h2>
750
750
  <div class="sectionbody">
751
- <div class="paragraph"><p>This is <code>v2.1.0</code> of <em>git multi</em> &#8230; hooray!</p></div>
751
+ <div class="paragraph"><p>This is <code>v2.2.0</code> of <em>git multi</em> &#8230; hooray!</p></div>
752
752
  </div>
753
753
  </div>
754
754
  <div class="sect1">
@@ -1209,7 +1209,7 @@ the <code>jq</code> command-line utility:
1209
1209
  <div id="footer">
1210
1210
  <div id="footer-text">
1211
1211
  Last updated
1212
- 2018-11-12 14:05:11 GMT
1212
+ 2018-11-12 21:37:52 GMT
1213
1213
  </div>
1214
1214
  </div>
1215
1215
  </body>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-multi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Vandenberk
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
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'
69
83
  description: Run the same git command in a set of related repos
70
84
  email:
71
85
  - pvandenberk@mac.com
@@ -131,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
145
  version: '0'
132
146
  requirements: []
133
147
  rubyforge_project:
134
- rubygems_version: 2.7.6
148
+ rubygems_version: 2.5.2.3
135
149
  signing_key:
136
150
  specification_version: 4
137
151
  summary: The ultimate multi-repo utility for git!