From 7d5f790a63ebbd10fc9512d3641657eae43fc394 Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Mon, 2 Jul 2018 13:14:40 -0400 Subject: [PATCH] Docs: bug reports --- .github/CONTRIBUTING.md | 39 ++++++++++++------ .github/ISSUE_TEMPLATE/bug_report.md | 21 +++++----- doc/bug_report_template.rb | 59 +--------------------------- 3 files changed, 40 insertions(+), 79 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 23c41fec..859c2c2e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d7f6f082..f279f881 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.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) { diff --git a/doc/bug_report_template.rb b/doc/bug_report_template.rb index f5204a7a..2f7d6398 100644 --- a/doc/bug_report_template.rb +++ b/doc/bug_report_template.rb @@ -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