plan_my_stuff 0.12.0 → 0.14.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: d23d00fb8f2addae60d416beb76a19f81fdf0bb0ce5235453262317c6e351c94
4
- data.tar.gz: a83cf20f6347ae27df34133d20b0b10646f5a96346616d0b5594ea4bd965c10f
3
+ metadata.gz: 4bb39718bce95afcf03151d7feaed80b192a9d0ae9224ca1cbe1da5936b38cc7
4
+ data.tar.gz: 3d82fabbea5dc402278882bd93eedc21d7cbfaf8e868c13f30dfc759a6dc964e
5
5
  SHA512:
6
- metadata.gz: b4cb5444db19f7a551f7296d96145db4e4be90d7897235abd877771dbbc15ffcd3361a4faade94fa521f7e491828c794854d2b0ac97b76e38e7c122f4fc63d07
7
- data.tar.gz: a46060793225471181698152cf2681d8be3f64252a845aa2f9e0a838ffc1977f88c81f2b60b28507c8e8a7e7eb64e67016d163d7353d6c9dc9f5faa9b5f8e140
6
+ metadata.gz: d6195d4cd41797ac803b4c3b0fb8a009782f616a2e634f20eb94415f6863337e6ec46705fc0b75af1cd8ff37f07254b7dc3b14e46aff0d3a087bcb01c2adcab3
7
+ data.tar.gz: fcc8ed29694e8256132207014bf6f9ceea3fc0f93c9a50cc11601d22cbc745c09e16f058ba243b6069a9662669f3675e6877eaffd97316487ed810ef5a73e1df
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.0
4
+
5
+ ### Added
6
+
7
+ - `Repo.resolve!` now treats a String matching a configured repo key (e.g. `"dummy"` when
8
+ `config.repos[:dummy]` is set) as that key, returning a Repo with `key:` populated.
9
+ Previously only Symbols hit the key lookup; strings always went through `"Org/Repo"`
10
+ parsing and raised on names without a slash. This prevents the need to call `to_sym` from the consuming app
11
+
12
+ ## 0.13.0
13
+
14
+ ### Changed
15
+
16
+ - Internal: gem now autoloads `lib/plan_my_stuff/**` via Zeitwerk
17
+ (already shipped by railties - no new dep). All `require_relative`
18
+ boilerplate in the gem's lib tree is gone. The gem entry retains two
19
+ explicit `require_relative`s for files that fall outside the autoload
20
+ model: `errors.rb` (defines several sibling error classes) and
21
+ `engine.rb` (must register with Rails at load time).
22
+
3
23
  ## 0.12.0
4
24
 
5
25
  ### Added
@@ -10,5 +10,3 @@ module PlanMyStuff
10
10
  module Archive
11
11
  end
12
12
  end
13
-
14
- require_relative 'archive/sweep'
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'base_project_extractions/graphql_hydration'
4
-
5
3
  module PlanMyStuff
6
4
  # Shared base for GitHub Projects V2 wrappers. Holds attribute definitions, generic find/list/update machinery,
7
5
  # hydration, and instance helpers. Concrete subclasses (Project, TestingProject) add their own +create!+ behavior
@@ -1,10 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'issue_extractions/approvals'
4
- require_relative 'issue_extractions/links'
5
- require_relative 'issue_extractions/viewers'
6
- require_relative 'issue_extractions/waiting'
7
-
8
3
  module PlanMyStuff
9
4
  # Wraps a GitHub issue with parsed PMS metadata and comments.
10
5
  # Class methods provide the public API for CRUD operations.
@@ -1,10 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'pipeline/completed_sweep'
4
- require_relative 'pipeline/issue_linker'
5
- require_relative 'pipeline/status'
6
- require_relative 'pipeline/testing'
7
-
8
3
  module PlanMyStuff
9
4
  # High-level orchestration layer for the release pipeline.
10
5
  #
@@ -10,7 +10,3 @@ module PlanMyStuff
10
10
  module Reminders
11
11
  end
12
12
  end
13
-
14
- require_relative 'reminders/closer'
15
- require_relative 'reminders/fire'
16
- require_relative 'reminders/sweep'
@@ -44,8 +44,12 @@ module PlanMyStuff
44
44
 
45
45
  from_full_name!(full_name, key: repo)
46
46
  when String
47
- key = PlanMyStuff.configuration.repos.key(repo)
48
- from_full_name!(repo, key: key)
47
+ if PlanMyStuff.configuration.repos.has_key?(repo.to_sym)
48
+ resolve!(repo.to_sym)
49
+ else
50
+ key = PlanMyStuff.configuration.repos.key(repo)
51
+ from_full_name!(repo, key: key)
52
+ end
49
53
  else
