trello_flow 3.0.0 → 3.1.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: 65ba518adb5b4f1b0ddbb9fb00933e0b440bb5a7
4
- data.tar.gz: ee13c9177458304c3ce7fa2bb4824e8dd916f939
3
+ metadata.gz: e9e36bcebf664ebc9d70451ede710554a961da8c
4
+ data.tar.gz: 92d851fd343ad6c08686c7a5074e26476c5eb490
5
5
  SHA512:
6
- metadata.gz: e9e2a023897b7211aa6de12b7717fb86806541e614db1e25c6fb36bf1daec3faa62c113e5851a1c762a9654ddc95bf526d898317e25f4a55c6be77e7b1e477c2
7
- data.tar.gz: d013ceefdf568c18e84e92964d8eaf3ef8ad78c2eb387b554a9800c20e1137be324e0ba00920bf794e94621db6a4761f20ec17838db33d0672755af73bb2492b
6
+ metadata.gz: 1abe6d0965c7388ee582e1064c06c7be90d1a88adfa0ecaadd7a5d58f80192812997545bd6619fd4f027a73dd4c339d6074757df57ab17dc656bf00bb634a3fe
7
+ data.tar.gz: 338f24641d96944b189d6a79313076db78419cc44583e79b56434183aa866a6cb498ca1fcb42292744e20cdd926b8e81d99a5fefe9a5ea043b3c73ad1e6ccd08
@@ -33,6 +33,10 @@ module TrelloFlow
33
33
  self.class.request(:post, "cards/#{id}/idLabels", value: label.id)
34
34
  end
35
35
 
36
+ def attach(url:)
37
+ self.class.request(:post, "cards/#{id}/attachments", url: url)
38
+ end
39
+
36
40
  def short_link
37
41
  url.scan(/\/c\/(.+)\//).flatten.first
38
42
  end
@@ -27,11 +27,11 @@ module TrelloFlow
27
27
  PullRequest.new(current_card, from: name, target: target).open
28
28
  end
29
29
 
30
- def open_trello(user)
30
+ def open_trello(user:, config:)
31
31
  if current_card
32
32
  Cli.open_url current_card.url
33
33
  else
34
- Cli.open_url "https://trello.com/#{user.username}/cards"
34
+ Cli.open_url config.board.url
35
35
  end
36
36
  end
37
37
 
@@ -48,7 +48,7 @@ module TrelloFlow
48
48
  end
49
49
 
50
50
  def card_short_link
51
- name.split(".").last
51
+ name[/\.(\w+)$/, 1]
52
52
  end
53
53
  end
54
54
  end
@@ -16,7 +16,7 @@ module TrelloFlow
16
16
  end
17
17
 
18
18
  def open
19
- Branch.current.open_trello(current_user)
19
+ Branch.current.open_trello(user: current_user, config: local_config)
20
20
  end
21
21
 
22
22
  def finish
@@ -1,3 +1,3 @@
1
1
  module TrelloFlow
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trello_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig