gitflash 0.1.2.alpha → 0.4.0
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 +4 -4
- data/CHANGELOG.md +43 -0
- data/README.md +16 -5
- data/bin/gitflash +2 -1
- data/command_descriptions.yml +33 -0
- data/lib/gitflash/cli.rb +70 -32
- data/lib/gitflash/configuration.rb +31 -0
- data/lib/gitflash/git/bash_command.rb +13 -4
- data/lib/gitflash/git/command_error.rb +7 -0
- data/lib/gitflash/git/wrapper.rb +48 -20
- data/lib/gitflash/prompt.rb +8 -3
- data/lib/gitflash/version.rb +1 -1
- data/lib/gitflash.rb +0 -1
- metadata +59 -13
- data/bin/console +0 -15
- data/bin/setup +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 308e1c6f4eba1ab9251d7606e919e91108df058d0618b04e2c8f35aac8370ad0
|
|
4
|
+
data.tar.gz: 47da55dc51b8f5b38e6dae281560f0dc880c3a58a95baea0689d4b0fd82536f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e21748dad35cd17a28452b9593dc08b015544d08d68fb615c4ae71e7681a3ac7790a2a95f0eec2aaad389d46fe95fb63d969d8043b668f695e39e7903afef640
|
|
7
|
+
data.tar.gz: e91e1e12645b2af6d0079209c690e08b4dfdb0e951cf99cf5b1c01b2b831e79d890a3eec1450be09434d14d448cae9cc58d93ccf61aded66e246da9c711bc670
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
## [Unreleased]
|
|
2
|
+
|
|
3
|
+
## [0.1.0.alpha] - 2023-06-17
|
|
4
|
+
|
|
5
|
+
- Initial release
|
|
6
|
+
|
|
7
|
+
## [0.1.1.alpha] - 2023-10-28
|
|
8
|
+
|
|
9
|
+
- Fix delete method
|
|
10
|
+
- Added and updated test
|
|
11
|
+
- bug fixes
|
|
12
|
+
|
|
13
|
+
## [0.1.2.alpha] - 2023-11-4
|
|
14
|
+
|
|
15
|
+
- Refactors and code improvements
|
|
16
|
+
- Zeitwerk warning suppress
|
|
17
|
+
- Update README
|
|
18
|
+
- Bug fixes
|
|
19
|
+
|
|
20
|
+
## [0.2.0.alpha] - 2023-12-9
|
|
21
|
+
|
|
22
|
+
- Add reset command
|
|
23
|
+
- Code improvements
|
|
24
|
+
|
|
25
|
+
## [0.3.0] - 2025-10-10
|
|
26
|
+
|
|
27
|
+
- Fix reset method
|
|
28
|
+
- Update to Ruby version 3.3.2
|
|
29
|
+
- Bug fixes
|
|
30
|
+
|
|
31
|
+
## [0.4.0] - 2026-09-24
|
|
32
|
+
|
|
33
|
+
- Run git commands without a shell and raise on failure
|
|
34
|
+
- List branches with `git for-each-ref`; detached HEAD no longer shows as a branch
|
|
35
|
+
- List the latest 100 commits for `reset`, unaffected by `log.decorate`
|
|
36
|
+
- Exit with an error when a git command fails or outside a git repository
|
|
37
|
+
- `delete` does nothing when no branches are available or selected
|
|
38
|
+
- `reset --hard` prints `Exited` when declined; fix single-commit message
|
|
39
|
+
- Correct `reset` help text
|
|
40
|
+
- Portable `bin/gitflash` shebang
|
|
41
|
+
- Require thor >= 1.4 (CVE-2025-54314) and Ruby >= 3.3
|
|
42
|
+
- Add `version` command (`--version`, `-v`)
|
|
43
|
+
- CI: pin third-party action to a commit SHA, restrict token permissions, test Ruby 3.3–3.4
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/rb/gitflash)
|
|
4
4
|
|
|
5
|
-
⚠️ **This project is
|
|
5
|
+
⚠️ **This project is still under development**: Use at your own risk!
|
|
6
6
|
|
|
7
7
|
This gem allows you to use some of the most common git commands in a more user intuitive way.
|
|
8
8
|
|
|
@@ -24,10 +24,21 @@ Or install it yourself as:
|
|
|
24
24
|
|
|
25
25
|
## Requirements
|
|
26
26
|
|
|
27
|
-
This gem requires Ruby
|
|
27
|
+
This gem requires Ruby 3.3+ and git.
|
|
28
|
+
|
|
28
29
|
## Usage
|
|
29
30
|
|
|
30
|
-
Run `gitflash` to get a list with the available commands and their description.
|
|
31
|
+
Run `gitflash` inside a git repository to get a list with the available commands and their description.
|
|
32
|
+
|
|
33
|
+
| Command | Description |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `gitflash checkout` | Select a local branch and check it out |
|
|
36
|
+
| `gitflash delete` | Select local branches (excluding the current branch and main/master) and force-delete them |
|
|
37
|
+
| `gitflash reset` | Select one of the latest 100 commits and reset to it (mixed reset) |
|
|
38
|
+
| `gitflash reset --hard` | Same as `reset`, but discard all current changes after confirmation |
|
|
39
|
+
| `gitflash version` | Print the installed version (also `--version`, `-v`) |
|
|
40
|
+
|
|
41
|
+
Run `gitflash help <command>` for details on a command.
|
|
31
42
|
|
|
32
43
|
## Development
|
|
33
44
|
|
|
@@ -37,7 +48,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
37
48
|
|
|
38
49
|
## Contributing
|
|
39
50
|
|
|
40
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
51
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Kleanthismits/git_flash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/Kleanthismits/git_flash/blob/main/CODE_OF_CONDUCT.md).
|
|
41
52
|
|
|
42
53
|
## License
|
|
43
54
|
|
|
@@ -45,4 +56,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
45
56
|
|
|
46
57
|
## Code of Conduct
|
|
47
58
|
|
|
48
|
-
Everyone interacting in the GitFlash project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
59
|
+
Everyone interacting in the GitFlash project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/Kleanthismits/git_flash/blob/main/CODE_OF_CONDUCT.md).
|
data/bin/gitflash
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
checkout:
|
|
2
|
+
short: 'Checkout the selected branch'
|
|
3
|
+
long: |
|
|
4
|
+
Presents a list with all the available local branches.
|
|
5
|
+
|
|
6
|
+
You can use the arrow keys to navigate through the branches.
|
|
7
|
+
Type for quick searching a specific branch.
|
|
8
|
+
Press `enter` to choose and checkout the branch.
|
|
9
|
+
Press `ctrl+c` to cancel the operation.
|
|
10
|
+
|
|
11
|
+
delete:
|
|
12
|
+
short: 'Delete the selected branches'
|
|
13
|
+
long: |
|
|
14
|
+
Presents a list with all the available local branches (without current or main/master).
|
|
15
|
+
|
|
16
|
+
You can use the arrow keys to navigate through the branches.
|
|
17
|
+
Type for quick searching a specific branch.
|
|
18
|
+
Press `space` to choose multiple branches.
|
|
19
|
+
Press `enter` to confirm selection and delete branches.
|
|
20
|
+
Press `ctrl+c` to cancel the operation.
|
|
21
|
+
|
|
22
|
+
reset:
|
|
23
|
+
short: 'Reset your code to the selected commit'
|
|
24
|
+
long: |
|
|
25
|
+
By default performs a mixed reset: your changes are kept as unstaged changes.
|
|
26
|
+
Pass --hard to discard all your current changes.
|
|
27
|
+
|
|
28
|
+
Presents a list with the latest 100 commits of the current branch.
|
|
29
|
+
|
|
30
|
+
You can use the arrow keys to navigate through the commits.
|
|
31
|
+
Type for quick searching a specific commit.
|
|
32
|
+
Press `enter` to confirm selection and reset to that commit.
|
|
33
|
+
Press `ctrl+c` to cancel the operation.
|
data/lib/gitflash/cli.rb
CHANGED
|
@@ -4,41 +4,42 @@ require 'thor'
|
|
|
4
4
|
|
|
5
5
|
module Gitflash
|
|
6
6
|
class Cli < Thor
|
|
7
|
+
extend Configuration::Descriptions
|
|
8
|
+
|
|
7
9
|
def self.exit_on_failure?
|
|
8
10
|
true
|
|
9
11
|
end
|
|
10
12
|
|
|
11
|
-
desc 'checkout',
|
|
12
|
-
long_desc
|
|
13
|
-
|
|
14
|
-
Presents a list with all the available local branches.
|
|
15
|
-
|
|
16
|
-
You can use the arrow keys to navigate through the branches.
|
|
17
|
-
Type for quick searching a specific branch.
|
|
18
|
-
Press `enter` to choose and checkout the branch.
|
|
19
|
-
Press `ctrl+c` to cancel the operation.
|
|
20
|
-
TEXT
|
|
13
|
+
desc 'checkout', descriptions.checkout.short
|
|
14
|
+
long_desc descriptions.checkout.long
|
|
21
15
|
|
|
22
16
|
def checkout
|
|
17
|
+
ensure_git_repo!
|
|
23
18
|
branches? ? checkout_branch : prompt.ok('You only have one branch!')
|
|
24
19
|
end
|
|
25
20
|
|
|
26
|
-
desc 'delete',
|
|
27
|
-
long_desc
|
|
21
|
+
desc 'delete', descriptions.delete.short
|
|
22
|
+
long_desc descriptions.delete.long
|
|
23
|
+
|
|
24
|
+
def delete
|
|
25
|
+
ensure_git_repo!
|
|
26
|
+
branches? ? delete_branch : prompt.ok('You only have one branch!')
|
|
27
|
+
end
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
desc 'reset', descriptions.reset.short
|
|
30
|
+
long_desc descriptions.reset.long
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
option :hard, type: :boolean, default: false, desc: 'Perform a hard reset'
|
|
33
|
+
def reset
|
|
34
|
+
ensure_git_repo!
|
|
35
|
+
commits? ? reset_to_commit : prompt.ok('You only have one commit!')
|
|
36
|
+
end
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
desc 'version', 'Print the gitflash version'
|
|
39
|
+
map %w[--version -v] => :version
|
|
39
40
|
|
|
40
|
-
def
|
|
41
|
-
|
|
41
|
+
def version
|
|
42
|
+
puts VERSION
|
|
42
43
|
end
|
|
43
44
|
|
|
44
45
|
private
|
|
@@ -50,36 +51,69 @@ module Gitflash
|
|
|
50
51
|
**checkout_options
|
|
51
52
|
)
|
|
52
53
|
|
|
53
|
-
git.checkout(selection)
|
|
54
|
+
run_git('checkout') { git.checkout(selection) }
|
|
54
55
|
end
|
|
55
56
|
|
|
56
57
|
def delete_branch
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
branches(options: { master: false, current: false })
|
|
60
|
-
)
|
|
58
|
+
choices = branches(options: { master: false, current: false })
|
|
59
|
+
return prompt.ok('No branches available to delete') if choices.empty?
|
|
61
60
|
|
|
62
|
-
prompt.
|
|
61
|
+
selection = prompt.multi_select('Select branches to delete', choices)
|
|
62
|
+
return prompt.ok('No branches selected') if selection.empty?
|
|
63
|
+
|
|
64
|
+
warning_message = <<~TEXT
|
|
63
65
|
You are about to permanently delete the following branches even if they have unmerged changes:
|
|
64
66
|
|
|
65
67
|
#{selection.map { |br| "* #{br}" }.join("\n")}
|
|
66
68
|
TEXT
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
|
|
70
|
+
proceed_with_warning(warning_message) do
|
|
71
|
+
run_git('delete') { git.delete(selection) }
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def reset_to_commit
|
|
76
|
+
selection = prompt.select('Select a commit to reset to', branch_commits)
|
|
77
|
+
reset_options = { commit_hash: selection, hard: options[:hard] }
|
|
78
|
+
|
|
79
|
+
if options[:hard]
|
|
80
|
+
warning_message = 'You are about to reset your branch and lose all your current changes'
|
|
81
|
+
proceed_with_warning(warning_message) { run_git('reset') { git.reset(**reset_options) } }
|
|
82
|
+
else
|
|
83
|
+
run_git('reset') { git.reset(**reset_options) }
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def proceed_with_warning(message, &)
|
|
88
|
+
result = prompt.proceed_with_warning(message, &)
|
|
89
|
+
puts result if result == 'Exited'
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def run_git(command)
|
|
93
|
+
raise Thor::Error, "git #{command} failed" unless yield
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def ensure_git_repo!
|
|
97
|
+
git.inside_work_tree!
|
|
98
|
+
rescue Git::CommandError
|
|
99
|
+
raise Thor::Error, 'Not a git repository'
|
|
70
100
|
end
|
|
71
101
|
|
|
72
102
|
def branches?
|
|
73
103
|
all_branches && all_branches.size > 1
|
|
74
104
|
end
|
|
75
105
|
|
|
106
|
+
def commits?
|
|
107
|
+
branch_commits && branch_commits.size > 1
|
|
108
|
+
end
|
|
109
|
+
|
|
76
110
|
def prompt
|
|
77
111
|
@prompt ||= Prompt.create
|
|
78
112
|
end
|
|
79
113
|
|
|
80
114
|
def checkout_options
|
|
81
115
|
{}.tap do |opt|
|
|
82
|
-
opt[:default] = current unless current.
|
|
116
|
+
opt[:default] = current unless current.to_s.empty?
|
|
83
117
|
end
|
|
84
118
|
end
|
|
85
119
|
|
|
@@ -95,6 +129,10 @@ module Gitflash
|
|
|
95
129
|
@current ||= git.current_branch
|
|
96
130
|
end
|
|
97
131
|
|
|
132
|
+
def branch_commits
|
|
133
|
+
@branch_commits ||= git.branch_commits
|
|
134
|
+
end
|
|
135
|
+
|
|
98
136
|
def git
|
|
99
137
|
Gitflash::Git::Wrapper
|
|
100
138
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'yaml'
|
|
4
|
+
|
|
5
|
+
module Gitflash
|
|
6
|
+
module Configuration
|
|
7
|
+
module Descriptions
|
|
8
|
+
def descriptions
|
|
9
|
+
@descriptions ||= load_descriptions
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def load_descriptions
|
|
15
|
+
file = File.expand_path('../../command_descriptions.yml', __dir__)
|
|
16
|
+
transform_to_struct(YAML.load_file(file))
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def transform_to_struct(data)
|
|
20
|
+
return data unless data.is_a? Hash
|
|
21
|
+
|
|
22
|
+
keys = data.keys.map(&:to_sym)
|
|
23
|
+
Struct.new(*keys).new(*data.values).tap do |st|
|
|
24
|
+
keys.each do |method|
|
|
25
|
+
st.public_send("#{method}=", transform_to_struct(st.public_send(method)))
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'open3'
|
|
4
|
+
|
|
3
5
|
module Gitflash
|
|
4
6
|
module Git
|
|
5
7
|
class BashCommand
|
|
6
8
|
class << self
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
# Runs a command without a shell and returns its stdout.
|
|
10
|
+
# Raises CommandError when the command exits with a non-zero status.
|
|
11
|
+
def exec(*args)
|
|
12
|
+
stdout, stderr, status = Open3.capture3(*args)
|
|
13
|
+
raise CommandError, "#{args.join(' ')} failed: #{stderr.strip}" unless status.success?
|
|
14
|
+
|
|
15
|
+
stdout
|
|
16
|
+
rescue SystemCallError => e
|
|
17
|
+
raise CommandError, "#{args.join(' ')} failed: #{e.message}"
|
|
9
18
|
end
|
|
10
19
|
|
|
11
|
-
def system_exec(*
|
|
12
|
-
system(*
|
|
20
|
+
def system_exec(*)
|
|
21
|
+
system(*)
|
|
13
22
|
end
|
|
14
23
|
end
|
|
15
24
|
end
|
data/lib/gitflash/git/wrapper.rb
CHANGED
|
@@ -1,52 +1,80 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
module Gitflash
|
|
3
4
|
module Git
|
|
4
5
|
class Wrapper
|
|
5
|
-
|
|
6
|
+
COMMITS_LIMIT = 100
|
|
6
7
|
|
|
7
8
|
class << self
|
|
8
9
|
def local_branches(current: true, master: true)
|
|
9
|
-
formatted_branches
|
|
10
|
-
hidden_branches(current, master).each { |br| branches.delete(br) }
|
|
11
|
-
end
|
|
10
|
+
formatted_branches - hidden_branches(current, master)
|
|
12
11
|
end
|
|
13
12
|
|
|
14
13
|
def all_local_branches
|
|
15
14
|
formatted_branches
|
|
16
15
|
end
|
|
17
16
|
|
|
17
|
+
# Raises CommandError when the working directory is not inside a git repository
|
|
18
|
+
def inside_work_tree!
|
|
19
|
+
output = bash.exec('git', 'rev-parse', '--is-inside-work-tree').strip
|
|
20
|
+
raise CommandError, 'Not inside a git work tree' unless output == 'true'
|
|
21
|
+
end
|
|
22
|
+
|
|
18
23
|
def current_branch
|
|
19
|
-
bash.exec('git branch --show-current').strip
|
|
24
|
+
bash.exec('git', 'branch', '--show-current').strip
|
|
20
25
|
end
|
|
21
26
|
|
|
22
27
|
def checkout(branch)
|
|
23
|
-
bash.system_exec('git', 'checkout', branch)
|
|
28
|
+
bash.system_exec('git', 'checkout', branch, '--')
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def delete(branch)
|
|
32
|
+
bash.system_exec('git', 'branch', '-D', *branch)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def reset(commit_hash:, hard:)
|
|
36
|
+
params = [].tap do |ar|
|
|
37
|
+
ar << '--hard' if hard
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
bash.system_exec('git', 'reset', *params, commit_hash, '--')
|
|
24
41
|
end
|
|
25
42
|
|
|
26
|
-
def
|
|
27
|
-
bash.
|
|
43
|
+
def branch_commits
|
|
44
|
+
commits_string = bash.exec(
|
|
45
|
+
'git', 'log', "--max-count=#{COMMITS_LIMIT}", '--format=%h%x09%s'
|
|
46
|
+
)
|
|
47
|
+
parse_commits(commits_string)
|
|
48
|
+
rescue CommandError
|
|
49
|
+
# `git log` fails on a branch without commits
|
|
50
|
+
{}
|
|
28
51
|
end
|
|
29
52
|
|
|
30
53
|
private
|
|
31
54
|
|
|
55
|
+
def parse_commits(commits_string)
|
|
56
|
+
{}.tap do |hsh|
|
|
57
|
+
commits_string.each_line do |line|
|
|
58
|
+
commit_code, commit_name = line.chomp.split("\t", 2)
|
|
59
|
+
next if commit_code.nil? || commit_code.empty?
|
|
60
|
+
|
|
61
|
+
hsh["#{commit_code} - #{commit_name}"] = commit_code
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
32
66
|
def hidden_branches(current, master)
|
|
33
67
|
[].tap { |hb|
|
|
34
|
-
hb.push('master') unless master
|
|
35
|
-
hb.push('main') unless master
|
|
68
|
+
hb.push('master', 'main') unless master
|
|
36
69
|
hb.push(current_branch) unless current
|
|
37
|
-
}
|
|
70
|
+
}.reject(&:empty?)
|
|
38
71
|
end
|
|
39
72
|
|
|
40
73
|
def formatted_branches
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def raw_branches
|
|
49
|
-
bash.exec('git branch').strip.split("\n").map(&:strip)
|
|
74
|
+
bash.exec('git', 'for-each-ref', '--format=%(refname:short)', 'refs/heads/')
|
|
75
|
+
.split("\n")
|
|
76
|
+
.map(&:strip)
|
|
77
|
+
.reject(&:empty?)
|
|
50
78
|
end
|
|
51
79
|
|
|
52
80
|
def bash
|
data/lib/gitflash/prompt.rb
CHANGED
|
@@ -23,9 +23,15 @@ module Gitflash
|
|
|
23
23
|
super(message, collection, default_select_options(options))
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
def proceed_with_warning(message)
|
|
27
|
+
raise ArgumentError, 'A block is required for this method' unless block_given?
|
|
28
|
+
|
|
29
|
+
warn(message)
|
|
30
|
+
answer = yes?('Do you want to proceed?')
|
|
31
|
+
answer ? yield : 'Exited'
|
|
32
|
+
end
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
private
|
|
29
35
|
|
|
30
36
|
def default_create_options(options)
|
|
31
37
|
{
|
|
@@ -37,7 +43,6 @@ module Gitflash
|
|
|
37
43
|
def default_select_options(options)
|
|
38
44
|
{
|
|
39
45
|
cycle: true,
|
|
40
|
-
per_page: 50,
|
|
41
46
|
filter: true,
|
|
42
47
|
symbols: { marker: '>' }
|
|
43
48
|
}.merge(options)
|
data/lib/gitflash/version.rb
CHANGED
data/lib/gitflash.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,62 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitflash
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kleanthis Mitsioulis
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: thor
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '1.4'
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '2'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '1.4'
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '2'
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: tty-prompt
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - "~>"
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0.23'
|
|
39
|
+
type: :runtime
|
|
40
|
+
prerelease: false
|
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - "~>"
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: '0.23'
|
|
46
|
+
- !ruby/object:Gem::Dependency
|
|
47
|
+
name: zeitwerk
|
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
|
49
|
+
requirements:
|
|
50
|
+
- - "~>"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '2.6'
|
|
53
|
+
type: :runtime
|
|
54
|
+
prerelease: false
|
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
56
|
+
requirements:
|
|
57
|
+
- - "~>"
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: '2.6'
|
|
13
60
|
description: This gem allows you to perform a number of git commands using interactive
|
|
14
61
|
cli prompts
|
|
15
62
|
email:
|
|
@@ -20,14 +67,16 @@ extensions: []
|
|
|
20
67
|
extra_rdoc_files:
|
|
21
68
|
- README.md
|
|
22
69
|
files:
|
|
70
|
+
- CHANGELOG.md
|
|
23
71
|
- LICENSE
|
|
24
72
|
- README.md
|
|
25
|
-
- bin/console
|
|
26
73
|
- bin/gitflash
|
|
27
|
-
-
|
|
74
|
+
- command_descriptions.yml
|
|
28
75
|
- lib/gitflash.rb
|
|
29
76
|
- lib/gitflash/cli.rb
|
|
77
|
+
- lib/gitflash/configuration.rb
|
|
30
78
|
- lib/gitflash/git/bash_command.rb
|
|
79
|
+
- lib/gitflash/git/command_error.rb
|
|
31
80
|
- lib/gitflash/git/wrapper.rb
|
|
32
81
|
- lib/gitflash/prompt.rb
|
|
33
82
|
- lib/gitflash/version.rb
|
|
@@ -35,11 +84,9 @@ homepage: https://github.com/Kleanthismits/git_flash
|
|
|
35
84
|
licenses:
|
|
36
85
|
- MIT
|
|
37
86
|
metadata:
|
|
38
|
-
homepage_uri: https://github.com/Kleanthismits/git_flash
|
|
39
87
|
source_code_uri: https://github.com/Kleanthismits/git_flash
|
|
40
88
|
changelog_uri: https://github.com/Kleanthismits/git_flash/blob/main/CHANGELOG.md
|
|
41
89
|
rubygems_mfa_required: 'true'
|
|
42
|
-
post_install_message:
|
|
43
90
|
rdoc_options: []
|
|
44
91
|
require_paths:
|
|
45
92
|
- lib
|
|
@@ -47,15 +94,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
47
94
|
requirements:
|
|
48
95
|
- - ">="
|
|
49
96
|
- !ruby/object:Gem::Version
|
|
50
|
-
version:
|
|
97
|
+
version: '3.3'
|
|
51
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
99
|
requirements:
|
|
53
|
-
- - "
|
|
100
|
+
- - ">="
|
|
54
101
|
- !ruby/object:Gem::Version
|
|
55
|
-
version:
|
|
102
|
+
version: '0'
|
|
56
103
|
requirements: []
|
|
57
|
-
rubygems_version: 3.2
|
|
58
|
-
signing_key:
|
|
104
|
+
rubygems_version: 3.7.2
|
|
59
105
|
specification_version: 4
|
|
60
106
|
summary: Simplified usage of some git cli commands
|
|
61
107
|
test_files: []
|
data/bin/console
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require 'bundler/setup'
|
|
5
|
-
require 'gitflash'
|
|
6
|
-
|
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
-
|
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
-
# require "pry"
|
|
12
|
-
# Pry.start
|
|
13
|
-
|
|
14
|
-
require 'irb'
|
|
15
|
-
IRB.start(__FILE__)
|