50
54
  raise(ArgumentError, "Cannot resolve repo: #{repo.inspect}")
51
55
  end
@@ -3,7 +3,7 @@
3
3
  module PlanMyStuff
4
4
  module VERSION
5
5
  MAJOR = 0
6
- MINOR = 12
6
+ MINOR = 14
7
7
  TINY = 0
8
8
 
9
9
  # Set PRE to nil unless it's a pre-release (beta, rc, etc.)
data/lib/plan_my_stuff.rb CHANGED
@@ -1,50 +1,35 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'zeitwerk'
4
+
3
5
  require 'date'
4
6
 
5
7
  require 'active_support/core_ext/array/wrap'
6
8
  require 'active_support/core_ext/object/blank'
7
9
 
8
- require_relative 'plan_my_stuff/application_record'
9
- require_relative 'plan_my_stuff/approval'
10
- require_relative 'plan_my_stuff/archive'
11
- require_relative 'plan_my_stuff/attachment'
12
- require_relative 'plan_my_stuff/attachment_uploader'
13
- require_relative 'plan_my_stuff/base_metadata'
14
- require_relative 'plan_my_stuff/base_project'
15
- require_relative 'plan_my_stuff/base_project_item'
16
- require_relative 'plan_my_stuff/base_project_metadata'
17
- require_relative 'plan_my_stuff/cache'
18
- require_relative 'plan_my_stuff/client'
19
- require_relative 'plan_my_stuff/comment'
20
- require_relative 'plan_my_stuff/comment_metadata'
21
- require_relative 'plan_my_stuff/configuration'
22
- require_relative 'plan_my_stuff/custom_fields'
23
- require_relative 'plan_my_stuff/engine' if defined?(Rails)
10
+ loader = Zeitwerk::Loader.for_gem
11
+ loader.inflector.inflect(
12
+ 'graphql' => 'GraphQL',
13
+ 'version' => 'VERSION',
14
+ )
15
+ loader.ignore(
16
+ File.join(__dir__, 'generators'),
17
+ File.join(__dir__, 'tasks'),
18
+ File.join(__dir__, 'plan_my_stuff', 'aws_sns_simulator.rb'),
19
+ File.join(__dir__, 'plan_my_stuff', 'engine.rb'),
20
+ File.join(__dir__, 'plan_my_stuff', 'errors.rb'),
21
+ File.join(__dir__, 'plan_my_stuff', 'test_helpers.rb'),
22
+ File.join(__dir__, 'plan_my_stuff', 'webhook_replayer.rb'),
23
+ )
24
+ loader.setup
25
+
26
+ # errors.rb defines several sibling error classes - load it eagerly rather
27
+ # than rely on autoload-via-lead-constant.
24
28
  require_relative 'plan_my_stuff/errors'
25
- require_relative 'plan_my_stuff/graphql/queries'
26
- require_relative 'plan_my_stuff/issue'
27
- require_relative 'plan_my_stuff/issue_field'
28
- require_relative 'plan_my_stuff/issue_field_value_set'
29
- require_relative 'plan_my_stuff/issue_metadata'
30
- require_relative 'plan_my_stuff/label'
31
- require_relative 'plan_my_stuff/link'
32
- require_relative 'plan_my_stuff/markdown'
33
- require_relative 'plan_my_stuff/metadata_parser'
34
- require_relative 'plan_my_stuff/notifications'
35
- require_relative 'plan_my_stuff/pipeline'
36
- require_relative 'plan_my_stuff/project'
37
- require_relative 'plan_my_stuff/project_item'
38
- require_relative 'plan_my_stuff/project_item_metadata'
39
- require_relative 'plan_my_stuff/project_metadata'
40
- require_relative 'plan_my_stuff/reminders'
41
- require_relative 'plan_my_stuff/repo'
42
- require_relative 'plan_my_stuff/testing_project'
43
- require_relative 'plan_my_stuff/testing_project_item'
44
- require_relative 'plan_my_stuff/testing_project_metadata'
45
- require_relative 'plan_my_stuff/user_resolver'
46
- require_relative 'plan_my_stuff/verifier'
47
- require_relative 'plan_my_stuff/version'
29
+
30
+ # Engine must register with Rails at load time, so eagerly require it
31
+ # (and only when Rails is defined - otherwise Rails::Engine is undefined).
32
+ require_relative 'plan_my_stuff/engine' if defined?(Rails)
48
33
 
49
34
  module PlanMyStuff
50
35
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plan_my_stuff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance