git-daily 0.0.1 → 0.0.2

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
+ SHA1:
3
+ metadata.gz: 33c7143c4b0caf5b1301db3913c282c45f056da3
4
+ data.tar.gz: c68f7e44f3b492f22abc221c92273c5ed5eaccc9
5
+ SHA512:
6
+ metadata.gz: a4facd683775812ca91846037cc84f43a8c8f7e3bed143a5163d9b926ce1c02246d158bb90695af7604644cc21b6bf866a5fc7a692651e86d4694d714135d5bc
7
+ data.tar.gz: 38cce6cace7e9f9e9bc94844e3d1493aaffcea5ddb6ee0017465d5a06ebabe5454af5bb53545d67cc2841b2180a0dc744baabe1b07a68e10d5cdd5f7a2db86c6
data/README.rst CHANGED
@@ -1,7 +1,9 @@
1
1
  git-daily
2
2
  ===========================
3
3
 
4
- "git-daily" is a tool which helps you to do daily workflow easier.
4
+ "git-daily on Ruby" is a tool which helps you to do daily workflow easier on Git. This is the Ruby version.
5
+
6
+ The original PHP version is here: https://github.com/sotarok/git-daily
5
7
 
6
8
  Sub-commands are::
7
9
 
@@ -31,14 +33,15 @@ Requirements
31
33
  Installation
32
34
  --------------------------
33
35
 
34
- Install from openpear.org ::
36
+ Install from rubygems ::
35
37
 
36
- gem instasll git-daily
38
+ gem install git-daily
37
39
 
38
40
  Install develop version ::
39
41
 
40
42
  cd /path/to/dir
41
43
  git clone git://github.com/koichiro/git-daily.git
44
+ cd git-daily
42
45
  rake build
43
46
  gem install pkg/git-daily-X.X.X.gem
44
47
 
@@ -56,6 +56,12 @@ module Git
56
56
  r.empty? ? nil : r
57
57
  end
58
58
 
59
+ def self.pull_request_url
60
+ r = `git config gitdaily.pullRequestUrl`
61
+ r.chomp!
62
+ r.empty? ? nil : r
63
+ end
64
+
59
65
  def self.current_branch
60
66
  r = `git branch --no-color`.split(/\n/)
61
67
  master = r.select { |v| v[/^\*/] }
@@ -47,7 +47,7 @@ module Git
47
47
 
48
48
  rel_branches = Command.release_branches(@branch_prefix)
49
49
  unless rel_branches.empty?
50
- raise "release process (on local) is not closed, so cannot open relase\n release branches: #{rel_branches.join(',')}"
50
+ raise "release process (on local) is not closed, so cannot open release\n release branches: #{rel_branches.join(',')}"
51
51
  end
52
52
 
53
53
  remote = Command.remote
@@ -57,7 +57,7 @@ module Git
57
57
 
58
58
  rels = `git branch -a --no-color`.split(/\n/).select { |b| b[/remotes\/#{remote}\/#{@branch_prefix}/]}
59
59
  unless rels.empty?
60
- raise "relase process (on local) is not closed, so cannot open releas\n relase branchs: #{rels.join(',')}"
60
+ raise "release process (on local) is not closed, so cannot open release\n release branches: #{rels.join(',')}"
61
61
  end
62
62
  end
63
63
 
@@ -237,7 +237,7 @@ module Git
237
237
  end
238
238
 
239
239
  if r_rel_branch != rel
240
- $stderr.puts "Closed old relase branch"
240
+ $stderr.puts "Closed old release branch"
241
241
  $stderr.puts "Please retry 'release sync'"
242
242
  end
243
243
  puts "sync to release close"
@@ -288,7 +288,13 @@ module Git
288
288
  end
289
289
 
290
290
  current_branch = Command.current_branch
291
- master_branch = Command.master
291
+
292
+ remote = Command.remote
293
+ master_branch = if remote
294
+ Command.remote_branch(remote, Command.master)
295
+ else
296
+ Command.master
297
+ end
292
298
 
293
299
  puts "first, fetch remotes"
294
300
  `git fetch --all`
@@ -369,6 +375,20 @@ module Git
369
375
  puts
370
376
  end
371
377
  end
378
+
379
+ if Command.pull_request_url
380
+ puts 'Pull Requests: '
381
+
382
+ urlBase = Command.pull_request_url
383
+ merges = `git log --merges --pretty=format:'%<(30)%s | %an' #{master_branch}..#{current_branch}`.split(/\n/)
384
+
385
+ merges.each do |merge|
386
+ merge.match(/^Merge pull request #(?<id>[1-9][0-9]*) .+$/) do |match|
387
+ url = sprintf(urlBase, match[:id])
388
+ puts "\t#{url} | #{match[0]}"
389
+ end
390
+ end
391
+ end
372
392
  end
373
393
 
374
394
  def usage
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Daily
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -9,7 +9,7 @@ class TestCommandRelease < Test::Unit::TestCase
9
9
  @command = Git::Daily::Release.new
10
10
  end
11
11
 
12
- def test_relase_open
12
+ def test_release_open
13
13
  @command.open
14
14
  end
15
15
 
metadata CHANGED
@@ -1,17 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-daily
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Koichiro Ohba
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-02-27 00:00:00.000000000 Z
11
+ date: 2018-02-26 00:00:00.000000000 Z
13
12
  dependencies: []
14
- description: ! 'git-daily on Ruby is a tool which helps you to do daily workflow easier
13
+ description: 'git-daily on Ruby is a tool which helps you to do daily workflow easier
15
14
  on Git. This is the Ruby version. The original PHP version is here: https://github.com/sotarok/git-daily'
16
15
  email:
17
16
  - koichiro@meadowy.org
@@ -20,7 +19,7 @@ executables:
20
19
  extensions: []
21
20
  extra_rdoc_files: []
22
21
  files:
23
- - .gitignore
22
+ - ".gitignore"
24
23
  - Gemfile
25
24
  - LICENSE
26
25
  - README.rst
@@ -46,27 +45,26 @@ files:
46
45
  - test/test_init_input.txt
47
46
  homepage: https://github.com/koichiro/git-daily
48
47
  licenses: []
48
+ metadata: {}
49
49
  post_install_message:
50
50
  rdoc_options: []
51
51
  require_paths:
52
52
  - lib
53
53
  required_ruby_version: !ruby/object:Gem::Requirement
54
- none: false
55
54
  requirements:
56
- - - ! '>='
55
+ - - ">="
57
56
  - !ruby/object:Gem::Version
58
57
  version: '0'
59
58
  required_rubygems_version: !ruby/object:Gem::Requirement
60
- none: false
61
59
  requirements:
62
- - - ! '>='
60
+ - - ">="
63
61
  - !ruby/object:Gem::Version
64
62
  version: '0'
65
63
  requirements: []
66
64
  rubyforge_project: git-daily
67
- rubygems_version: 1.8.11
65
+ rubygems_version: 2.6.11
68
66
  signing_key:
69
- specification_version: 3
67
+ specification_version: 4
70
68
  summary: git-daily on ruby is a tool which helps you to do daily workflow easier on
71
69
  Git.
72
70
  test_files:
@@ -74,4 +72,3 @@ test_files:
74
72
  - test/test_command_init.rb
75
73
  - test/test_command_release.rb
76
74
  - test/test_init_input.txt
77
- has_rdoc: