kuy 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: 4eadde951fb2567d25a2fd34f311e890a0aeab3aa2e036bf4ae3f0c3b10e9282
4
- data.tar.gz: b5381937aa2998150a1eb9977052d696dac8125002fc0063f48e950ed7d23648
3
+ metadata.gz: 31dc3a147035a7536f85ba12934d780032873e9cb9ea5fc2b292498ebba46daf
4
+ data.tar.gz: 6d2c979e4cea89c40b16f3466038255262c8a230fe207b3b4a923a15ed2e1a53
5
5
  SHA512:
6
- metadata.gz: fba23ad93a94cbe4d12d918140924807396e32528d193d8e507caa73ee2e5a2643ee016a12278a73c2ff19bf996d7166e9d1ba3b38cfbd13c1fd1fa73cfbaaa3
7
- data.tar.gz: 95d56df6d570550fba6043ef79a6edc5f5fe78af983c76825fe224667a427016f6f86b921364d20cafd8c22634c3e099995745235c340ed049f89c1f15614466
6
+ metadata.gz: c11c55e94edf7d6f85c3c34ca4129165274404dfa521519c4783bf1101d93fff83c6eb63ce38344d5a9cef8b393894ddd6b1bbe67ef44a04a476319066fe78fb
7
+ data.tar.gz: a484040c7a8bc4d361af26fc0ea9d4beb4bd7eb1958849b325fc9a9ac8c7cac0cd611e9595402190eee0a8e7d9c22ed07632534b15679fce4438d975dee363f2
@@ -0,0 +1,8 @@
1
+ 0.2.0:
2
+ * Show information when git is not available
3
+ * kuy command accepts first argument as branch name
4
+
5
+ 0.1.0:
6
+ * Initial gem release
7
+ * kuy command for pulling and merging from origin/develop branch
8
+ * kuymaster command for pulling and merging from origin/master branch
data/README.md CHANGED
@@ -8,17 +8,26 @@ Kuy assumes git is already installed.
8
8
  gem install kuy
9
9
  ```
10
10
 
11
+ ## Installation with Homebrew and brew-gem
12
+ If you use zsh and MacOS, there is possibility `kuy` and `kuymaster` commands are not found.
13
+ As alternative, you can install this gem with [Homebrew] and [brew-gem].
14
+
15
+ ```sh
16
+ brew install brew-gem
17
+ brew gem install kuy
18
+ ```
19
+
11
20
  ## How to Use
12
21
  Run `kuy` or `kuymaster` command in your git feature branch.
13
22
 
14
23
  Suppose you have a branch named `my-feature-branch` and you want to pull `develop` branch and merge into `my-feature-branch`.
15
- ```
24
+ ```sh
16
25
  git checkout my-feature-branch
17
26
  kuy
18
27
  ```
19
28
 
20
29
  Or if you want to pull `master` branch and merge into `my-feature-branch`.
21
- ```
30
+ ```sh
22
31
  git checkout my-feature-branch
23
32
  kuymaster
24
33
  ```
@@ -26,3 +35,6 @@ kuymaster
26
35
  ## License
27
36
 
28
37
  Kuy is released under the [MIT License](https://opensource.org/licenses/MIT).
38
+
39
+ [Homebrew]: https://brew.sh
40
+ [brew-gem]: https://github.com/sportngin/brew-gem
data/bin/kuy CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require_relative '../lib/kuy'
4
- Kuy.pull_and_merge_from(:develop)
3
+ require 'kuy'
4
+ branch = ARGV.empty? ? :develop : ARGV.first
5
+ Kuy.pull_and_merge_from(:branch)
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require_relative '../lib/kuy'
3
+ require 'kuy'
4
4
  Kuy.pull_and_merge_from(:master)
@@ -2,7 +2,7 @@ require 'date'
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'kuy'
5
- s.version = '0.1.0'
5
+ s.version = '0.2.0'
6
6
  s.date = Date.today.to_s
7
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
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'
data/lib/kuy.rb CHANGED
@@ -1,12 +1,14 @@
1
1
  class Kuy
2
2
  def self.pull_and_merge_from(branch)
3
+ return 'git is not installed' if system('git --version').nil?
4
+
3
5
  current_branch = `git rev-parse --abbrev-ref HEAD`.strip
4
6
 
5
- puts "checkout and update from #{branch}"
7
+ puts "Running checkout and update from origin/#{branch}"
6
8
  `git checkout #{branch}`
7
9
  `git pull origin #{branch}`
8
10
 
9
- puts "merging with #{current_branch}"
11
+ puts "Merging with origin/#{current_branch}"
10
12
  `git checkout #{current_branch}`
11
13
  `git merge #{branch} --no-ff`
12
14
  puts 'Done!'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kunto Aji Kristianto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-02 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Kuy is a Ruby gem to simplify git feature branch workflow if you want
14
14
  to pull and merge your develop or master branch
@@ -20,6 +20,7 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - ".gitignore"
23
+ - CHANGELOG.md
23
24
  - LICENSE.txt
24
25
  - README.md
25
26
  - bin/kuy