checkoff 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +11 -0
- data/.rubocop.yml +4 -1
- data/.ruby-version +1 -1
- data/.travis.yml +11 -7
- data/README.md +1 -1
- data/lib/checkoff/cli.rb +1 -1
- data/lib/checkoff/projects.rb +5 -5
- data/lib/checkoff/tasks.rb +6 -6
- data/lib/checkoff/version.rb +1 -1
- data/lib/checkoff/workspaces.rb +3 -2
- data/metrics/mdl_high_water_mark +1 -1
- data/metrics/pycodestyle_high_water_mark +1 -0
- metadata +5 -5
- data/circle.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bcfbe52f9e00d9fbb3273fc84d94524b2c558b4332e36b0590c9e9a3639f562c
|
4
|
+
data.tar.gz: ef883bfc44a231a7ab6bc18b1b2783e5d938988e445f8d74a200e18b5eb4321d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae40905a29fb8f05497e1193346599c2c54ed39ebd9245205e07f0c1c3b31c5c7c1d9531f0ea9dd590a47b5c218c0f231f4c2ee7ccee3fffb94feef53d4934c3
|
7
|
+
data.tar.gz: ddf1af1d7aa362ddf7862cc38cdbbb5d72287610b39ce6f5a82534eda6d204649c5b3b42de09234bb25f203fa5c04ba2b477b7d333518400f05cfb2485427cbf
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# I like trailing commas in maps. They let me insert new elements and
|
2
2
|
# see them as one line in a diff, not two.
|
3
|
-
Style/
|
3
|
+
Style/TrailingCommaInArrayLiteral:
|
4
|
+
EnforcedStyleForMultiline: comma
|
5
|
+
|
6
|
+
Style/TrailingCommaInHashLiteral:
|
4
7
|
EnforcedStyleForMultiline: comma
|
5
8
|
|
6
9
|
# I use keyword arguments for a poor man's dependency injection to cut
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.6.3
|
data/.travis.yml
CHANGED
@@ -2,10 +2,14 @@ before_install:
|
|
2
2
|
- gem install bundler
|
3
3
|
language: ruby
|
4
4
|
rvm:
|
5
|
-
- ruby-2.5.
|
6
|
-
- ruby-2.4.
|
7
|
-
- ruby-2.3.
|
8
|
-
- ruby-2.2.
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
5
|
+
- ruby-2.5.1
|
6
|
+
- ruby-2.4.4
|
7
|
+
- ruby-2.3.7
|
8
|
+
# - ruby-2.2.10 # no longer supported
|
9
|
+
#
|
10
|
+
# - jruby-head # JRuby not supported by dependencies
|
11
|
+
# - jruby-9.0 # see:
|
12
|
+
# https://github.com/apiology/quality/issues/59
|
13
|
+
# https://github.com/brianmario/charlock_holmes/issues/124
|
14
|
+
#
|
15
|
+
- ruby-head # Upstream bug - see https://travis-ci.org/apiology/checkoff/jobs/138626934
|
data/README.md
CHANGED
data/lib/checkoff/cli.rb
CHANGED
data/lib/checkoff/projects.rb
CHANGED
@@ -43,16 +43,16 @@ module Checkoff
|
|
43
43
|
def projects_by_workspace_name(workspace_name)
|
44
44
|
workspace = @workspaces.workspace_by_name(workspace_name)
|
45
45
|
raise "Could not find workspace named #{workspace_name}" unless workspace
|
46
|
-
projects.find_by_workspace(workspace: workspace.
|
46
|
+
projects.find_by_workspace(workspace: workspace.gid)
|
47
47
|
end
|
48
48
|
|
49
49
|
def my_tasks(workspace_name)
|
50
50
|
my_tasks = @config[:my_tasks]
|
51
|
-
|
52
|
-
if my_tasks.nil? ||
|
51
|
+
gid = @config[:my_tasks][workspace_name] unless my_tasks.nil?
|
52
|
+
if my_tasks.nil? || gid.nil?
|
53
53
|
raise "Please define [:my_tasks][#{workspace_name}] in config file"
|
54
54
|
end
|
55
|
-
projects.
|
55
|
+
projects.find_by_gid(gid)
|
56
56
|
end
|
57
57
|
|
58
58
|
def project(workspace_name, project_name)
|
@@ -83,7 +83,7 @@ module Checkoff
|
|
83
83
|
def tasks_from_project(project, only_uncompleted: true, extra_fields: [])
|
84
84
|
options = task_options
|
85
85
|
options[:completed_since] = '9999-12-01' if only_uncompleted
|
86
|
-
options[:project] = project.
|
86
|
+
options[:project] = project.gid
|
87
87
|
options[:options][:fields] += extra_fields
|
88
88
|
client.tasks.find_all(options).to_a
|
89
89
|
end
|
data/lib/checkoff/tasks.rb
CHANGED
@@ -42,15 +42,15 @@ module Checkoff
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def add_task(name,
|
45
|
-
|
46
|
-
|
45
|
+
workspace_gid: default_workspace_gid,
|
46
|
+
assignee_gid: default_assignee_gid)
|
47
47
|
@asana_task.create(client,
|
48
|
-
assignee:
|
49
|
-
workspace:
|
48
|
+
assignee: assignee_gid,
|
49
|
+
workspace: workspace_gid, name: name)
|
50
50
|
end
|
51
51
|
|
52
|
-
def
|
53
|
-
@config[:
|
52
|
+
def default_assignee_gid
|
53
|
+
@config[:default_assignee_gid]
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
data/lib/checkoff/version.rb
CHANGED
data/lib/checkoff/workspaces.rb
CHANGED
@@ -12,11 +12,12 @@ module Checkoff
|
|
12
12
|
def client
|
13
13
|
@client ||= @asana_client.new do |c|
|
14
14
|
c.authentication :access_token, @config[:personal_access_token]
|
15
|
+
c.default_headers "asana-enable" => "string_ids,new_sections"
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
def
|
19
|
-
@config[:
|
19
|
+
def default_workspace_gid
|
20
|
+
@config[:default_workspace_gid]
|
20
21
|
end
|
21
22
|
|
22
23
|
def workspace_by_name(workspace_name)
|
data/metrics/mdl_high_water_mark
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
7
|
@@ -0,0 +1 @@
|
|
1
|
+
0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkoff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -172,6 +172,7 @@ executables:
|
|
172
172
|
extensions: []
|
173
173
|
extra_rdoc_files: []
|
174
174
|
files:
|
175
|
+
- ".circleci/config.yml"
|
175
176
|
- ".gitignore"
|
176
177
|
- ".rubocop.yml"
|
177
178
|
- ".ruby-version"
|
@@ -184,7 +185,6 @@ files:
|
|
184
185
|
- bin/console
|
185
186
|
- bin/setup
|
186
187
|
- checkoff.gemspec
|
187
|
-
- circle.yml
|
188
188
|
- coverage/.last_run.json
|
189
189
|
- docs/example_project.png
|
190
190
|
- exe/checkoff
|
@@ -216,6 +216,7 @@ files:
|
|
216
216
|
- metrics/mdl_high_water_mark
|
217
217
|
- metrics/pep8_high_water_mark
|
218
218
|
- metrics/punchlist_high_water_mark
|
219
|
+
- metrics/pycodestyle_high_water_mark
|
219
220
|
- metrics/rails_best_practices_high_water_mark
|
220
221
|
- metrics/rubocop_high_water_mark
|
221
222
|
- metrics/scalastyle_high_water_mark
|
@@ -239,8 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
240
|
- !ruby/object:Gem::Version
|
240
241
|
version: '0'
|
241
242
|
requirements: []
|
242
|
-
|
243
|
-
rubygems_version: 2.6.14
|
243
|
+
rubygems_version: 3.0.3
|
244
244
|
signing_key:
|
245
245
|
specification_version: 4
|
246
246
|
summary: Command-line and gem client for Asana (unofficial)
|