git_local 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 341679de1dc41050a8c505b4bb6e165d3b4b38c4
4
- data.tar.gz: fc469cd308ff92cc6148563a85ce98b15d4d50bf
3
+ metadata.gz: 1052d082820f442848e45f0a03f9494d0ead675f
4
+ data.tar.gz: 36cf4e4b212aa6fac28e4378d9fc84f8aeaefa02
5
5
  SHA512:
6
- metadata.gz: b0bbdac26e347c75f214d918b7daeb42f689137bdf40fc14a1df8cef6782d286eec942ff49ca77e514a7c1bed45c437aa02f0996d3434fcaffc2b2ab6269d0da
7
- data.tar.gz: 764c40cfd988121f7da87368b9914781f77b8ce069e043784629de7f5a95a63a278b30bbff339074726704be17a5d7ae7535549e9da9f6b7e7ad660832a0ed2b
6
+ metadata.gz: c426481be677b222d81c9b58e9015876f0d555252636dacaccaee6dedfabbde552bd878b24194b7996e211ba17869de5f2bf9ab17e1f7049e2a15b2f01b90d24
7
+ data.tar.gz: 8c7626addd880dcd3fc3c6483629076a168fb68c02dcdea9b129dd73f30ceb0f9b7cdd18b72332cba571b4b056b734ecb656555f535cf10e636aa4cf9cf09591
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_local (0.0.6)
4
+ git_local (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -15,7 +15,7 @@ module GitLocal
15
15
  end
16
16
 
17
17
  def get
18
- Dir.exist?(path) && new_commit_on_remote? ? pull : clone_and_checkout
18
+ Dir.exist?(path) && new_commit_on_remote? ? reset_to_latest_from_origin : clone_and_checkout
19
19
  end
20
20
 
21
21
  def file_object(file_path)
@@ -94,8 +94,8 @@ module GitLocal
94
94
  @org_repo_branch ||= "#{org}/#{repo}/#{branch}"
95
95
  end
96
96
 
97
- def pull
98
- Process.wait(IO.popen("(cd #{path} && git pull)").pid)
97
+ def reset_to_latest_from_origin
98
+ Process.wait(IO.popen("(cd #{path} && git fetch && git reset origin/#{branch} --hard)").pid)
99
99
  end
100
100
 
101
101
  def repo_path
@@ -1,3 +1,3 @@
1
1
  module GitLocal
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Galvanize Product
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-02 00:00:00.000000000 Z
11
+ date: 2017-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.6.11
139
+ rubygems_version: 2.5.1
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: A lightweight git command line wrapper in Ruby