hatate 0.1.0 → 0.2.1

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: eb0a5d94d2de95bec6d613596ad266719f2f20005cdd9912dde0ed9b5521e1a1
4
- data.tar.gz: e2658e172844c1617cfb8bd878f475d8fe07d86255def25e25e1275f3209d9bb
3
+ metadata.gz: 4f58e91d27771d9149b87abe9b3fd3eab68f8199a2c2da19f4623ad04fee3c60
4
+ data.tar.gz: 772d24b869d0857cc8f052db772822a583d393e66303420dcd4d034586f26f80
5
5
  SHA512:
6
- metadata.gz: 1ca46b75754aa3b6a416d1900e05e2e18cf34cdd55e514519398903a95a6be75b7822b224ee2b3189e0f926f21b3e4c99915dac066267ee2e4d5bff6f01598a2
7
- data.tar.gz: e43c19e1d89910c2306bfb9c6611cfd30c86adae7d5ff8a52288e2136beeb1a13041ccfd521dad45b06c55cee4603fea1d0a02ef1b62ec803e4387e069b897c1
6
+ metadata.gz: a7514eb04a94b5a4fb57319f191c3d8c97233b9b53e2420ef4d490f1502591e55a73ed50beb2511395eb0a6236738527d68f6a1490e29631253f08c2d47f53b2
7
+ data.tar.gz: bf2793c96bccc931e5ef9b176a165abc9e145e3cc9901bfc534e9459fbcb123b36f543664f046f37b8e6c72c8ae3e6af45b501cd03066a53548ea7dfc6716978
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2023-05-18
4
+
5
+ - No changes
6
+
7
+ ## [0.2.0] - 2023-05-18
8
+
9
+ - Implement basic boilerplate template
10
+
3
11
  ## [0.1.0] - 2023-05-04
4
12
 
5
13
  - Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hatate (0.1.0)
4
+ hatate (0.2.1)
5
5
  rails (~> 7.0.4)
6
6
 
7
7
  GEM
@@ -110,6 +110,8 @@ GEM
110
110
  nio4r (2.5.9)
111
111
  nokogiri (1.14.3-arm64-darwin)
112
112
  racc (~> 1.4)
113
+ nokogiri (1.14.3-x86_64-linux)
114
+ racc (~> 1.4)
113
115
  parallel (1.23.0)
114
116
  parser (3.2.2.1)
115
117
  ast (~> 2.4.1)
@@ -199,6 +201,7 @@ GEM
199
201
 
200
202
  PLATFORMS
201
203
  arm64-darwin-22
204
+ x86_64-linux
202
205
 
203
206
  DEPENDENCIES
204
207
  hatate!
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Hatate is an opinionated Ruby on Rails application generator. It makes a whole
4
4
  bunch of choices that I like, and I hope you like them too.
5
5
 
6
- ## Installation
6
+ ## Usage
7
7
 
8
8
  Install the Hatate gem:
9
9
 
@@ -13,29 +13,45 @@ Then run:
13
13
 
14
14
  hatate new <app_name>
15
15
 
16
- ## Usage
16
+ ## What's included?
17
17
 
18
- TODO: Write usage instructions here
18
+ - Postgres
19
+ - Tailwind CSS
20
+ - Propshaft
21
+ - Hotwire
22
+ - RSpec
23
+ - FactoryBot
24
+ - Capybara
25
+ - Cuprite
26
+ - Standard
27
+ - GitHub Actions
19
28
 
20
29
  ## Development
21
30
 
22
- Hatate requires the latest Ruby version
31
+ Hatate requires the latest Ruby version.
32
+
33
+ Clone the repo, then run:
34
+
35
+ bin/setup
36
+
37
+ Run tests with:
38
+
39
+ bundle exec rspec
40
+
41
+ And run Standard with:
42
+
43
+ bundle exec standardrb
23
44
 
24
- After checking out the repo, run `bin/setup` to install dependencies. Then, run
25
- `rake spec` to run the tests. You can also run `bin/console` for an interactive
26
- prompt that will allow you to experiment.
45
+ You can step in to a console with:
27
46
 
