trellohub 0.0.1 → 0.1.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/.rspec +2 -0
- data/.travis.yml +14 -0
- data/Gemfile +9 -0
- data/README.md +33 -7
- data/bin/trellohub +7 -0
- data/lib/trellohub.rb +10 -3
- data/lib/trellohub/card.rb +8 -79
- data/lib/trellohub/configurable.rb +75 -36
- data/lib/trellohub/core_ext/array.rb +10 -0
- data/lib/trellohub/core_ext/hash.rb +9 -1
- data/lib/trellohub/core_ext/string.rb +22 -0
- data/lib/trellohub/form.rb +142 -0
- data/lib/trellohub/form/card.rb +163 -0
- data/lib/trellohub/form/issue.rb +191 -0
- data/lib/trellohub/list.rb +18 -2
- data/lib/trellohub/member.rb +14 -2
- data/lib/trellohub/mocking.rb +87 -0
- data/lib/trellohub/repository.rb +47 -0
- data/lib/trellohub/synchronal.rb +22 -41
- data/lib/trellohub/version.rb +1 -1
- data/spec/helper.rb +59 -0
- data/spec/trellohub_spec.rb +51 -0
- metadata +20 -7
- data/lib/trellohub/cards.rb +0 -58
- data/lib/trellohub/lists.rb +0 -17
data/lib/trellohub/cards.rb
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
require 'trellohub/board'
|
2
|
-
|
3
|
-
module Trellohub
|
4
|
-
module Cards
|
5
|
-
def valid_attributes
|
6
|
-
%i(
|
7
|
-
id
|
8
|
-
checkItemStates
|
9
|
-
closed
|
10
|
-
dateLastActivity
|
11
|
-
desc
|
12
|
-
descData
|
13
|
-
idBoard
|
14
|
-
idList
|
15
|
-
idMembersVoted
|
16
|
-
idShort
|
17
|
-
idAttachmentCover
|
18
|
-
name
|
19
|
-
pos
|
20
|
-
shortLink
|
21
|
-
badges
|
22
|
-
due
|
23
|
-
idChecklists
|
24
|
-
idMembers
|
25
|
-
labels
|
26
|
-
shortUrl
|
27
|
-
subscribed
|
28
|
-
)
|
29
|
-
end
|
30
|
-
|
31
|
-
def other_attributes
|
32
|
-
%i(
|
33
|
-
key
|
34
|
-
repository
|
35
|
-
list_name
|
36
|
-
members
|
37
|
-
milestore
|
38
|
-
issue
|
39
|
-
)
|
40
|
-
end
|
41
|
-
|
42
|
-
def all_attributes
|
43
|
-
self.valid_attributes + self.other_attributes
|
44
|
-
end
|
45
|
-
|
46
|
-
def all
|
47
|
-
@all || self.all!
|
48
|
-
end
|
49
|
-
|
50
|
-
def all!
|
51
|
-
@all = Trell.cards(Trellohub::Board.id)
|
52
|
-
end
|
53
|
-
|
54
|
-
def all_clear
|
55
|
-
self.all.each { |card| Trell.delete_card(card.id) }
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
data/lib/trellohub/lists.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'trellohub/board'
|
2
|
-
|
3
|
-
module Trellohub
|
4
|
-
module Lists
|
5
|
-
def all
|
6
|
-
@all || self.all!
|
7
|
-
end
|
8
|
-
|
9
|
-
def all!
|
10
|
-
@all = Trell.lists(Trellohub::Board.id)
|
11
|
-
end
|
12
|
-
|
13
|
-
def find_by(name: nil)
|
14
|
-
self.all.find { |list| list.name == name }
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|