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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 117a1e63ffe4109064607e746bc4c48b42d923d6
4
- data.tar.gz: 4d428edd63053d7b021ad32d8c479b7f5fb54931
2
+ SHA256:
3
+ metadata.gz: bcfbe52f9e00d9fbb3273fc84d94524b2c558b4332e36b0590c9e9a3639f562c
4
+ data.tar.gz: ef883bfc44a231a7ab6bc18b1b2783e5d938988e445f8d74a200e18b5eb4321d
5
5
  SHA512:
6
- metadata.gz: 96086eddeb94cfa9f01c37d9df640a71698f591ef1281f9a7ba1fcc40ab5e6a31f06bf40f7c987b741b64dbffa67f6dc63c3962f4434c3eea40e679fab9755a5
7
- data.tar.gz: 320d92a0cc339558fabaf5372476764f721c73cbf5ace1a3366c3fb2c09ec52e38e2a7aef7c6d3e31957bdf21a594006cd579bbf6843764226b54dcf0dbd49a8
6
+ metadata.gz: ae40905a29fb8f05497e1193346599c2c54ed39ebd9245205e07f0c1c3b31c5c7c1d9531f0ea9dd590a47b5c218c0f231f4c2ee7ccee3fffb94feef53d4934c3
7
+ data.tar.gz: ddf1af1d7aa362ddf7862cc38cdbbb5d72287610b39ce6f5a82534eda6d204649c5b3b42de09234bb25f203fa5c04ba2b477b7d333518400f05cfb2485427cbf
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ jobs:
3
+ build:
4
+ working_directory: ~/checkoff
5
+ docker:
6
+ - image: apiology/circleci-ruby:latest
7
+ steps:
8
+ - checkout
9
+ - run: bundle install
10
+ - run: bundle exec rake --jobs=4 test
11
+ - run: bundle exec rake --jobs=4 quality
@@ -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/TrailingCommaInLiteral:
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
@@ -1 +1 @@
1
- ruby-2.3.6
1
+ 2.6.3
@@ -2,10 +2,14 @@ before_install:
2
2
  - gem install bundler
3
3
  language: ruby
4
4
  rvm:
5
- - ruby-2.5.0
6
- - ruby-2.4.3
7
- - ruby-2.3.6
8
- - ruby-2.2.9
9
- # - jruby-head # see https://github.com/apiology/quality/issues/59
10
- # - jruby-9.0 # see https://github.com/apiology/quality/issues/59
11
- # - ruby-head # Upstream bug - see https://travis-ci.org/apiology/checkoff/jobs/138626934
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
@@ -75,7 +75,7 @@ And even gather counts for project metrics:
75
75
  ```bash
76
76
  $ checkoff view 'Personal Projects' 'Create demo' | jq 'to_entries | map(.value) | flatten | map(.name) | length'
77
77
  4
78
- $
78
+ $
79
79
  ```
80
80
 
81
81
  ## Caching
@@ -63,7 +63,7 @@ module Checkoff
63
63
  def quickadd(workspace_name, task_name)
64
64
  workspace = @workspaces.workspace_by_name(workspace_name)
65
65
  @tasks.add_task(task_name,
66
- workspace_id: workspace.id)
66
+ workspace_gid: workspace.gid)
67
67
  end
68
68
 
69
69
  def validate_args!(args)
@@ -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.id)
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
- id = @config[:my_tasks][workspace_name] unless my_tasks.nil?
52
- if my_tasks.nil? || id.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.find_by_id(id)
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.id
86
+ options[:project] = project.gid
87
87
  options[:options][:fields] += extra_fields
88
88
  client.tasks.find_all(options).to_a
89
89
  end
@@ -42,15 +42,15 @@ module Checkoff
42
42
  end
43
43
 
44
44
  def add_task(name,
45
- workspace_id: default_workspace_id,
46
- assignee_id: default_assignee_id)
45
+ workspace_gid: default_workspace_gid,
46
+ assignee_gid: default_assignee_gid)
47
47
  @asana_task.create(client,
48
- assignee: assignee_id,
49
- workspace: workspace_id, name: name)
48
+ assignee: assignee_gid,
49
+ workspace: workspace_gid, name: name)
50
50
  end
51
51
 
52
- def default_assignee_id
53
- @config[:default_assignee_id]
52
+ def default_assignee_gid
53
+ @config[:default_assignee_gid]
54
54
  end
55
55
  end
56
56
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Checkoff
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -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 default_workspace_id
19
- @config[:default_workspace_id]
19
+ def default_workspace_gid
20
+ @config[:default_workspace_gid]
20
21
  end
21
22
 
22
23
  def workspace_by_name(workspace_name)
@@ -1 +1 @@
1
- 8
1
+ 7
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.2.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: 2018-04-26 00:00:00.000000000 Z
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
- rubyforge_project:
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)
data/circle.yml DELETED
@@ -1,6 +0,0 @@
1
- test:
2
- override:
3
- - bundle exec rake localtest
4
- general:
5
- artifacts:
6
- - "coverage"