get-jets 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +48 -0
- data/get-jets.gemspec +44 -0
- data/lib/generators/jets/engine/USAGE +5 -0
- data/lib/generators/jets/engine/engine_generator.rb +30 -0
- data/lib/generators/jets/engine/templates/%name%.gemspec.tt +31 -0
- data/lib/generators/jets/engine/templates/Gemfile +19 -0
- data/lib/generators/jets/engine/templates/Gemfile.runtime +0 -0
- data/lib/generators/jets/engine/templates/README.md.tt +3 -0
- data/lib/generators/jets/engine/templates/Rakefile.tt +9 -0
- data/lib/generators/jets/engine/templates/app/controllers/%name%/application_controller.rb.tt +4 -0
- data/lib/generators/jets/engine/templates/config/routes.rb.tt +2 -0
- data/lib/generators/jets/engine/templates/lib/%name%.rb.tt +22 -0
- data/lib/generators/jets/engine/templates/lib/%name%/engine.rb.tt +49 -0
- data/lib/generators/jets/engine/templates/lib/%name%/version.rb.tt +5 -0
- data/lib/generators/jets/engine/templates/spec/internal/config/database.yml.tt +6 -0
- data/lib/generators/jets/engine/templates/spec/internal/config/storage.yml.tt +3 -0
- data/lib/generators/jets/engine/templates/spec/internal/db/schema.rb +4 -0
- data/lib/generators/jets/engine/templates/spec/rails_helper.rb.tt +64 -0
- data/lib/generators/jets/engine/templates/spec/spec_helper.rb +6 -0
- data/lib/generators/jets/gem/USAGE +5 -0
- data/lib/generators/jets/gem/gem_generator.rb +21 -0
- data/lib/generators/jets/gem/templates/%name%.gemspec.tt +24 -0
- data/lib/generators/jets/gem/templates/Gemfile +15 -0
- data/lib/generators/jets/gem/templates/Gemfile.runtime +0 -0
- data/lib/generators/jets/gem/templates/README.md.tt +29 -0
- data/lib/generators/jets/gem/templates/Rakefile.tt +8 -0
- data/lib/generators/jets/gem/templates/lib/%name%.rb.tt +3 -0
- data/lib/generators/jets/gem/templates/lib/%name%/version.rb.tt +5 -0
- data/lib/generators/jets/gem/templates/spec/rails_helper.rb +5 -0
- data/lib/generators/jets/gem/templates/spec/spec_helper.rb +6 -0
- data/lib/generators/jets/install/install_generator.rb +23 -0
- data/lib/get-jets.rb +3 -0
- data/lib/jets/rails.rb +55 -0
- data/lib/jets/rails/railtie.rb +18 -0
- data/lib/jets/rails/version.rb +7 -0
- metadata +222 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3f19ebfd31dfcefd8950baf4cdf954a4333d21c32ebb0ba00d2c4278457037fc
|
4
|
+
data.tar.gz: e477e4c3121b3e9d60133b8b1a6980112b59dcfb34b47996ea438679e8dbc14e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 315fb95bb3b7338895783d2988822ec969fedd60242907c74a34ad32ca7008815c3b3053f6c10e5be243d4d211a414907413c1131c8a9c660c4cf5f8ff35be82
|
7
|
+
data.tar.gz: 937e4811bbd33f0dc73db17ae384384caca2f7bd570349f6ccf6c9555fc123b1f01e34fe0ffd90e218cb8c76459d5f134630c4f3e66365e7c501e0b651ec087a
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
[gem]: https://rubygems.org/gems/jets
|
2
|
+
[actions]: https://github.com/getjets/jets/actions
|
3
|
+
|
4
|
+
# jets
|
5
|
+
|
6
|
+
[![CI Status](https://github.com/getjets/jets/workflows/ci/badge.svg)][actions]
|
7
|
+
|
8
|
+
`jets` provides afterburners for your Ruby on Rails app development.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem "get-jets"
|
16
|
+
```
|
17
|
+
|
18
|
+
or to your engine's Gemfile and `.gemspec`:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
# Gemfile
|
22
|
+
gem "get-jets"
|
23
|
+
|
24
|
+
# .gemspec
|
25
|
+
s.add_development_dependency "jets-rubocop"
|
26
|
+
```
|
27
|
+
|
28
|
+
## Supported Ruby versions
|
29
|
+
|
30
|
+
This library officially supports the following Ruby versions:
|
31
|
+
|
32
|
+
* MRI >= "3.0"
|
33
|
+
|
34
|
+
## License
|
35
|
+
|
36
|
+
See `LICENSE` file.
|
37
|
+
|
38
|
+
## Credits
|
39
|
+
|
40
|
+
Original inspiration for the Jets project comes from [Vladimir Dementyev's](https://github.com/palkan)
|
41
|
+
excellent presentation on component-based Rails monolith applications and his [Engems](https://github.com/palkan/engems)
|
42
|
+
showcase repository.
|
43
|
+
|
44
|
+
Code:
|
45
|
+
- [Engems](https://github.com/palkan/engems)
|
46
|
+
|
47
|
+
Talks:
|
48
|
+
- [Between monoliths and microservices](https://noti.st/palkan/VWPOSd/between-monoliths-and-microservices)
|
data/get-jets.gemspec
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require "jets/rails/version"
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = "get-jets"
|
10
|
+
spec.authors = ["Lauri Jutila"]
|
11
|
+
spec.email = "ruby@laurijutila.com"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.version = Jets::Rails::VERSION.dup
|
14
|
+
|
15
|
+
spec.summary = "Jets for your Ruby on Rails apps"
|
16
|
+
spec.description = "get-jets provides the official integration of Jets gems with Ruby on Rails framework."
|
17
|
+
spec.homepage = "https://github.com/getjets/jets"
|
18
|
+
spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "get-jets.gemspec", "lib/**/*"]
|
19
|
+
spec.bindir = "bin"
|
20
|
+
spec.executables = []
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
24
|
+
spec.metadata["changelog_uri"] = "https://github.com/getjets/jets/blob/master/CHANGELOG.md"
|
25
|
+
spec.metadata["source_code_uri"] = "https://github.com/getjets/jets"
|
26
|
+
spec.metadata["bug_tracker_uri"] = "https://github.com/getjets/jets/issues"
|
27
|
+
|
28
|
+
spec.required_ruby_version = ">= 3.0.0"
|
29
|
+
|
30
|
+
spec.add_runtime_dependency "jets-bundler", "~> 0.1"
|
31
|
+
spec.add_runtime_dependency "jets-factory", "~> 0.1"
|
32
|
+
spec.add_runtime_dependency "jets-testing", "~> 0.1"
|
33
|
+
spec.add_runtime_dependency "jets-rubocop", "~> 0.1"
|
34
|
+
|
35
|
+
# to update dependencies edit project.yml
|
36
|
+
|
37
|
+
spec.add_development_dependency "bundler", "~> 2"
|
38
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
39
|
+
spec.add_development_dependency "rspec", "~> 3.9"
|
40
|
+
|
41
|
+
spec.add_development_dependency "fuubar", "~> 2.5"
|
42
|
+
spec.add_development_dependency "rspec-instafail", "~> 1.0"
|
43
|
+
spec.add_development_dependency "rspec_junit_formatter", "~> 0.4"
|
44
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/generators"
|
4
|
+
|
5
|
+
module Jets
|
6
|
+
module Generators
|
7
|
+
class EngineGenerator < ::Rails::Generators::NamedBase
|
8
|
+
namespace "jets:engine"
|
9
|
+
source_root File.expand_path("templates", __dir__)
|
10
|
+
|
11
|
+
desc "Generates a Rails engine with given NAME with Jets conventions " \
|
12
|
+
"and configurations. \n\n"
|
13
|
+
|
14
|
+
def create_engine_file
|
15
|
+
directory(".", "engines/#{name}")
|
16
|
+
|
17
|
+
chmod "engines/#{name}/bin/console", 0o755, verbose: false
|
18
|
+
chmod "engines/#{name}/bin/rails", 0o755, verbose: false
|
19
|
+
end
|
20
|
+
|
21
|
+
def mount_engine_to_routes
|
22
|
+
route "mount #{class_name}::Engine, at: \"/\", as: :#{name}_root"
|
23
|
+
end
|
24
|
+
|
25
|
+
def add_engine_to_gemfile_as_component
|
26
|
+
append_to_file "Gemfile", "component \"#{name}\""
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
+
|
5
|
+
require "<%= name %>/version"
|
6
|
+
|
7
|
+
# Use Rails version from the project's root
|
8
|
+
rails_version = File.read(File.join(__dir__, "../../.rails-version"))
|
9
|
+
|
10
|
+
Gem::Specification.new do |s|
|
11
|
+
s.name = "<%= name %>"
|
12
|
+
s.version = <%= class_name %>::VERSION
|
13
|
+
s.authors = ["TODO"]
|
14
|
+
s.summary = "TODO:"
|
15
|
+
s.description = "TODO:"
|
16
|
+
|
17
|
+
s.files = Dir["{app,config,db,lib}/**/*"]
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_dependency "rails", rails_version
|
21
|
+
s.add_dependency "pg", "~> 1.0"
|
22
|
+
|
23
|
+
s.add_development_dependency "brakeman", "~> 4.7"
|
24
|
+
s.add_development_dependency "bundler", ">= 2.0"
|
25
|
+
s.add_development_dependency "pry-byebug", ">= 3.4"
|
26
|
+
s.add_development_dependency "rake", "~> 13.0"
|
27
|
+
|
28
|
+
# Internal
|
29
|
+
s.add_development_dependency "jets-rubocop"
|
30
|
+
s.add_development_dependency "jets-testing"
|
31
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
git_source(:github) do |repo_name|
|
6
|
+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
7
|
+
"https://github.com/#{repo_name}.git"
|
8
|
+
end
|
9
|
+
|
10
|
+
gemspec
|
11
|
+
|
12
|
+
eval_gemfile "./Gemfile.runtime"
|
13
|
+
|
14
|
+
gem "jets-testing"
|
15
|
+
gem "jets-rubocop"
|
16
|
+
|
17
|
+
# Speed up application code loading
|
18
|
+
# https://github.com/Shopify/bootsnap
|
19
|
+
gem "bootsnap", ">= 1.4.3", require: false
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails"
|
4
|
+
|
5
|
+
require "<%= name %>/version"
|
6
|
+
|
7
|
+
module <%= class_name %>
|
8
|
+
class << self
|
9
|
+
# Configure table_name_prefix for all the models from the engine
|
10
|
+
# if there could be a collision with other engines, or the main
|
11
|
+
# app models.
|
12
|
+
#
|
13
|
+
# This is useful during the gradual migration to component-based
|
14
|
+
# architecture.
|
15
|
+
|
16
|
+
def table_name_prefix
|
17
|
+
""
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
require "<%= name %>/engine"
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/engine"
|
4
|
+
|
5
|
+
module <%= class_name %>
|
6
|
+
class << self
|
7
|
+
def configure
|
8
|
+
yield Engine.config
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class Engine < ::Rails::Engine
|
13
|
+
isolate_namespace <%= class_name %>
|
14
|
+
|
15
|
+
config.autoload_paths += Dir["#{config.root}/app/**/concerns"]
|
16
|
+
|
17
|
+
# Specify the application controller base class, defaults to main application's ApplicationController
|
18
|
+
config.application_controller = "ApplicationController"
|
19
|
+
|
20
|
+
initializer "<%= name %>" do |app|
|
21
|
+
app.config.paths["db/migrate"].concat(config.paths["db/migrate"].expanded)
|
22
|
+
|
23
|
+
# For migration_context (used for checking if migrations are pending)
|
24
|
+
ActiveRecord::Migrator.migrations_path += config.paths["db/migrate"].expanded.flatten
|
25
|
+
|
26
|
+
engine_factories_path = root.join("spec", "factories")
|
27
|
+
|
28
|
+
# This hook is provided by `jets-factory` gem
|
29
|
+
ActiveSupport.on_load(:factory_bot) do
|
30
|
+
FactoryBot.definition_file_paths.unshift engine_factories_path
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
initialize "<%= name %>.subscribe_to_events" do
|
35
|
+
ActiveSupport.on_load :active_event_store do |store|
|
36
|
+
# async subscriber is invoked from a background job, enqueued after the transaction commits
|
37
|
+
# store.subscribe MyEventHandler, to: EventHappened
|
38
|
+
|
39
|
+
# anonymous handler
|
40
|
+
# store.subscribe(to: EventHappened, sync: true) do |event|
|
41
|
+
# # do something
|
42
|
+
# end
|
43
|
+
|
44
|
+
# subscribes to EventHappened automatically
|
45
|
+
# store.subscribe OnEventHappened::DoThat
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Engine root is used by rails_configuration to correctly
|
4
|
+
# load fixtures and support files
|
5
|
+
|
6
|
+
unless defined?(ENGINE_ROOT)
|
7
|
+
ENGINE_ROOT = Pathname.new(File.expand_path("..", __dir__))
|
8
|
+
end
|
9
|
+
|
10
|
+
ENV["RAILS_ENV"] = "test"
|
11
|
+
ENV["BOOTSNAP_CACHE_DIR"] = File.join(ENGINE_ROOT, "spec", "internal", "tmp", "cache")
|
12
|
+
|
13
|
+
require "bootsnap/setup"
|
14
|
+
|
15
|
+
require "combustion"
|
16
|
+
require "jets/testing/ext/combustion_bundler_patch"
|
17
|
+
|
18
|
+
begin
|
19
|
+
# Customize your Combustion test application.
|
20
|
+
# Combustion.initialize! :active_record, :active_job, :active_storage, :action_mailer, :action_controller
|
21
|
+
Combustion.initialize! :active_record, bundler_groups: :<%= name %> do
|
22
|
+
config.logger = Logger.new(nil)
|
23
|
+
config.log_level = :fatal
|
24
|
+
|
25
|
+
config.autoloader = :zeitwerk
|
26
|
+
|
27
|
+
# Always use test adapter for active_job
|
28
|
+
# config.active_job.queue_adapter = :test
|
29
|
+
#
|
30
|
+
# Always use test service to active_storage
|
31
|
+
# config.active_storage.service = :test
|
32
|
+
#
|
33
|
+
# Enable verbose logging for active_record
|
34
|
+
# config.active_record.verbose_query_logs = true
|
35
|
+
end
|
36
|
+
rescue => e
|
37
|
+
# Fail fast if application couldn't be loaded
|
38
|
+
$stdout.puts "Failed to load the app: #{e.message}\n#{e.backtrace.take(5).join("\n")}"
|
39
|
+
exit(1)
|
40
|
+
end
|
41
|
+
|
42
|
+
# if you need url helpers (e.g. with active storage)
|
43
|
+
# Rails.application.default_url_options[:host] = "localhost"
|
44
|
+
# <%= class_name %>::Engine.routes.default_url_options[:host] = "localhost"
|
45
|
+
|
46
|
+
module Jets
|
47
|
+
module Testing
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
require "jets/testing/rails"
|
52
|
+
|
53
|
+
# action_policy helpers
|
54
|
+
# require "action_policy/rspec"
|
55
|
+
# require "action_policy/rspec/dsl"
|
56
|
+
|
57
|
+
# Additional RSpec configuration
|
58
|
+
#
|
59
|
+
# RSpec.configure do |config|
|
60
|
+
# config.after(:suite) do
|
61
|
+
# # Cleanup attachments generated during tests
|
62
|
+
# FileUtils.rm_rf(ActiveStorage::Blob.service.root)
|
63
|
+
# end
|
64
|
+
# end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/generators"
|
4
|
+
|
5
|
+
module Jets
|
6
|
+
module Generators
|
7
|
+
class GemGenerator < ::Rails::Generators::NamedBase
|
8
|
+
namespace "jets:gem"
|
9
|
+
source_root File.expand_path("templates", __dir__)
|
10
|
+
|
11
|
+
desc "Generates a gem with given NAME with Jets conventions " \
|
12
|
+
"and configurations. \n\n"
|
13
|
+
|
14
|
+
def create_gem_file
|
15
|
+
directory(".", "gems/#{name}")
|
16
|
+
|
17
|
+
chmod "engines/#{name}/bin/console", 0o755, verbose: false
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
+
|
5
|
+
require "<%= name %>/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "<%= name %>"
|
9
|
+
s.version = <%= class_name %>::VERSION
|
10
|
+
s.authors = ["TODO"]
|
11
|
+
s.summary = "TODO:"
|
12
|
+
s.description = "TODO:"
|
13
|
+
|
14
|
+
s.files = Dir["{config,lib}/**/*", "Rakefile"]
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
|
17
|
+
s.add_development_dependency "bundler", "~> 2"
|
18
|
+
s.add_development_dependency "pry-byebug", "~> 3.4"
|
19
|
+
s.add_development_dependency "rake", "~> 13.0"
|
20
|
+
|
21
|
+
# Internal
|
22
|
+
s.add_development_dependency "jets-rubocop", "~> 0.1"
|
23
|
+
s.add_development_dependency "jets-testing", "~> 0.1"
|
24
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
git_source(:github) do |repo_name|
|
6
|
+
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
|
7
|
+
"https://github.com/#{repo_name}.git"
|
8
|
+
end
|
9
|
+
|
10
|
+
gemspec
|
11
|
+
|
12
|
+
eval_gemfile "./Gemfile.runtime"
|
13
|
+
|
14
|
+
gem "jets-testing"
|
15
|
+
gem "jets-rubocop"
|
File without changes
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# <%= class_name %>
|
2
|
+
|
3
|
+
## Purpose
|
4
|
+
|
5
|
+
TODO: Purpose of this gem.
|
6
|
+
|
7
|
+
## Architecture
|
8
|
+
|
9
|
+
TODO: Define the architecture of this gem.
|
10
|
+
|
11
|
+
## Development Environment
|
12
|
+
|
13
|
+
TODO: Write instructions how to set up a development environment for this gem.
|
14
|
+
|
15
|
+
## Test Environment
|
16
|
+
|
17
|
+
TODO: Write instructions how to set up a test environment for this gem.
|
18
|
+
|
19
|
+
## Production Environment
|
20
|
+
|
21
|
+
TODO: Write instructions how to use this gem in production.
|
22
|
+
|
23
|
+
## Continuous Integration
|
24
|
+
|
25
|
+
TODO: Write instructions on how this gem is continuously integrated.
|
26
|
+
|
27
|
+
## Coding Style
|
28
|
+
|
29
|
+
TODO: Define coding style for this gem.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/generators"
|
4
|
+
|
5
|
+
module Jets
|
6
|
+
module Generators
|
7
|
+
class InstallGenerator < ::Rails::Generators::Base
|
8
|
+
namespace "jets:install"
|
9
|
+
source_root File.expand_path("templates", __dir__)
|
10
|
+
|
11
|
+
desc "Sets up your Rails application to use Jets. \n\n"
|
12
|
+
|
13
|
+
def set_rails_version
|
14
|
+
template ".rails-version", "./.rails-version"
|
15
|
+
end
|
16
|
+
|
17
|
+
def modify_gemfile
|
18
|
+
prepend_to_file "Gemfile", 'require "bundler/component"'
|
19
|
+
prepend_to_file "Gemfile", 'require "bundler/eval_gemfile"'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/get-jets.rb
ADDED
data/lib/jets/rails.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "jets/rails/railtie"
|
4
|
+
|
5
|
+
module Jets
|
6
|
+
# Initializer interface
|
7
|
+
#
|
8
|
+
# @example set up a container with auto-registration paths
|
9
|
+
# # config/initializer/system.rb
|
10
|
+
#
|
11
|
+
# Dry::Rails.container do
|
12
|
+
# auto_register!("lib", "app/operations")
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# @see Dry::Rails::Container.auto_register!
|
16
|
+
#
|
17
|
+
# @api public
|
18
|
+
|
19
|
+
module Rails
|
20
|
+
# Set container block that will be evaluated in the context of the container
|
21
|
+
#
|
22
|
+
# @return [self]
|
23
|
+
#
|
24
|
+
# @api public
|
25
|
+
def self.container(&block)
|
26
|
+
_container_blocks << block
|
27
|
+
self
|
28
|
+
end
|
29
|
+
|
30
|
+
# Create a new container class
|
31
|
+
#
|
32
|
+
# This is used during booting and reloading
|
33
|
+
#
|
34
|
+
# @param options [Hash] Container configuration settings
|
35
|
+
#
|
36
|
+
# @return [Class]
|
37
|
+
#
|
38
|
+
# @api private
|
39
|
+
def self.create_container(options = {})
|
40
|
+
Class.new(Container) { config.update(options) }
|
41
|
+
end
|
42
|
+
|
43
|
+
# @api private
|
44
|
+
def self.evaluate_initializer(container)
|
45
|
+
_container_blocks.each do |block|
|
46
|
+
container.class_eval(&block)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# @api private
|
51
|
+
def self._container_blocks
|
52
|
+
@_container_blocks ||= []
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/railtie"
|
4
|
+
|
5
|
+
module Jets
|
6
|
+
module Rails
|
7
|
+
# The railtie is responsible for setting up Jets for Rails.
|
8
|
+
#
|
9
|
+
# @api public
|
10
|
+
class Railtie < ::Rails::Railtie
|
11
|
+
generators do
|
12
|
+
require "generators/jets/engine/engine_generator"
|
13
|
+
require "generators/jets/gem/gem_generator"
|
14
|
+
require "generators/jets/install/install_generator"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,222 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: get-jets
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lauri Jutila
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-04-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jets-bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jets-factory
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jets-testing
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jets-rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '12.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '12.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.9'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.9'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: fuubar
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.5'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.5'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec-instafail
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec_junit_formatter
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.4'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.4'
|
153
|
+
description: get-jets provides the official integration of Jets gems with Ruby on
|
154
|
+
Rails framework.
|
155
|
+
email: ruby@laurijutila.com
|
156
|
+
executables: []
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files: []
|
159
|
+
files:
|
160
|
+
- README.md
|
161
|
+
- get-jets.gemspec
|
162
|
+
- lib/generators/jets/engine/USAGE
|
163
|
+
- lib/generators/jets/engine/engine_generator.rb
|
164
|
+
- lib/generators/jets/engine/templates/%name%.gemspec.tt
|
165
|
+
- lib/generators/jets/engine/templates/Gemfile
|
166
|
+
- lib/generators/jets/engine/templates/Gemfile.runtime
|
167
|
+
- lib/generators/jets/engine/templates/README.md.tt
|
168
|
+
- lib/generators/jets/engine/templates/Rakefile.tt
|
169
|
+
- lib/generators/jets/engine/templates/app/controllers/%name%/application_controller.rb.tt
|
170
|
+
- lib/generators/jets/engine/templates/config/routes.rb.tt
|
171
|
+
- lib/generators/jets/engine/templates/lib/%name%.rb.tt
|
172
|
+
- lib/generators/jets/engine/templates/lib/%name%/engine.rb.tt
|
173
|
+
- lib/generators/jets/engine/templates/lib/%name%/version.rb.tt
|
174
|
+
- lib/generators/jets/engine/templates/spec/internal/config/database.yml.tt
|
175
|
+
- lib/generators/jets/engine/templates/spec/internal/config/storage.yml.tt
|
176
|
+
- lib/generators/jets/engine/templates/spec/internal/db/schema.rb
|
177
|
+
- lib/generators/jets/engine/templates/spec/rails_helper.rb.tt
|
178
|
+
- lib/generators/jets/engine/templates/spec/spec_helper.rb
|
179
|
+
- lib/generators/jets/gem/USAGE
|
180
|
+
- lib/generators/jets/gem/gem_generator.rb
|
181
|
+
- lib/generators/jets/gem/templates/%name%.gemspec.tt
|
182
|
+
- lib/generators/jets/gem/templates/Gemfile
|
183
|
+
- lib/generators/jets/gem/templates/Gemfile.runtime
|
184
|
+
- lib/generators/jets/gem/templates/README.md.tt
|
185
|
+
- lib/generators/jets/gem/templates/Rakefile.tt
|
186
|
+
- lib/generators/jets/gem/templates/lib/%name%.rb.tt
|
187
|
+
- lib/generators/jets/gem/templates/lib/%name%/version.rb.tt
|
188
|
+
- lib/generators/jets/gem/templates/spec/rails_helper.rb
|
189
|
+
- lib/generators/jets/gem/templates/spec/spec_helper.rb
|
190
|
+
- lib/generators/jets/install/install_generator.rb
|
191
|
+
- lib/get-jets.rb
|
192
|
+
- lib/jets/rails.rb
|
193
|
+
- lib/jets/rails/railtie.rb
|
194
|
+
- lib/jets/rails/version.rb
|
195
|
+
homepage: https://github.com/getjets/jets
|
196
|
+
licenses:
|
197
|
+
- MIT
|
198
|
+
metadata:
|
199
|
+
allowed_push_host: https://rubygems.org
|
200
|
+
changelog_uri: https://github.com/getjets/jets/blob/master/CHANGELOG.md
|
201
|
+
source_code_uri: https://github.com/getjets/jets
|
202
|
+
bug_tracker_uri: https://github.com/getjets/jets/issues
|
203
|
+
post_install_message:
|
204
|
+
rdoc_options: []
|
205
|
+
require_paths:
|
206
|
+
- lib
|
207
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
208
|
+
requirements:
|
209
|
+
- - ">="
|
210
|
+
- !ruby/object:Gem::Version
|
211
|
+
version: 3.0.0
|
212
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - ">="
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '0'
|
217
|
+
requirements: []
|
218
|
+
rubygems_version: 3.2.3
|
219
|
+
signing_key:
|
220
|
+
specification_version: 4
|
221
|
+
summary: Jets for your Ruby on Rails apps
|
222
|
+
test_files: []
|