lgit 0.2.1 → 0.3.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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +3 -2
- data/README.md +1 -1
- data/exe/lgit +4 -3
- data/lib/lgit/version.rb +1 -1
- data/lib/lgit.rb +12 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d29e963fe6d26aa9b8de93d7ec5509a3daa9efc4499233fe0d9e0e358b192c95
|
4
|
+
data.tar.gz: ccc2fbdbcc21196e970249cf6197c44e803c2faa21a7f9b3f0985ec6e76cd8cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7238657b5b65fa0918e676090c9c058c2eac04f7b522adece8bf3bf3542541adfc7a500f75363289e9eaa4b43b085770dcc2560038efee4eb89fd443c63f40c
|
7
|
+
data.tar.gz: 6c5bf22694a0df071acf6ece731f91ace66c407b4ec35ed8af58262b286114b0e51f2537af4dcf755cbc563a9eed1ec4d676af5d9cc1c5ecfa0ba9a39c1ddfcf
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
lgit (0.1
|
4
|
+
lgit (0.2.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -10,6 +10,7 @@ GEM
|
|
10
10
|
rake (10.5.0)
|
11
11
|
|
12
12
|
PLATFORMS
|
13
|
+
ruby
|
13
14
|
x64-mingw32
|
14
15
|
|
15
16
|
DEPENDENCIES
|
@@ -19,4 +20,4 @@ DEPENDENCIES
|
|
19
20
|
rake (~> 10.0)
|
20
21
|
|
21
22
|
BUNDLED WITH
|
22
|
-
1.16.
|
23
|
+
1.16.6
|
data/README.md
CHANGED
@@ -48,7 +48,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
48
48
|
|
49
49
|
## Contributing
|
50
50
|
|
51
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
51
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/luladjiev/lgit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
52
52
|
|
53
53
|
## License
|
54
54
|
|
data/exe/lgit
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
+
require 'lgit'
|
4
5
|
|
5
6
|
if ARGV.size.zero?
|
6
7
|
puts 'Specify command'
|
@@ -14,10 +15,10 @@ when 'branch'
|
|
14
15
|
git.create_branch ARGV[1]
|
15
16
|
when 'rebase'
|
16
17
|
if git.get_branch == 'master'
|
17
|
-
puts
|
18
|
+
puts 'Error: Cannot rebase master!'
|
18
19
|
exit 2
|
19
20
|
end
|
20
|
-
git.rebase
|
21
|
+
git.rebase ARGV[1]
|
21
22
|
when 'delete-branches'
|
22
23
|
git.delete_branches
|
23
24
|
else
|
data/lib/lgit/version.rb
CHANGED
data/lib/lgit.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
require
|
1
|
+
require 'lgit/version'
|
2
2
|
|
3
3
|
module Lgit
|
4
|
+
###
|
5
|
+
# Git related class
|
4
6
|
class Git
|
5
|
-
def
|
6
|
-
`git checkout
|
7
|
+
def refresh_base(base = 'master')
|
8
|
+
`git checkout #{base}`
|
7
9
|
`git pull`
|
8
10
|
end
|
9
11
|
|
@@ -12,16 +14,16 @@ module Lgit
|
|
12
14
|
end
|
13
15
|
|
14
16
|
def create_branch(name)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
return unless name
|
18
|
+
|
19
|
+
refresh_base
|
20
|
+
`git checkout -b #{name}`
|
19
21
|
end
|
20
22
|
|
21
|
-
def rebase
|
22
|
-
|
23
|
+
def rebase(base = 'master')
|
24
|
+
refresh_base base
|
23
25
|
`git checkout - `
|
24
|
-
`git rebase
|
26
|
+
`git rebase #{base}`
|
25
27
|
end
|
26
28
|
|
27
29
|
def delete_branches
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Luladjiev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.7.
|
98
|
+
rubygems_version: 2.7.8
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: Git on steroids
|