wipit 0.0.1 → 0.0.2

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.
@@ -24,9 +24,12 @@ module Wipit
24
24
  end
25
25
 
26
26
  def build(options={})
27
+ deleted_files = %x[ git ls-files --deleted ]
27
28
  @command = ''
28
29
  @command << "git checkout -b #{options[:branch]} && " unless options[:branch].empty?
29
- @command << "git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'"
30
+ @command << "git add ."
31
+ @command << " && git rm $(git ls-files --deleted)" unless deleted_files.empty?
32
+ @command << " && git commit -m 'WIP'"
30
33
  @command << " && git push origin #{options[:branch]}" unless options[:branch].empty? || options[:push] != true
31
34
  @command
32
35
  end
@@ -1,3 +1,3 @@
1
1
  module Wipit
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
@@ -4,26 +4,26 @@ require 'helper'
4
4
  class WipitTest < Test::Unit::TestCase
5
5
 
6
6
  def test_basic_run
7
- assert_command '', "git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'"
7
+ assert_command '', "git add . && git commit -m 'WIP'"
8
8
  end
9
9
 
10
10
  def test_branch_run
11
- assert_command 'my_branch', "git checkout -b my_branch && git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'"
11
+ assert_command 'my_branch', "git checkout -b my_branch && git add . && git commit -m 'WIP'"
12
12
  end
13
13
 
14
14
  def test_two_branches_run
15
- assert_command 'my_branch my_branch2', "git checkout -b my_branch2 && git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'"
15
+ assert_command 'my_branch my_branch2', "git checkout -b my_branch2 && git add . && git commit -m 'WIP'"
16
16
  end
17
17
 
18
18
  def test_branch_push_run
19
- assert_command 'my_branch -p', "git checkout -b my_branch && git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP' && git push origin my_branch"
19
+ assert_command 'my_branch -p', "git checkout -b my_branch && git add . && git commit -m 'WIP' && git push origin my_branch"
20
20
  end
21
21
 
22
22
  def test_push_branch_run
23
- assert_command '-p my_branch', "git checkout -b my_branch && git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP' && git push origin my_branch"
23
+ assert_command '-p my_branch', "git checkout -b my_branch && git add . && git commit -m 'WIP' && git push origin my_branch"
24
24
  end
25
25
 
26
26
  def test_push_run
27
- assert_command '-p', "git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'"
27
+ assert_command '-p', "git add . && git commit -m 'WIP'"
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wipit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Thomas Marino