checkoff 0.33.1 → 0.34.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdeaf61d33faef2fafd4f051971864380978305ffb4e7dbf0b17df9ae05df49d
4
- data.tar.gz: 2b6af7c4bb2b80d8d8b3a4e31f3c2af295c2102f907e4bc60912f5bd857fadd0
3
+ metadata.gz: 4765aedff037e2fd029982dbbeca62019cf9edf5e28b80bfaab298e75895f8fe
4
+ data.tar.gz: 1dc2e1f230a95dc3f2bbc0f77710e7a644441b2532e1f53151eadb99e0021ebf
5
5
  SHA512:
6
- metadata.gz: dbbaf91613072385e4d4a73517a6e15b044ad5ae7c21356e25424be252b9c5d29bc09337e1d5c755bb53bfac68a9bd6ed401b6e1c687f1c6e88f6f280b04565d
7
- data.tar.gz: 4553fa61a5929835656fe6f6d0bdcfa4711fd6273bbd6de1b46b536aed7b6d44c89e366e8fd1940c7f88e7d3845a11ad42a5185a8bff2c26779b9e889bcbc979
6
+ metadata.gz: 8a2b92adf00c68e573356dca4f6d3dc906052c8bad787187d3f53a364ec75398e25b1f46576baa6a54386c0fde67e3c8c062ca5370946bc700829469035c28dd
7
+ data.tar.gz: 43c625cbed5a5c006c5b7caff410481890e073e4ecb779e4a59d46141d384839088740741ba4dc40c995e1d70cdc4a1da9d60b8f8dc7f3db0846a739ab41a090
data/.rubocop.yml CHANGED
@@ -98,7 +98,7 @@ Style/TrivialAccessors:
98
98
 
99
99
  AllCops:
100
100
  NewCops: enable
101
- TargetRubyVersion: 2.7
101
+ TargetRubyVersion: 3.0
102
102
  Exclude:
103
103
  - 'bin/*'
104
104
  - 'vendor/**/*'
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- checkoff (0.33.1)
15
+ checkoff (0.34.0)
16
16
  activesupport
17
17
  asana (> 0.10.0)
18
18
  cache_method
@@ -22,7 +22,7 @@ PATH
22
22
  GEM
23
23
  remote: https://rubygems.org/
24
24
  specs:
25
- activesupport (7.0.4.2)
25
+ activesupport (7.0.4.3)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 1.6, < 2)
28
28
  minitest (>= 5.1)
@@ -40,7 +40,7 @@ GEM
40
40
  concurrent-ruby
41
41
  childprocess (4.1.0)
42
42
  coderay (1.1.3)
43
- concurrent-ruby (1.1.10)
43
+ concurrent-ruby (1.2.2)
44
44
  crack (0.4.5)
45
45
  rexml
46
46
  dalli (3.2.4)
@@ -89,7 +89,7 @@ GEM
89
89
  mixlib-config (>= 2.2.1, < 4)
90
90
  mixlib-shellout
91
91
  method_source (1.0.0)
92
- minitest (5.17.0)
92
+ minitest (5.18.0)
93
93
  minitest-profile (0.0.2)
94
94
  minitest-reporters (1.5.0)
95
95
  ansi
@@ -122,7 +122,7 @@ GEM
122
122
  coderay (~> 1.1)
123
123
  method_source (~> 1.0)
124
124
  public_suffix (5.0.0)
125
- rack (3.0.4.1)
125
+ rack (3.0.6.1)
126
126
  rainbow (3.1.1)
127
127
  rake (13.0.3)
128
128
  regexp_parser (2.6.0)
data/checkoff.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = 'Command-line and gem client for Asana (unofficial)'
14
14
  spec.homepage = 'https://github.com/apiology/checkoff'
15
15
  spec.license = 'MIT license'
16
- spec.required_ruby_version = '>= 2.7'
16
+ spec.required_ruby_version = '>= 3.0'
17
17
 
18
18
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
19
  `git ls-files -z`.split("\x0").reject do |f|
