Skip to content

Commit

Permalink
Deploy 0e07cb9 to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Deploy from CI committed Mar 25, 2024
0 parents commit 12d96e7
Show file tree
Hide file tree
Showing 149 changed files with 26,475 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

<!-- By contributing to this project, you agree to abide by the thoughtbot Code
of Conduct: https://thoughtbot.com/open-source-code-of-conduct -->

### Description

<!-- A clear and concise description of what the bug is. -->

### Reproduction Steps

<!-- Steps for others to reproduce the bug. Be as specific as possible. A
reproduction script or link to a sample application that demonstrates the
problem are especially helpful. -->

<!-- You can create a reproduction script by copying this sample reproduction
script and adding whatever code is necessary to get a failing test case:
https://github.com/thoughtbot/factory_bot/blob/main/.github/REPRODUCTION_SCRIPT.rb -->

### Expected behavior

<!-- What you expected to happen. -->

### Actual behavior

<!-- What happened instead. -->

### System configuration
**factory_bot version**:
**rails version**:
**ruby version**:
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'feature'
assignees: ''

---

<!-- By contributing to this project, you agree to abide by the thoughtbot Code
of Conduct: https://thoughtbot.com/open-source-code-of-conduct -->

### Problem this feature will solve

<!-- A clear and concise description of what the problem is. Ex. When doing
[...] I find it difficult to [...] -->

### Desired solution

<!-- The feature or change that would solve the problem -->

## Alternatives considered

<!-- Any alternative solutions or features you've considered. -->

## Additional context

<!-- Add any other context about this feature request. -->
50 changes: 50 additions & 0 deletions .github/REPRODUCTION_SCRIPT.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
require "bundler/inline"

gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "factory_bot", "~> 6.0"
gem "activerecord"
gem "sqlite3"
end

require "active_record"
require "factory_bot"
require "minitest/autorun"
require "logger"

ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Base.logger = Logger.new(STDOUT)

ActiveRecord::Schema.define do
# TODO: Update the schema to include the specific tables or columns necessary
# to reproduct the bug
create_table :posts, force: true do |t|
t.string :body
end
end

# TODO: Add any application specific code necessary to reproduce the bug
class Post < ActiveRecord::Base
end

FactoryBot.define do
# TODO: Write the factory definitions necessary to reproduce the bug
factory :post do
body { "Post body" }
end
end

class FactoryBotTest < Minitest::Test
def test_factory_bot_stuff
# TODO: Write a failing test case to demonstrate what isn't working as
# expected
body_override = "Body override"

post = FactoryBot.build(:post, body: body_override)

assert_equal post.body, body_override
end
end

# Run the tests with `ruby <filename>`
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build
on:
- push
- pull_request

jobs:
build:
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
ruby:
- jruby-9.4
- truffleruby
- "3.2"
- "3.1"
- "3.0"
rails:
- "6.1"
- "7.0"
- "7.1"
- main
exclude:
- ruby: jruby-9.4
rails: "7.1"
- ruby: jruby-9.4
rails: main

runs-on: 'ubuntu-latest'

env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.rails }}.gemfile

steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Setup project
run: bundle install
- name: Run test
run: bundle exec rake all_specs

standard:
name: Run standard
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
- name: Setup project
run: bundle install
- name: Run test
run: bundle exec rake standard
36 changes: 36 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docs
on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pull-requests: write # To create a PR from that branch
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install mdbook
run: |
mkdir mdbook
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Deploy GitHub Pages
run: |
cd docs
mdbook build
git worktree add gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../book/* .
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages
17 changes: 17 additions & 0 deletions .github/workflows/dynamic-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: update-templates

on:
push:
branches:
- main
workflow_dispatch:

jobs:
update-templates:
permissions:
contents: write
pull-requests: write
pages: write
uses: thoughtbot/templates/.github/workflows/dynamic-readme.yaml@main
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.swp
test.db
factory_girl-*.gem
factory_bot-*.gem
docs/book
.yardoc
coverage
.bundle
tmp
bin
.rubocop-https*
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format progress
--color
--require spec_helper
4 changes: 4 additions & 0 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SimpleCov.start do
add_filter "/spec/"
add_filter "/tmp/"
end
3 changes: 3 additions & 0 deletions .standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ruby_version: "3.0"
parallel: true
format: progress
6 changes: 6 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lib/**/*.rb
-
GETTING_STARTED.md
CONTRIBUTING.md
NAME.md
LICENSE
187 changes: 187 additions & 0 deletions 404.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions FontAwesome/css/font-awesome.css

Large diffs are not rendered by default.

Binary file added FontAwesome/fonts/FontAwesome.ttf
Binary file not shown.
Binary file added FontAwesome/fonts/fontawesome-webfont.eot
Binary file not shown.

0 comments on commit 12d96e7

Please sign in to comment.