wipit 0.0.2 → 0.1.0

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,11 +24,9 @@ module Wipit
24
24
  end
25
25
 
26
26
  def build(options={})
27
- deleted_files = %x[ git ls-files --deleted ]
28
27
  @command = ''
29
28
  @command << "git checkout -b #{options[:branch]} && " unless options[:branch].empty?
30
- @command << "git add ."
31
- @command << " && git rm $(git ls-files --deleted)" unless deleted_files.empty?
29
+ @command << "git add -A"
32
30
  @command << " && git commit -m 'WIP'"
33
31
  @command << " && git push origin #{options[:branch]}" unless options[:branch].empty? || options[:push] != true
34
32
  @command
@@ -1,3 +1,3 @@
1
1
  module Wipit
2
- VERSION = '0.0.2'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -1,6 +1,5 @@
1
1
  $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
2
2
  require 'test/unit'
3
- require 'util_capture'
4
3
  require 'wipit'
5
4
 
6
5
  class Test::Unit::TestCase
@@ -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 commit -m 'WIP'"
7
+ assert_command '', "git add -A && 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 commit -m 'WIP'"
11
+ assert_command 'my_branch', "git checkout -b my_branch && git add -A && 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 commit -m 'WIP'"
15
+ assert_command 'my_branch my_branch2', "git checkout -b my_branch2 && git add -A && 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 commit -m 'WIP' && git push origin my_branch"
19
+ assert_command 'my_branch -p', "git checkout -b my_branch && git add -A && 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 commit -m 'WIP' && git push origin my_branch"
23
+ assert_command '-p my_branch', "git checkout -b my_branch && git add -A && 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 commit -m 'WIP'"
27
+ assert_command '-p', "git add -A && git commit -m 'WIP'"
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,33 +1,29 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: wipit
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 2
10
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - John Thomas Marino
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-04-29 00:00:00 -04:00
19
- default_executable:
12
+ date: 2011-08-16 00:00:00.000000000Z
20
13
  dependencies: []
21
-
22
- description: "\n Save your work.\n\n $ wipit\n > git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'\n\n Save your work to a topic branch.\n\n $ wipit my_wip_branch\n > git checkout -b my_wip_branch && git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'\n\n Save your work to a topic branch and push to origin.\n\n $ wipit my_wip_branch -p\n > git checkout -b my_wip_branch && git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP' && git push origin my_wip_branch\n "
14
+ description: ! "\n Save your work.\n\n $ wipit\n > git add . && git
15
+ rm $(git ls-files --deleted) && git commit -m 'WIP'\n\n Save your work to a topic
16
+ branch.\n\n $ wipit my_wip_branch\n > git checkout -b my_wip_branch
17
+ && git add . && git rm $(git ls-files --deleted) && git commit -m 'WIP'\n\n Save
18
+ your work to a topic branch and push to origin.\n\n $ wipit my_wip_branch
19
+ -p\n > git checkout -b my_wip_branch && git add . && git rm $(git ls-files
20
+ --deleted) && git commit -m 'WIP' && git push origin my_wip_branch\n "
23
21
  email: writejm@gmail.com
24
- executables:
22
+ executables:
25
23
  - wipit
26
24
  extensions: []
27
-
28
25
  extra_rdoc_files: []
29
-
30
- files:
26
+ files:
31
27
  - README.md
32
28
  - Rakefile
33
29
  - LICENSE
@@ -35,41 +31,30 @@ files:
35
31
  - lib/wipit.rb
36
32
  - bin/wipit
37
33
  - test/helper.rb
38
- - test/util_capture.rb
39
34
  - test/wipit_test.rb
40
- has_rdoc: true
41
35
  homepage: http://github.com/johmas/wipit
42
36
  licenses: []
43
-
44
37
  post_install_message:
45
38
  rdoc_options: []
46
-
47
- require_paths:
39
+ require_paths:
48
40
  - lib
49
- required_ruby_version: !ruby/object:Gem::Requirement
41
+ required_ruby_version: !ruby/object:Gem::Requirement
50
42
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
58
- required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
48
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- hash: 3
64
- segments:
65
- - 0
66
- version: "0"
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
67
53
  requirements: []
68
-
69
54
  rubyforge_project: wipit
70
- rubygems_version: 1.3.7
55
+ rubygems_version: 1.8.6
71
56
  signing_key:
72
57
  specification_version: 3
73
- summary: wipit is a command line utility for git that makes it easier to save work in progress.
58
+ summary: wipit is a command line utility for git that makes it easier to save work
59
+ in progress.
74
60
  test_files: []
75
-
@@ -1,13 +0,0 @@
1
- require 'stringio'
2
-
3
- module Kernel
4
-
5
- def capture_stdout
6
- out = StringIO.new
7
- $stdout = out
8
- yield
9
- return out
10
- ensure
11
- $stdout = STDOUT
12
- end
13
- end