thecore_generators 3.0.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/MIT-LICENSE +20 -0
- data/README.md +54 -0
- data/Rakefile +14 -0
- data/lib/thecore_generators/railtie.rb +13 -0
- data/lib/thecore_generators/version.rb +3 -0
- data/lib/thecore_generators.rb +5 -0
- metadata +67 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9f829a0f19f22655ce14f10be2c9c748dd67acc8a9432aced696cd9ca3ba7f8a
|
|
4
|
+
data.tar.gz: '08b6468f673411496eab954f7d2511c4345242aa5aa1a020d7a3860ad42580bc'
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 92ad6a86068b45d71a7a077cee5c083fb893724767314bb49d914a567cd09b4708091c97fa7d5772470e4f37bd068447f63b9b600081807fa73ed842455f9353
|
|
7
|
+
data.tar.gz: 1e5430b20ea00057c7dea7b48736c31f2cbc64dc236550fc5957d90874dd3d42b1435968fb996bfcb2022ad9d3b7fe4b4cf79bcf6f4bd5b1fad358a9c0388cfa
|
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2026 Gabriele Tassoni
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# thecore_generators
|
|
2
|
+
|
|
3
|
+
Part of the [Thecore framework](https://github.com/gabrieletassoni/thecore/tree/release/3).
|
|
4
|
+
|
|
5
|
+
Rails-native generators for Thecore 3 apps and ATOMs — replacing the scaffolding logic
|
|
6
|
+
currently duplicated in the [Thecore VS Code extension](https://github.com/gabrieletassoni/thecore_code_extension).
|
|
7
|
+
Wherever Rails already has a native generator command to override (`rails generate
|
|
8
|
+
model`/`migration`), this gem hooks it instead of inventing new vocabulary; operations with
|
|
9
|
+
no Rails-native equivalent (ATOM creation, action scaffolding, app bootstrapping) get their
|
|
10
|
+
own `thecore:*`-namespaced generators or an application template. See
|
|
11
|
+
[`docs/adr/0002-thecore-generators-gem-and-generator-hook-mechanism.md`](https://github.com/gabrieletassoni/thecore/blob/release/3/docs/adr/0002-thecore-generators-gem-and-generator-hook-mechanism.md)
|
|
12
|
+
in the thecore repo for the full design.
|
|
13
|
+
|
|
14
|
+
**Status:** bootstrap only. This release makes the gem buildable, testable, and
|
|
15
|
+
publishable — it ships no generator behaviour yet. `ThecoreGenerators::Railtie`
|
|
16
|
+
(`lib/thecore_generators/railtie.rb`) is a deliberate no-op; the `config.app_generators.orm`
|
|
17
|
+
hook lands in a follow-up ticket.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Add to your host app's or ATOM's `Gemfile`:
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
gem "thecore_generators", "~> 3.0"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Running tests locally
|
|
28
|
+
|
|
29
|
+
Tests use a `Rails::Generators::TestCase`-based harness against the `test/dummy` Rails
|
|
30
|
+
app included in this repo (needed to exercise generators the way a real host app would).
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
bundle install
|
|
34
|
+
bundle exec rake test
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`bundle exec rake` alone runs the same suite (`test` is the default Rake task).
|
|
38
|
+
|
|
39
|
+
To run a single test file:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
bundle exec ruby -Itest test/generators/placeholder_generator_test.rb
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Releasing
|
|
46
|
+
|
|
47
|
+
Version lives in `lib/thecore_generators/version.rb`. Pushing a commit that bumps it
|
|
48
|
+
triggers `.github/workflows/gempush.yml`, which tags the commit with that version and
|
|
49
|
+
publishes to RubyGems (skipped if the tag already exists) — the same pattern used by the
|
|
50
|
+
other gems in this ecosystem (`model_driven_api`, `thecore_backend_commons`, etc.).
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT — see [`MIT-LICENSE`](MIT-LICENSE).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require "bundler/setup"
|
|
2
|
+
require "bundler/gem_tasks"
|
|
3
|
+
require "rake/testtask"
|
|
4
|
+
|
|
5
|
+
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
|
|
6
|
+
load "rails/tasks/engine.rake"
|
|
7
|
+
|
|
8
|
+
Rake::TestTask.new(:test) do |t|
|
|
9
|
+
t.libs << "test"
|
|
10
|
+
t.libs << "lib"
|
|
11
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
task default: :test
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module ThecoreGenerators
|
|
2
|
+
# Boot-time hook point for this gem. Intentionally empty for now: no
|
|
3
|
+
# generator behaviour ships in this release. A future ticket will add
|
|
4
|
+
#
|
|
5
|
+
# config.app_generators.orm :thecore, migration: true, timestamps: true
|
|
6
|
+
#
|
|
7
|
+
# here, following the same mechanism ActiveRecord's own Railtie and
|
|
8
|
+
# Mongoid both use to hook `rails generate model`/`migration` (see
|
|
9
|
+
# docs/adr/0002-thecore-generators-gem-and-generator-hook-mechanism.md in
|
|
10
|
+
# the thecore repo).
|
|
11
|
+
class Railtie < ::Rails::Railtie
|
|
12
|
+
end
|
|
13
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: thecore_generators
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Gabriele Tassoni
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: railties
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '7.2'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '7.2'
|
|
26
|
+
description: Hooks Rails' own generator commands (model, migration) and adds thecore:*-namespaced
|
|
27
|
+
generators plus a check_practices rake task, replacing scaffolding logic previously
|
|
28
|
+
duplicated in the Thecore VS Code extension. See docs/adr/0002-thecore-generators-gem-and-generator-hook-mechanism.md
|
|
29
|
+
in the thecore repo for the design rationale.
|
|
30
|
+
email:
|
|
31
|
+
- g.tassoni@bancolini.com
|
|
32
|
+
executables: []
|
|
33
|
+
extensions: []
|
|
34
|
+
extra_rdoc_files: []
|
|
35
|
+
files:
|
|
36
|
+
- MIT-LICENSE
|
|
37
|
+
- README.md
|
|
38
|
+
- Rakefile
|
|
39
|
+
- lib/thecore_generators.rb
|
|
40
|
+
- lib/thecore_generators/railtie.rb
|
|
41
|
+
- lib/thecore_generators/version.rb
|
|
42
|
+
homepage: https://github.com/gabrieletassoni/thecore_generators
|
|
43
|
+
licenses:
|
|
44
|
+
- MIT
|
|
45
|
+
metadata:
|
|
46
|
+
allowed_push_host: https://rubygems.org
|
|
47
|
+
homepage_uri: https://github.com/gabrieletassoni/thecore_generators
|
|
48
|
+
source_code_uri: https://github.com/gabrieletassoni/thecore_generators
|
|
49
|
+
changelog_uri: https://github.com/gabrieletassoni/thecore_generators/blob/release/3/CHANGELOG.md
|
|
50
|
+
rdoc_options: []
|
|
51
|
+
require_paths:
|
|
52
|
+
- lib
|
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
54
|
+
requirements:
|
|
55
|
+
- - ">="
|
|
56
|
+
- !ruby/object:Gem::Version
|
|
57
|
+
version: '3.1'
|
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - ">="
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '0'
|
|
63
|
+
requirements: []
|
|
64
|
+
rubygems_version: 3.6.9
|
|
65
|
+
specification_version: 4
|
|
66
|
+
summary: Rails-native generators for the Thecore 3 scaffolding framework.
|
|
67
|
+
test_files: []
|