plan_my_stuff 0.1.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 +7 -0
- data/LICENSE +28 -0
- data/README.md +284 -0
- data/app/controllers/plan_my_stuff/application_controller.rb +76 -0
- data/app/controllers/plan_my_stuff/comments_controller.rb +82 -0
- data/app/controllers/plan_my_stuff/issues_controller.rb +145 -0
- data/app/controllers/plan_my_stuff/labels_controller.rb +30 -0
- data/app/controllers/plan_my_stuff/project_items_controller.rb +93 -0
- data/app/controllers/plan_my_stuff/projects_controller.rb +17 -0
- data/app/views/plan_my_stuff/comments/edit.html.erb +16 -0
- data/app/views/plan_my_stuff/comments/partials/_form.html.erb +32 -0
- data/app/views/plan_my_stuff/issues/edit.html.erb +12 -0
- data/app/views/plan_my_stuff/issues/index.html.erb +37 -0
- data/app/views/plan_my_stuff/issues/new.html.erb +7 -0
- data/app/views/plan_my_stuff/issues/partials/_form.html.erb +41 -0
- data/app/views/plan_my_stuff/issues/partials/_labels.html.erb +23 -0
- data/app/views/plan_my_stuff/issues/partials/_viewers.html.erb +32 -0
- data/app/views/plan_my_stuff/issues/show.html.erb +58 -0
- data/app/views/plan_my_stuff/projects/index.html.erb +13 -0
- data/app/views/plan_my_stuff/projects/show.html.erb +101 -0
- data/config/routes.rb +25 -0
- data/lib/generators/plan_my_stuff/install/install_generator.rb +38 -0
- data/lib/generators/plan_my_stuff/install/templates/initializer.rb +106 -0
- data/lib/generators/plan_my_stuff/views/views_generator.rb +22 -0
- data/lib/plan_my_stuff/application_record.rb +39 -0
- data/lib/plan_my_stuff/base_metadata.rb +136 -0
- data/lib/plan_my_stuff/client.rb +143 -0
- data/lib/plan_my_stuff/comment.rb +360 -0
- data/lib/plan_my_stuff/comment_metadata.rb +56 -0
- data/lib/plan_my_stuff/configuration.rb +139 -0
- data/lib/plan_my_stuff/custom_fields.rb +65 -0
- data/lib/plan_my_stuff/engine.rb +11 -0
- data/lib/plan_my_stuff/errors.rb +87 -0
- data/lib/plan_my_stuff/issue.rb +486 -0
- data/lib/plan_my_stuff/issue_metadata.rb +111 -0
- data/lib/plan_my_stuff/label.rb +59 -0
- data/lib/plan_my_stuff/markdown.rb +83 -0
- data/lib/plan_my_stuff/metadata_parser.rb +53 -0
- data/lib/plan_my_stuff/project.rb +504 -0
- data/lib/plan_my_stuff/project_item.rb +414 -0
- data/lib/plan_my_stuff/test_helpers.rb +501 -0
- data/lib/plan_my_stuff/user_resolver.rb +61 -0
- data/lib/plan_my_stuff/verifier.rb +102 -0
- data/lib/plan_my_stuff/version.rb +19 -0
- data/lib/plan_my_stuff.rb +69 -0
- data/lib/tasks/plan_my_stuff.rake +23 -0
- metadata +126 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'active_support/core_ext/array/wrap'
|
|
4
|
+
require 'active_support/core_ext/object/blank'
|
|
5
|
+
|
|
6
|
+
require_relative 'plan_my_stuff/application_record'
|
|
7
|
+
require_relative 'plan_my_stuff/base_metadata'
|
|
8
|
+
require_relative 'plan_my_stuff/client'
|
|
9
|
+
require_relative 'plan_my_stuff/comment'
|
|
10
|
+
require_relative 'plan_my_stuff/comment_metadata'
|
|
11
|
+
require_relative 'plan_my_stuff/configuration'
|
|
12
|
+
require_relative 'plan_my_stuff/custom_fields'
|
|
13
|
+
require_relative 'plan_my_stuff/engine' if defined?(Rails)
|
|
14
|
+
require_relative 'plan_my_stuff/errors'
|
|
15
|
+
require_relative 'plan_my_stuff/issue'
|
|
16
|
+
require_relative 'plan_my_stuff/issue_metadata'
|
|
17
|
+
require_relative 'plan_my_stuff/label'
|
|
18
|
+
require_relative 'plan_my_stuff/markdown'
|
|
19
|
+
require_relative 'plan_my_stuff/metadata_parser'
|
|
20
|
+
require_relative 'plan_my_stuff/project'
|
|
21
|
+
require_relative 'plan_my_stuff/project_item'
|
|
22
|
+
require_relative 'plan_my_stuff/user_resolver'
|
|
23
|
+
require_relative 'plan_my_stuff/verifier'
|
|
24
|
+
require_relative 'plan_my_stuff/version'
|
|
25
|
+
|
|
26
|
+
module PlanMyStuff
|
|
27
|
+
class << self
|
|
28
|
+
# @return [PlanMyStuff::Configuration]
|
|
29
|
+
def configuration
|
|
30
|
+
@configuration ||= Configuration.new
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @return [PlanMyStuff::Configuration]
|
|
34
|
+
def configure
|
|
35
|
+
yield(configuration)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @return [PlanMyStuff::Client]
|
|
39
|
+
def client
|
|
40
|
+
@client ||= Client.new
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns the appropriate HTTP 422 status symbol for the current Rails version.
|
|
44
|
+
# Rails 7.1+ deprecated :unprocessable_entity in favor of :unprocessable_content.
|
|
45
|
+
#
|
|
46
|
+
# @return [Symbol]
|
|
47
|
+
#
|
|
48
|
+
def unprocessable_status
|
|
49
|
+
if Gem::Version.new(Rails.version) >= Gem::Version.new('7.1')
|
|
50
|
+
:unprocessable_content
|
|
51
|
+
else
|
|
52
|
+
:unprocessable_entity
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Resets the memoized client and configuration. Useful for testing.
|
|
57
|
+
#
|
|
58
|
+
# @return [void]
|
|
59
|
+
#
|
|
60
|
+
def reset!
|
|
61
|
+
exit_test_mode! if defined?(@_test_mode) && @_test_mode
|
|
62
|
+
@client = nil
|
|
63
|
+
@configuration = nil
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Top-level alias so consuming apps can use PMS.configure, PMS::Issue.find, etc.
|
|
69
|
+
PMS = PlanMyStuff
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
namespace :plan_my_stuff do
|
|
4
|
+
desc 'Verify PlanMyStuff configuration: token, org, repos, and project access'
|
|
5
|
+
task verify: :environment do
|
|
6
|
+
require 'plan_my_stuff/verifier'
|
|
7
|
+
|
|
8
|
+
verifier = PlanMyStuff::Verifier.new.run
|
|
9
|
+
|
|
10
|
+
verifier.results.each do |result|
|
|
11
|
+
status = result.passed ? "\e[32mPASS\e[0m" : "\e[31mFAIL\e[0m"
|
|
12
|
+
puts("[#{status}] #{result.name}: #{result.message}")
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
puts
|
|
16
|
+
if verifier.passed?
|
|
17
|
+
puts("\e[32mAll checks passed.\e[0m")
|
|
18
|
+
else
|
|
19
|
+
puts("\e[31mSome checks failed.\e[0m")
|
|
20
|
+
exit(1)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: plan_my_stuff
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Brands Insurance
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-04-01 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rails
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '6.1'
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '8'
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - ">="
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '6.1'
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '8'
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: octokit
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: 10.0.0
|
|
40
|
+
type: :runtime
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: 10.0.0
|
|
47
|
+
description:
|
|
48
|
+
email:
|
|
49
|
+
- documents@brandsinsurance.com
|
|
50
|
+
executables: []
|
|
51
|
+
extensions: []
|
|
52
|
+
extra_rdoc_files: []
|
|
53
|
+
files:
|
|
54
|
+
- LICENSE
|
|
55
|
+
- README.md
|
|
56
|
+
- app/controllers/plan_my_stuff/application_controller.rb
|
|
57
|
+
- app/controllers/plan_my_stuff/comments_controller.rb
|
|
58
|
+
- app/controllers/plan_my_stuff/issues_controller.rb
|
|
59
|
+
- app/controllers/plan_my_stuff/labels_controller.rb
|
|
60
|
+
- app/controllers/plan_my_stuff/project_items_controller.rb
|
|
61
|
+
- app/controllers/plan_my_stuff/projects_controller.rb
|
|
62
|
+
- app/views/plan_my_stuff/comments/edit.html.erb
|
|
63
|
+
- app/views/plan_my_stuff/comments/partials/_form.html.erb
|
|
64
|
+
- app/views/plan_my_stuff/issues/edit.html.erb
|
|
65
|
+
- app/views/plan_my_stuff/issues/index.html.erb
|
|
66
|
+
- app/views/plan_my_stuff/issues/new.html.erb
|
|
67
|
+
- app/views/plan_my_stuff/issues/partials/_form.html.erb
|
|
68
|
+
- app/views/plan_my_stuff/issues/partials/_labels.html.erb
|
|
69
|
+
- app/views/plan_my_stuff/issues/partials/_viewers.html.erb
|
|
70
|
+
- app/views/plan_my_stuff/issues/show.html.erb
|
|
71
|
+
- app/views/plan_my_stuff/projects/index.html.erb
|
|
72
|
+
- app/views/plan_my_stuff/projects/show.html.erb
|
|
73
|
+
- config/routes.rb
|
|
74
|
+
- lib/generators/plan_my_stuff/install/install_generator.rb
|
|
75
|
+
- lib/generators/plan_my_stuff/install/templates/initializer.rb
|
|
76
|
+
- lib/generators/plan_my_stuff/views/views_generator.rb
|
|
77
|
+
- lib/plan_my_stuff.rb
|
|
78
|
+
- lib/plan_my_stuff/application_record.rb
|
|
79
|
+
- lib/plan_my_stuff/base_metadata.rb
|
|
80
|
+
- lib/plan_my_stuff/client.rb
|
|
81
|
+
- lib/plan_my_stuff/comment.rb
|
|
82
|
+
- lib/plan_my_stuff/comment_metadata.rb
|
|
83
|
+
- lib/plan_my_stuff/configuration.rb
|
|
84
|
+
- lib/plan_my_stuff/custom_fields.rb
|
|
85
|
+
- lib/plan_my_stuff/engine.rb
|
|
86
|
+
- lib/plan_my_stuff/errors.rb
|
|
87
|
+
- lib/plan_my_stuff/issue.rb
|
|
88
|
+
- lib/plan_my_stuff/issue_metadata.rb
|
|
89
|
+
- lib/plan_my_stuff/label.rb
|
|
90
|
+
- lib/plan_my_stuff/markdown.rb
|
|
91
|
+
- lib/plan_my_stuff/metadata_parser.rb
|
|
92
|
+
- lib/plan_my_stuff/project.rb
|
|
93
|
+
- lib/plan_my_stuff/project_item.rb
|
|
94
|
+
- lib/plan_my_stuff/test_helpers.rb
|
|
95
|
+
- lib/plan_my_stuff/user_resolver.rb
|
|
96
|
+
- lib/plan_my_stuff/verifier.rb
|
|
97
|
+
- lib/plan_my_stuff/version.rb
|
|
98
|
+
- lib/tasks/plan_my_stuff.rake
|
|
99
|
+
homepage: https://github.com/brandsinsurance/PlanMyStuff/
|
|
100
|
+
licenses:
|
|
101
|
+
- BSD-3-Clause
|
|
102
|
+
metadata:
|
|
103
|
+
rubygems_mfa_required: 'true'
|
|
104
|
+
homepage_uri: https://github.com/brandsinsurance/PlanMyStuff/
|
|
105
|
+
source_code_uri: https://github.com/brandsinsurance/PlanMyStuff
|
|
106
|
+
changelog_uri: https://github.com/brandsinsurance/PlanMyStuff/blob/main/CHANGELOG.adoc
|
|
107
|
+
post_install_message:
|
|
108
|
+
rdoc_options: []
|
|
109
|
+
require_paths:
|
|
110
|
+
- lib
|
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
|
+
requirements:
|
|
113
|
+
- - ">="
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: '3.3'
|
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
|
+
requirements:
|
|
118
|
+
- - ">="
|
|
119
|
+
- !ruby/object:Gem::Version
|
|
120
|
+
version: '0'
|
|
121
|
+
requirements: []
|
|
122
|
+
rubygems_version: 3.5.11
|
|
123
|
+
signing_key:
|
|
124
|
+
specification_version: 4
|
|
125
|
+
summary: Shared PMS
|
|
126
|
+
test_files: []
|