gurney_client 0.2.0 → 0.2.2

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: 66191c965c8b5f4cc1286891aa9b3b60a3d8fc62ec1bc6f25787003fc1c19c3b
4
- data.tar.gz: b4237a5f20d4b5b0b469d348cf283a9504b4e2fed1ed9a5d678d287a4b64ebd5
3
+ metadata.gz: 7c48954d1bfc52ad52a403cd36f679400cafbb4e0d5c6820dfa4ef7e2c3c555f
4
+ data.tar.gz: 288e682225abd4957e891755f90fc5fb276e9662ed6ddbef19ba3c6ed2e9acfc
5
5
  SHA512:
6
- metadata.gz: 43ad1ed35a79fc1a53561069d0645a3b5bbc112ea6ae275f0fa9ab89ba8a343c345ab163cc37fba2ab90f849f7d04c26d159f62daf69e18bc4e1291eba29755d
7
- data.tar.gz: cdb663765cbceeb6740aaa6748d9c911e9ead3940e44bb51c211df905ddd56a0c42ffdd5bacc12c1c72ae806fbb13345ac97bbd627e8a74db4f2fe1977ac57e7
6
+ metadata.gz: 688e1df6e72a084b038034e7c7d1d15e70c93744826220eee089eec34d3a78852e01d0abd1588a7152705f25a6e695b409b32197293f8bf34f079e36573bbed1
7
+ data.tar.gz: a93da5e3b0233730b119e3a29d8981be97b2a38a72ded8090ae019305f8c555cd5924b7d6a40902f7ee878d3878e19e0c94afceb6cda7c8b6c9e59b2fb58aef3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gurney_client (0.2.0)
4
+ gurney_client (0.2.1)
5
5
  bundler (< 3)
6
6
  colorize (~> 0.8)
7
7
  git (~> 1.5)
@@ -10,18 +10,22 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
+ addressable (2.8.1)
14
+ public_suffix (>= 2.0.2, < 6.0)
13
15
  byebug (11.0.1)
14
16
  colorize (0.8.1)
15
17
  diff-lcs (1.3)
16
- git (1.6.0)
18
+ git (1.13.1)
19
+ addressable (~> 2.8)
17
20
  rchardet (~> 1.8)
18
21
  httparty (0.17.3)
19
22
  mime-types (~> 3.0)
20
23
  multi_xml (>= 0.5.2)
21
24
  mime-types (3.3.1)
22
25
  mime-types-data (~> 3.2015)
23
- mime-types-data (3.2019.1009)
26
+ mime-types-data (3.2020.0512)
24
27
  multi_xml (0.6.0)
28
+ public_suffix (5.0.1)
25
29
  rake (13.0.1)
26
30
  rchardet (1.8.0)
27
31
  rspec (3.9.0)
@@ -48,4 +52,4 @@ DEPENDENCIES
48
52
  rspec
49
53
 
50
54
  BUNDLED WITH
51
- 2.1.4
55
+ 2.2.27
data/gurney.gemspec CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'Gurney is a small tool to extract yarn and RubyGems dependencies from project files and report them to a web api.'
12
12
  spec.homepage = "https://github.com/makandra/gurney"
13
13
  spec.license = "MIT"
14
+ spec.metadata = { 'rubygems_mfa_required' => 'true' }
14
15
 
15
16
  spec.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(test|spec|features|bin)/}) }
16
17
  spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
data/lib/gurney/cli.rb CHANGED
@@ -7,23 +7,26 @@ require 'fileutils'
7
7
 
8
8
  module Gurney
9
9
  class CLI
10
-
11
10
  HOOK_STDIN_REGEX = /(?<old>[0-9a-f]{40}) (?<new>[0-9a-f]{40}) refs\/heads\/(?<ref>\w+)/m
12
11
  CLIENT_HOOK_STDIN_REGEX = /refs\/heads\/(?<ref>\w+) (?<new>[0-9a-f]{40}) refs\/heads\/(?<remote_ref>\w+) (?<remote_sha>[0-9a-f]{40})/m
12
+ MAIN_BRANCHES = ['master', 'main'].freeze
13
13
 
14
14
  def self.run(cmd_parameter=[])
15
15
  options = Gurney::CLI::OptionParser.parse(cmd_parameter)
16
16
 
17
17
  begin
18
18
  if options.hook
19
- g = Git.bare(ENV['GIT_DIR'])
19
+ g = Git.bare(ENV['GIT_DIR'] || Dir.pwd)
20
20
  else
21
21
  unless Dir.exists? './.git'
22
22
  raise Gurney::Error.new('Must be run within a git repository')
23
23
  end
24
24
  g = Git.open('.')
25
25
  end
26
- config_file = read_file(g, options.hook, 'master', options.config_file)
26
+ config_file = MAIN_BRANCHES.find do |branch|
27
+ file = read_file(g, options.hook, branch, options.config_file)
28
+ break file if file
29
+ end
27
30
  if !config_file && options.hook
28
31
  # dont run as a hook with no config
29
32
  exit 0
@@ -1,3 +1,3 @@
1
1
  module Gurney
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gurney_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Schaflitzl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2023-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -100,7 +100,8 @@ files:
100
100
  homepage: https://github.com/makandra/gurney
101
101
  licenses:
102
102
  - MIT
103
- metadata: {}
103
+ metadata:
104
+ rubygems_mfa_required: 'true'
104
105
  post_install_message:
105
106
  rdoc_options: []
106
107
  require_paths:
@@ -116,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  - !ruby/object:Gem::Version
117
118
  version: '0'
118
119
  requirements: []
119
- rubygems_version: 3.1.2
120
+ rubygems_version: 3.0.3.1
120
121
  signing_key:
121
122
  specification_version: 4
122
123
  summary: Gurney is a small tool to extract yarn and RubyGems dependencies from project