trello_flow 3.1.0 → 3.3.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: e9e36bcebf664ebc9d70451ede710554a961da8c
4
- data.tar.gz: 92d851fd343ad6c08686c7a5074e26476c5eb490
3
+ metadata.gz: d37b50f1be3df52fcb343f599dde3b4b284e2714
4
+ data.tar.gz: 84503911b11e5c12dc5a78874b7aa1347fe0f33d
5
5
  SHA512:
6
- metadata.gz: 1abe6d0965c7388ee582e1064c06c7be90d1a88adfa0ecaadd7a5d58f80192812997545bd6619fd4f027a73dd4c339d6074757df57ab17dc656bf00bb634a3fe
7
- data.tar.gz: 338f24641d96944b189d6a79313076db78419cc44583e79b56434183aa866a6cb498ca1fcb42292744e20cdd926b8e81d99a5fefe9a5ea043b3c73ad1e6ccd08
6
+ metadata.gz: 295f1a0a9614746441851cd36e7e30fee9364f1b56f997fef514dad7e1b8a4c0107afd5e8987810c0589ecad2caf190222e0253d98f972f43e250151c580d2ef
7
+ data.tar.gz: 4479e1ed48797ac5efe7aa21de6c6ab4e0f9ddfdf3dcaf7a072fb6fb94fe0da458b64152416444d98d702793fb95888055520db363364f57fe442464b503ba1b
data/README.md CHANGED
@@ -10,10 +10,10 @@ gem install trello_flow
10
10
  ## Usage
11
11
 
12
12
  ```bash
13
- git open # Open relevant card/all user's cards in browser
14
- git start # Pick a board to see backlog
13
+ git start # Shows backlog for current board
15
14
  git start <card URL> # Assigns self to card, moves to "started", and creates branch
16
- git start "Do this" # Picking a board creates card "Do this" and starts it
15
+ git start "Do this" # Creates card "Do this" and starts it
16
+ git open # Open relevant card/board in browser
17
17
  git finish # Opens PR
18
18
  git cleanup # cleans up merged card branches
19
19
  ```
data/exe/git-finish CHANGED
@@ -3,5 +3,17 @@
3
3
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
4
4
 
5
5
  require "trello_flow"
6
+ require "trollop"
6
7
 
7
- TrelloFlow::Main.new.finish
8
+
9
+ options = Trollop::options do
10
+ banner <<-EOS
11
+ Pushes branch to GitHub and opens a PR
12
+
13
+ Usage:
14
+ git finish
15
+ EOS
16
+ opt :wip, "Open [WIP] PR"
17
+ end
18
+
19
+ TrelloFlow::Main.new.finish(options)
@@ -23,8 +23,8 @@ module TrelloFlow
23
23
  Cli.run "git push origin #{name} -u"
24
24
  end
25
25
 
26
- def open_pull_request
27
- PullRequest.new(current_card, from: name, target: target).open
26
+ def open_pull_request(options = {})
27
+ PullRequest.new(current_card, options.merge(from: name, target: target)).open
28
28
  end
29
29
 
30
30
  def open_trello(user:, config:)
@@ -19,10 +19,10 @@ module TrelloFlow
19
19
  Branch.current.open_trello(user: current_user, config: local_config)
20
20
  end
21
21
 
22
- def finish
22
+ def finish(options = {})
23
23
  branch = Branch.current
24
24
  branch.push
25
- branch.open_pull_request
25
+ branch.open_pull_request(options)
26
26
  end
27
27
 
28
28
  def cleanup
@@ -48,8 +48,8 @@ module TrelloFlow
48
48
  end
49
49
 
50
50
  def create_new_card(name)
51
- card = board.lists.backlog.cards.create name: name
52
51
  label = Table.pick board.labels, caption: "Add label:"
52
+ card = board.lists.backlog.cards.create name: name
53
53
  card.add_label(label) if label
54
54
  card
55
55
  end
@@ -2,10 +2,11 @@ require "trello_flow/repo"
2
2
 
3
3
  module TrelloFlow
4
4
  class PullRequest
5
- def initialize(card, from:, target:)
5
+ def initialize(card, from:, target:, **options)
6
6
  @card = card
7
7
  @from = from
8
8
  @target = target
9
+ @options = options
9
10
  end
10
11
 
11
12
  def open
@@ -14,7 +15,7 @@ module TrelloFlow
14
15
 
15
16
  private
16
17
 
17
- attr_reader :card, :from, :target
18
+ attr_reader :card, :from, :target, :options
18
19
 
19
20
  def url
20
21
  repo.url + "/compare/#{target}...#{from}?expand=1&title=#{escape title_with_prefixes}&body=#{escape body}"
@@ -30,7 +31,7 @@ module TrelloFlow
30
31
 
31
32
  def prefixes
32
33
  prefixes = []
33
- # prefixes << "[WIP]" if @options[:wip]
34
+ prefixes << "[WIP]" if options[:wip]
34
35
  prefixes << "[#{target.titleize}]" if release_branch?
35
36
  prefixes.join(" ")
36
37
  end
@@ -1,3 +1,3 @@
1
1
  module TrelloFlow
2
- VERSION = "3.1.0"
2
+ VERSION = "3.3.0"
3
3
  end
data/trello_flow.gemspec CHANGED
@@ -36,4 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_dependency "launchy"
37
37
  spec.add_dependency "multi_json"
38
38
  spec.add_dependency "spyke"
39
+ spec.add_dependency "trollop"
39
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trello_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-12 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -234,6 +234,20 @@ dependencies:
234
234
  - - ">="
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: trollop
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
237
251
  description: GitHub/Trello flow gemified.
238
252
  email:
239
253
  - jens@balvig.com