git_wrapper 1.0.1 → 1.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.
data/.gitignore CHANGED
@@ -1,5 +1,5 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
5
- .idea
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .idea
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in git_wrapper.gemspec
4
- gemspec
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in git_wrapper.gemspec
4
+ gemspec
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require "bundler/gem_tasks"
@@ -110,7 +110,8 @@ module GitWrapper
110
110
  end
111
111
 
112
112
  def current_branch
113
- execute(Commands::Branch.new(@location).current)
113
+ branch = execute(Commands::Branch.new(@location).current)
114
+ branch.nil? ? 'master' : branch
114
115
  end
115
116
 
116
117
  def branch(name, commit=nil)
@@ -1,3 +1,3 @@
1
1
  module GitWrapper
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -386,6 +386,9 @@ describe GitWrapper, '-> Repository' do
386
386
  it 'Get a current branch' do
387
387
  repo = Repository.new(@file_helper.create_temp_folder)
388
388
  repo.init
389
+
390
+ repo.current_branch.should eq('master')
391
+
389
392
  @file_helper.create_temp_file(repo.location, 'test')
390
393
  repo.add_all
391
394
  repo.commit('first commit')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-05 00:00:00.000000000 Z
12
+ date: 2012-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &3974124 !ruby/object:Gem::Requirement
16
+ requirement: &28348860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *3974124
24
+ version_requirements: *28348860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &3973452 !ruby/object:Gem::Requirement
27
+ requirement: &28348608 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *3973452
35
+ version_requirements: *28348608
36
36
  description: OO git command line wrapper
37
37
  email:
38
38
  - gabynaiman@gmail.com