plan_my_stuff 0.10.4 → 0.10.5
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 +4 -4
- data/CHANGELOG.md +14 -0
- data/CONFIGURATION.md +14 -1
- data/app/controllers/plan_my_stuff/application_controller.rb +1 -1
- data/lib/generators/plan_my_stuff/install/templates/initializer.rb +8 -1
- data/lib/plan_my_stuff/configuration.rb +11 -0
- data/lib/plan_my_stuff/verifier.rb +10 -0
- data/lib/plan_my_stuff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce0e2f02e6063ab2fe3238671d06182fc5447f428e6dc01d336ba6e00379e86a
|
|
4
|
+
data.tar.gz: f80f58ce32e19ea6e7b8aca34a62110379e6ea65f10c943fd108c409ec50a669
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3aaf1478091d45cbf8caa72a8a0f14b6cc445c5ec7c17382b92d50bb593d36b04ab00ade2973b2e8c67e19b3dfe1b7841022a9f336da2fe7ba3d27ea6c6b7eb5
|
|
7
|
+
data.tar.gz: 680bbb80160eaa20b20c05d4585e167e143c5be6c4735869bf8d138605cd11a52bacc1f3564cc6b8ea57e772b13aa22bdc7cd720c8254f5cf576c3207b15826e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.5
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `config.parent_controller` (default `'::ApplicationController'`) lets consuming apps that don't use the
|
|
8
|
+
`ApplicationController` name (e.g. `ActionController::Base`, `RawrApplicationController`) tell the engine
|
|
9
|
+
what to inherit from. The `plan_my_stuff:verify` rake task now reports whether the configured class
|
|
10
|
+
resolves.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Example config option showed `url_options = Rails.application.config.action_mailer.default_url_options`. Now it shows
|
|
15
|
+
`url_options = Rails.application.routes.default_url_options`
|
|
16
|
+
|
|
3
17
|
## 0.10.4
|
|
4
18
|
|
|
5
19
|
### Changed
|
data/CONFIGURATION.md
CHANGED
|
@@ -67,7 +67,7 @@ config.testing_template_project_number = 42
|
|
|
67
67
|
```ruby
|
|
68
68
|
config.app_name = 'MyApp'
|
|
69
69
|
|
|
70
|
-
url_options = Rails.application.
|
|
70
|
+
url_options = Rails.application.routes.default_url_options
|
|
71
71
|
config.issues_url_prefix = "#{url_options[:protocol] || 'http'}://#{url_options[:host]}/issues"
|
|
72
72
|
```
|
|
73
73
|
|
|
@@ -349,3 +349,16 @@ Controllable keys (with gem defaults):
|
|
|
349
349
|
| `:'testing_project_items/results'` | `plan_my_stuff/testing_project_items/results` |
|
|
350
350
|
| `:'webhooks/github'` | `plan_my_stuff/webhooks/github` |
|
|
351
351
|
| `:'webhooks/aws'` | `plan_my_stuff/webhooks/aws` |
|
|
352
|
+
|
|
353
|
+
### Parent controller
|
|
354
|
+
|
|
355
|
+
| Option | Type | Default | Description |
|
|
356
|
+
|---|---|---|---|
|
|
357
|
+
| `parent_controller` | `String` | `'::ApplicationController'` | Parent of `PlanMyStuff::ApplicationController`. |
|
|
358
|
+
|
|
359
|
+
Set this in `config/initializers/plan_my_stuff.rb`; Rails resolves the superclass once at class definition, so the
|
|
360
|
+
value must be set before the engine's controllers load.
|
|
361
|
+
|
|
362
|
+
```ruby
|
|
363
|
+
config.parent_controller = 'RawrApplicationController'
|
|
364
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module PlanMyStuff
|
|
4
|
-
class ApplicationController <
|
|
4
|
+
class ApplicationController < PlanMyStuff.configuration.parent_controller.constantize
|
|
5
5
|
protect_from_forgery with: :exception
|
|
6
6
|
helper Rails.application.routes.url_helpers
|
|
7
7
|
|
|
@@ -101,7 +101,7 @@ PlanMyStuff.configure do |config|
|
|
|
101
101
|
# number is appended to form `Issue#user_link`, which the gem also
|
|
102
102
|
# writes as the visible body of the GitHub issue.
|
|
103
103
|
# Recommended default:
|
|
104
|
-
# url_options = Rails.application.
|
|
104
|
+
# url_options = Rails.application.routes.default_url_options
|
|
105
105
|
# config.issues_url_prefix =
|
|
106
106
|
# "#{url_options[:protocol] || 'http'}://#{url_options[:host]}/issues"
|
|
107
107
|
|
|
@@ -321,4 +321,11 @@ PlanMyStuff.configure do |config|
|
|
|
321
321
|
# :'testing_project_items/results' => 'plan_my_stuff/testing_project_items/results'
|
|
322
322
|
# :'webhooks/github' => 'plan_my_stuff/webhooks/github'
|
|
323
323
|
# :'webhooks/aws' => 'plan_my_stuff/webhooks/aws'
|
|
324
|
+
|
|
325
|
+
# --------------------------------------------------------------------------
|
|
326
|
+
# Parent controller
|
|
327
|
+
# --------------------------------------------------------------------------
|
|
328
|
+
# Parent class for PlanMyStuff::ApplicationController. Override when the
|
|
329
|
+
# consuming app does not use the `ApplicationController` name.
|
|
330
|
+
# config.parent_controller = 'MyOtherApplicationController'
|
|
324
331
|
end
|
|
@@ -227,6 +227,16 @@ module PlanMyStuff
|
|
|
227
227
|
#
|
|
228
228
|
attr_accessor :controllers
|
|
229
229
|
|
|
230
|
+
# Parent class string for +PlanMyStuff::ApplicationController+. Defaults to +'::ApplicationController'+. Override
|
|
231
|
+
# when the consuming app does not use the +ApplicationController+ name (e.g. +'ActionController::Base'+,
|
|
232
|
+
# +'RawrApplicationController'+). Must be set before the gem's controllers load - the standard
|
|
233
|
+
# +config/initializers/plan_my_stuff.rb+ location is correct, since Rails resolves the superclass once at class
|
|
234
|
+
# definition time.
|
|
235
|
+
#
|
|
236
|
+
# @return [String]
|
|
237
|
+
#
|
|
238
|
+
attr_accessor :parent_controller
|
|
239
|
+
|
|
230
240
|
# Whether to use Rails.cache for ETag-based HTTP caching of GitHub reads. Defaults to true; set to false to bypass
|
|
231
241
|
# the cache entirely.
|
|
232
242
|
#
|
|
@@ -361,6 +371,7 @@ module PlanMyStuff
|
|
|
361
371
|
@production_branch = 'production'
|
|
362
372
|
@mount_groups = { webhooks: true, issues: true, projects: true }
|
|
363
373
|
@controllers = {}
|
|
374
|
+
@parent_controller = '::ApplicationController'
|
|
364
375
|
@cache_enabled = true
|
|
365
376
|
@github_login_for = {}
|
|
366
377
|
@reminders_enabled = true
|
|
@@ -23,6 +23,7 @@ module PlanMyStuff
|
|
|
23
23
|
check_organization
|
|
24
24
|
check_repos
|
|
25
25
|
check_default_project
|
|
26
|
+
check_parent_controller
|
|
26
27
|
self
|
|
27
28
|
end
|
|
28
29
|
|
|
@@ -80,6 +81,15 @@ module PlanMyStuff
|
|
|
80
81
|
@results << Result.new("Repo :#{key}", false, "#{full_name}: #{e.message}")
|
|
81
82
|
end
|
|
82
83
|
|
|
84
|
+
# @return [void]
|
|
85
|
+
def check_parent_controller
|
|
86
|
+
parent = PlanMyStuff.configuration.parent_controller.to_s
|
|
87
|
+
klass = parent.constantize
|
|
88
|
+
@results << Result.new('Parent controller', true, "#{parent} resolved to #{klass}")
|
|
89
|
+
rescue NameError => e
|
|
90
|
+
@results << Result.new('Parent controller', false, "#{parent.inspect}: #{e.message}")
|
|
91
|
+
end
|
|
92
|
+
|
|
83
93
|
# @return [void]
|
|
84
94
|
def check_default_project
|
|
85
95
|
project_number = PlanMyStuff.configuration.default_project_number
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: plan_my_stuff
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brands Insurance
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|