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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ea4050b440a57f8d76d85e7e081a3c230050ed5
4
- data.tar.gz: e94b7f0907f250010472046df33b11967fa0c394
3
+ metadata.gz: 7bb29f4ae9f8cbad6ba7e9b712f462a1ff4868f6
4
+ data.tar.gz: 2fd15eef40fac8e8d4ca021f72b5ab13ac49b72b
5
5
  SHA512:
6
- metadata.gz: 70c88fa8d37b1a75a47b09430c87f91edc2ac7ae77cca6e8248528ef7ba6d50aaeb4c6b837cacad982d6d70c5c2a3f3195790425eb716336cb6b07d14478de81
7
- data.tar.gz: 0275de4c4e7a742a74b7e95980bcd79c1a60a03a52d84e736a2bd65c938066ff48e764da4405c84fd86114e7939ca95f9aa5b3c61851f3dbf6527f76e3d5be70
6
+ metadata.gz: bbfd6dfce8772031e32020ec52c16462360a1e4173c9d339e9f07e9142907fec8f0dfd6be210d2dc80efed8a6268986b51633ce59b492184a67ff37858281166
7
+ data.tar.gz: e8273c8d9267ed225c84ba0c503fed2aca6275703746fe96a43a7d27ce701a889b5a6b78ee1ea076be4007b7a6aa67b3e1cb9c4017a9caea6438532395f0b898
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ## master (unreleased)
2
+
3
+ ## 0.0.2
4
+
5
+ * Fix: dry-run doesn't take ignore argument.
6
+
7
+ ## 0.0.1
8
+
9
+ * Initial release.
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(*options.values_at(:repo, :target, :ignore))
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(options[:repo], options[:target])
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
@@ -1,3 +1,3 @@
1
1
  module GitSnip
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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.1
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