git_snip 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/git_snip/cli.rb +6 -2
- data/lib/git_snip/version.rb +1 -1
- data/spec/lib/git_snip/cli_spec.rb +13 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bb29f4ae9f8cbad6ba7e9b712f462a1ff4868f6
|
4
|
+
data.tar.gz: 2fd15eef40fac8e8d4ca021f72b5ab13ac49b72b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbfd6dfce8772031e32020ec52c16462360a1e4173c9d339e9f07e9142907fec8f0dfd6be210d2dc80efed8a6268986b51633ce59b492184a67ff37858281166
|
7
|
+
data.tar.gz: e8273c8d9267ed225c84ba0c503fed2aca6275703746fe96a43a7d27ce701a889b5a6b78ee1ea076be4007b7a6aa67b3e1cb9c4017a9caea6438532395f0b898
|
data/CHANGELOG.md
ADDED
data/lib/git_snip/cli.rb
CHANGED
@@ -31,7 +31,7 @@ module GitSnip
|
|
31
31
|
exit 64
|
32
32
|
end
|
33
33
|
|
34
|
-
cleaner = GitSnip::Cleaner.new(*
|
34
|
+
cleaner = GitSnip::Cleaner.new(*cleaner_args)
|
35
35
|
|
36
36
|
say 'Deleting the following branches...', :green
|
37
37
|
say
|
@@ -52,7 +52,7 @@ module GitSnip
|
|
52
52
|
private
|
53
53
|
|
54
54
|
def dry_run
|
55
|
-
cleaner = GitSnip::Cleaner.new(
|
55
|
+
cleaner = GitSnip::Cleaner.new(*cleaner_args)
|
56
56
|
|
57
57
|
say 'Would delete the following branches...', :green
|
58
58
|
say
|
@@ -81,5 +81,9 @@ module GitSnip
|
|
81
81
|
def column(string, width, last: false)
|
82
82
|
string[0, width].ljust(last ? width : width + 1)
|
83
83
|
end
|
84
|
+
|
85
|
+
def cleaner_args
|
86
|
+
options.values_at(:repo, :target, :ignore)
|
87
|
+
end
|
84
88
|
end
|
85
89
|
end
|
data/lib/git_snip/version.rb
CHANGED
@@ -71,6 +71,19 @@ RSpec.describe GitSnip::CLI do
|
|
71
71
|
|
72
72
|
expect(exitstatus).to eq(0)
|
73
73
|
end
|
74
|
+
|
75
|
+
it 'should not list ignored branches' do
|
76
|
+
setup_basic_repo
|
77
|
+
|
78
|
+
stdout, _, exitstatus = git_snip("--dry-run --ignore=merged")
|
79
|
+
|
80
|
+
expect(stdout).to eq(
|
81
|
+
"Would delete the following branches...\n\n" \
|
82
|
+
"No branches would be deleted.\n"
|
83
|
+
)
|
84
|
+
|
85
|
+
expect(exitstatus).to eq(0)
|
86
|
+
end
|
74
87
|
end
|
75
88
|
|
76
89
|
describe 'with --target' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_snip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hendy Tanata
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- ".gitignore"
|
92
92
|
- ".rspec"
|
93
93
|
- ".travis.yml"
|
94
|
+
- CHANGELOG.md
|
94
95
|
- Gemfile
|
95
96
|
- LICENSE.txt
|
96
97
|
- README.md
|