dappgen 0.1.0 → 0.1.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 +4 -4
- data/dappgen.gemspec +5 -5
- data/data/dappgen/generators/gem/base/CODE_OF_CONDUCT.md +1 -1
- data/data/dappgen/generators/gem/base/LICENSE.txt +1 -1
- data/data/dappgen/generators/gem/base/base.gemspec +5 -5
- data/data/dappgen/generators/gem/replacers/README.md.erb +2 -2
- data/data/dappgen/generators/gem/templates/gemspec.erb +5 -5
- data/data/dappgen/generators/rails-zen-app/DapperConfig +6 -0
- data/data/dappgen/generators/rails-zen-app/replacers/Kaiserfile.erb +20 -0
- data/data/dappgen/generators/rails-zen-app/replacers/config/application.rb.erb +54 -0
- data/lib/dappgen/dapper_config.rb +2 -2
- data/lib/dappgen/machines/dry_run_machine.rb +27 -10
- data/lib/dappgen/machines/execute_machine.rb +13 -4
- data/lib/dappgen/version.rb +1 -1
- metadata +16 -15
- data/data/dappgen/generators/gem/base/Gemfile.lock +0 -34
- data/data/dappgen/generators/rails/DapperConfig +0 -0
- /data/data/dappgen/generators/{rails → rails-zen-app}/README.md +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0242183e9dccdce44b1bea5ae30d8c60c70b60e744dfdb8a6eec20135783220
|
|
4
|
+
data.tar.gz: 475ccf7226fdbb93978e523073553558e9744ca41a9af2fdb1e6afdff11d2b56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 359fe3a3e959a2dd498e10ff494d4b472d0f79e5bc40c1c2d9714334c7c7e3b758df64f575b09b36963c4b2353beecf8072e5267cff337d0cf8ff96ca8b37716
|
|
7
|
+
data.tar.gz: fec8ff69a556c15247b10299ccf9e869f034104dd297b1100e626038d6d4e1c742ac6386dccd517366768491e9a7533a6659534d1f003a7676f19da599c6cb0c
|
data/dappgen.gemspec
CHANGED
|
@@ -6,19 +6,19 @@ Gem::Specification.new do |spec|
|
|
|
6
6
|
spec.name = 'dappgen'
|
|
7
7
|
spec.version = Dappgen::VERSION
|
|
8
8
|
spec.authors = ['David Siaw']
|
|
9
|
-
spec.email = ['
|
|
9
|
+
spec.email = ['874280+davidsiaw@users.noreply.github.com']
|
|
10
10
|
|
|
11
|
-
spec.summary = '
|
|
11
|
+
spec.summary = %q{David's App Generator}
|
|
12
12
|
spec.description = 'Generates Rails apps'
|
|
13
|
-
spec.homepage = 'https://github.com/
|
|
13
|
+
spec.homepage = 'https://github.com/davidsiaw/dappgen'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
|
16
16
|
|
|
17
17
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
18
|
|
|
19
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
20
|
-
spec.metadata['source_code_uri'] = 'https://github.com/
|
|
21
|
-
spec.metadata['changelog_uri'] = 'https://github.com/
|
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/davidsiaw/dappgen'
|
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/davidsiaw/dappgen'
|
|
22
22
|
|
|
23
23
|
spec.files = Dir['{exe,data,lib}/**/*'] + %w[Gemfile dappgen.gemspec]
|
|
24
24
|
spec.bindir = 'exe'
|
|
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
|
55
55
|
## Enforcement
|
|
56
56
|
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at
|
|
58
|
+
reported by contacting the project team at 874280+davidsiaw@users.noreply.github.com. All
|
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
@@ -5,20 +5,20 @@ require_relative 'lib/base/version'
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = 'base'
|
|
7
7
|
spec.version = Base::VERSION
|
|
8
|
-
spec.authors = ['
|
|
9
|
-
spec.email = ['
|
|
8
|
+
spec.authors = ['David Siaw']
|
|
9
|
+
spec.email = ['874280+davidsiaw@users.noreply.github.com']
|
|
10
10
|
|
|
11
11
|
spec.summary = 'Base gem'
|
|
12
12
|
spec.description = 'Does not do anything'
|
|
13
|
-
spec.homepage = 'https://github.com/
|
|
13
|
+
spec.homepage = 'https://github.com/davidsiaw/dappgen'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
|
16
16
|
|
|
17
17
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
18
|
|
|
19
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
20
|
-
spec.metadata['source_code_uri'] = 'https://github.com/
|
|
21
|
-
spec.metadata['changelog_uri'] = 'https://github.com/
|
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/davidsiaw/dappgen'
|
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/davidsiaw/dappgen'
|
|
22
22
|
|
|
23
23
|
spec.files = Dir['{exe,data,lib}/**/*'] + %w[Gemfile base.gemspec]
|
|
24
24
|
spec.bindir = 'exe'
|
|
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
32
32
|
|
|
33
33
|
## Contributing
|
|
34
34
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/davidsiaw/<%= gem_name %>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/davidsiaw/<%= gem_name %>/blob/master/CODE_OF_CONDUCT.md).
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
## License
|
|
@@ -41,4 +41,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
41
41
|
|
|
42
42
|
## Code of Conduct
|
|
43
43
|
|
|
44
|
-
Everyone interacting in the <%= gem_name.to_s.camelize %> project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
44
|
+
Everyone interacting in the <%= gem_name.to_s.camelize %> project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/davidsiaw/<%= gem_name %>/blob/master/CODE_OF_CONDUCT.md).
|
|
@@ -5,20 +5,20 @@ require_relative 'lib/<%= gem_name %>/version'
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = '<%= gem_name %>'
|
|
7
7
|
spec.version = <%= gem_name.to_s.camelize %>::VERSION
|
|
8
|
-
spec.authors = ['
|
|
9
|
-
spec.email = ['
|
|
8
|
+
spec.authors = ['David Siaw']
|
|
9
|
+
spec.email = ['874280+davidsiaw@users.noreply.github.com']
|
|
10
10
|
|
|
11
11
|
spec.summary = '<%= gem_name.to_s.camelize %> summary'
|
|
12
12
|
spec.description = '<%= gem_name.to_s.camelize %> description'
|
|
13
|
-
spec.homepage = 'https://github.com/
|
|
13
|
+
spec.homepage = 'https://github.com/[USERNAME]/<%= gem_name %>'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
15
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
|
16
16
|
|
|
17
17
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
18
18
|
|
|
19
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
20
|
-
spec.metadata['source_code_uri'] = 'https://github.com/
|
|
21
|
-
spec.metadata['changelog_uri'] = 'https://github.com/
|
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/[USERNAME]/<%= gem_name %>'
|
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/[USERNAME]/<%= gem_name %>'
|
|
22
22
|
|
|
23
23
|
spec.files = Dir['{exe,data,lib}/**/*'] + %w[Gemfile <%= gem_name %>.gemspec]
|
|
24
24
|
spec.bindir = 'exe'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
dockerfile 'Dockerfile'
|
|
2
|
+
|
|
3
|
+
plugin :database
|
|
4
|
+
def_db postgres: { root_password: 'postgres' }
|
|
5
|
+
|
|
6
|
+
app_params "
|
|
7
|
+
-e DATABASE_URL=postgres://postgres:postgres@<%= '<' %>%= db_container_name %<%= '>' %>/<%= app_name %>_development
|
|
8
|
+
-e REDIS_URL=redis://<%= '<' %>%= @config[:shared_names][:redis] %<%= '>' %>:6379
|
|
9
|
+
"
|
|
10
|
+
|
|
11
|
+
attach_mount "app", "/app/home/app"
|
|
12
|
+
attach_mount "db", "/app/home/db"
|
|
13
|
+
attach_mount "lib", "/app/home/lib"
|
|
14
|
+
attach_mount "spec", "/app/home/spec"
|
|
15
|
+
attach_mount "config", "/app/home/config"
|
|
16
|
+
attach_mount "Gemfile", "/app/home/Gemfile"
|
|
17
|
+
attach_mount "Gemfile.lock", "/app/home/Gemfile.lock"
|
|
18
|
+
|
|
19
|
+
expose "3000"
|
|
20
|
+
db_reset_command "rails db:reset"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'boot'
|
|
4
|
+
|
|
5
|
+
require 'rails'
|
|
6
|
+
# Pick the frameworks you want:
|
|
7
|
+
require 'active_model/railtie'
|
|
8
|
+
require 'active_job/railtie'
|
|
9
|
+
require 'active_record/railtie'
|
|
10
|
+
require 'active_storage/engine'
|
|
11
|
+
require 'action_controller/railtie'
|
|
12
|
+
require 'action_mailer/railtie'
|
|
13
|
+
require 'action_view/railtie'
|
|
14
|
+
require 'action_cable/engine'
|
|
15
|
+
require 'sprockets/railtie'
|
|
16
|
+
# require "rails/test_unit/railtie"
|
|
17
|
+
|
|
18
|
+
Bundler.require(*Rails.groups)
|
|
19
|
+
|
|
20
|
+
module <%= app_name.to_s.camelize %>
|
|
21
|
+
# The application config
|
|
22
|
+
class Application < Rails::Application
|
|
23
|
+
# Initialize configuration defaults for originally generated Rails version.
|
|
24
|
+
config.load_defaults 5.2
|
|
25
|
+
|
|
26
|
+
# Clear hosts in Rails 6. No need to whitelist unless you
|
|
27
|
+
# really want to.
|
|
28
|
+
config.hosts.clear
|
|
29
|
+
|
|
30
|
+
# Settings in config/environments/* take precedence over those specified
|
|
31
|
+
# here.
|
|
32
|
+
# Application configuration can go into files in config/initializers
|
|
33
|
+
# -- all .rb files in that directory are automatically loaded after loading
|
|
34
|
+
# the framework and any gems in your application.
|
|
35
|
+
|
|
36
|
+
# Don't generate system test files.
|
|
37
|
+
config.generators.system_tests = nil
|
|
38
|
+
|
|
39
|
+
config.paths.add File.join('app', 'apis'), glob: File.join('**', '*.rb')
|
|
40
|
+
config.autoload_paths += Dir[Rails.root.join('app', 'apis', '*')]
|
|
41
|
+
config.active_job.queue_adapter = :sidekiq
|
|
42
|
+
|
|
43
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
44
|
+
config.log_formatter = ::Logger::Formatter.new
|
|
45
|
+
|
|
46
|
+
# Use a different logger for distributed setups.
|
|
47
|
+
# require 'syslog/logger'
|
|
48
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new
|
|
49
|
+
# 'app-name')
|
|
50
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
|
51
|
+
logger.formatter = config.log_formatter
|
|
52
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -20,17 +20,34 @@ module Dappgen
|
|
|
20
20
|
@cur_dir_name = name
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def copy_base(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
def copy_base(source)
|
|
24
|
+
if source.nil?
|
|
25
|
+
Dir["#{@static_files_dir}/**/*"].each do |object|
|
|
26
|
+
rel_path = object.sub(%r{^#{@static_files_dir}/}, '')
|
|
27
|
+
branch = @tree[@cur_dir_name]
|
|
28
|
+
|
|
29
|
+
levels = rel_path.split('/')
|
|
30
|
+
levels[0..-1].each do |level|
|
|
31
|
+
branch[level] = {} if branch[level].nil?
|
|
32
|
+
|
|
33
|
+
branch = branch[level]
|
|
34
|
+
end
|
|
33
35
|
end
|
|
36
|
+
else
|
|
37
|
+
`rm -rf .tmp`
|
|
38
|
+
`git clone #{source} .tmp`
|
|
39
|
+
Dir[".tmp/**/*"].each do |object|
|
|
40
|
+
rel_path = object.sub(%r{^.tmp/}, '')
|
|
41
|
+
branch = @tree[@cur_dir_name]
|
|
42
|
+
|
|
43
|
+
levels = rel_path.split('/')
|
|
44
|
+
levels[0..-1].each do |level|
|
|
45
|
+
branch[level] = {} if branch[level].nil?
|
|
46
|
+
|
|
47
|
+
branch = branch[level]
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
`rm -rf .tmp`
|
|
34
51
|
end
|
|
35
52
|
|
|
36
53
|
Dir["#{@replacer_files_dir}/**/*"].each do |object|
|
|
@@ -28,10 +28,19 @@ module Dappgen
|
|
|
28
28
|
FileUtils.mkdir_p name
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
def copy_base(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
def copy_base(source)
|
|
32
|
+
if source.nil?
|
|
33
|
+
puts "Copying static files to '#{@cur_dir_name}'"
|
|
34
|
+
Dir["#{@static_files_dir}/*"].each do |object|
|
|
35
|
+
FileUtils.cp_r object, @cur_dir_name
|
|
36
|
+
end
|
|
37
|
+
else
|
|
38
|
+
`rm -rf .tmp`
|
|
39
|
+
`git clone #{source} .tmp`
|
|
40
|
+
Dir['.tmp/*'].each do |object|
|
|
41
|
+
FileUtils.cp_r object, @cur_dir_name
|
|
42
|
+
end
|
|
43
|
+
`rm -rf .tmp`
|
|
35
44
|
end
|
|
36
45
|
|
|
37
46
|
puts "Applying replacers to '#{@cur_dir_name}'"
|
data/lib/dappgen/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dappgen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Siaw
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-11-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -68,7 +68,7 @@ dependencies:
|
|
|
68
68
|
version: '0'
|
|
69
69
|
description: Generates Rails apps
|
|
70
70
|
email:
|
|
71
|
-
-
|
|
71
|
+
- 874280+davidsiaw@users.noreply.github.com
|
|
72
72
|
executables:
|
|
73
73
|
- dappgen
|
|
74
74
|
extensions: []
|
|
@@ -80,7 +80,6 @@ files:
|
|
|
80
80
|
- data/dappgen/generators/gem/README.md
|
|
81
81
|
- data/dappgen/generators/gem/base/CODE_OF_CONDUCT.md
|
|
82
82
|
- data/dappgen/generators/gem/base/Gemfile
|
|
83
|
-
- data/dappgen/generators/gem/base/Gemfile.lock
|
|
84
83
|
- data/dappgen/generators/gem/base/LICENSE.txt
|
|
85
84
|
- data/dappgen/generators/gem/base/README.md
|
|
86
85
|
- data/dappgen/generators/gem/base/Rakefile
|
|
@@ -101,8 +100,10 @@ files:
|
|
|
101
100
|
- data/dappgen/generators/gem/templates/base_spec.erb
|
|
102
101
|
- data/dappgen/generators/gem/templates/gemspec.erb
|
|
103
102
|
- data/dappgen/generators/gem/templates/version.erb
|
|
104
|
-
- data/dappgen/generators/rails/DapperConfig
|
|
105
|
-
- data/dappgen/generators/rails/README.md
|
|
103
|
+
- data/dappgen/generators/rails-zen-app/DapperConfig
|
|
104
|
+
- data/dappgen/generators/rails-zen-app/README.md
|
|
105
|
+
- data/dappgen/generators/rails-zen-app/replacers/Kaiserfile.erb
|
|
106
|
+
- data/dappgen/generators/rails-zen-app/replacers/config/application.rb.erb
|
|
106
107
|
- exe/dappgen
|
|
107
108
|
- lib/dappgen.rb
|
|
108
109
|
- lib/dappgen/dapper_config.rb
|
|
@@ -112,15 +113,15 @@ files:
|
|
|
112
113
|
- lib/dappgen/machines/execute_machine.rb
|
|
113
114
|
- lib/dappgen/script.rb
|
|
114
115
|
- lib/dappgen/version.rb
|
|
115
|
-
homepage: https://github.com/
|
|
116
|
+
homepage: https://github.com/davidsiaw/dappgen
|
|
116
117
|
licenses:
|
|
117
118
|
- MIT
|
|
118
119
|
metadata:
|
|
119
120
|
allowed_push_host: https://rubygems.org
|
|
120
|
-
homepage_uri: https://github.com/
|
|
121
|
-
source_code_uri: https://github.com/
|
|
122
|
-
changelog_uri: https://github.com/
|
|
123
|
-
post_install_message:
|
|
121
|
+
homepage_uri: https://github.com/davidsiaw/dappgen
|
|
122
|
+
source_code_uri: https://github.com/davidsiaw/dappgen
|
|
123
|
+
changelog_uri: https://github.com/davidsiaw/dappgen
|
|
124
|
+
post_install_message:
|
|
124
125
|
rdoc_options: []
|
|
125
126
|
require_paths:
|
|
126
127
|
- lib
|
|
@@ -135,8 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
135
136
|
- !ruby/object:Gem::Version
|
|
136
137
|
version: '0'
|
|
137
138
|
requirements: []
|
|
138
|
-
rubygems_version: 3.
|
|
139
|
-
signing_key:
|
|
139
|
+
rubygems_version: 3.4.10
|
|
140
|
+
signing_key:
|
|
140
141
|
specification_version: 4
|
|
141
|
-
summary:
|
|
142
|
+
summary: David's App Generator
|
|
142
143
|
test_files: []
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
base (0.1.0)
|
|
5
|
-
|
|
6
|
-
GEM
|
|
7
|
-
remote: https://rubygems.org/
|
|
8
|
-
specs:
|
|
9
|
-
diff-lcs (1.4.4)
|
|
10
|
-
rake (12.3.3)
|
|
11
|
-
rspec (3.9.0)
|
|
12
|
-
rspec-core (~> 3.9.0)
|
|
13
|
-
rspec-expectations (~> 3.9.0)
|
|
14
|
-
rspec-mocks (~> 3.9.0)
|
|
15
|
-
rspec-core (3.9.2)
|
|
16
|
-
rspec-support (~> 3.9.3)
|
|
17
|
-
rspec-expectations (3.9.2)
|
|
18
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
19
|
-
rspec-support (~> 3.9.0)
|
|
20
|
-
rspec-mocks (3.9.1)
|
|
21
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
22
|
-
rspec-support (~> 3.9.0)
|
|
23
|
-
rspec-support (3.9.3)
|
|
24
|
-
|
|
25
|
-
PLATFORMS
|
|
26
|
-
ruby
|
|
27
|
-
|
|
28
|
-
DEPENDENCIES
|
|
29
|
-
base!
|
|
30
|
-
rake (~> 12.0)
|
|
31
|
-
rspec (~> 3.0)
|
|
32
|
-
|
|
33
|
-
BUNDLED WITH
|
|
34
|
-
2.1.2
|
|
File without changes
|
|
File without changes
|