28
- To install this gem onto your local machine, run `bundle exec rake install`. To
29
- release a new version, update the version number in `version.rb`, and then run
30
- `bundle exec rake release`, which will create a git tag for the version, push
31
- git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
47
+ bin/console
32
48
 
33
- ## Contributing
49
+ ## Releasing
34
50
 
35
- Bug reports and pull requests are welcome on GitHub at
36
- https://github.com/cpjmcquillan/hatate. This project is intended to be a safe,
37
- welcoming space for collaboration, and contributors are expected to adhere to
38
- the [code of conduct](https://github.com/[USERNAME]/hatate/blob/main/CODE_OF_CONDUCT.md).
51
+ 1. Bump the version number in `lib/hatate/version.rb`
52
+ 1. Run `bundle exec rake release`, which will create a git tag for the version,
53
+ push git commits and the created tag, and push the `.gem` file to
54
+ [rubygems.org](https://rubygems.org).
39
55
 
40
56
  ## License
41
57
 
data/exe/hatate CHANGED
@@ -1,5 +1,14 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require "pathname"
4
+
5
+ source_path = File.expand_path("#{Pathname.new(__FILE__).dirname}/../lib")
6
+ $LOAD_PATH << source_path
7
+
3
8
  require "hatate"
4
9
 
5
- puts "Hello world!"
10
+ templates_root = File.expand_path(File.join("..", "templates"), File.dirname(__FILE__))
11
+ Hatate::AppGenerator.source_root(templates_root)
12
+ Hatate::AppGenerator.source_paths << Rails::Generators::AppGenerator.source_root << templates_root
13
+
14
+ Hatate::AppGenerator.start
@@ -0,0 +1,69 @@
1
+ module Hatate
2
+ class AppBuilder < Rails::AppBuilder
3
+ def readme
4
+ template "README.md.erb", "README.md"
5
+ end
6
+
7
+ def gemfile
8
+ template "Gemfile.erb", "Gemfile"
9
+ end
10
+
11
+ def leftovers
12
+ bundle_command "exec standardrb --fix-unsafely"
13
+ initial_commit
14
+ end
15
+
16
+ def database_config
17
+ inject_into_file(
18
+ "config/database.yml",
19
+ postgres_test_config,
20
+ after: "database: #{app_name}_test"
21
+ )
22
+ end
23
+
24
+ def dependencies
25
+ bundle_command "install"
26
+ bundle_command "lock --add-platform x86_64-linux"
27
+ rails_command "tailwindcss:install"
28
+ end
29
+
30
+ def github_actions
31
+ template "lint.yml", ".github/workflows/lint.yml"
32
+ template "test.yml", ".github/workflows/test.yml"
33
+ end
34
+
35
+ def test_helpers
36
+ template "spec/.rspec", ".rspec"
37
+ template "spec/spec_helper.rb", "spec/spec_helper.rb"
38
+ template "spec/rails_helper.rb", "spec/rails_helper.rb"
39
+ template "spec/support/cuprite.rb", "spec/support/cuprite.rb"
40
+ template "spec/support/system.rb", "spec/support/system.rb"
41
+ template "spec/support/factory_bot.rb", "spec/support/factory_bot.rb"
42
+ template "spec/support/freeze_time.rb", "spec/support/freeze_time.rb"
43
+ template "spec/support/i18n.rb", "spec/support/i18n.rb"
44
+ end
45
+
46
+ def ruby_version
47
+ create_file ".ruby-version", "#{Hatate::RUBY_VERSION}\n"
48
+ end
49
+
50
+ private
51
+
52
+ def postgres_test_config
53
+ "
54
+ host: <%= ENV.fetch(\"POSTGRES_HOST\", \"localhost\") %>
55
+ username: <%= ENV.fetch(\"POSTGRES_USER\", \"\") %>
56
+ password: <%= ENV.fetch(\"POSTGRES_PASSWORD\", \"\") %>
57
+ "
58
+ end
59
+
60
+ def initial_commit
61
+ git add: "."
62
+ git commit: "-m 'Initial commit' -m '#{commit_message}'"
63
+ end
64
+
65
+ def commit_message
66
+ "This app was generated with [hatate](https://github.com/cpjmcquillan/hatate)"
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,32 @@
1
+ module Hatate
2
+ class AppGenerator < Rails::Generators::AppGenerator
3
+ def initialize(*args)
4
+ super
5
+
6
+ self.options = options.merge(
7
+ database: "postgresql",
8
+ css: "tailwind",
9
+ asset_pipeline: "propshaft",
10
+ skip_test: true,
11
+ skip_jbuilder: true,
12
+ skip_bundle: true
13
+ ).freeze
14
+ end
15
+
16
+ def finish_template
17
+ build :ruby_version
18
+ build :dependencies
19
+ build :database_config
20
+ build :test_helpers
21
+ build :github_actions
22
+
23
+ super
24
+ end
25
+
26
+ private
27
+
28
+ def get_builder_class
29
+ Hatate::AppBuilder
30
+ end
31
+ end
32
+ end
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hatate
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.1"
5
5
  RAILS_VERSION = "~> 7.0.4"
6
+ RUBY_VERSION = IO
7
+ .read("#{File.dirname(__FILE__)}/../../.ruby-version")
8
+ .strip
9
+ .freeze
6
10
  end
data/lib/hatate.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "hatate/version"
3
+ require "rails/generators/rails/app/app_generator"
4
+
5
+ require "hatate/version"
6
+ require "hatate/app_generator"
7
+ require "hatate/app_builder"
4
8
 
5
9
  module Hatate
6
10
  class Error < StandardError; end
@@ -0,0 +1,44 @@
1
+ source "https://rubygems.org"
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ ruby "<%= Hatate::RUBY_VERSION %>"
5
+
6
+ # Rails defaults
7
+ gem "rails", "~> 7.0.4", ">= 7.0.4.3"
8
+
9
+ ## Database
10
+ gem "pg"
11
+
12
+ ## Web server
13
+ gem "puma"
14
+
15
+ ## Asset pipeline
16
+ gem "propshaft"
17
+ gem "importmap-rails"
18
+ gem "tailwindcss-rails"
19
+
20
+ ## Hotwire
21
+ gem "stimulus-rails"
22
+ gem "turbo-rails"
23
+
24
+ ## Other
25
+ gem "bootsnap", require: false
26
+ gem "redis"
27
+ gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw jruby]
28
+
29
+ group :development do
30
+ gem "web-console"
31
+ gem "rack-mini-profiler"
32
+ end
33
+
34
+ group :development, :test do
35
+ gem "debug", platforms: %i[mri mingw x64_mingw]
36
+ gem "factory_bot_rails"
37
+ gem "rspec-rails"
38
+ gem "standard"
39
+ end
40
+
41
+ group :test do
42
+ gem "capybara"
43
+ gem "cuprite"
44
+ end
@@ -0,0 +1,34 @@
1
+ # <%= app_name.humanize %>
2
+
3
+ ## Getting started
4
+
5
+ ### Pre-requisites
6
+
7
+ - Ruby <%= Hatate::RUBY_VERSION %>
8
+ - [postgresql](https://www.postgresql.org)
9
+
10
+ ### Setup
11
+
12
+ ```sh
13
+ bin/setup
14
+ ```
15
+
16
+ ## Development
17
+
18
+ ```sh
19
+ bin/dev
20
+ ```
21
+
22
+ ## Testing
23
+
24
+ To run RSpec tests:
25
+
26
+ ```sh
27
+ bundle exec rspec
28
+ ```
29
+
30
+ To run the Standard linter:
31
+
32
+ ```sh
33
+ bundle exec standardrb
34
+ ```
@@ -0,0 +1,13 @@
1
+ name: Lint
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ lint:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - uses: ruby/setup-ruby@v1
11
+ with:
12
+ bundler-cache: true
13
+ - run: bundle exec standardrb
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1,65 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ require "spec_helper"
3
+ ENV["RAILS_ENV"] ||= "test"
4
+ require_relative "../config/environment"
5
+ # Prevent database truncation if the environment is production
6
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
7
+ require "rspec/rails"
8
+ # Add additional requires below this line. Rails is not loaded until this point!
9
+ require "capybara/rspec"
10
+
11
+ # Requires supporting ruby files with custom matchers and macros, etc, in
12
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
13
+ # run as spec files by default. This means that files in spec/support that end
14
+ # in _spec.rb will both be required and run as specs, causing the specs to be
15
+ # run twice. It is recommended that you do not name files matching this glob to
16
+ # end with _spec.rb. You can configure this pattern with the --pattern
17
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
18
+ #
19
+ # The following line is provided for convenience purposes. It has the downside
20
+ # of increasing the boot-up time by auto-requiring all files in the support
21
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
22
+ # require only the support files necessary.
23
+ #
24
+ Dir[Rails.root.join("spec", "support", "**", "*.rb")].sort.each { |f| require f }
25
+
26
+ # Checks for pending migrations and applies them before tests are run.
27
+ # If you are not using ActiveRecord, you can remove these lines.
28
+ begin
29
+ ActiveRecord::Migration.maintain_test_schema!
30
+ rescue ActiveRecord::PendingMigrationError => e
31
+ abort e.to_s.strip
32
+ end
33
+
34
+ RSpec.configure do |config|
35
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
36
+ # config.fixture_path = "#{::Rails.root}/spec/fixtures"
37
+
38
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
39
+ # examples within a transaction, remove the following line or assign false
40
+ # instead of true.
41
+ config.use_transactional_fixtures = true
42
+
43
+ # You can uncomment this line to turn off ActiveRecord support entirely.
44
+ # config.use_active_record = false
45
+
46
+ # RSpec Rails can automatically mix in different behaviours to your tests
47
+ # based on their file location, for example enabling you to call `get` and
48
+ # `post` in specs under `spec/controllers`.
49
+ #
50
+ # You can disable this behaviour by removing the line below, and instead
51
+ # explicitly tag your specs with their type, e.g.:
52
+ #
53
+ # RSpec.describe UsersController, type: :controller do
54
+ # # ...
55
+ # end
56
+ #
57
+ # The different available types are documented in the features, such as in
58
+ # https://relishapp.com/rspec/rspec-rails/docs
59
+ config.infer_spec_type_from_file_location!
60
+
61
+ # Filter lines from Rails gems in backtraces.
62
+ # config.filter_rails_from_backtrace!
63
+ # arbitrary gems may also be filtered via:
64
+ # config.filter_gems_from_backtrace("gem name")
65
+ end
@@ -0,0 +1,96 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
16
+ RSpec.configure do |config|
17
+ # rspec-expectations config goes here. You can use an alternate
18
+ # assertion/expectation library such as wrong or the stdlib/minitest
19
+ # assertions if you prefer.
20
+ config.expect_with :rspec do |expectations|
21
+ # This option will default to `true` in RSpec 4. It makes the `description`
22
+ # and `failure_message` of custom matchers include text for helper methods
23
+ # defined using `chain`, e.g.:
24
+ # be_bigger_than(2).and_smaller_than(4).description
25
+ # # => "be bigger than 2 and smaller than 4"
26
+ # ...rather than:
27
+ # # => "be bigger than 2"
28
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
29
+ end
30
+
31
+ # rspec-mocks config goes here. You can use an alternate test double
32
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
33
+ config.mock_with :rspec do |mocks|
34
+ # Prevents you from mocking or stubbing a method that does not exist on
35
+ # a real object. This is generally recommended, and will default to
36
+ # `true` in RSpec 4.
37
+ mocks.verify_partial_doubles = true
38
+ end
39
+
40
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
41
+ # have no way to turn it off -- the option exists only for backwards
42
+ # compatibility in RSpec 3). It causes shared context metadata to be
43
+ # inherited by the metadata hash of host groups and examples, rather than
44
+ # triggering implicit auto-inclusion in groups with matching metadata.
45
+ config.shared_context_metadata_behavior = :apply_to_host_groups
46
+
47
+ # The settings below are suggested to provide a good initial experience
48
+ # with RSpec, but feel free to customize to your heart's content.
49
+ # This allows you to limit a spec run to individual examples or groups
50
+ # you care about by tagging them with `:focus` metadata. When nothing
51
+ # is tagged with `:focus`, all examples get run. RSpec also provides
52
+ # aliases for `it`, `describe`, and `context` that include `:focus`
53
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
54
+ config.filter_run_when_matching :focus
55
+
56
+ # Allows RSpec to persist some state between runs in order to support
57
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
58
+ # you configure your source control system to ignore this file.
59
+ config.example_status_persistence_file_path = "tmp/.rspec_examples.txt"
60
+
61
+ # Limits the available syntax to the non-monkey patched syntax that is
62
+ # recommended. For more details, see:
63
+ # https://rspec.info/features/3-12/rspec-core/configuration/zero-monkey-patching-mode/
64
+ config.disable_monkey_patching!
65
+
66
+ # This setting enables warnings. It's recommended, but in some cases may
67
+ # be too noisy due to issues in dependencies.
68
+ config.warnings = true
69
+
70
+ # Many RSpec users commonly either run the entire suite or an individual
71
+ # file, and it's useful to allow more verbose output when running an
72
+ # individual spec file.
73
+ if config.files_to_run.one?
74
+ # Use the documentation formatter for detailed output,
75
+ # unless a formatter has already been configured
76
+ # (e.g. via a command-line flag).
77
+ config.default_formatter = "doc"
78
+ end
79
+
80
+ # Print the 10 slowest examples and example groups at the
81
+ # end of the spec run, to help surface which specs are running
82
+ # particularly slow.
83
+ config.profile_examples = nil
84
+
85
+ # Run specs in random order to surface order dependencies. If you find an
86
+ # order dependency and want to debug it, you can fix the order by providing
87
+ # the seed, which is printed after each run.
88
+ # --seed 1234
89
+ config.order = :random
90
+
91
+ # Seed global randomization in this process using the `--seed` CLI option.
92
+ # Setting this allows you to use `--seed` to deterministically reproduce
93
+ # test failures related to randomization by passing the same `--seed` value
94
+ # as the one that triggered the failure.
95
+ Kernel.srand config.seed
96
+ end
@@ -0,0 +1,13 @@
1
+ require "capybara/cuprite"
2
+
3
+ Capybara.javascript_driver = :cuprite
4
+
5
+ Capybara.register_driver(:cuprite) do |app|
6
+ Capybara::Cuprite::Driver.new(
7
+ app,
8
+ window_size: [1200, 800],
9
+ timeout: 10,
10
+ headless: ENV.fetch("CUPRITE_HEADLESS", true),
11
+ js_errors: ENV.fetch("CUPRITE_JS_ERRORS", false)
12
+ )
13
+ end
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include FactoryBot::Syntax::Methods
3
+ end
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include ActiveSupport::Testing::TimeHelpers
3
+ end
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include ActionView::Helpers::TranslationHelper
3
+ end
@@ -0,0 +1,9 @@
1
+ RSpec.configure do |config|
2
+ config.before(:each, type: :system) do
3
+ driven_by :rack_test
4
+ end
5
+
6
+ config.before(:each, type: :system, js: true) do
7
+ driven_by :cuprite
8
+ end
9
+ end
@@ -0,0 +1,36 @@
1
+ name: Test
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ env:
9
+ RAILS_ENV: test
10
+ POSTGRES_HOST: localhost
11
+ POSTGRES_USER: postgres
12
+ POSTGRES_PASSWORD: postgres
13
+
14
+ services:
15
+ postgres:
16
+ image: postgres
17
+ env:
18
+ POSTGRES_HOST: localhost
19
+ POSTGRES_USER: postgres
20
+ POSTGRES_PASSWORD: postgres
21
+ ports:
22
+ - 5432:5432
23
+ options: >-
24
+ --health-cmd pg_isready
25
+ --health-interval 10s
26
+ --health-timeout 5s
27
+ --health-retries 5
28
+
29
+ steps:
30
+ - uses: actions/checkout@v2
31
+ - uses: ruby/setup-ruby@v1
32
+ with:
33
+ bundler-cache: true
34
+ - run: bin/rails db:prepare
35
+ - run: bin/rails assets:precompile
36
+ - run: bundle exec rspec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hatate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connor McQuillan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-06 00:00:00.000000000 Z
11
+ date: 2023-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -35,18 +35,30 @@ extensions: []
35
35
  extra_rdoc_files: []
36
36
  files:
37
37
  - ".rspec"
38
- - ".standard.yml"
38
+ - ".ruby-version"
39
39
  - CHANGELOG.md
40
- - CODE_OF_CONDUCT.md
41
40
  - Gemfile
42
41
  - Gemfile.lock
43
42
  - LICENSE.txt
44
43
  - README.md
45
44
  - Rakefile
46
45
  - exe/hatate
47
- - hatate.gemspec
48
46
  - lib/hatate.rb
47
+ - lib/hatate/app_builder.rb
48
+ - lib/hatate/app_generator.rb
49
49
  - lib/hatate/version.rb
50
+ - templates/Gemfile.erb
51
+ - templates/README.md.erb
52
+ - templates/lint.yml
53
+ - templates/spec/.rspec
54
+ - templates/spec/rails_helper.rb
55
+ - templates/spec/spec_helper.rb
56
+ - templates/spec/support/cuprite.rb
57
+ - templates/spec/support/factory_bot.rb
58
+ - templates/spec/support/freeze_time.rb
59
+ - templates/spec/support/i18n.rb
60
+ - templates/spec/support/system.rb
61
+ - templates/test.yml
50
62
  homepage: https://github.com/cpjmcquillan/hatate
51
63
  licenses:
52
64
  - MIT
@@ -60,9 +72,9 @@ require_paths:
60
72
  - lib
61
73
  required_ruby_version: !ruby/object:Gem::Requirement
62
74
  requirements:
63
- - - ">="
75
+ - - "~>"
64
76
  - !ruby/object:Gem::Version
65
- version: 3.0.0
77
+ version: 3.2.2
66
78
  required_rubygems_version: !ruby/object:Gem::Requirement
67
79
  requirements:
68
80
  - - ">="
@@ -72,5 +84,5 @@ requirements: []
72
84
  rubygems_version: 3.4.12
73
85
  signing_key:
74
86
  specification_version: 4
75
- summary: Generate a Rails application just how I like it.
87
+ summary: Generate a Rails application with this opinionated generator.
76
88
  test_files: []
data/.standard.yml DELETED
@@ -1,3 +0,0 @@
1
- # For available configuration options, see:
2
- # https://github.com/testdouble/standard
3
- ruby_version: 3.0
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at me@cpjmcquillan.com. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/hatate.gemspec DELETED
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/hatate/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "hatate"
7
- spec.version = Hatate::VERSION
8
- spec.authors = ["Connor McQuillan"]
9
- spec.email = ["me@cpjmcquillan.com"]
10
-
11
- spec.summary = "Generate a Rails application just how I like it."
12
-
13
- spec.description = <<~HERE
14
- Hatate is an opinionated Ruby on Rails application generator. It makes a
15
- whole bunch of choices that I like, and I hope you like them too.
16
- HERE
17
-
18
- spec.homepage = "https://github.com/cpjmcquillan/hatate"
19
- spec.license = "MIT"
20
- spec.required_ruby_version = ">= 3.0.0"
21
-
22
- spec.metadata["homepage_uri"] = spec.homepage
23
- spec.metadata["source_code_uri"] = spec.homepage
24
- spec.metadata["changelog_uri"] = spec.homepage + "/blob/main/CHANGELOG.md"
25
-
26
- # Specify which files should be added to the gem when it is released.
27
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
- spec.files = Dir.chdir(__dir__) do
29
- `git ls-files -z`.split("\x0").reject do |f|
30
- (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
31
- end
32
- end
33
- spec.bindir = "exe"
34
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
35
- spec.require_paths = ["lib"]
36
-
37
- spec.add_dependency "rails", Hatate::RAILS_VERSION
38
- end