trello-fs 0.1.1 → 0.1.2

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: 011cffde31cbe14951a9471bb58c4c2dd3aeb0ba
4
- data.tar.gz: 4e2796a742275c74416b3a3ee66b71a2ee3a7172
3
+ metadata.gz: 7288e25a02f8332142a3ac7d05b9225c9b7602fb
4
+ data.tar.gz: b6f01b02db7b22beaedbd511b73778ad0d02528f
5
5
  SHA512:
6
- metadata.gz: 14d210103db2200ed0fc5ca224f39e072f32d02d4c8c2a9ec95de135522329095ec5778a194b26c2789d051b98fa1a38f7b3c1ddbd11cbea3594667f4f27dd76
7
- data.tar.gz: a7ac90ca90457c1b1f89065d28f819f41f91a69911fb9b483a5b255a14fb2ae51a89d653beda3b97db8853bad5f48e59e8d98b0a6e9ed2a8f53b5daf47051019
6
+ metadata.gz: c6a0ec247beb67b9e34f6c77e6a18fc0dd9975c4586c381a9e56afdc34e0ca6b41a8b554cc0a05e0517f3d3696cdd7c05d0abdc1fb70a1d0dca3215517212135
7
+ data.tar.gz: 942eafb92fb0656b6a150dcaedfd7b0c8c7aef8b0f67eee844bcbb2f087e84e9e13c7a2274403b531dbdfe8c4f43a0771d1ef9b4bba46ac9dd72539bb69fd8fb
@@ -2,4 +2,8 @@
2
2
 
3
3
  [Examples](../README.md)
4
4
 
5
+ # [TrelloFs Demo Board](../TrelloFs_Demo_Board/README.md)
6
+
7
+ ## [A Second List of Cards](../TrelloFs_Demo_Board/A_Second_List_of_Cards/README.md)
8
+
5
9
  - [A card with an image](../TrelloFs_Demo_Board/A_Second_List_of_Cards/A_card_with_an_image.md)
@@ -2,5 +2,9 @@
2
2
 
3
3
  [Examples](../README.md)
4
4
 
5
+ # [TrelloFs Demo Board](../TrelloFs_Demo_Board/README.md)
6
+
7
+ ## [A Second List of Cards](../TrelloFs_Demo_Board/A_Second_List_of_Cards/README.md)
8
+
5
9
  - [A card with an image](../TrelloFs_Demo_Board/A_Second_List_of_Cards/A_card_with_an_image.md)
6
10
  - [This one has a puppy](../TrelloFs_Demo_Board/A_Second_List_of_Cards/This_one_has_a_puppy.md)
@@ -2,4 +2,8 @@
2
2
 
3
3
  [Examples](../README.md)
4
4
 
5
+ # [TrelloFs Demo Board](../TrelloFs_Demo_Board/README.md)
6
+
7
+ ## [A Second List of Cards](../TrelloFs_Demo_Board/A_Second_List_of_Cards/README.md)
8
+
5
9
  - [This one has a puppy](../TrelloFs_Demo_Board/A_Second_List_of_Cards/This_one_has_a_puppy.md)
@@ -2,5 +2,9 @@
2
2
 
3
3
  [Examples](../README.md)
4
4
 
5
+ # [TrelloFs Demo Board](../TrelloFs_Demo_Board/README.md)
6
+
7
+ ## [A List of Cards](../TrelloFs_Demo_Board/A_List_of_Cards/README.md)
8
+
5
9
  - [TrelloFs Features](../TrelloFs_Demo_Board/A_List_of_Cards/TrelloFs_Features.md)
6
10
  - [TrelloFs Installation](../TrelloFs_Demo_Board/A_List_of_Cards/TrelloFs_Installation.md)
@@ -2,5 +2,12 @@
2
2
 
3
3
  [Examples](../README.md)
4
4
 
5
- - [Use color-coded labels for organization](../Welcome_Board/Intermediate/Use_color-coded_labels_for_organization.md)
6
- - [You can attach pictures and files...](../Welcome_Board/Basics/You_can_attach_pictures_and_files.md)
5
+ # [Welcome Board](../Welcome_Board/README.md)
6
+
7
+ ## [Basics](../Welcome_Board/Basics/README.md)
8
+
9
+ - [You can attach pictures and files...](../Welcome_Board/Basics/You_can_attach_pictures_and_files.md)
10
+
11
+ ## [Intermediate](../Welcome_Board/Intermediate/README.md)
12
+
13
+ - [Use color-coded labels for organization](../Welcome_Board/Intermediate/Use_color-coded_labels_for_organization.md)
@@ -42,8 +42,6 @@ module TrelloFs
42
42
  label_builder = LabelBuilder.new(repository, lbl)
43
43
  "[`#{label_builder.label_name}`](../../#{label_builder.relative_path})"
44
44
  end.sort.join(' ')
45
- list_name = @list_builder.list_name
46
- board_name = @list_builder.board_name
47
45
 
48
46
  [
49
47
  "# [#{card_name}](#{@card.url})",
@@ -99,6 +97,14 @@ module TrelloFs
99
97
  board_builder.board
100
98
  end
101
99
 
100
+ def board_name
101
+ board_builder.board_name
102
+ end
103
+
104
+ def list_name
105
+ @list_builder.list_name
106
+ end
107
+
102
108
  def repository_name
103
109
  repository.title
104
110
  end
@@ -38,12 +38,36 @@ module TrelloFs
38
38
  end
39
39
 
40
40
  def card_links
41
- @label.cards.sort {|a,b| a.name <=> b.name }.map do |card|
41
+ card_structure.sort.map do |board_path, lists|
42
+ list_paths = lists.sort.map do |list_path, cards|
43
+ card_paths = cards.sort.map do |card_path|
44
+ "- #{card_path}"
45
+ end.join("\n")
46
+
47
+ "## #{list_path}\n\n#{card_paths}"
48
+ end.join("\n\n")
49
+
50
+ "# #{board_path}\n\n#{list_paths}"
51
+ end.join("\n\n")
52
+ # links.sort {|a,b| a <=> b }.join("\n")
53
+ end
54
+
55
+ def card_structure
56
+ structure = {}
57
+
58
+ @label.cards.map do |card|
42
59
  card_builder = CardBuilder.new_by_card(@repository, card)
43
- path = '../' + card_builder.relative_path
44
- link = "[#{card_builder.card_name}](#{path})"
45
- "- #{link}"
46
- end.join("\n")
60
+ board_builder = card_builder.board_builder
61
+ list_builder = card_builder.list_builder
62
+
63
+ board_path = "[#{board_builder.board_name}](../#{board_builder.relative_path}/README.md)"
64
+ list_path = "[#{list_builder.list_name}](../#{list_builder.relative_path}/README.md)"
65
+ card_path = "[#{card_builder.card_name}](../#{card_builder.relative_path})"
66
+
67
+ ((structure[board_path] ||= {})[list_path] ||= []) << card_path
68
+ end
69
+
70
+ structure
47
71
  end
48
72
 
49
73
  def label_name
@@ -1,3 +1,3 @@
1
1
  module TrelloFs
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trello-fs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matúš Tomlein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-08 00:00:00.000000000 Z
11
+ date: 2015-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler