effective_developer 0.9.2 → 0.9.4

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: 6e026e46bbff8d78d0c45c877ea2ebcf1cf0d641284b77b642e6123551d712e3
4
- data.tar.gz: 3e837b1bab5c421ca55a8298961707b9a33fa3c2ef40c6828fe416372cad8bbd
3
+ metadata.gz: a292b60034bae3d6e72f11e16ece9fbcd216fa8e3cfc83458281627e1bfdb97d
4
+ data.tar.gz: e41603ddb72d4221941cff29c9c5e0a5fb46b4a1ccb0fc3571f58610c9a1a541
5
5
  SHA512:
6
- metadata.gz: c4557f204ceabc9d099bb70025d40824efa66dc8d9d63b1fb473a046a7f5dd55aab1ad3cf23c076612dd68348bd023533bdabe31c3608b79c8121f605503d49e
7
- data.tar.gz: 736b6ca507e8f116bb524c28da00e86e3f68122aa98a7096ccddac223da6cb128700152d0b73c8585ac7fc8a13af74761ed57ff020a9e50dc2f53ee215e4d870
6
+ metadata.gz: 6be90498535413cd99e48b1ee8a6d3cb62e9873482ab6e141611f2e9cb87b3a8cf275f41c8290671e1d6e8a1af3072de5299973f90a075dcdd5da9f8b5751a9d
7
+ data.tar.gz: 374328335692d5d689dd0df3c01a673dac34243510f9f171c43fc1b0c5460712c4a908ec57609761517992f2bd1c26202674ac7588de46ec2b855a759456f61a
data/README.md CHANGED
@@ -138,7 +138,9 @@ It truly resets you back to a fresh working copy. Perfect for tweaking scaffold
138
138
 
139
139
  ## gitsweep
140
140
 
141
- A command line script to delete any git branch that has already been merged into master & develop
141
+ Delete local branches and clean worktrees already merged into the current HEAD. Worktree removal uses Worktrunk (`wt`), including for detached HEAD worktrees.
142
+
143
+ Keeps `main`, `master`, `develop`, `staging`, `hatchbox2`, the current worktree, and the primary worktree. Also keeps locked worktrees, worktrees with uncommitted or untracked files, and worktrees with a Git operation in progress. Without Worktrunk, only branches without worktrees are deleted. Remote branches and stashes are unchanged.
142
144
 
143
145
  ```console
144
146
  > gitsweep
@@ -1,3 +1,3 @@
1
1
  module EffectiveDeveloper
2
- VERSION = '0.9.2'.freeze
2
+ VERSION = '0.9.4'.freeze
3
3
  end
@@ -0,0 +1,17 @@
1
+ # rails generate run_once NAME
2
+ #
3
+ # Generates a timestamped run_once rake task, just like a db migration:
4
+ #
5
+ # rails generate run_once upgrade_to_effective_cpd_seven
6
+ # => db/run_once/20260227230301_upgrade_to_effective_cpd_seven.rake
7
+
8
+ class RunOnceGenerator < Rails::Generators::NamedBase
9
+ source_root File.expand_path('templates', __dir__)
10
+
11
+ desc 'Creates a timestamped run_once rake task in db/run_once/'
12
+
13
+ def create_run_once_task
14
+ timestamp = Time.now.utc.strftime('%Y%m%d%H%M%S')
15
+ template 'run_once_task.rake.tt', File.join('db', 'run_once', "#{timestamp}_#{file_name}.rake")
16
+ end
17
+ end
@@ -0,0 +1,27 @@
1
+ # rake run_once:<%= file_name %>
2
+ #
3
+ # <%= Time.now.utc.strftime('%Y-%m-%d') %>
4
+ # TODO: describe what this task does and why it doesn't fit into a db migration.
5
+ #
6
+ # This task is run exactly once on production, after db:migrate, by
7
+ # `rake upside:perform_run_once_tasks`. There are no rollbacks and failure aborts
8
+ # the whole run, so it must be defensive and idempotent.
9
+ #
10
+ # - Guard the tenant and wrap work in a Tenant.as block.
11
+ # - Never use a bang finder on an assumed id — use a non-raising lookup and `next`.
12
+ # - Re-running must be a safe no-op (scope to the records still needing the change).
13
+ # - `puts` found/fixed/skipped counts so the production run log shows what happened.
14
+ #
15
+ # See .claude/rules/run-once-tasks.md for the full pattern.
16
+
17
+ namespace :run_once do
18
+ task <%= file_name %>: :environment do
19
+ next unless Tenant.engine_present?(:tenant)
20
+
21
+ Tenant.as(:tenant) do
22
+ # ... idempotent, scoped, validated mutation ...
23
+
24
+ puts "Done: <%= file_name %>"
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_developer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-04-24 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -73,6 +72,8 @@ files:
73
72
  - lib/generators/effective/scaffold_generator.rb
74
73
  - lib/generators/effective/views_generator.rb
75
74
  - lib/generators/effective_developer/install_generator.rb
75
+ - lib/generators/run_once/run_once_generator.rb
76
+ - lib/generators/run_once/templates/run_once_task.rake.tt
76
77
  - lib/scaffolds/admin_effective/controllers/controller.rb
77
78
  - lib/scaffolds/admin_effective/datatables/datatable.rb
78
79
  - lib/scaffolds/admin_effective/models/model.rb
@@ -128,7 +129,6 @@ homepage: https://github.com/code-and-effect/effective_developer
128
129
  licenses:
129
130
  - MIT
130
131
  metadata: {}
131
- post_install_message:
132
132
  rdoc_options: []
133
133
  require_paths:
134
134
  - lib
@@ -143,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  requirements: []
146
- rubygems_version: 3.5.6
147
- signing_key:
146
+ rubygems_version: 4.0.17
148
147
  specification_version: 4
149
148
  summary: Provides some quality of life developer tools.
150
149
  test_files: []