Make open source the default, and check for sass instead
This commit is contained in:
committed by
Jorge Manrubia
parent
09866d7081
commit
e1e9a01720
+1
-1
@@ -22,7 +22,7 @@ RUN apt-get update -qq && \
|
||||
|
||||
# Install application gems
|
||||
COPY Gemfile Gemfile.lock .ruby-version ./
|
||||
COPY lib/bootstrap.rb ./lib/bootstrap.rb
|
||||
COPY lib/fizzy.rb ./lib/fizzy.rb
|
||||
COPY gems ./gems/
|
||||
RUN --mount=type=secret,id=GITHUB_TOKEN --mount=type=cache,id=fizzy-permabundle-${RUBY_VERSION},sharing=locked,target=/permabundle \
|
||||
gem install bundler && \
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ RUN apt-get update -qq && \
|
||||
|
||||
# Install application gems
|
||||
COPY Gemfile Gemfile.lock .ruby-version ./
|
||||
COPY lib/bootstrap.rb ./lib/bootstrap.rb
|
||||
COPY lib/fizzy.rb ./lib/fizzy.rb
|
||||
COPY gems ./gems/
|
||||
RUN --mount=type=secret,id=GITHUB_TOKEN --mount=type=cache,id=fizzy-devbundle-${RUBY_VERSION},sharing=locked,target=/devbundle \
|
||||
gem install bundler foreman && \
|
||||
|
||||
@@ -76,8 +76,6 @@ group :test do
|
||||
gem "mocha"
|
||||
end
|
||||
|
||||
require_relative "lib/bootstrap"
|
||||
unless Bootstrap.oss_config?
|
||||
eval_gemfile "gems/fizzy-saas/Gemfile"
|
||||
group :saas do
|
||||
gem "fizzy-saas", path: "gems/fizzy-saas"
|
||||
end
|
||||
|
||||
+2
-12
@@ -1,13 +1,3 @@
|
||||
GIT
|
||||
remote: https://github.com/basecamp/queenbee-plugin
|
||||
revision: eb01c697de1ad028afc65cc7d9b5345a7a8e849f
|
||||
ref: eb01c697de1ad028afc65cc7d9b5345a7a8e849f
|
||||
specs:
|
||||
queenbee (3.2.0)
|
||||
activeresource
|
||||
builder
|
||||
rexml
|
||||
|
||||
GIT
|
||||
remote: https://github.com/basecamp/rails-structured-logging
|
||||
revision: 76960cb5c15fc2b6b5f7542e05d7dcc031cef9e6
|
||||
@@ -387,6 +377,8 @@ GEM
|
||||
public_suffix (7.0.0)
|
||||
puma (7.1.0)
|
||||
nio4r (~> 2.0)
|
||||
queenbee (1.5.1)
|
||||
json (> 1.8)
|
||||
raabro (1.4.0)
|
||||
racc (1.8.1)
|
||||
rack (3.2.4)
|
||||
@@ -585,7 +577,6 @@ PLATFORMS
|
||||
x86_64-linux-musl
|
||||
|
||||
DEPENDENCIES
|
||||
activeresource
|
||||
autotuner
|
||||
aws-sdk-s3
|
||||
bcrypt (~> 3.1.7)
|
||||
@@ -612,7 +603,6 @@ DEPENDENCIES
|
||||
prometheus-client-mmap (~> 1.3)
|
||||
propshaft
|
||||
puma (>= 5.0)
|
||||
queenbee!
|
||||
rack-mini-profiler
|
||||
rails!
|
||||
rails_structured_logging!
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
#!/usr/bin/env ruby
|
||||
require_relative "../lib/bootstrap"
|
||||
if !Bootstrap.oss_config?
|
||||
# default from rails/test_unit/runner.rb but adding the saas gem test files
|
||||
ENV["DEFAULT_TEST"] = "{gems/fizzy-saas/,}test/**/*_test.rb"
|
||||
ENV["DEFAULT_TEST_EXCLUDE"] = "{gems/fizzy-saas/,}test/{system,dummy,fixtures}/**/*_test.rb"
|
||||
end
|
||||
APP_PATH = File.expand_path('../config/application', __dir__)
|
||||
require_relative '../config/boot'
|
||||
require 'rails/commands'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
require_relative "boot"
|
||||
require "rails/all"
|
||||
require_relative "../lib/fizzy"
|
||||
|
||||
Bundler.require(*Rails.groups)
|
||||
|
||||
module Fizzy
|
||||
|
||||
+1
-2
@@ -10,8 +10,7 @@ CI.run do
|
||||
step "Security: Brakeman audit", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error"
|
||||
step "Security: Gitleaks audit", "bin/gitleaks-audit"
|
||||
|
||||
step "Tests: Rails: SaaS config", "bin/rails test"
|
||||
step "Tests: Rails: OSS config", "OSS_CONFIG=1 bin/rails test"
|
||||
step "Tests: Rails", "bin/rails test"
|
||||
step "Tests: System", "bin/rails test:system"
|
||||
|
||||
if success?
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
require "bootstrap"
|
||||
Rails.application.config.x.oss_config = Bootstrap.oss_config?
|
||||
+2
-1
@@ -224,7 +224,8 @@ Rails.application.routes.draw do
|
||||
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
|
||||
get "service-worker" => "pwa#service_worker"
|
||||
|
||||
unless Rails.application.config.x.oss_config
|
||||
# TODO: Can we move this just to the engine
|
||||
if Fizzy.saas?
|
||||
mount Fizzy::Saas::Engine, at: "/", as: "saas"
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module Bootstrap
|
||||
def self.oss_config?
|
||||
ENV.fetch("OSS_CONFIG", "") != "" || !File.directory?(File.expand_path("../gems/fizzy-saas", __dir__))
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
module Fizzy
|
||||
def self.saas?
|
||||
defined?(Fizzy::Saas::Engine)
|
||||
end
|
||||
end
|
||||
@@ -21,7 +21,7 @@ class SessionsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
end
|
||||
|
||||
unless Bootstrap.oss_config?
|
||||
if Fizzy.saas?
|
||||
test "create for a new user" do
|
||||
untenanted do
|
||||
assert_difference -> { Identity.count }, +1 do
|
||||
|
||||
@@ -152,7 +152,3 @@ end
|
||||
ActiveSupport.on_load(:active_record_fixture_set) do
|
||||
prepend(FixturesTestHelper)
|
||||
end
|
||||
|
||||
unless Rails.application.config.x.oss_config
|
||||
load File.expand_path("../gems/fizzy-saas/test/test_helper.rb", __dir__)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user