gitnext 0.1.1 → 0.1.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.
@@ -1,7 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'gitnext'
3
- s.version = '0.1.1'
4
- s.summary = 'Simple method to move forward or backwards through a git repo'
3
+ s.version = '0.1.2'
4
+ s.summary = 'Use next or previous to navigate through a git repository'
5
+ s.description = "A simple command line tool to use when doing presentations."
5
6
  s.platform = Gem::Platform::RUBY
6
7
  s.authors = ["Nigel"]
7
8
  s.email = ["nigelr@brisbanerails.com"]
@@ -83,7 +83,7 @@ class GitNext
83
83
  end
84
84
 
85
85
  def self.go_to position
86
- @git.checkout "master#{"~#{position}" if position > 0}", "--force"
86
+ `git checkout master~#{position} --force > /dev/null 2>&1`
87
87
  config_save_position position
88
88
  end
89
89
  end
@@ -61,9 +61,19 @@ describe GitNext do
61
61
  it("should create have value of 4") { File.read(gitnext_config).should == "3" }
62
62
  end
63
63
  context "after gitnext initialised" do
64
- before { GitNext.run sample_dir }
65
- it("should go to next version") { File.read(file_1).should == "b" }
66
- it("config should have 2") { File.read(gitnext_config).should == "2" }
64
+ context "clean repo" do
65
+ before { GitNext.run sample_dir }
66
+ it("should go to next version") { File.read(file_1).should == "b" }
67
+ it("config should have 2") { File.read(gitnext_config).should == "2" }
68
+ end
69
+ context "dirty repo" do
70
+ before do
71
+ File.open(file_1, "w") { |f| f.write "1" }
72
+ GitNext.run sample_dir
73
+ end
74
+ it("should go to next version") { File.read(file_1).should == "b" }
75
+ it("config should have 2") { File.read(gitnext_config).should == "2" }
76
+ end
67
77
  end
68
78
 
69
79
  describe "remove" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitnext
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nigel
@@ -15,7 +15,8 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-12 00:00:00 Z
18
+ date: 2011-06-13 00:00:00 +10:00
19
+ default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: rspec
@@ -49,7 +50,7 @@ dependencies:
49
50
  version: 1.2.5
50
51
  type: :runtime
51
52
  version_requirements: *id002
52
- description:
53
+ description: A simple command line tool to use when doing presentations.
53
54
  email:
54
55
  - nigelr@brisbanerails.com
55
56
  executables:
@@ -63,6 +64,7 @@ files:
63
64
  - lib/git_next.rb
64
65
  - bin/gitnext
65
66
  - gitnext.gemspec
67
+ has_rdoc: true
66
68
  homepage: http://github.com/nigelr/gitnext
67
69
  licenses: []
68
70
 
@@ -92,9 +94,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
94
  requirements: []
93
95
 
94
96
  rubyforge_project:
95
- rubygems_version: 1.8.5
97
+ rubygems_version: 1.5.2
96
98
  signing_key:
97
99
  specification_version: 3
98
- summary: Simple method to move forward or backwards through a git repo
100
+ summary: Use next or previous to navigate through a git repository
99
101
  test_files: []
100
102