totrello 0.2.02 → 0.2.03
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/ToTrello +15 -0
- data/lib/totrello/version.rb +1 -1
- data/lib/totrello.rb +4 -15
- data/test/totrello_config_spec.rb +1 -0
- data/test/totrello_spec.rb +11 -3
- data/totrello.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTNjOGEzMzY1NTg4ZDE3Y2VhNWVhM2RhMmY3ZjIyMWNmOTc3YTU4NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGE2NGJhZjIyMjc4YjlkNGUwMjhmYmFlYTk0ODE4ZDNhNGMxYzhiNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTc0NDVkOTJlNzdhMDRkZmZiZWEwYTQwZmM5MTEzNzFiNjRjMDgwNTc4ZGM5
|
10
|
+
NTZhNDMzNjdkMjQyZWQxMjc0ZDQ0MGU0Y2IyYmQzM2RlYzg1NmY4YjdmMGNk
|
11
|
+
Y2FkOGUxNTA0YmNiNWM2MWE0NDMyODcyNTBlN2EyOGE2YjJjZjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2RlYzBjM2I0ZDQ5NGMzMmQ5Y2EzOTE3NDYwYjk2YjM4MjA5NWVjZTg4MGMx
|
14
|
+
ZmUwYzAzMjgyNGIyN2VmMDg1YjYyNTYyNTNmYWExOTZlN2IxNGQ4NGQ2OTZk
|
15
|
+
MGVkODdhOTViYzkzM2M4YjQ5YzRhZjg5N2JmMWJhMGZmMjE3Mzg=
|
data/bin/ToTrello
CHANGED
@@ -7,6 +7,21 @@ TRELLO_MEMBER_TOKEN = ENV['TRELLO_MEMBER_TOKEN']
|
|
7
7
|
def main
|
8
8
|
|
9
9
|
if TRELLO_DEVELOPER_PUBLIC_KEY.nil? || TRELLO_MEMBER_TOKEN.nil?
|
10
|
+
puts "ERROR:\n"
|
11
|
+
puts "Your Trello developer PK is: #{TRELLO_DEVELOPER_PUBLIC_KEY}\n"
|
12
|
+
puts "Your Trello member token is: #{TRELLO_MEMBER_TOKEN}\n\n"
|
13
|
+
puts "It looks like you haven't set either a TRELLO_DEVELOPER_PUBLIC_KEY or TRELLO_MEMBER_TOKEN.\n\n"
|
14
|
+
puts "You can generate a TRELLO_DEVELOPER_PUBLIC_KEY at:\n"
|
15
|
+
puts "https://trello.com/1/appKey/generate\n"
|
16
|
+
puts "You can generate a TRELLO_MEMBER_TOKEN at:\n"
|
17
|
+
puts " https://trello.com/1/authorize?key=[TRELLO_DEVELOPER_PUBLIC_KEY]&name=ToTrelloGem&expiration=never&response_type=token&scope=read,write\n\n"
|
18
|
+
puts "Then run:\n"
|
19
|
+
puts " $ export TRELLO_DEVELOPER_PUBLIC_KEY='[Your key here]'\n"
|
20
|
+
puts " $ export TRELLO_MEMBER_TOKEN='[Your key here]'\n"
|
21
|
+
|
22
|
+
puts "\nAnd try ToTrello again.\n"
|
23
|
+
|
24
|
+
|
10
25
|
exit(-1)
|
11
26
|
else
|
12
27
|
|
data/lib/totrello/version.rb
CHANGED
data/lib/totrello.rb
CHANGED
@@ -12,20 +12,10 @@ module Totrello
|
|
12
12
|
@config
|
13
13
|
|
14
14
|
def initialize(directory)
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
@config = totrello_config.build_hash
|
20
|
-
rescue
|
21
|
-
error_data = "It looks like you're missing some details:\n\n\n"
|
22
|
-
error_data += " You must define TRELLO_DEVELOPER_PUBLIC_KEY & TRELLO_MEMBER_TOKEN\n"
|
23
|
-
error_data += " \nYou can generate the TRELLO_DEVELOPER_PUBLIC_KEY at:\n"
|
24
|
-
error_data += " \nhttps://trello.com/1/appKey/generate\n"
|
25
|
-
error_data += " \nYou can generate the TRELLO_MEMBER_TOKEN at:\n "
|
26
|
-
error_data += "\nhttps://trello.com/1/authorize?key=[TRELLO_DEVELOPER_PUBLIC_KEY]&name=ToTrelloGem&expiration=never&response_type=token&scope=read,write\n"
|
27
|
-
puts error_data
|
28
|
-
end
|
15
|
+
@trello = TrelloCreator.new
|
16
|
+
@directory = directory
|
17
|
+
totrello_config = TotrelloConfig.new(directory)
|
18
|
+
@config = totrello_config.build_hash
|
29
19
|
end
|
30
20
|
|
31
21
|
def find_todo_items
|
@@ -56,7 +46,6 @@ module Totrello
|
|
56
46
|
card = @trello.create_card(board, todo[:todo], description ,list)
|
57
47
|
end
|
58
48
|
|
59
|
-
#TODO: Test if this works
|
60
49
|
def gen_description(file, todo, project_name)
|
61
50
|
out = "TODO item found by the [ToTrello](https://rubygems.org/gems/totrello) gem\n"
|
62
51
|
out += "===========================\n"
|
data/test/totrello_spec.rb
CHANGED
@@ -15,29 +15,37 @@ describe 'Totrello' do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
describe 'create_or_gen_board' do
|
18
|
+
|
18
19
|
it "should return a board" do
|
19
20
|
directory = "#{Dir.pwd}/test/test_data"
|
21
|
+
|
20
22
|
t = Totrello::Trelloize.new(directory)
|
21
23
|
board = t.create_or_gen_board(directory.split('/').last)
|
24
|
+
|
22
25
|
expect(board.name.downcase).to eq(directory.split('/').last.downcase)
|
26
|
+
|
23
27
|
end
|
24
28
|
|
25
29
|
end
|
26
30
|
|
27
31
|
describe 'create_card' do
|
32
|
+
|
28
33
|
it "should return a card" do
|
34
|
+
|
29
35
|
directory = "#{Dir.pwd}/test/test_data"
|
36
|
+
|
30
37
|
t = Totrello::Trelloize.new(directory)
|
31
38
|
board = t.create_or_gen_board(directory.split('/').last)
|
39
|
+
|
32
40
|
card_name = Digest::SHA1.hexdigest Time.now.to_s
|
41
|
+
|
33
42
|
card = t.create_trello_card(board, 'To Do', {:todo => card_name, :location => card_name.reverse }, directory.split('/').last)
|
43
|
+
|
34
44
|
expect(card).to include(card_name)
|
45
|
+
|
35
46
|
end
|
36
47
|
|
37
48
|
end
|
38
49
|
|
39
|
-
|
40
50
|
end
|
41
51
|
|
42
|
-
|
43
|
-
|
data/totrello.gemspec
CHANGED
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.6"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency 'rspec', '~> 3
|
24
|
-
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4
|
23
|
+
spec.add_development_dependency 'rspec', '~> 3'
|
24
|
+
spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
|
25
25
|
|
26
|
-
spec.add_dependency 'ruby-trello', '~> 1.1
|
26
|
+
spec.add_dependency 'ruby-trello', '~> 1.1'
|
27
27
|
|
28
28
|
end
|
29
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: totrello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.03
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Teeter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,42 +44,42 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 3
|
47
|
+
version: '3'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 3
|
54
|
+
version: '3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: codeclimate-test-reporter
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.4
|
61
|
+
version: '0.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.4
|
68
|
+
version: '0.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: ruby-trello
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.1
|
75
|
+
version: '1.1'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.1
|
82
|
+
version: '1.1'
|
83
83
|
description: This will take the todo items in your code and turn them into trello
|
84
84
|
cards
|
85
85
|
email: joshteeter@gmail.com
|