Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt at publishing the gem with compiled assets #2397

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,23 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install dependencies
- name: Set up JS
uses: actions/setup-node@v4
with:
cache: yarn
- name: Install Ruby dependencies
run: bundle install
- name: Install Appraisal dependencies
run: bundle exec appraisal install
- name: Install JS dependencies
run: yarn install
- name: Setup the environment
run: cp .sample.env .env
- run: cp spec/example_app/config/database.yml.sample spec/example_app/config/database.yml
- name: Setup the database
run: bundle exec rake db:setup
- name: Build assets
run: yarn run build && yarn run build:css
- name: Run tests
run: bundle exec rspec
- name: Appraise Rails 6.0
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@
/.foreman
/coverage/*
/db/*.sqlite3

/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

/spec/example_app/log/*
/spec/example_app/tmp/*
!/spec/example_app/log/.keep
!/spec/example_app/tmp/.keep
/spec/example_app/public/system
/spec/example_app/public/assets

/spec/example_app/app/assets/builds/*
!/spec/example_app/app/assets/builds/.keep
elias19r marked this conversation as resolved.
Show resolved Hide resolved

/spec/example_app/node_modules
/spec/example_app/config/database.yml

/node_modules
/public

/tags
pkg
*.ipr
Expand All @@ -28,3 +39,4 @@ pkg
gemfiles/.bundle/
.yardoc
/doc
*.gem
1 change: 1 addition & 0 deletions .sample.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# http://ddollar.github.com/foreman/
elias19r marked this conversation as resolved.
Show resolved Hide resolved
RACK_ENV=development
SECRET_KEY_BASE=development_secret
PORT=3000
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ gem "sentry-rails"
gem "sentry-ruby"
gem "unicorn"

gem "cssbundling-rails", "~> 1.2"
gem "jsbundling-rails", "~> 1.1"
gem "sprockets-rails", "~> 3.4"

elias19r marked this conversation as resolved.
Show resolved Hide resolved
group :development, :test do
gem "appraisal"
gem "awesome_print"
Expand Down
25 changes: 7 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ PATH
actionpack (>= 6.0, < 8.0)
actionview (>= 6.0, < 8.0)
activerecord (>= 6.0, < 8.0)
jquery-rails (~> 4.6.0)
kaminari (~> 1.2.2)
sassc-rails (~> 2.1)
selectize-rails (~> 0.6)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -116,6 +113,8 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
cssbundling-rails (1.4.0)
railties (>= 6.0.0)
database_cleaner (2.0.2)
database_cleaner-active_record (>= 2, < 3)
database_cleaner-active_record (2.1.0)
Expand All @@ -137,7 +136,6 @@ GEM
railties (>= 5.0.0)
faker (3.2.3)
i18n (>= 1.8.11, < 2)
ffi (1.15.5)
formulaic (0.4.1)
activesupport
capybara
Expand All @@ -160,10 +158,8 @@ GEM
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jsbundling-rails (1.3.0)
railties (>= 6.0.0)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand Down Expand Up @@ -279,15 +275,6 @@ GEM
rspec-support (~> 3.12)
rspec-support (3.12.1)
rubyzip (2.3.2)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selectize-rails (0.12.6)
selenium-webdriver (4.17.0)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -311,7 +298,6 @@ GEM
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.3.0)
tilt (2.2.0)
timecop (0.9.8)
timeout (0.4.0)
tzinfo (2.0.6)
Expand Down Expand Up @@ -347,6 +333,7 @@ DEPENDENCIES
awesome_print
byebug
capybara
cssbundling-rails (~> 1.2)
database_cleaner
dotenv-rails
factory_bot_rails
Expand All @@ -355,6 +342,7 @@ DEPENDENCIES
front_matter_parser
globalid
i18n-tasks (= 1.0.13)
jsbundling-rails (~> 1.1)
kaminari-i18n
launchy
pg
Expand All @@ -366,6 +354,7 @@ DEPENDENCIES
sentry-rails
sentry-ruby
shoulda-matchers
sprockets-rails (~> 3.4)
timecop
uglifier
unicorn
Expand Down
3 changes: 3 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
js: yarn build --watch
css: yarn build:css --watch
4 changes: 0 additions & 4 deletions administrate.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ Gem::Specification.new do |s|
s.add_dependency "actionpack", ">= 6.0", "< 8.0"
s.add_dependency "actionview", ">= 6.0", "< 8.0"
s.add_dependency "activerecord", ">= 6.0", "< 8.0"

s.add_dependency "jquery-rails", "~> 4.6.0"
s.add_dependency "kaminari", "~> 1.2.2"
s.add_dependency "sassc-rails", "~> 2.1"
s.add_dependency "selectize-rails", "~> 0.6"

s.description = <<-DESCRIPTION
Administrate is heavily inspired by projects like Rails Admin and ActiveAdmin,
Expand Down
Empty file added app/assets/builds/.keep
Empty file.
89 changes: 89 additions & 0 deletions app/assets/builds/administrate-internal/docs.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/assets/builds/administrate-internal/docs.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading