regolith 0.1.20 → 0.1.21
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/lib/regolith/cli.rb +25 -3
- data/lib/regolith/version.rb +1 -1
- data/regolith.gemspec +8 -8
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d590506b9d76a0cae7c0b4cc1355860e601c42740d8f4de852e41c001cee08e8
|
4
|
+
data.tar.gz: 412b231f3860a025d6f48c6f96aeb2dc5b60d9368d298e05849d490221f0092d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f22e33c9f838f9a2c61af3808e8c7e0ba5f65e3729653e4674d8e3562dd184d6184f9b284fdcd657ad0f3ac6327521ccd2edbbea5e9a478b8e822f14edcb523d
|
7
|
+
data.tar.gz: a79ff4e21eba13f58cbed3d598dad134cf34df9ee9e3d7c99d0209397fec42b58ba180c636c7d8f2984902a49b8fd614335d819de156ea1e5bcd76128990122a
|
data/lib/regolith/cli.rb
CHANGED
@@ -69,7 +69,7 @@ module Regolith
|
|
69
69
|
File.write('docker-compose.yml', generate_docker_compose(app_name))
|
70
70
|
File.write('Makefile', generate_makefile)
|
71
71
|
File.write('.bin/regolith', generate_regolith_shim)
|
72
|
-
FileUtils.chmod(
|
72
|
+
FileUtils.chmod(0o755, '.bin/regolith')
|
73
73
|
end
|
74
74
|
|
75
75
|
def generate_resource(resource_type, resource_name)
|
@@ -118,7 +118,7 @@ module Regolith
|
|
118
118
|
|
119
119
|
# Overwrite Gemfile before bundle install
|
120
120
|
puts "🔧 Overwriting Gemfile to remove sqlite3 and other defaults..."
|
121
|
-
|
121
|
+
|
122
122
|
major_minor = `ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")'`.strip
|
123
123
|
|
124
124
|
custom_gemfile = <<~GEMFILE
|
@@ -137,6 +137,7 @@ module Regolith
|
|
137
137
|
gem "rubocop-rails-omakase", require: false
|
138
138
|
end
|
139
139
|
|
140
|
+
# Regolith vendored gem so the container can build without network access to your local gem
|
140
141
|
gem "regolith", path: "vendor/regolith"
|
141
142
|
GEMFILE
|
142
143
|
|
@@ -159,6 +160,7 @@ module Regolith
|
|
159
160
|
end
|
160
161
|
|
161
162
|
patch_rails_app(service_dir, service_name, port)
|
163
|
+
patch_bootsnap(service_dir)
|
162
164
|
|
163
165
|
config['services'][service_name] = {
|
164
166
|
'port' => port,
|
@@ -203,6 +205,26 @@ module Regolith
|
|
203
205
|
File.write(app_rb_path, app_rb_content)
|
204
206
|
end
|
205
207
|
|
208
|
+
# ---- Bootsnap Patch: make it optional & non-fatal ----
|
209
|
+
def patch_bootsnap(service_dir)
|
210
|
+
boot_path = File.join(service_dir, "config", "boot.rb")
|
211
|
+
return unless File.exist?(boot_path)
|
212
|
+
|
213
|
+
content = File.read(boot_path)
|
214
|
+
|
215
|
+
# Remove any unconditional bootsnap require and replace with guarded load
|
216
|
+
content.gsub!(/^\s*require\s+["']bootsnap\/setup["']\s*$/, <<~RUBY.strip)
|
217
|
+
begin
|
218
|
+
require "bootsnap/setup"
|
219
|
+
rescue LoadError
|
220
|
+
warn "[regolith] bootsnap not found; continuing without it"
|
221
|
+
end
|
222
|
+
RUBY
|
223
|
+
|
224
|
+
File.write(boot_path, content)
|
225
|
+
end
|
226
|
+
# ------------------------------------------------------
|
227
|
+
|
206
228
|
def start_server
|
207
229
|
unless File.exist?('docker-compose.yml')
|
208
230
|
puts "❌ Error: Not in a Regolith app directory"
|
@@ -240,7 +262,7 @@ module Regolith
|
|
240
262
|
end
|
241
263
|
|
242
264
|
def load_regolith_config
|
243
|
-
return
|
265
|
+
return({ 'services' => {} }) unless File.exist?('config/regolith.yml')
|
244
266
|
config = YAML.load_file('config/regolith.yml') || {}
|
245
267
|
config['services'] ||= {}
|
246
268
|
config
|
data/lib/regolith/version.rb
CHANGED
data/regolith.gemspec
CHANGED
@@ -5,18 +5,18 @@ Gem::Specification.new do |spec|
|
|
5
5
|
spec.name = "regolith"
|
6
6
|
spec.version = Regolith::VERSION
|
7
7
|
spec.authors = ["Regolith Team"]
|
8
|
-
spec.email = ["
|
8
|
+
spec.email = ["info@regolith.bio"]
|
9
9
|
|
10
|
-
spec.summary = "Rails
|
11
|
-
spec.description = "
|
12
|
-
spec.homepage = "https://
|
10
|
+
spec.summary = "Rails microservices. Zero setup. Docker + PostgreSQL"
|
11
|
+
spec.description = "Generate and orchestrate Rails microservices with zero setup using Docker + PostgreSQL."
|
12
|
+
spec.homepage = "https://regolith.bio"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.required_ruby_version = ">= 2.7.0"
|
16
16
|
|
17
|
-
spec.metadata["homepage_uri"] =
|
18
|
-
spec.metadata["source_code_uri"] = "https://github.com/
|
19
|
-
spec.metadata["changelog_uri"] = "https://github.com/
|
17
|
+
spec.metadata["homepage_uri"] = "https://regolith.bio"
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/ziolndr/regolith"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/ziolndr/regolith/blob/main/CHANGELOG.md"
|
20
20
|
|
21
21
|
# Specify which files should be added to the gem when it is released.
|
22
22
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
@@ -34,4 +34,4 @@ Gem::Specification.new do |spec|
|
|
34
34
|
# Development dependencies
|
35
35
|
spec.add_development_dependency "rspec", "~> 3.0"
|
36
36
|
spec.add_development_dependency "rake", "~> 13.0"
|
37
|
-
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regolith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Regolith Team
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '13.0'
|
69
|
-
description:
|
70
|
-
|
69
|
+
description: Generate and orchestrate Rails microservices with zero setup using Docker
|
70
|
+
+ PostgreSQL.
|
71
71
|
email:
|
72
|
-
-
|
72
|
+
- info@regolith.bio
|
73
73
|
executables:
|
74
74
|
- regolith
|
75
75
|
extensions: []
|
@@ -86,13 +86,13 @@ files:
|
|
86
86
|
- lib/regolith/service_client.rb
|
87
87
|
- lib/regolith/version.rb
|
88
88
|
- regolith.gemspec
|
89
|
-
homepage: https://
|
89
|
+
homepage: https://regolith.bio
|
90
90
|
licenses:
|
91
91
|
- MIT
|
92
92
|
metadata:
|
93
|
-
homepage_uri: https://
|
94
|
-
source_code_uri: https://github.com/
|
95
|
-
changelog_uri: https://github.com/
|
93
|
+
homepage_uri: https://regolith.bio
|
94
|
+
source_code_uri: https://github.com/ziolndr/regolith
|
95
|
+
changelog_uri: https://github.com/ziolndr/regolith/blob/main/CHANGELOG.md
|
96
96
|
post_install_message:
|
97
97
|
rdoc_options: []
|
98
98
|
require_paths:
|
@@ -111,5 +111,5 @@ requirements: []
|
|
111
111
|
rubygems_version: 3.3.15
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
|
-
summary: Rails
|
114
|
+
summary: Rails microservices. Zero setup. Docker + PostgreSQL
|
115
115
|
test_files: []
|