trello_flow 3.3.0 → 3.4.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: d37b50f1be3df52fcb343f599dde3b4b284e2714
4
- data.tar.gz: 84503911b11e5c12dc5a78874b7aa1347fe0f33d
3
+ metadata.gz: 19a0bf9f2105eb2217b4419e6ccef937dea8a9d5
4
+ data.tar.gz: c11eabeccf68b1f9a9bd100755f302f8db907f22
5
5
  SHA512:
6
- metadata.gz: 295f1a0a9614746441851cd36e7e30fee9364f1b56f997fef514dad7e1b8a4c0107afd5e8987810c0589ecad2caf190222e0253d98f972f43e250151c580d2ef
7
- data.tar.gz: 4479e1ed48797ac5efe7aa21de6c6ab4e0f9ddfdf3dcaf7a072fb6fb94fe0da458b64152416444d98d702793fb95888055520db363364f57fe442464b503ba1b
6
+ metadata.gz: cf6bef0ee316d24f24ccf785207f59d936500ca0bf63719548efe98489957e49e7380fe27875ba350a3ededea45b01d7a8ddeaef684452808ac249d067415642
7
+ data.tar.gz: e70cec90f67003397cd3ac86d5d0dc56c9d39625eeeee4d37b333ef635ea9a4185e6e28ac48fdc2465199d6ebd24851cb3f506a66deb8cb881d7d3f3dc2870c4
@@ -11,8 +11,8 @@ module TrelloFlow
11
11
  new Cli.read("git rev-parse --abbrev-ref HEAD")
12
12
  end
13
13
 
14
- def self.from_card(card)
15
- new("#{current.target}.#{card.to_param}.#{card.short_link}")
14
+ def self.from_card(user:, card:)
15
+ new("#{user.initials.downcase}.#{card.to_param}.#{current.target}.#{card.short_link}")
16
16
  end
17
17
 
18
18
  def checkout
@@ -36,7 +36,11 @@ module TrelloFlow
36
36
  end
37
37
 
38
38
  def target
39
- name.split('.').first
39
+ if legacy_naming?
40
+ name_parts.first
41
+ else
42
+ name_parts[-2] || name
43
+ end
40
44
  end
41
45
 
42
46
  private
@@ -50,5 +54,13 @@ module TrelloFlow
50
54
  def card_short_link
51
55
  name[/\.(\w+)$/, 1]
52
56
  end
57
+
58
+ def legacy_naming?
59
+ name_parts.size == 3
60
+ end
61
+
62
+ def name_parts
63
+ @_name_parts ||= name.split(".")
64
+ end
53
65
  end
54
66
  end
@@ -30,7 +30,7 @@ module TrelloFlow
30
30
  end
31
31
 
32
32
  def filter
33
- "^ *#{target}.\\+$"
33
+ "\\.#{target}\\."
34
34
  end
35
35
  end
36
36
  end
@@ -12,7 +12,7 @@ module TrelloFlow
12
12
  card = create_or_pick_card(name)
13
13
  card.add_member(current_user)
14
14
  card.start
15
- Branch.from_card(card).checkout
15
+ Branch.from_card(user: current_user, card: card).checkout
16
16
  end
17
17
 
18
18
  def open
@@ -1,3 +1,3 @@
1
1
  module TrelloFlow
2
- VERSION = "3.3.0"
2
+ VERSION = "3.4.0"
3
3
  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.3.0
4
+ version: 3.4.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-02-01 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler