git_dj 0.0.8 → 0.0.9

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/git_dj/version.rb +1 -1
  3. data/lib/git_dj.rb +16 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e8b0fa64bbf5cec1347bd5c31c3718765389cd8
4
- data.tar.gz: d8379684c1581207a7bba6b1069d8cf087e198ba
3
+ metadata.gz: cd40ffe2f2a7c352aca313c66579acf6f13be03f
4
+ data.tar.gz: 44a277f42dc29e7c2271742a03107062c8c3aae5
5
5
  SHA512:
6
- metadata.gz: fc37c37829a613e8555e008f8842d5927bd318bfe78e43ad6ce6a017d003bd6a5096555b5da041e63acf1e2df73c72f5505fb8332592cafef03624bdf55059dc
7
- data.tar.gz: 6496d243cec2c3cc4e1bcd9366473b14aa64e83acbeeb14e79610b2bb4363c931da9cd5da543a63c5353ee91fb13eab972fdfcaadad30c34d4c4fa44219ad9a5
6
+ metadata.gz: e9e6332c2653493f8e0f1a2cf6347625cd33289c72c4d0965d024527931328b183c8f6493760bf408135e936a13e477c18a1ad20dfab83a988fe784e2426f05f
7
+ data.tar.gz: 0718edb3e7d86148cced1299e5c9d0025e6bf3f5c12548b070cfece5a797610e38b0452a7e737a74a4313071c50355c639c0aeaeb5ece2a563c67a86e5960f5b
@@ -1,3 +1,3 @@
1
1
  class GitDj
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/lib/git_dj.rb CHANGED
@@ -25,6 +25,8 @@ class GitDj
25
25
  continue_prev_commands
26
26
  when "i"
27
27
  integrate_current_branch_to_another
28
+ when 'pr'
29
+ create_pull_request
28
30
  when 'help'
29
31
  print_help
30
32
  else
@@ -32,6 +34,13 @@ class GitDj
32
34
  end
33
35
  end
34
36
 
37
+ def create_pull_request
38
+ run_cmds [
39
+ "git push origin #{current_branch_name}",
40
+ "open #{current_repo_url}/compare/#{current_branch_name}?expand=1"
41
+ ]
42
+ end
43
+
35
44
  def integrate_current_branch
36
45
  send_branch_to_integration('staging')
37
46
  end
@@ -57,7 +66,7 @@ class GitDj
57
66
  run_cmds [
58
67
  "git checkout #{integration_branch}",
59
68
  "git pull origin #{integration_branch}",
60
- "git merge #{cur_branch}",
69
+ "git merge --no-edit #{cur_branch}",
61
70
  "git push origin #{integration_branch}",
62
71
  "git checkout #{cur_branch}"
63
72
  ]
@@ -117,6 +126,11 @@ class GitDj
117
126
  branch_string.chomp.strip
118
127
  end
119
128
 
129
+ def current_repo_url
130
+ url = %x(git ls-remote --get-url origin)
131
+ url[0..-6]
132
+ end
133
+
120
134
  def print_help
121
135
  puts %Q{Git DJ #{VERSION}
122
136
 
@@ -126,6 +140,7 @@ Usage:
126
140
  #{green_color('gdj release')} - merge current branch into master, and switch back
127
141
  #{green_color('gdj get')} - pull changes from origin to local
128
142
  #{green_color('gdj put')} - pull, then push changes from origin to local
143
+ #{green_color('gdj pr')} - push current branch to origin, then open pull request in browser
129
144
  #{green_color('gdj continue')} - continue previous failed command (after merge, etc)
130
145
 
131
146
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_dj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Tabunov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-20 00:00:00.000000000 Z
11
+ date: 2016-11-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple and lightweight alternative to git flow
14
14
  email: