checkoff 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: 7de05bff57b8bc1ccd37b878944a994b3bad1d08ddfc5bddbd3b95fcbcfef219
4
- data.tar.gz: 1368a91a4848ef821ec1ea5d55c689d6a9a5e5d31854cd23b573f5034050b7f2
3
+ metadata.gz: 7b60fa3a74c9081153ae5c0f489da64684033ae6f675129d07aaf401dcc43170
4
+ data.tar.gz: a382e7ad7163e6465e561eb427f2ddc5c73c5039de45028d306aec082212995a
5
5
  SHA512:
6
- metadata.gz: a75ed4380070000a5c1a598871f41d34e9fc5bf1e45d6964fd739a8f907e759770caebbfe84a59c01e98d50798eff93c01fc3b664f0c24e014098a2b928cd0b9
7
- data.tar.gz: f23238f6b1aa52b41b3567b9246c9982a447f3300a881d15837d9691ea7942425da85b065ee898406b0a0c18a303d221cbe89b0568e7281f3bf10a792d0b9d82
6
+ metadata.gz: a3599189037cb4bc794f1acb098e927b8556d88bde21c49591e6e79b6cd203c74befad345c883a4c28e07edc73ca467601099a93f99b8b8abf4f28150df4aed6
7
+ data.tar.gz: 747a97c032b4e40ead6c6e2d76ec6e571b0b37e2ec7e66cf7ed706d95061ef90e0c2666f3d974199801b98c4f5083d772e76ddacd0460d549c326dcbb036b791
@@ -6,6 +6,12 @@ jobs:
6
6
  - image: apiology/circleci-ruby:latest
7
7
  steps:
8
8
  - checkout
9
- - run: bundle install
10
- - run: bundle exec rake --jobs=4 test
11
- - run: bundle exec rake --jobs=4 quality
9
+ - type: cache-restore
10
+ key: checkoff-{{ checksum "checkoff.gemspec" }}-{{ checksum "Gemfile" }}
11
+ - run: gem install --no-document bundler
12
+ - run: bundle install --path vendor/bundle --jobs=4
13
+ - type: cache-save
14
+ key: checkoff-{{ checksum "checkoff.gemspec" }}-{{ checksum "Gemfile" }}
15
+ paths:
16
+ - "vendor/bundle"
17
+ - run: bundle exec rake --jobs=4 ci
@@ -1,30 +1,27 @@
1
- # I like trailing commas in maps. They let me insert new elements and
1
+ # I like trailing commas in hashes. They let me insert new elements and
2
2
  # see them as one line in a diff, not two.
3
- Style/TrailingCommaInArrayLiteral:
3
+ Style/TrailingCommaInHashLiteral:
4
4
  EnforcedStyleForMultiline: comma
5
5
 
6
- Style/TrailingCommaInHashLiteral:
6
+ Style/TrailingCommaInArrayLiteral:
7
7
  EnforcedStyleForMultiline: comma
8
8
 
9
9
  # I use keyword arguments for a poor man's dependency injection to cut
10
10
  # down on the magic in my tests.
11
- ParameterLists:
11
+ Metrics/ParameterLists:
12
12
  CountKeywordArgs: false
13
13
 
14
- # If i'm using one function name and returning the contents of an
14
+ # If I'm using one function name and returning the contents of an
15
15
  # attribute, that's OK. The alternative would be this, which I find
16
16
  # confusing and often not really what I mean:
17
17
  #
18
18
  # attr_reader :something_else
19
19
  # alias_method :something, :something_else
20
- TrivialAccessors:
20
+ Style/TrivialAccessors:
21
21
  ExactNameMatch: true
22
22
 
23
- Layout/MultilineMethodCallIndentation:
24
- EnforcedStyle: indented
25
-
26
23
  #
27
- # Add 'XXX' to the standard list
24
+ # Add 'XX X' to the standard list
28
25
  #
29
26
  Style/CommentAnnotation:
30
27
  Keywords:
@@ -40,3 +37,41 @@ Style/CommentAnnotation:
40
37
  W"
41
38
  - "XX\
42
39
  X"
40
+
41
+ # https://stackoverflow.com/questions/40934345/rubocop-25-line-block-size-and-rspec-tests
42
+ Metrics/BlockLength:
43
+ # Exclude DSLs
44
+ Exclude:
45
+ - 'Rakefile'
46
+ - '*.gemspec'
47
+ - '**/*.rake'
48
+ - 'spec/**/*.rb'
49
+ - 'feature/**/*.rb'
50
+
51
+ # http://www.betterspecs.org/#single
52
+ #
53
+ # > in tests that are not isolated (e.g. ones that integrate with a
54
+ # > DB, an external webservice, or end-to-end-tests), you take a
55
+ # > massive performance hit to do the same setup over and over again,
56
+ # > just to set a different expectation in each test. In these sorts
57
+ # > of slower tests, I think it's fine to specify more than one
58
+ # > isolated behavior.
59
+ RSpec/MultipleExpectations:
60
+ Exclude:
61
+ - 'feature/**/*.rb'
62
+
63
+ Style/StringLiterals:
64
+ EnforcedStyle: single_quotes
65
+ SupportedStyles:
66
+ - single_quotes
67
+ - double_quotes
68
+ ConsistentQuotesInMultiline: true
69
+
70
+ AllCops:
71
+ TargetRubyVersion: 2.4
72
+
73
+
74
+ require:
75
+ - rubocop-rspec
76
+ - rubocop-minitest
77
+ - rubocop-rake
@@ -1 +1 @@
1
- 2.6.3
1
+ 2.6.6
@@ -1,15 +1,17 @@
1
+ language: ruby
2
+ cache: bundler
1
3
  before_install:
4
+ # https://bundler.io/blog/2019/05/14/
5
+ # solutions-for-cant-find-gem-bundler-with-executable-bundle.html
6
+ - gem update --system
2
7
  - gem install bundler
3
- language: ruby
4
8
  rvm:
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
9
+ # JRuby error with native code build - possibly can be overcome?
10
+ # checking for main() in -lstdc++... RuntimeError: The compiler failed to generate
11
+ # https://travis-ci.com/apiology/pronto-punchlist/jobs/264907931
12
+ # - jruby-head
13
+ - ruby-head
14
+ - ruby-2.7
15
+ - ruby-2.6
16
+ - ruby-2.5
17
+ - ruby-2.4
@@ -0,0 +1,27 @@
1
+ .PHONY: spec feature
2
+
3
+ all: localtest
4
+
5
+ localtest:
6
+ @bundle exec rake localtest
7
+
8
+ feature:
9
+ @bundle exec rake feature
10
+
11
+ spec:
12
+ @bundle exec rake spec
13
+
14
+ rubocop:
15
+ @bundle exec rake rubocop
16
+
17
+ punchlist:
18
+ @bundle exec rake punchlist
19
+
20
+ pronto:
21
+ @bundle exec rake pronto
22
+
23
+ bigfiles:
24
+ @bundle exec rake bigfiles
25
+
26
+ quality:
27
+ @bundle exec rake quality
@@ -1,7 +1,7 @@
1
- # frozen_string_literal: true
2
1
  # coding: ascii
2
+ # frozen_string_literal: true
3
3
 
4
- lib = File.expand_path('../lib', __FILE__)
4
+ lib = File.expand_path('lib', __dir__)
5
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  require 'checkoff/version'
7
7
 
@@ -27,11 +27,11 @@ Gem::Specification.new do |spec|
27
27
  spec.add_runtime_dependency 'cache_method'
28
28
  spec.add_runtime_dependency 'dalli'
29
29
 
30
- spec.add_development_dependency 'bundler', '~> 1.12'
30
+ spec.add_development_dependency 'bundler'
31
31
  spec.add_development_dependency 'minitest-profile'
32
32
  spec.add_development_dependency 'mocha'
33
- spec.add_development_dependency 'quality'
34
- spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'quality', '~> 37'
34
+ spec.add_development_dependency 'rake', '~> 13.0'
35
35
  spec.add_development_dependency 'rspec', '>=3.4'
36
36
  spec.add_development_dependency 'simplecov'
37
37
  end
@@ -103,7 +103,7 @@ module Checkoff
103
103
  stderr.puts " #{$PROGRAM_NAME} quickadd workspace task_name"
104
104
  stderr.puts
105
105
  stderr.puts "'project' can be set to a project name, or :my_tasks, " \
106
- ':my_tasks_upcoming, :my_tasks_new, or :my_tasks_today'
106
+ ":my_tasks_upcoming, :my_tasks_new, or :my_tasks_today"
107
107
  end
108
108
 
109
109
  def view(workspace_name, project_name, section_name)
@@ -10,7 +10,7 @@ module Checkoff
10
10
  def self.load(sym)
11
11
  file = "#{sym}.yml"
12
12
  YAML.load_file(File.expand_path("~/.#{file}"))
13
- .with_indifferent_access
13
+ .with_indifferent_access
14
14
  end
15
15
  end
16
16
  end
@@ -43,6 +43,7 @@ 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
+
46
47
  projects.find_by_workspace(workspace: workspace.gid)
47
48
  end
48
49
 
@@ -52,6 +53,7 @@ module Checkoff
52
53
  if my_tasks.nil? || gid.nil?
53
54
  raise "Please define [:my_tasks][#{workspace_name}] in config file"
54
55
  end
56
+
55
57
  projects.find_by_id(gid)
56
58
  end
57
59
 
@@ -87,6 +89,6 @@ module Checkoff
87
89
  options[:options][:fields] += extra_fields
88
90
  client.tasks.find_all(options).to_a
89
91
  end
90
- cache_method :tasks_from_project, LONG_CACHE_TIME
92
+ cache_method :tasks_from_project, SHORT_CACHE_TIME
91
93
  end
92
94
  end
@@ -54,7 +54,7 @@ module Checkoff
54
54
  raw_tasks = projects.tasks_from_project(project)
55
55
  by_assignee_status =
56
56
  projects.active_tasks(raw_tasks)
57
- .group_by(&:assignee_status)
57
+ .group_by(&:assignee_status)
58
58
  active_tasks = by_assignee_status[assignee_status]
59
59
  by_section(active_tasks)
60
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Checkoff
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
@@ -12,7 +12,7 @@ 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
+ c.default_headers 'asana-enable' => 'string_ids,new_sections'
16
16
  end
17
17
  end
18
18
 
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ desc 'Run tasks to be done during a continuous integration (CI) build'
3
4
  task ci: :localtest
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ desc 'Rebaseline quality thresholds to last commit'
3
4
  task :clear_metrics do |_t|
4
5
  ret =
5
6
  system('git checkout coverage/.last_run.json metrics/*_high_water_mark')
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ desc 'Standard build when running on a workstation'
3
4
  task localtest: %i[clear_metrics test quality]
@@ -1 +1 @@
1
- 459
1
+ 457
@@ -1,2 +1 @@
1
- 11
2
-
1
+ 10
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.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vince Broz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-28 00:00:00.000000000 Z
11
+ date: 2020-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.12'
75
+ version: '0'
76
76
  type: :development
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.12'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest-profile
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -112,30 +112,30 @@ dependencies:
112
112
  name: quality
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '37'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '37'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '10.0'
131
+ version: '13.0'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '10.0'
138
+ version: '13.0'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
- description:
167
+ description:
168
168
  email:
169
169
  - vince@broz.cc
170
170
  executables:
@@ -180,6 +180,7 @@ files:
180
180
  - CODE_OF_CONDUCT.md
181
181
  - Gemfile
182
182
  - LICENSE.txt
183
+ - Makefile
183
184
  - README.md
184
185
  - Rakefile
185
186
  - bin/console
@@ -225,7 +226,7 @@ homepage: http://github.com/apiology/checkoff
225
226
  licenses:
226
227
  - MIT
227
228
  metadata: {}
228
- post_install_message:
229
+ post_install_message:
229
230
  rdoc_options: []
230
231
  require_paths:
231
232
  - lib
@@ -241,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
242
  version: '0'
242
243
  requirements: []
243
244
  rubygems_version: 3.0.3
244
- signing_key:
245
+ signing_key:
245
246
  specification_version: 4
246
247
  summary: Command-line and gem client for Asana (unofficial)
247
248
  test_files: []