Integrate fizzy-saas as vendored gem at saas/
- Update Gemfile.saas to use path: "saas" instead of GitHub source - Update config/database.yml to reference local saas/ directory - Update bin/setup to source saas/bin/setup directly - Remove redundant dotfiles (ruby-version, gitignore, rubocop, github workflows) - Add saas/db exclusions to root rubocop config
This commit is contained in:
@@ -11,3 +11,5 @@ AllCops:
|
||||
Exclude:
|
||||
- 'db/migrate/**/*'
|
||||
- 'db/schema*.rb'
|
||||
- 'saas/db/migrate/**/*'
|
||||
- 'saas/db/saas_schema.rb'
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ git_source(:bc) { |repo| "https://github.com/basecamp/#{repo}" }
|
||||
gem "activeresource", require: "active_resource"
|
||||
gem "stripe", "~> 18.0"
|
||||
gem "queenbee", bc: "queenbee-plugin"
|
||||
gem "fizzy-saas", bc: "fizzy-saas"
|
||||
gem "fizzy-saas", path: "saas"
|
||||
gem "console1984", bc: "console1984"
|
||||
gem "audits1984", bc: "audits1984"
|
||||
|
||||
|
||||
+21
-22
@@ -19,28 +19,6 @@ GIT
|
||||
rails (>= 7.0)
|
||||
rainbow
|
||||
|
||||
GIT
|
||||
remote: https://github.com/basecamp/fizzy-saas
|
||||
revision: 8eaa692316bb27ed73bd628b4735082585498ca0
|
||||
specs:
|
||||
fizzy-saas (0.1.0)
|
||||
audits1984
|
||||
console1984
|
||||
prometheus-client-mmap (~> 1.4.0)
|
||||
queenbee
|
||||
rails (>= 8.1.0.beta1)
|
||||
rails_structured_logging
|
||||
sentry-rails
|
||||
sentry-ruby
|
||||
yabeda
|
||||
yabeda-actioncable
|
||||
yabeda-activejob
|
||||
yabeda-gc
|
||||
yabeda-http_requests
|
||||
yabeda-prometheus-mmap
|
||||
yabeda-puma-plugin
|
||||
yabeda-rails (>= 0.10)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/basecamp/lexxy
|
||||
revision: 7c197c0afc7095c89df9cb6e24484df9e7212ac8
|
||||
@@ -181,6 +159,27 @@ GIT
|
||||
tsort (>= 0.2)
|
||||
zeitwerk (~> 2.6)
|
||||
|
||||
PATH
|
||||
remote: saas
|
||||
specs:
|
||||
fizzy-saas (0.1.0)
|
||||
audits1984
|
||||
console1984
|
||||
prometheus-client-mmap (~> 1.4.0)
|
||||
queenbee
|
||||
rails (>= 8.1.0.beta1)
|
||||
rails_structured_logging
|
||||
sentry-rails
|
||||
sentry-ruby
|
||||
yabeda
|
||||
yabeda-actioncable
|
||||
yabeda-activejob
|
||||
yabeda-gc
|
||||
yabeda-http_requests
|
||||
yabeda-prometheus-mmap
|
||||
yabeda-puma-plugin
|
||||
yabeda-rails (>= 0.10)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
|
||||
@@ -136,8 +136,7 @@ bundle config set --local auto_install true
|
||||
step "Installing RubyGems" bundle install
|
||||
|
||||
if [ -n "$SAAS" ]; then
|
||||
saas_setup=$(bundle show fizzy-saas)/bin/setup
|
||||
source "$saas_setup"
|
||||
source "$app_root/saas/bin/setup"
|
||||
else
|
||||
if [ "$DATABASE_ADAPTER" = "mysql" ]; then
|
||||
oss_mysql_setup
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<%
|
||||
config_path = if Fizzy.saas?
|
||||
gem_path = Gem::Specification.find_by_name("fizzy-saas").gem_dir
|
||||
gem_path = Rails.root.join("saas").to_s
|
||||
File.join(gem_path, "config", "database.yml")
|
||||
else
|
||||
File.join("config", "database.#{Fizzy.db_adapter}.yml")
|
||||
|
||||
Vendored
-25
@@ -1,25 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
rubocop:
|
||||
name: Rubocop
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
BUNDLE_GITHUB__COM: ${{ format('x-access-token:{0}', secrets.FIZZY_GH_TOKEN) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: .ruby-version
|
||||
bundler-cache: true
|
||||
|
||||
- name: Run Rubocop
|
||||
run: bundle exec rubocop
|
||||
@@ -1,10 +0,0 @@
|
||||
/.bundle/
|
||||
/doc/
|
||||
/log/*.log
|
||||
/pkg/
|
||||
/tmp/
|
||||
/test/dummy/db/*.sqlite3
|
||||
/test/dummy/db/*.sqlite3-*
|
||||
/test/dummy/log/*.log
|
||||
/test/dummy/storage/
|
||||
/test/dummy/tmp/
|
||||
@@ -1,13 +0,0 @@
|
||||
# Omakase Ruby styling for Rails
|
||||
inherit_gem: { rubocop-rails-omakase: rubocop.yml }
|
||||
|
||||
# Overwrite or add rules to create your own house style
|
||||
#
|
||||
# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
|
||||
# Layout/SpaceInsideArrayLiteralBrackets:
|
||||
# Enabled: false
|
||||
|
||||
AllCops:
|
||||
Exclude:
|
||||
- 'db/migrate/**/*'
|
||||
- 'db/schema*.rb'
|
||||
@@ -1 +0,0 @@
|
||||
3.4.7
|
||||
@@ -25,6 +25,8 @@ RUN apt-get update -qq && \
|
||||
# Install application gems
|
||||
COPY Gemfile Gemfile.lock Gemfile.saas Gemfile.saas.lock .ruby-version ./
|
||||
COPY lib/fizzy.rb ./lib/fizzy.rb
|
||||
COPY saas/fizzy-saas.gemspec ./saas/
|
||||
COPY saas/lib/fizzy/saas/version.rb ./saas/lib/fizzy/saas/
|
||||
RUN --mount=type=secret,id=GITHUB_TOKEN --mount=type=cache,id=fizzy-permabundle-${RUBY_VERSION},sharing=locked,target=/permabundle \
|
||||
gem install bundler && \
|
||||
BUNDLE_PATH=/permabundle BUNDLE_GITHUB__COM="$(cat /run/secrets/GITHUB_TOKEN):x-oauth-basic" bundle install && \
|
||||
|
||||
@@ -11,7 +11,7 @@ Rails.application.configure do
|
||||
|
||||
# Content Security Policy
|
||||
config.x.content_security_policy.report_only = false
|
||||
config.x.content_security_policy.report_uri = "https://o33603.ingest.us.sentry.io/api/4510481339187200/security/?sentry_key=9f126ba30d5f703451a13a2929bb5a10"
|
||||
config.x.content_security_policy.report_uri = "https://o33603.ingest.us.sentry.io/api/4510481339187200/security/?sentry_key=9f126ba30d5f703451a13a2929bb5a10" # gitleaks:allow (public DSN for CSP reports)
|
||||
config.x.content_security_policy.script_src = "https://challenges.cloudflare.com"
|
||||
config.x.content_security_policy.frame_src = "https://challenges.cloudflare.com"
|
||||
config.x.content_security_policy.connect_src = "https://storage.basecamp.com"
|
||||
|
||||
Reference in New Issue
Block a user