plutonium 0.18.8 → 0.19.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: db09e7efd9881620723c20ca5a7ca66da36abc10f6eaa11cdf35e0b02b2202e4
4
- data.tar.gz: e03d61dda513fc33bf487179e55bcacfdd1964197c9eb4559ffb68ed1644b28b
3
+ metadata.gz: e258fecf4bb703998367bdb017632e7d574353b0ea17ab1095f2a51e48830e5f
4
+ data.tar.gz: 5e9204d931880a93b5c1431b899170f5ad84b15bd98ecff6159e1dba804b181a
5
5
  SHA512:
6
- metadata.gz: 8cb1f9b6bc8ad83001cd8a70ce9a56d62d47a20a88fe10c32292866075b24759c402444920f6ec0000b3f12f08e79cb66a39f305d30ebc1e3ba015e2de680643
7
- data.tar.gz: a04dc1fd9bf280c1574a3c1c71a1da9de2a6474a514f6cc1503c214250d40d5ef2a6350205906ddbac9ee497b73beef84095662d9222f1805b7254e6560205eb
6
+ metadata.gz: 89092ba600c685b58f1b8138c7cef005b12ff614adc1cac75c2173e8e808bdc033140f992331725d31263a4e26e432bc6d1a3fc3a6a71deae1b573ce17b2bf69
7
+ data.tar.gz: 2e7db8b31e25b248e92113653231db0b5d4dc459ec3b9bd51ef2d43ea282a94ab909a11fc66e264eea0b6ed532dd9de9c74e8674f0dbaa16b82db70ccf60fad4
@@ -12,7 +12,7 @@
12
12
  ```
13
13
  - Install useful gems
14
14
  ```bash
15
- rails g pu:gem:annotate
15
+ rails g pu:gem:annotated
16
16
  ```
17
17
  - Install rodauth
18
18
  ```bash
@@ -224,7 +224,7 @@ Add helpful development gems:
224
224
 
225
225
  ```ruby
226
226
  # Generate model annotations
227
- rails generate pu:gem:annotate
227
+ rails generate pu:gem:annotated
228
228
 
229
229
  # Set up environment variables
230
230
  rails generate pu:gem:dotenv
@@ -1,6 +1,8 @@
1
- gem "plutonium"
2
-
3
1
  after_bundle do
2
+ Bundler.with_unbundled_env do
3
+ run "bundle add plutonium"
4
+ end
5
+
4
6
  generate "pu:core:install"
5
7
 
6
8
  git add: "."
@@ -1,6 +1,11 @@
1
1
  after_bundle do
2
2
  # Run the plutonium install
3
- rails_command "app:template LOCATION=https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb"
3
+ template_location = if ENV["LOCAL"]
4
+ "/Users/stefan/Documents/plutonium/plutonium-core/docs/public/templates/plutonium.rb"
5
+ else
6
+ "https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb"
7
+ end
8
+ rails_command "app:template LOCATION=#{template_location}"
4
9
 
5
10
  # Enliten!
6
11
  rails_command "app:template LOCATION=https://raw.githubusercontent.com/thedumbtechguy/enlitenment/main/template.rb"
@@ -3,13 +3,18 @@ after_bundle do
3
3
  git(add: ".") && git(commit: %( -m 'initial commit' ))
4
4
 
5
5
  # Run the base install
6
- rails_command "app:template LOCATION=https://radioactive-labs.github.io/plutonium-core/templates/base.rb"
6
+ template_location = if ENV["LOCAL"]
7
+ "/Users/stefan/Documents/plutonium/plutonium-core/docs/public/templates/base.rb"
8
+ else
9
+ "https://radioactive-labs.github.io/plutonium-core/templates/base.rb"
10
+ end
11
+ rails_command "app:template LOCATION=#{template_location}"
7
12
 
8
13
  # Add development tools
9
14
  generate "pu:gem:dotenv"
10
15
  git(add: ".") && git(commit: %( -m 'add dotenv' ))
11
16
 
12
- generate "pu:gem:annotate"
17
+ generate "pu:gem:annotated"
13
18
  git(add: ".") && git(commit: %( -m 'add annotate' ))
14
19
 
15
20
  generate "pu:gem:standard"
@@ -9,10 +9,11 @@ module Pu
9
9
 
10
10
  source_root File.expand_path("templates", __dir__)
11
11
 
12
- desc "Install the annnotate gem"
12
+ desc "Install the annnotated gem"
13
13
 
14
14
  def start
15
- bundle "annotate", group: :development
15
+ bundle "annotated", group: :development
16
+ generate "annotated:install"
16
17
  copy_file "lib/tasks/auto_annotate_models.rake"
17
18
  rescue => e
18
19
  exception "#{self.class} failed:", e
@@ -3,11 +3,11 @@
3
3
  # NOTE: to have a dev-mode tool do its thing in production.
4
4
  return unless Rails.env.development?
5
5
 
6
- require "annotate"
6
+ require "annotated"
7
7
  task :set_annotation_options do
8
8
  # You can override any of these by setting an environment variable of the
9
9
  # same name.
10
- Annotate.set_defaults(
10
+ Annotated.set_defaults(
11
11
  "active_admin" => "false",
12
12
  "additional_file_patterns" => [],
13
13
  "routes" => "false",
@@ -56,4 +56,4 @@ task :set_annotation_options do
56
56
  )
57
57
  end
58
58
 
59
- Annotate.load_tasks
59
+ Annotated.load_tasks
@@ -76,15 +76,15 @@ module PlutoniumGenerators
76
76
  type = type.to_sym if type
77
77
 
78
78
  if dangerous_name?(name)
79
- raise Error, "Could not generate field '#{name}', as it is already defined by Active Record."
79
+ raise "Could not generate field '#{name}', as it is already defined by Active Record."
80
80
  end
81
81
 
82
82
  if type && !valid_type?(type)
83
- raise Error, "Could not generate field '#{name}' with unknown type '#{type}'."
83
+ raise "Could not generate field '#{name}' with unknown type '#{type}'."
84
84
  end
85
85
 
86
86
  if index_type && !valid_index_type?(index_type)
87
- raise Error, "Could not generate field '#{name}' with unknown index '#{index_type}'."
87
+ raise "Could not generate field '#{name}' with unknown index '#{index_type}'."
88
88
  end
89
89
 
90
90
  if type && reference?(type)
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.18.8"
2
+ VERSION = "0.19.0"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.8
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-08 00:00:00.000000000 Z
11
+ date: 2025-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -30,20 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '7.1'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '8.0'
33
+ version: '7.2'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
- version: '7.1'
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '8.0'
40
+ version: '7.2'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: listen
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -582,9 +576,9 @@ files:
582
576
  - lib/generators/pu/field/renderer/renderer_generator.rb
583
577
  - lib/generators/pu/field/renderer/templates/.keep
584
578
  - lib/generators/pu/field/renderer/templates/renderer.rb.tt
585
- - lib/generators/pu/gem/annotate/annotate_generator.rb
586
- - lib/generators/pu/gem/annotate/templates/.keep
587
- - lib/generators/pu/gem/annotate/templates/lib/tasks/auto_annotate_models.rake
579
+ - lib/generators/pu/gem/annotated/annotated_generator.rb
580
+ - lib/generators/pu/gem/annotated/templates/.keep
581
+ - lib/generators/pu/gem/annotated/templates/lib/tasks/auto_annotate_models.rake
588
582
  - lib/generators/pu/gem/dotenv/dotenv_generator.rb
589
583
  - lib/generators/pu/gem/dotenv/templates/.env
590
584
  - lib/generators/pu/gem/dotenv/templates/.env.local