git_helper 3.6.2 → 3.6.3

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: 64c4ad9b8acf74b29b341f534243721f4bf168d1d15c524e052a201b867e9c6d
4
- data.tar.gz: '01228b5f41daa653e47e11a33f5cde747edfc795759ab5b7c0b474d655538431'
3
+ metadata.gz: 7e0efd69de26cab869fc579da3011c6958b2491913cca1e0ec061f33a6890e91
4
+ data.tar.gz: e942b0e9b503de7d33090ce6be10b197df033fffe80b401a837c4ce62195b186
5
5
  SHA512:
6
- metadata.gz: 90f31e2053f842aaa9a536de4a79c9e2e066fd08c8703367520b2728e39a3b9aa88374230fbc2211993c709077cc573272e2e79dc996d5009dbdd864986c0541
7
- data.tar.gz: e683017056105ba89126467da7cea039ee7c0d88350f8971ed0e130d85fcc0e2ea383600e7e88c01806d68540e2183bb5e30f6a8130d9fbabdce4bcbba545ab8
6
+ metadata.gz: 30472648379bc818e9b54f15b25948e7f5cc64e0a0cb349724a8ae9f1df8e0642d1daac1df3ff4669334d162370d3a7f78c57df16574fb89c9cc2b5d48963a1c
7
+ data.tar.gz: 69d48ba584a596249b41b91f0cb6828af7fca255a13c123d84bc24071ed2de5cfda8cac0777050002f68e63f8e4608322924f1baae288693bd5f12cb030f4930
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_helper (3.6.1.pre.test)
4
+ git_helper (3.6.3)
5
5
  gli (~> 2.13)
6
6
  highline_wrapper (~> 1.1)
7
7
 
@@ -10,9 +10,9 @@ GEM
10
10
  specs:
11
11
  ast (2.4.2)
12
12
  coderay (1.1.3)
13
- concurrent-ruby (1.1.10)
13
+ concurrent-ruby (1.2.0)
14
14
  diff-lcs (1.5.0)
15
- faker (3.0.0)
15
+ faker (3.1.1)
16
16
  i18n (>= 1.8.11, < 2)
17
17
  ffi (1.15.5)
18
18
  formatador (1.1.0)
@@ -31,13 +31,13 @@ GEM
31
31
  guard (~> 2.1)
32
32
  guard-compat (~> 1.1)
33
33
  rspec (>= 2.99.0, < 4.0)
34
- highline (2.0.3)
34
+ highline (2.1.0)
35
35
  highline_wrapper (1.3.1)
36
36
  highline (~> 2.0)
37
37
  i18n (1.12.0)
38
38
  concurrent-ruby (~> 1.0)
39
39
  json (2.6.3)
40
- listen (3.7.1)
40
+ listen (3.8.0)
41
41
  rb-fsevent (~> 0.10, >= 0.10.3)
42
42
  rb-inotify (~> 0.9, >= 0.9.10)
43
43
  lumberjack (1.2.8)
@@ -47,46 +47,46 @@ GEM
47
47
  nenv (~> 0.1)
48
48
  shellany (~> 0.0)
49
49
  parallel (1.22.1)
50
- parser (3.1.3.0)
50
+ parser (3.2.1.0)
51
51
  ast (~> 2.4.1)
52
- pry (0.14.1)
52
+ pry (0.14.2)
53
53
  coderay (~> 1.1)
54
54
  method_source (~> 1.0)
55
55
  rainbow (3.1.1)
56
56
  rb-fsevent (0.11.2)
57
57
  rb-inotify (0.10.1)
58
58
  ffi (~> 1.0)
59
- regexp_parser (2.6.1)
59
+ regexp_parser (2.7.0)
60
60
  rexml (3.2.5)
61
61
  rspec (3.12.0)
62
62
  rspec-core (~> 3.12.0)
63
63
  rspec-expectations (~> 3.12.0)
64
64
  rspec-mocks (~> 3.12.0)
65
- rspec-core (3.12.0)
65
+ rspec-core (3.12.1)
66
66
  rspec-support (~> 3.12.0)
67
- rspec-expectations (3.12.1)
67
+ rspec-expectations (3.12.2)
68
68
  diff-lcs (>= 1.2.0, < 2.0)
69
69
  rspec-support (~> 3.12.0)
70
- rspec-mocks (3.12.1)
70
+ rspec-mocks (3.12.3)
71
71
  diff-lcs (>= 1.2.0, < 2.0)
72
72
  rspec-support (~> 3.12.0)
73
73
  rspec-support (3.12.0)
74
- rubocop (1.40.0)
74
+ rubocop (1.45.1)
75
75
  json (~> 2.3)
76
76
  parallel (~> 1.10)
77
- parser (>= 3.1.2.1)
77
+ parser (>= 3.2.0.0)
78
78
  rainbow (>= 2.2.2, < 4.0)
79
79
  regexp_parser (>= 1.8, < 3.0)
80
80
  rexml (>= 3.2.5, < 4.0)
81
- rubocop-ast (>= 1.23.0, < 2.0)
81
+ rubocop-ast (>= 1.24.1, < 2.0)
82
82
  ruby-progressbar (~> 1.7)
83
- unicode-display_width (>= 1.4.0, < 3.0)
84
- rubocop-ast (1.24.0)
83
+ unicode-display_width (>= 2.4.0, < 3.0)
84
+ rubocop-ast (1.24.1)
85
85
  parser (>= 3.1.1.0)
86
86
  ruby-progressbar (1.11.0)
87
87
  shellany (0.0.1)
88
88
  thor (1.2.1)
89
- unicode-display_width (2.3.0)
89
+ unicode-display_width (2.4.2)
90
90
 
91
91
  PLATFORMS
92
92
  arm64-darwin-21
@@ -102,4 +102,4 @@ DEPENDENCIES
102
102
  rubocop (~> 1.10)
103
103
 
104
104
  BUNDLED WITH
105
- 2.3.26
105
+ 2.4.6
data/README.md CHANGED
@@ -6,32 +6,37 @@
6
6
  gem install git_helper
7
7
  ```
8
8
 
9
- Some of the commands in this gem can be used without any additional configuration. However, others utilize special GitHub or GitLab configuration. To provide access tokens for this, create a `~/.git_helper/config.yml` file. The contents should look like this:
10
-
11
- ```
12
- :github_user: GITHUB-USERNAME
13
- :github_token: GITHUB-TOKEN
14
- :gitlab_user: GITLAB-USERNAME
15
- :gitlab_token: GITLAB-TOKEN
16
- ```
17
-
18
- To create or see what access tokens you have, look [here for GitHub personal access tokens](https://github.com/settings/tokens) and [here for GitLab access tokens](https://gitlab.com/profile/personal_access_tokens). You could either have one set of tokens for each computer you use, or just have one set of tokens for all computers that you rotate periodically.
19
-
20
9
  Once the gem is installed, run this to view the help screen:
10
+
21
11
  ```bash
22
12
  git-helper --help
23
13
  ```
24
14
 
25
- To see what version of git_helper you're running, run:
15
+ To see what version of Git Helper you're running, run:
16
+
26
17
  ```bash
27
18
  git-helper --version
28
19
  ```
29
20
 
30
- To help you create the `~/.git_helper/config.yml` file and set up the plugins (see below), run this command and allow the command to walk you through the prompts:
21
+ Some of the commands in this gem can be used without any additional configuration. However, others utilize special GitHub or GitLab configuration. To set up access with GitHub/GitLab, run:
22
+
31
23
  ```bash
32
24
  git-helper setup
33
25
  ```
34
26
 
27
+ This will give you the option to set up credentials at GitHub and/or GitLab, as well as give you the choice to set up Git Helper as a plugin or not (see below).
28
+
29
+ The final result will be a `~/.git_helper/config.yml` file with the contents in this form:
30
+
31
+ ```
32
+ :github_user: GITHUB-USERNAME
33
+ :github_token: GITHUB-TOKEN
34
+ :gitlab_user: GITLAB-USERNAME
35
+ :gitlab_token: GITLAB-TOKEN
36
+ ```
37
+
38
+ To create or see what access tokens you have, look [here for GitHub personal access tokens](https://github.com/settings/tokens) and [here for GitLab access tokens](https://gitlab.com/profile/personal_access_tokens). You could either have one set of tokens for each computer you use, or just have one set of tokens for all computers that you rotate periodically.
39
+
35
40
  ## Plugin Usage
36
41
 
37
42
  As an additional option, you can set each of the following commands to be a git plugin, meaning you can call them in a way that feels even more git-native:
@@ -42,21 +47,12 @@ git-helper clean-branches git clean-branches
42
47
  git-helper code-request git code-request
43
48
  ```
44
49
 
45
- To do this, download the `plugins.zip` file in the root of this directory. Unzip and place the contents in the appropriate location:
50
+ Running the `setup` command will give you the option to set this up:
46
51
 
47
52
  ```bash
48
- mkdir ~/.git_helper
49
- unzip path/to/downloaded/plugins.zip -d ~/.git_helper
50
- ```
51
-
52
- Now, the plugins will live in `~/.git_helper/plugins/*`. Add the following line to your `~/.bash_profile`:
53
-
54
- ```bash
55
- export PATH=/path/to/computer/home/.git_helper/plugins:$PATH
53
+ git-helper setup
56
54
  ```
57
55
 
58
- And then run `source ~/.bash_profile`.
59
-
60
56
  ## Alias Usage
61
57
 
62
58
  To make the commands even shorter, I recommend setting aliases. You can either set aliases through git itself, like this (only possible if you also use the plugin option):
@@ -67,7 +63,7 @@ git config --global alias.nb new-branch
67
63
 
68
64
  And then running `git nb` maps to `git new-branch`, which through the plugin, maps to `git-helper new-branch`.
69
65
 
70
- Or you can set the alias through your `~/.bashrc` (which is my preferred method because it can make the command even shorter, and doesn't require the plugin usage). To do this, add lines like this to the `~/.bashrc` file and run `source ~/.bashrc`:
66
+ Or you can set the alias through your `~/.zshrc` (which is my preferred method because it can make the command even shorter, and doesn't require the plugin usage). To do this, add lines like this to the `~/.zshrc` file and run `source ~/.zshrc`:
71
67
 
72
68
  ```bash
73
69
  alias gnb="git new-branch"
@@ -19,7 +19,7 @@ module GitHelper
19
19
  end
20
20
 
21
21
  def git_config_file_path
22
- "#{Dir.pwd.scan(%r{\A/\w*/\w*/}).first}.git_helper/config.yml"
22
+ "#{Dir.home}/.git_helper/config.yml"
23
23
  end
24
24
 
25
25
  private def config_file
@@ -32,14 +32,15 @@ module GitHelper
32
32
  return unless answer
33
33
 
34
34
  create_or_update_plugin_files
35
- puts "\nNow add this line to your ~/.bash_profile:\n " \
36
- 'export PATH=/path/to/computer/home/.git_helper/plugins:$PATH'
35
+ puts "\nNow add this line to your ~/.zshrc:\n " \
36
+ 'export PATH="$HOME/.git_helper/plugins:$PATH"'
37
37
  puts "\nDone!"
38
38
  end
39
39
 
40
40
  private def create_or_update_config_file
41
41
  contents = generate_file_contents
42
42
  puts "Creating or updating your #{config_file} file..."
43
+ FileUtils.mkdir_p("#{Dir.home}/.git_helper")
43
44
  File.open(config_file, 'w') { |file| file.puts contents }
44
45
  puts "\nDone!\n\n"
45
46
  end
@@ -82,7 +83,7 @@ module GitHelper
82
83
 
83
84
  # rubocop:disable Metrics/MethodLength
84
85
  private def create_or_update_plugin_files
85
- plugins_dir = "#{Dir.pwd.scan(%r{\A/\w*/\w*/}).first}.git_helper/plugins"
86
+ plugins_dir = "#{Dir.home}/.git_helper/plugins"
86
87
  plugins_url = 'https://api.github.com/repos/emmahsax/git_helper/contents/plugins'
87
88
  header = 'Accept: application/vnd.github.v3.raw'
88
89
  token = git_config_reader.github_token
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitHelper
4
- VERSION = '3.6.2'
4
+ VERSION = '3.6.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emma Sax
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2023-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  - !ruby/object:Gem::Version
176
176
  version: '0'
177
177
  requirements: []
178
- rubygems_version: 3.3.26
178
+ rubygems_version: 3.4.6
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: A set of GitHub and GitLab workflow scripts