t1k 1.1.10 → 1.2.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: f370fc7edc44db8ab23c2ccdf73981d8f933d3f1
4
- data.tar.gz: c5a7eb67b8603b72795fe60cdbdfee4594d27c7d
3
+ metadata.gz: 032fd6051d9d59dc4ae603a5247c6510bd17cc2f
4
+ data.tar.gz: ca404f600d7a733a80b71d9c4af62b5b96d67996
5
5
  SHA512:
6
- metadata.gz: 85d5d5399dba63eb36d6d09ae8bb6d7fa99dba49ea85d598e13128c9baa591d69e01389af83aafbf49b1c73cfd9d23e394906cf1efefdcfee6f72875aedfb4ea
7
- data.tar.gz: 8c20dc5697192bc3d3bba2637fa22053993d0417b918d382bccfb8ba73963bafdb4910d7f3cc15bd737d2040e238507a879c384495345a02ce8fda742a27b3f9
6
+ metadata.gz: 28f58526fb0d9fcb5f6266060bf56d895f9c2fba0d153cf6e811a278705327a6e06f1de1c37bc1cd966d420478d9334331e65b876cd27943cb54ac6c85d8a072
7
+ data.tar.gz: c3acb79196e7eaf8c026ef818ac4df6250d5576d9e66b0ad7f2315f6817231d99193e55b0e03ca1e7db286e9e05aeb3a956475b928740de5785096ed76df9b44
@@ -29,18 +29,16 @@ module T1k
29
29
  end
30
30
 
31
31
  def self.get_card url_card
32
- begin
33
- puts "Catching card"
32
+ puts "Catching card"
34
33
 
35
- me = ::Trello::Member.find(self.user_name)
36
- board = me.boards.select{|x| x.name.upcase == self.board_name.upcase}.first
37
- card = board.cards.select{|x| x.url.index(url_card)}.first
38
- raise if card.nil?
34
+ me = ::Trello::Member.find(self.user_name)
35
+ raise "User not found" if me.nil?
36
+ board = me.boards.select{|x| x.name.upcase == self.board_name.upcase}.first
37
+ raise "Board not found.\nBoards available: #{me.boards.map(&:name)}" if board.nil?
38
+ card = board.cards.select{|x| x.url.index(url_card)}.first
39
+ raise "Card not found" if card.nil?
39
40
 
40
- card
41
- rescue
42
- raise 'Card not found'
43
- end
41
+ card
44
42
  end
45
43
 
46
44
  def self.update_card card, issue
data/lib/t1k/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module T1k
2
- VERSION = "1.1.10"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: t1k
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Maia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-10 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails