git-trim 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +3 -3
- data/git-trim.gemspec +1 -1
- data/lib/git-trim/version.rb +1 -1
- data/lib/git-trim.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92db4c11447a62f7967f2beb14992824322cdc245c6cc9caba0289c5c7e19874
|
4
|
+
data.tar.gz: 5a87497a2f3dd09195ae8991336eec680d78e06c26af9fd5bc3ea0ff32a949d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6059a21f04dad9126aef59197ae5ad37f9b2574df92028272aa982b36255295eea1ab82e819a63a64fba09df14c4ef2531e7c7e57a90cc748ec099a9d30b006
|
7
|
+
data.tar.gz: eb23ae147a5d2c5ce5eb5648d7c7cfd71050b5227d1732bb7ee53d0fce5b38f551c8254d374930d5fda429fc00b912530079a194ac758059193b8db4b8dc56e2
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
git-trim (0.1.
|
4
|
+
git-trim (0.1.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
diff-lcs (1.3)
|
10
|
-
rake (
|
10
|
+
rake (13.0.1)
|
11
11
|
rspec (3.7.0)
|
12
12
|
rspec-core (~> 3.7.0)
|
13
13
|
rspec-expectations (~> 3.7.0)
|
@@ -28,8 +28,8 @@ PLATFORMS
|
|
28
28
|
DEPENDENCIES
|
29
29
|
bundler (~> 1.16)
|
30
30
|
git-trim!
|
31
|
-
rake (~>
|
31
|
+
rake (~> 13.0)
|
32
32
|
rspec (~> 3.0)
|
33
33
|
|
34
34
|
BUNDLED WITH
|
35
|
-
1.
|
35
|
+
1.17.3
|
data/README.md
CHANGED
@@ -22,12 +22,12 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
You can call `git trim` and it will remove any branch that isn't currently merged into the current branch that isn't also in the `.git-protected-branches` file. It will not remove the
|
25
|
+
You can call `git trim` and it will remove any branch that isn't currently merged into the current branch that isn't also in the `.git-protected-branches` file. It will not remove the main branch.
|
26
26
|
|
27
27
|
The `.git-protected-branches` file can reside in the current directory or any parent directory. Branch names are each listed on a line in the file. For example:
|
28
28
|
|
29
29
|
```
|
30
|
-
|
30
|
+
main
|
31
31
|
staging
|
32
32
|
production
|
33
33
|
```
|
@@ -42,4 +42,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
42
42
|
|
43
43
|
## Code of Conduct
|
44
44
|
|
45
|
-
Everyone interacting in the Git::Trim project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/git-trim/blob/
|
45
|
+
Everyone interacting in the Git::Trim project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/git-trim/blob/main/CODE_OF_CONDUCT.md).
|
data/git-trim.gemspec
CHANGED
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.require_paths = ["lib", "bin"]
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.16"
|
27
|
-
spec.add_development_dependency "rake", "~>
|
27
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
28
28
|
spec.add_development_dependency "rspec", "~> 3.0"
|
29
29
|
end
|
data/lib/git-trim/version.rb
CHANGED
data/lib/git-trim.rb
CHANGED
@@ -8,9 +8,9 @@ class GitTrim
|
|
8
8
|
protected_branches = File.read(".git-protected-branches").split("\n")
|
9
9
|
end
|
10
10
|
protected_branches ||= []
|
11
|
-
protected_branches << "
|
11
|
+
protected_branches << "main"
|
12
12
|
|
13
|
-
branches = %x{git branch --merged
|
13
|
+
branches = %x{git branch --merged main}.split("\n").collect {|b| b.gsub('*', '').strip}
|
14
14
|
branches -= protected_branches
|
15
15
|
|
16
16
|
branches.each do |branch|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-trim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Petersen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.7.6
|
98
|
+
rubygems_version: 2.7.6.2
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: A script to remove all merged branches that aren't protected.
|