github-trello-cl 0.1.5 → 0.1.6
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/Gemfile.lock +1 -1
- data/lib/trello.rb +16 -4
- data/trello.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52d23c5c2483d82c0002d5af602cc60782de7889
|
4
|
+
data.tar.gz: 3342b8d2f6634972c01c4005ba327b76a0019540
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 763cb40425184c045a963154dc89a68953a076b7192a452e3e461d65123c9eb36dbca3ee7d8ec55d5a371f0974d45298403cad0e8d8b5ce105f0268839178d36
|
7
|
+
data.tar.gz: 39474a635d8bf949770d2fc33c0db2be0271d6a1b698dc2716daa3cb91d1691ceb2431eee8fc830338ff54d3be01d635a7ecd74d7da1eb860fca2a190e7b366a
|
data/Gemfile.lock
CHANGED
data/lib/trello.rb
CHANGED
@@ -86,8 +86,9 @@ module Trello
|
|
86
86
|
c.option '--user USERNAME', 'Configures the user\'s Trello username (required)'
|
87
87
|
c.option '--key APIKEY', 'Configures the user\'s API key for access to the API backend'
|
88
88
|
c.option '--url PATH', 'Configures the path to this trello CL\'s API backend'
|
89
|
+
c.option '--repo REPO', 'Configures the Github repo with which your branches are associated. This should include the organization, e.g. Organization/cool-repo'
|
89
90
|
c.action do |args, options|
|
90
|
-
unless [options.user, options.url, options.key].all?(&:nil?)
|
91
|
+
unless [options.user, options.url, options.key, options.repo].all?(&:nil?)
|
91
92
|
if options.user
|
92
93
|
response = Api::Trello.make_call(:get, "members/#{options.user}", {fields: :none})
|
93
94
|
config.user = response['id']
|
@@ -97,8 +98,18 @@ module Trello
|
|
97
98
|
config.url = format_api_url(options.url)
|
98
99
|
end
|
99
100
|
|
100
|
-
|
101
|
-
|
101
|
+
# handle unformatted keys
|
102
|
+
{
|
103
|
+
options.key => 'api_key',
|
104
|
+
options.repo => 'repo'
|
105
|
+
}.each do |option, config_key|
|
106
|
+
if option
|
107
|
+
config[config_key] = option
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
unless config.repo.include? '/'
|
112
|
+
puts "Your repo #{config.repo} doesn't appear to include the organization. That's going to break links on Trello. Make sure to fix that before starting cards."
|
102
113
|
end
|
103
114
|
|
104
115
|
puts "Config updated."
|
@@ -160,6 +171,7 @@ module Trello
|
|
160
171
|
card_number, branch = args
|
161
172
|
|
162
173
|
user_check
|
174
|
+
param_check 'repo', "You need to specify what repository you're working in with 'trello config --repo <name>'."
|
163
175
|
|
164
176
|
user = config['user']
|
165
177
|
|
@@ -180,7 +192,7 @@ module Trello
|
|
180
192
|
end
|
181
193
|
end
|
182
194
|
|
183
|
-
response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (options['no-branch'] ? nil : branch)})
|
195
|
+
response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (options['no-branch'] ? nil : branch), repo: config['repo']})
|
184
196
|
if response.success?
|
185
197
|
say "Started card #{card_number} with branch #{prefixed_branch}."
|
186
198
|
end
|
data/trello.gemspec
CHANGED
@@ -2,7 +2,7 @@ $LOAD_PATH << File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'github-trello-cl'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.6'
|
6
6
|
s.date = '2015-02-23'
|
7
7
|
s.summary = "Interface with trello"
|
8
8
|
s.description = "A tool to allow people using Trello as a workflow to interface with it via command line access to an API"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-trello-cl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Pletcher
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
141
|
+
rubygems_version: 2.4.6
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Interface with trello
|