Skip to content

Commit

Permalink
Merge pull request #2 from hedgeyedev/rails-engine
Browse files Browse the repository at this point in the history
feat: initial commit of Rails engine implementation
  • Loading branch information
jrogers-hedgeye authored Sep 5, 2024
2 parents 56dd993 + 66d8be3 commit cc4d80c
Show file tree
Hide file tree
Showing 108 changed files with 2,605 additions and 437 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Ruby

on:
push:
branches:
- master

pull_request:

jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.4'

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Make sure assets can compile in the dummy app
run: bundle exec rails app:assets:precompile
84 changes: 84 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Release Gem

on:
release:
types: [published]

jobs:
build:
name: Build Gem
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run NPM install
run: npm install
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Build gem
run: bundle exec rake build
- name: List gem
run: |
find pkg
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: pkg/*.gem

test:
runs-on: ubuntu-latest
name: Test gem
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: 'pkg'
- name: List gem
run: |
find pkg
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Install gem
run: |
gem install pkg/artifact/*.gem
push:
name: Push Gem to Server
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: pkg
- name: List gems
run: |
find pkg
- name: Set up GitHub Packages authentication
run: |
mkdir -p ~/.gem
cat > ~/.gem/credentials <<'CREDENTIALS'
---
:github: Bearer ${{ secrets.GITHUB_TOKEN }}
CREDENTIALS
chmod 0600 ~/.gem/credentials
- name: Push gem
run: |
find pkg/artifact -name '*.gem' | while read -r gem; do
echo "=== pushing '${gem}'"
gem push --key github --host https://rubygems.pkg.github.com/hedgeyedev "${gem}"
done
- name: Clean up credentials
run: |
rm -rvf ~/.gem/credentials
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Ruby

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/[email protected]
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rails test
4 changes: 4 additions & 0 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
project=phlex_preview
unreleased=false
future-release=0.2.0
since-tag=0.1.0
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/.bundle/
/doc/
/log/*.log
/pkg/
/tmp/
/test/dummy/db/*.sqlite3
/test/dummy/db/*.sqlite3-*
/test/dummy/log/*.log
/test/dummy/storage/
/test/dummy/tmp/
/test/dummy/public/assets/
*.gem
coverage/
.DS_Store
/.idea/
/.ruby-lsp/
app/assets/builds
bun.lockb
node_modules/
package.json
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
phlex_preview
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.2.4
Empty file added CHANGELOG.md
Empty file.
15 changes: 8 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# frozen_string_literal: true

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# gem "rails"

gem "phlex", "~> 1.10"
gem "roda", "~> 3.79"
gemspec

gem "rouge", "~> 4.2"
group :development do
gem "puma"
gem "sprockets-rails"
gem "foreman"
gem "github_changelog_generator", "~> 1.16"
end
Loading

0 comments on commit cc4d80c

Please sign in to comment.