kuy 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4eadde951fb2567d25a2fd34f311e890a0aeab3aa2e036bf4ae3f0c3b10e9282
4
+ data.tar.gz: b5381937aa2998150a1eb9977052d696dac8125002fc0063f48e950ed7d23648
5
+ SHA512:
6
+ metadata.gz: fba23ad93a94cbe4d12d918140924807396e32528d193d8e507caa73ee2e5a2643ee016a12278a73c2ff19bf996d7166e9d1ba3b38cfbd13c1fd1fa73cfbaaa3
7
+ data.tar.gz: 95d56df6d570550fba6043ef79a6edc5f5fe78af983c76825fe224667a427016f6f86b921364d20cafd8c22634c3e099995745235c340ed049f89c1f15614466
@@ -0,0 +1,5 @@
1
+ *~
2
+ *.swp
3
+ *.swo
4
+ *.gem
5
+ .DS_Store
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2019 Kunto Aji Kristianto
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,28 @@
1
+ # Kuy
2
+ Kuy is a Ruby gem to simplify git feature branch workflow if you want to pull and merge your develop or master branch.
3
+ Kuy assumes git is already installed.
4
+
5
+ ## Installation
6
+
7
+ ```ruby
8
+ gem install kuy
9
+ ```
10
+
11
+ ## How to Use
12
+ Run `kuy` or `kuymaster` command in your git feature branch.
13
+
14
+ Suppose you have a branch named `my-feature-branch` and you want to pull `develop` branch and merge into `my-feature-branch`.
15
+ ```
16
+ git checkout my-feature-branch
17
+ kuy
18
+ ```
19
+
20
+ Or if you want to pull `master` branch and merge into `my-feature-branch`.
21
+ ```
22
+ git checkout my-feature-branch
23
+ kuymaster
24
+ ```
25
+
26
+ ## License
27
+
28
+ Kuy is released under the [MIT License](https://opensource.org/licenses/MIT).
data/bin/kuy ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/kuy'
4
+ Kuy.pull_and_merge_from(:develop)
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative '../lib/kuy'
4
+ Kuy.pull_and_merge_from(:master)
@@ -0,0 +1,16 @@
1
+ require 'date'
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'kuy'
5
+ s.version = '0.1.0'
6
+ s.date = Date.today.to_s
7
+ s.summary = 'Kuy is a Ruby gem to simplify git feature branch workflow if you want to pull and merge your develop or master branch'
8
+ s.description = 'Kuy is a Ruby gem to simplify git feature branch workflow if you want to pull and merge your develop or master branch'
9
+ s.author = 'Kunto Aji Kristianto'
10
+ s.email = 'kuntoaji@kaklabs.com'
11
+ s.files = `git ls-files -z`.split("\x0")
12
+ s.executables << 'kuy'
13
+ s.executables << 'kuymaster'
14
+ s.homepage = 'http://github.com/kuntoaji/kuy'
15
+ s.license = 'MIT'
16
+ end
@@ -0,0 +1,14 @@
1
+ class Kuy
2
+ def self.pull_and_merge_from(branch)
3
+ current_branch = `git rev-parse --abbrev-ref HEAD`.strip
4
+
5
+ puts "checkout and update from #{branch}"
6
+ `git checkout #{branch}`
7
+ `git pull origin #{branch}`
8
+
9
+ puts "merging with #{current_branch}"
10
+ `git checkout #{current_branch}`
11
+ `git merge #{branch} --no-ff`
12
+ puts 'Done!'
13
+ end
14
+ end
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kuy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kunto Aji Kristianto
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-07-02 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Kuy is a Ruby gem to simplify git feature branch workflow if you want
14
+ to pull and merge your develop or master branch
15
+ email: kuntoaji@kaklabs.com
16
+ executables:
17
+ - kuy
18
+ - kuymaster
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - ".gitignore"
23
+ - LICENSE.txt
24
+ - README.md
25
+ - bin/kuy
26
+ - bin/kuymaster
27
+ - kuy.gemspec
28
+ - lib/kuy.rb
29
+ homepage: http://github.com/kuntoaji/kuy
30
+ licenses:
31
+ - MIT
32
+ metadata: {}
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubygems_version: 3.0.3
49
+ signing_key:
50
+ specification_version: 4
51
+ summary: Kuy is a Ruby gem to simplify git feature branch workflow if you want to
52
+ pull and merge your develop or master branch
53
+ test_files: []