ding 0.8.4 → 1.0.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.
- checksums.yaml +4 -4
- data/README.md +16 -7
- data/lib/ding/cli.rb +5 -3
- data/lib/ding/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04e92ee8a732f0ef2129453db6ff013a7ee13cf5
|
4
|
+
data.tar.gz: ee7f8df5dcb0f7ad17638a10b73613acbfc54098
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
44
|
+
### ding push
|
43
45
|
|
44
|
-
This is the default action so running `ding` is the equivalent of `ding
|
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
|
53
|
+
$ ding help push
|
52
54
|
|
53
55
|
Usage:
|
54
|
-
ding
|
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
|
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 :
|
9
|
+
default_task :push
|
10
10
|
|
11
|
-
desc "
|
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
|
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
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.
|
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-
|
11
|
+
date: 2015-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|