Docs: bug reports
This commit is contained in:
parent
1bda13329d
commit
7d5f790a63
|
@ -2,24 +2,37 @@
|
|||
|
||||
Thanks for your interest in PaperTrail!
|
||||
|
||||
Ask usage questions on Stack Overflow:
|
||||
https://stackoverflow.com/tags/paper-trail-gem
|
||||
|
||||
**Please do not use github issues to ask usage questions.**
|
||||
|
||||
On github, we appreciate bug reports, feature suggestions, and pull requests.
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
Please use our [bug report template][1].
|
||||
|
||||
## Reporting Security Vulnerabilities
|
||||
|
||||
Please email jared@jaredbeck.com, batkinz@gmail.com
|
||||
Please email jared@jaredbeck.com and batkinz@gmail.com. Do not mention the
|
||||
vulnerability publicly until there's a fix.
|
||||
|
||||
We will respond as soon as we can. Thank you for responsibly disclosing
|
||||
security vulnerabilities.
|
||||
|
||||
## Usage Questions
|
||||
|
||||
Due to limited volunteers, we cannot answer *usage* questions. Please ask such
|
||||
questions on [StackOverflow](https://stackoverflow.com/tags/paper-trail-gem).
|
||||
|
||||
## Reporting Bugs
|
||||
|
||||
You want to fix a bug, but need some help.
|
||||
|
||||
> You are required to provide a script that reproduces the bug, using our
|
||||
> template. You are required to fix the bug. We're here to help, but no one else
|
||||
> will fix it for you. If you don't fix the bug in a reasonable amount of time,
|
||||
> your issue will be closed.
|
||||
> - From our [issue template][1].
|
||||
|
||||
Due to limited volunteers, we cannot fix everyone's bugs for them. We're happy
|
||||
to help, but we can only accept issues from people committed to working on their
|
||||
own problems.
|
||||
|
||||
Different people use different parts of PaperTrail. You may have found a bug,
|
||||
but you might also be the only person affected by that bug. Don't hesitate to
|
||||
ask for whatever help you need, but it's your job to fix it.
|
||||
|
||||
## Development
|
||||
|
||||
Install gems with `bundle exec appraisal install`.
|
||||
|
@ -91,4 +104,4 @@ markdown-toc -i --maxdepth 3 --bullets='-' README.md
|
|||
1. git tag -a -m "v5.0.0" "v5.0.0" # or whatever number
|
||||
1. git push --tags origin
|
||||
|
||||
[1]: https://github.com/paper-trail-gem/paper_trail/blob/master/doc/bug_report_template.rb
|
||||
[1]: https://github.com/paper-trail-gem/paper_trail/blob/master/.github/ISSUE_TEMPLATE/bug_report.md
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
name: Bug Report
|
||||
name: I want to fix a bug, but need some help
|
||||
about: >
|
||||
You will be asked to provide a script that reproduces the bug, based on our
|
||||
template.
|
||||
You are required to provide a script that reproduces the bug, using our
|
||||
template. You are required to fix the bug. We're here to help, but no one else
|
||||
will fix it for you. If you don't fix the bug in a reasonable amount of time,
|
||||
your issue will be closed. See CONTRIBUTING.md for details.
|
||||
|
||||
---
|
||||
|
||||
|
@ -14,17 +16,18 @@ Bug reports must use the following template:
|
|||
```ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Use this template to report PaperTrail bugs.
|
||||
# Please include only the minimum code necessary to reproduce your issue.
|
||||
require "bundler/inline"
|
||||
|
||||
# STEP ONE: What versions are you using?
|
||||
gemfile(true) do
|
||||
ruby "2.4.2"
|
||||
ruby "2.5.1"
|
||||
source "https://rubygems.org"
|
||||
gem "activerecord", "5.1.4"
|
||||
gem "minitest", "5.10.3"
|
||||
gem "paper_trail", "9.1.0", require: false
|
||||
gem "sqlite3"
|
||||
gem "activerecord", "5.2.0"
|
||||
gem "minitest", "5.11.3"
|
||||
gem "paper_trail", "9.2.0", require: false
|
||||
gem "sqlite3", "1.3.13"
|
||||
end
|
||||
|
||||
require "active_record"
|
||||
|
@ -60,7 +63,7 @@ class User < ActiveRecord::Base
|
|||
has_paper_trail
|
||||
end
|
||||
|
||||
# STEP FIVE: Write a test that demonstrates your issue by failing.
|
||||
# STEP FIVE: Please write a test that demonstrates your issue.
|
||||
class BugTest < ActiveSupport::TestCase
|
||||
def test_1
|
||||
assert_difference(-> { PaperTrail::Version.count }, +1) {
|
||||
|
|
|
@ -1,59 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Use this template to report PaperTrail bugs.
|
||||
# Please include only the minimum code necessary to reproduce your issue.
|
||||
require "bundler/inline"
|
||||
|
||||
# STEP ONE: What versions are you using?
|
||||
gemfile(true) do
|
||||
ruby "2.4.2"
|
||||
source "https://rubygems.org"
|
||||
gem "activerecord", "5.1.4"
|
||||
gem "minitest", "5.10.3"
|
||||
gem "paper_trail", "8.0.0", require: false
|
||||
gem "sqlite3"
|
||||
end
|
||||
|
||||
require "active_record"
|
||||
require "minitest/autorun"
|
||||
require "logger"
|
||||
|
||||
# Please use sqlite for your bug reports, if possible.
|
||||
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
|
||||
ActiveRecord::Base.logger = nil
|
||||
ActiveRecord::Schema.define do
|
||||
# STEP TWO: Define your tables here.
|
||||
create_table :users, force: true do |t|
|
||||
t.text :first_name, null: false
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
create_table :versions do |t|
|
||||
t.string :item_type, null: false
|
||||
t.integer :item_id, null: false
|
||||
t.string :event, null: false
|
||||
t.string :whodunnit
|
||||
t.text :object, limit: 1_073_741_823
|
||||
t.text :object_changes, limit: 1_073_741_823
|
||||
t.datetime :created_at
|
||||
end
|
||||
add_index :versions, %i[item_type item_id]
|
||||
end
|
||||
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
||||
require "paper_trail"
|
||||
|
||||
# STEP FOUR: Define your AR models here.
|
||||
class User < ActiveRecord::Base
|
||||
has_paper_trail
|
||||
end
|
||||
|
||||
# STEP FIVE: Please write a test that demonstrates your issue.
|
||||
class BugTest < ActiveSupport::TestCase
|
||||
def test_1
|
||||
assert_difference(-> { PaperTrail::Version.count }, +1) {
|
||||
User.create(first_name: "Jane")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
# STEP SIX: Run this script using `ruby my_bug_report.rb`
|
||||
# Moved to .github/ISSUE_TEMPLATE/bug_report.md
|
||||
# Please update your bookmarks
|
||||
|
|
Loading…
Reference in New Issue