ding 0.8.4 → 1.0.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
  SHA1:
3
- metadata.gz: 34dd7cd7e774700fffbb9c92df0062d4973cc818
4
- data.tar.gz: 66c376f6198436513b8492125f3550ed1f05a395
3
+ metadata.gz: 04e92ee8a732f0ef2129453db6ff013a7ee13cf5
4
+ data.tar.gz: ee7f8df5dcb0f7ad17638a10b73613acbfc54098
5
5
  SHA512:
6
- metadata.gz: 3085835587bc68f1277a0702bbe3a805c1de7f31e432fd6168e0e62f33f9eada4cf05559df78779545f87e70ffaac5b7a33cb4ded49d94476f902feec8783f1d
7
- data.tar.gz: 4e4bb4db05bfccc6cae4156192c44977439124353535fe88d74b1702dd9f31a6039bbb8da062a59b079fda92705abd6a131818aa724282a8ed110d76f22294de
6
+ metadata.gz: 61ff465ab0358cdb2e25618f4b47fcec61cff4ea5a22d506aca1202980c787dc3792892b85264cbc54a67d6401c502739b77a0e994749ebffe323edabfbe376e
7
+ data.tar.gz: 75ba13e9398eca7ed442acf148210d066fca51ab0955d7679a490d5c5d8b29c7b2d3c2997f437d95385f6d676d5004110549500d5130895c31e66cff0c76d6ca
data/README.md CHANGED
@@ -22,9 +22,11 @@ These defaults can be over-ridden by providing ENV vars to the shell:
22
22
 
23
23
  DING_MASTER_BRANCH - main branch to switch to for synchronising
24
24
  DING_DEVELOP_BRANCH - used to compare merge against feature
25
- DING_TESTING_BRANCH - branch to over-ride from feature branch
25
+ DING_TESTING_BRANCH - branch to over-ride 'testing' branch
26
26
  DING_SACROSANCT_BRANCHES - space separated list of protected branches
27
27
 
28
+ The testing branch can also be over-ridden by passing the `-b` option.
29
+
28
30
  ## Using Ding
29
31
 
30
32
  There are several commands available with global options for verbosity and forcing actions:
@@ -33,32 +35,39 @@ There are several commands available with global options for verbosity and forci
33
35
  ding help [COMMAND] # Describe available commands or one specific command
34
36
  ding key-gen # Create a new private/public key pair and associated ssh config
35
37
  ding key-show # Copy a public ssh key signature to the system clipboard (use -v to also display the signature)
36
- ding test # Push a feature branch to the testing branch (this is the default action)
38
+ ding push # Push a feature branch to the testing branch (this is the default action)
37
39
 
38
40
  Options:
39
41
  -f, [--force], [--no-force] # use the force on commands that allow it e.g. git push
40
42
  -v, [--verbose], [--no-verbose] # show verbose output such as full callstack on errors
41
43
 
42
- ### ding test
44
+ ### ding push
43
45
 
44
- This is the default action so running `ding` is the equivalent of `ding test`.
46
+ This is the default action so running `ding` is the equivalent of `ding push`.
45
47
 
46
48
  There is an option to specify the feature branch pattern to display for
47
49
  selection of the code to be pushed to `testing`. By default, only
48
50
  remote branches that haven't already been merged to `develop` will be
49
51
  listed, this can be over-ridden by using the `-m` flag.
50
52
 
51
- $ ding help test
53
+ $ ding help push
52
54
 
53
55
  Usage:
54
- ding test
56
+ ding push
55
57
 
56
58
  Options:
59
+ -b [--branch=BRANCH] # specify an over-ride destination branch
57
60
  -m, [--merged], [--no-merged] # display branches that have been merged
58
61
  -p, [--pattern=PATTERN] # specify a pattern for listing branches
59
62
  # Default: origin/XAP*
60
63
 
61
- Push a feature branch to the testing branch
64
+ Push feature branch(es) to the testing branch (this is the default action)
65
+
66
+ The destination branch is selected in the following order:
67
+
68
+ 1. The branch specified by the `-b` option
69
+ 1. The branch specified in `ENV['DING_TESTING_BRANCH']`
70
+ 1. Otherwise defaults to the `testing` branch
62
71
 
63
72
  ### ding key-gen
64
73
 
data/lib/ding/cli.rb CHANGED
@@ -6,13 +6,15 @@ module Ding
6
6
  class_option :force, type: 'boolean', aliases: '-f', default: true, desc: 'use the force on commands that allow it e.g. git push'
7
7
  class_option :verbose, type: 'boolean', aliases: '-v', default: false, desc: 'show verbose output such as full callstack on errors'
8
8
 
9
- default_task :test
9
+ default_task :push
10
10
 
11
- desc "test", "Push a feature branch(es) to the testing branch (this is the default action)"
11
+ desc "push", "Push feature branch(es) to the testing branch (this is the default action)"
12
+ option :branch, type: 'string', aliases: '-b', default: nil, desc: 'specify an over-ride destination branch'
12
13
  option :merged, type: 'boolean', aliases: '-m', default: false, desc: 'display branches that have been merged'
13
14
  option :pattern, type: 'string', aliases: '-p', default: 'origin/XAP*', desc: 'specify a pattern for listing branches'
14
- def test
15
+ def push
15
16
  develop_branch, testing_branch = Ding::DEVELOP_BRANCH.dup, Ding::TESTING_BRANCH.dup
17
+ testing_branch = options[:branch] if options[:branch]
16
18
  say "\nDing ding ding: let's merge one or more feature branches to #{testing_branch}:\n\n", :green
17
19
 
18
20
  repo = Ding::Git.new(options).tap do |r|
data/lib/ding/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ding
2
- VERSION = "0.8.4"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ding
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Bain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-23 00:00:00.000000000 Z
11
+ date: 2015-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler