gx 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,17 @@
1
+ === 1.1.0 / 2001-04-02
2
+
3
+ * 1 mega enhancement
4
+
5
+ * Spinner to indicate fetchitude status
6
+
7
+ * 1 sharktopus enhancement
8
+
9
+ * -c to use 'hub compare' rather than the normal diffstat
10
+
11
+ * 1 bodacious enhancement
12
+
13
+ * defunkt now a regular contributor
14
+
1
15
  === 1.0.0 / 2011-03-22
2
16
 
3
17
  * 1 major enhancement
@@ -1,4 +1,3 @@
1
- .autotest
2
1
  History.txt
3
2
  Manifest.txt
4
3
  README.txt
@@ -7,4 +6,3 @@ bin/gx-publish
7
6
  bin/gx-update
8
7
  lib/gx.rb
9
8
  lib/gx/enhance.rb
10
- test/test_gx.rb
@@ -21,6 +21,10 @@ op = OptionParser.new do |o|
21
21
  opts.verbose = true
22
22
  end
23
23
 
24
+ o.on "-c", "--compare", "Use hub's compare instead of diffstats" do
25
+ opts.compare = true
26
+ end
27
+
24
28
  o.on "--debug", "Show all git commands run" do
25
29
  Grit.debug = true
26
30
  end
@@ -87,12 +91,31 @@ co[N]flict Set the contents of the file to contain the merged between the
87
91
 
88
92
  def fetch
89
93
  print "Fetching new commits: "
90
- out = @repo.git.fetch :timeout => false
94
+ out = nil
95
+ spinner do
96
+ out = @repo.git.fetch :timeout => false
97
+ end
91
98
  puts "done."
92
99
 
93
100
  # TODO parse +out+ for details to show the user.
94
101
  end
95
102
 
103
+ # from http://ruby.about.com/od/tasks/f/spinner.htm
104
+ def spinner(&block)
105
+ chars = %w{ | / - \\ }
106
+
107
+ t = Thread.new(&block)
108
+ while t.alive?
109
+ print chars[0]
110
+ sleep 0.1
111
+ print "\b"
112
+
113
+ chars.push chars.shift
114
+ end
115
+
116
+ t.join
117
+ end
118
+
96
119
  def includes_conflict_markers?(path)
97
120
  /^<<<<<<< HEAD/.match(File.read(path))
98
121
  end
@@ -361,7 +384,11 @@ co[N]flict Set the contents of the file to contain the merged between the
361
384
  puts
362
385
 
363
386
  unless @opts.quiet
364
- system "git diff --stat #{@common}..#{@origin}"
387
+ if @opts.compare
388
+ system "hub compare #{@common[0,7]}...#{@origin[0,7]}"
389
+ else
390
+ system "git diff --stat #{@common}..#{@origin}"
391
+ end
365
392
  end
366
393
 
367
394
  end
data/lib/gx.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Gx
2
- VERSION = '1.0.1'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 0
9
8
  - 1
10
- version: 1.0.1
9
+ - 0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Evan Phoenix
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-22 00:00:00 -07:00
18
+ date: 2011-04-02 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -66,7 +66,6 @@ extra_rdoc_files:
66
66
  - Manifest.txt
67
67
  - README.txt
68
68
  files:
69
- - .autotest
70
69
  - History.txt
71
70
  - Manifest.txt
72
71
  - README.txt
@@ -75,8 +74,6 @@ files:
75
74
  - bin/gx-update
76
75
  - lib/gx.rb
77
76
  - lib/gx/enhance.rb
78
- - test/test_gx.rb
79
- - .gemtest
80
77
  has_rdoc: true
81
78
  homepage: http://github.com/evanphx/gx
82
79
  licenses: []
@@ -112,5 +109,5 @@ rubygems_version: 1.6.2
112
109
  signing_key:
113
110
  specification_version: 3
114
111
  summary: "Gx is 2 git related tools: gx-update and gx-publish"
115
- test_files:
116
- - test/test_gx.rb
112
+ test_files: []
113
+
data/.autotest DELETED
@@ -1,23 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require 'autotest/restart'
4
-
5
- # Autotest.add_hook :initialize do |at|
6
- # at.extra_files << "../some/external/dependency.rb"
7
- #
8
- # at.libs << ":../some/external"
9
- #
10
- # at.add_exception 'vendor'
11
- #
12
- # at.add_mapping(/dependency.rb/) do |f, _|
13
- # at.files_matching(/test_.*rb$/)
14
- # end
15
- #
16
- # %w(TestA TestB).each do |klass|
17
- # at.extra_class_map[klass] = "test/test_misc.rb"
18
- # end
19
- # end
20
-
21
- # Autotest.add_hook :run_command do |at|
22
- # system "rake build"
23
- # end
data/.gemtest DELETED
File without changes
@@ -1,8 +0,0 @@
1
- require "test/unit"
2
- require "gx"
3
-
4
- class TestGx < Test::Unit::TestCase
5
- def test_sanity
6
- flunk "write tests or I will kneecap you"
7
- end
8
- end