git_selector 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb239a7bd25eb04147c34c2abf08b85a0011c340de26c5ec6ab432f199fdcc68
4
- data.tar.gz: b1d5fb88077a842a73e49906f23595920fca485272d3da4ca5d101d01da17e29
3
+ metadata.gz: 689376c3a594eea00fb5af61323fa64c43ab2164c4c3e2e2c82d5ee5a94053a1
4
+ data.tar.gz: 6799bfacbc96410af97573008f6aa5ee29fa7ea1c3d99f5ab5fb3664b967e2f9
5
5
  SHA512:
6
- metadata.gz: ad33d9bf74f706bd203588628ad0fc4a91936545c8e50755791331481cb7e2e413c64b667a5bd21de7852b733005783a1b6203a0d7d02725da3681a99b566634
7
- data.tar.gz: c4ff0b4254aaf8bc701790b64ec3bd2ada32e1b31a825db122b7dc5da4043bebf62473c837b77056d24312e8df2e59d3d84a98c10c4a8b083d33e383fe6332b1
6
+ metadata.gz: 2605b37bd449e19cfabcb08f7f5d56a0ce684d356aa255565753fa6e0d6d33c0d192a18cc354f00a9461a932e19c6b503f25efeb99159e2f59af758aed9ae529
7
+ data.tar.gz: e307587bc02389c8c091f18306774bba3ac8e4d76ba32cffbb21a6f04c005bd964e5c174de5808a5a39e9004d1b0c9a73572bbd6d1d36c6d80f95099d0e7fa6b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_selector (0.2.2)
4
+ git_selector (0.2.4)
5
5
  git
6
6
  tty-prompt
7
7
 
data/lib/git_prompt.rb CHANGED
@@ -17,7 +17,7 @@ class GitPrompt
17
17
 
18
18
  create_prompt
19
19
  define_key_events
20
- select_tag(extractor.recent_tag_names)
20
+ display_select(extractor.recent_branch_names)
21
21
  end
22
22
 
23
23
  def define_key_events
@@ -40,12 +40,12 @@ class GitPrompt
40
40
 
41
41
  if event.value == 'b'
42
42
  clear_prompt
43
- select_tag(extractor.recent_branch_names)
43
+ display_select(extractor.recent_branch_names)
44
44
  end
45
45
 
46
46
  if event.value == 't'
47
47
  clear_prompt
48
- select_tag(extractor.recent_tag_names)
48
+ display_select(extractor.recent_tag_names)
49
49
  end
50
50
  end
51
51
  end
@@ -60,7 +60,7 @@ class GitPrompt
60
60
  @prompt = TTY::Prompt.new(quiet: true)
61
61
  end
62
62
 
63
- def select_tag(treeish_names)
63
+ def display_select(treeish_names)
64
64
  message = <<~MSG.chomp
65
65
  j: down, k: up, q: quit, Enter: choose tag
66
66
  [b] branch mode [t] tag mode
@@ -1,3 +1,3 @@
1
1
  module GitSelector
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative '../../git_prompt.rb'
4
- require_relative './prompt/list.rb'
5
4
 
6
5
  module TTY
7
6
  class Prompt
8
7
 
8
+ # FIXME This introduces dependencies to tty-prompt v0.23.1
9
9
  # original - https://github.com/piotrmurach/tty-prompt/blob/master/lib/tty/prompt.rb#L226-L250
10
10
  def invoke_select(object, question, *args, &block)
11
11
  options = Utils.extract_options!(args)
@@ -34,9 +34,5 @@ module TTY
34
34
  # 2 is for the prompt message
35
35
  print(TTY::Cursor.clear_lines(GitPrompt::SELECT_OPTIONS_PER_PAGE + 2, :up))
36
36
  end
37
-
38
- def purge_list
39
- @list = nil
40
- end
41
37
  end
42
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_selector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuya Suzuki
@@ -77,7 +77,6 @@ files:
77
77
  - lib/git_selector.rb
78
78
  - lib/git_selector/version.rb
79
79
  - lib/monkey_patches/tty/prompt.rb
80
- - lib/monkey_patches/tty/prompt/list.rb
81
80
  - lib/treeish_extractor.rb
82
81
  homepage: https://github.com/suzukimilanpaak/git_selector
83
82
  licenses:
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module TTY
4
- class Prompt
5
- class List
6
- def clear
7
-
8
- end
9
- end
10
- end
11
- end
12
-