data/fix.sh CHANGED
@@ -116,7 +116,7 @@ ensure_ruby_versions() {
116
116
 
117
117
  # You can find out which feature versions are still supported / have
118
118
  # been release here: https://www.ruby-lang.org/en/downloads/
119
- ruby_versions="$(latest_ruby_version 2.7)"
119
+ ruby_versions="$(latest_ruby_version 3.0)"
120
120
 
121
121
  echo "Latest Ruby versions: ${ruby_versions}"
122
122
 
@@ -134,6 +134,7 @@ ensure_ruby_versions() {
134
134
  CFLAGS="-Wno-error=implicit-function-declaration" rbenv install -s "${ver}"
135
135
  else
136
136
  rbenv install -s "${ver}"
137
+ hash -r # ensure we are seeing latest bundler etc
137
138
  fi
138
139
  done
139
140
  }
@@ -152,10 +153,9 @@ ensure_bundle() {
152
153
  #
153
154
  # https://app.asana.com/0/1107901397356088/1199504270687298
154
155
 
155
- # Version 2.2.22 of bundler comes with a fix to ensure the 'bundle
156
- # update --conservative' flag works as expected - important when
157
- # doing a 'bundle update' on a about-to-be-published gem after
158
- # bumping a gem version.
156
+ # Version <2.2.22 of bundler isn't compatible with Ruby 3.3:
157
+ #
158
+ # https://stackoverflow.com/questions/70800753/rails-calling-didyoumeanspell-checkers-mergeerror-name-spell-checker-h
159
159
  need_better_bundler=false
160
160
  if [ "${bundler_version_major}" -lt 2 ]
161
161
  then
@@ -167,7 +167,7 @@ ensure_bundle() {
167
167
  need_better_bundler=true
168
168
  elif [ "${bundler_version_minor}" -eq 2 ]
169
169
  then
170
- if [ "${bundler_version_patch}" -lt 22 ]
170
+ if [ "${bundler_version_patch}" -lt 23 ]
171
171
  then
172
172
  need_better_bundler=true
173
173
  fi
@@ -175,7 +175,11 @@ ensure_bundle() {
175
175
  fi
176
176
  if [ "${need_better_bundler}" = true ]
177
177
  then
178
- gem install --no-document bundler
178
+ # need to do this first before 'bundle update --bundler' will work
179
+ make bundle_install
180
+ bundle update --bundler
181
+ # ensure next step installs fresh bundle
182
+ rm -f Gemfile.lock.installed
179
183
  fi
180
184
  make bundle_install
181
185
  # https://bundler.io/v2.0/bundle_lock.html#SUPPORTING-OTHER-PLATFORMS
@@ -27,7 +27,7 @@ module Checkoff
27
27
  def client
28
28
  @client ||= @asana_client_class.new do |c|
29
29
  c.authentication :access_token, @config.fetch(:personal_access_token)
30
- c.default_headers 'asana-enable' => 'new_project_templates,new_user_task_lists,new_memberships'
30
+ c.default_headers 'asana-enable' => 'new_project_templates,new_user_task_lists,new_memberships,new_goal_memberships'
31
31
  end
32
32
  end
33
33
 
@@ -3,5 +3,5 @@
3
3
  # Command-line and gem client for Asana (unofficial)
4
4
  module Checkoff
5
5
  # Version of library
6
- VERSION = '0.33.1'
6
+ VERSION = '0.34.0'
7
7
  end
@@ -18,9 +18,11 @@ module Checkoff
18
18
  SHORT_CACHE_TIME = MINUTE
19
19
 
20
20
  def initialize(config: Checkoff::Internal::ConfigLoader.load(:asana),
21
- client: Checkoff::Clients.new(config: config).client)
21
+ client: Checkoff::Clients.new(config: config).client,
22
+ asana_workspace: Asana::Resources::Workspace)
22
23
  @config = config
23
24
  @client = client
25
+ @asana_workspace = asana_workspace
24
26
  end
25
27
 
26
28
  # Pulls an Asana workspace object
@@ -30,6 +32,10 @@ module Checkoff
30
32
  end
31
33
  end
32
34
 
35
+ def default_workspace
36
+ @asana_workspace.find_by_id(client, default_workspace_gid)
37
+ end
38
+
33
39
  def workspace_or_raise(workspace_name)
34
40
  workspace = workspace(workspace_name)
35
41
  raise "Could not find workspace #{workspace_name}" if workspace.nil?
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.33.1
4
+ version: 0.34.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: 2023-03-02 00:00:00.000000000 Z
11
+ date: 2023-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -447,14 +447,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
447
447
  requirements:
448
448
  - - ">="
449
449
  - !ruby/object:Gem::Version
450
- version: '2.7'
450
+ version: '3.0'
451
451
  required_rubygems_version: !ruby/object:Gem::Requirement
452
452
  requirements:
453
453
  - - ">="
454
454
  - !ruby/object:Gem::Version
455
455
  version: '0'
456
456
  requirements: []
457
- rubygems_version: 3.1.6
457
+ rubygems_version: 3.2.33
458
458
  signing_key:
459
459
  specification_version: 4
460
460
  summary: Command-line and gem client for Asana (unofficial)