geet 0.13.0 → 0.14.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
2
  SHA256:
3
- metadata.gz: 9e3fb8be731151a44f97d99825b4635046f3a52d444709ade0b538f6df5f9032
4
- data.tar.gz: a643e30c0e1be8851f051593b29d64296e6c8ec7fdcdfb8548bb98a8412fd20b
3
+ metadata.gz: 4e0c9b0b20cd918b9ba0bce2769f4200ed86f73dc96007953f119f5e3cca3a26
4
+ data.tar.gz: 2f807bd361e8eb6fe20a8a6ceb40de0437470de0c2a7014e2576638e007cee51
5
5
  SHA512:
6
- metadata.gz: 3b26b8dddfe4ce9af0cd97e43a0e3f36165c101fb7b468882397be364880ef110124b1ea2c1364510b78f3f638395a75691b291ad199791da8480c17be715a68
7
- data.tar.gz: 0ba381a84d8e6ddad6e0cbd8e1ac498c5b51447019ff091e8509f5902785083fa56b461ce0537c75a3ad221571fa4a8ee9b1d5c2d59aedde832767e65b449875
6
+ metadata.gz: 02c71d752459372d8339b348d52db79720a7846d37406d913923a7906aba88c5b4fd658d4118f74c9fce6c91c073e7b04a42a377381968e481f112c522f05acd
7
+ data.tar.gz: 418cbcd62a90765d0e9927d6d6487527ed67fedcb359a8afd8fc141e0bac4903504a84b19b4e9fa14b356dc86b2c382a547ab24d2c017ec9205f41072d43d55d
data/Gemfile CHANGED
@@ -4,13 +4,18 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
+ gem 'sorbet-runtime'
8
+
9
+ group :development do
10
+ gem 'sorbet'
11
+ gem 'byebug'
12
+ gem 'rubocop', '~> 1.35.0', require: :false
13
+ gem 'spoom', require: false
14
+ gem 'tapioca', require: false
15
+ end
16
+
7
17
  group :test do
8
18
  gem 'rspec', '~> 3.7.0'
9
19
  gem 'vcr', '~> 3.0.3'
10
20
  gem 'webmock', '~> 3.1.1'
11
21
  end
12
-
13
- group :tools do
14
- gem 'byebug', '~> 9.1.0'
15
- gem 'rubocop', '~> 1.35.0'
16
- end
data/bin/tapioca ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'tapioca' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("tapioca", "tapioca")
data/geet.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.required_ruby_version = '>= 2.6.0'
12
12
  s.authors = ['Saverio Miroddi']
13
- s.date = '2022-08-18'
13
+ s.date = '2022-11-28'
14
14
  s.email = ['saverio.pub2@gmail.com']
15
15
  s.homepage = 'https://github.com/saveriomiroddi/geet'
16
16
  s.summary = 'Commandline interface for performing SCM host operations, eg. create a PR on GitHub'
@@ -62,10 +62,6 @@ module Geet
62
62
  attempt_provider_call(:Milestone, :create, title, api_interface)
63
63
  end
64
64
 
65
- def milestone(number)
66
- attempt_provider_call(:Milestone, :find, number, api_interface)
67
- end
68
-
69
65
  def milestones
70
66
  attempt_provider_call(:Milestone, :list, api_interface)
71
67
  end
@@ -37,20 +37,6 @@ module Geet
37
37
  new(number, title, due_on, api_interface)
38
38
  end
39
39
 
40
- # See https://developer.github.com/v3/issues/milestones/#get-a-single-milestone
41
- #
42
- def self.find(number, api_interface, **)
43
- api_path = "milestones/#{number}"
44
-
45
- response = api_interface.send_request(api_path)
46
-
47
- number = response.fetch('number')
48
- title = response.fetch('title')
49
- due_on = parse_iso_8601_timestamp(raw_due_on)
50
-
51
- new(number, title, due_on, api_interface)
52
- end
53
-
54
40
  # See https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository
55
41
  #
56
42
  def self.list(api_interface, **)
@@ -123,7 +123,22 @@ module Geet
123
123
 
124
124
  @out.puts "Creating remote branch #{remote_branch.inspect}..."
125
125
 
126
- @git_client.push(remote_branch: remote_branch)
126
+ begin
127
+ @git_client.push(remote_branch: remote_branch)
128
+ rescue
129
+ # A case where this helps is if a push hook fails.
130
+ #
131
+ @out.print "Error while pushing; retry (Y/N*)?"
132
+ input = $stdin.getch
133
+ @out.puts
134
+
135
+ case input.downcase.rstrip
136
+ when 'n', ''
137
+ # exit the cycle
138
+ else
139
+ retry
140
+ end
141
+ end
127
142
  end
128
143
  end
129
144
 
@@ -24,7 +24,7 @@ module Geet
24
24
 
25
25
  # Initialize the instance, and starts the background threads.
26
26
  #
27
- def initialize(repository, out: output)
27
+ def initialize(repository, out: $stdout)
28
28
  @repository = repository
29
29
  @out = out
30
30
  @selections_data = []
data/lib/geet/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Geet
4
- VERSION = '0.13.0'
4
+ VERSION = '0.14.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saverio Miroddi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-18 00:00:00.000000000 Z
11
+ date: 2022-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_scripting
@@ -71,6 +71,7 @@ files:
71
71
  - README.md
72
72
  - Rakefile
73
73
  - bin/geet
74
+ - bin/tapioca
74
75
  - extra/anonymize_vcr_data
75
76
  - extra/issue_editing.png
76
77
  - extra/pr_editing.png