Skip to content
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
168 changes: 154 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,166 @@
name: Bug Report 🐞
about: Create a report to help us improve.
title: ''
labels: ''
labels: ["bug"]
assignees: ''
---

<!-- This is not an exhaustive model but a help. No step is mandatory. -->

**Description**
Description of what the bug is about.
### Description
<!-- Description of what the bug is about. -->

**Expected behavior**
What you expected to happen.
### Expected behavior
<!-- What you expected to happen. -->

**Current behavior**
What happened.
### Current behavior
<!-- What happened. -->

**Screenshots or Logs**
If applicable, add screenshots or logs to help explain your problem.
### Screenshots or logs
<!-- If applicable, add screenshots or logs to help explain your problem. -->

**Environment (please complete the following information):**
- OS: [e.g. Debian GNU/Linux]
- Meilisearch server version: [e.g. v.0.20.0]
- meilisearch-rails version: [e.g v0.1.0]
- Rails version: [e.g. 6.1.3.2]
### Environment
**Operating System** [e.g. Debian GNU/Linux] (`cat /etc/*-release | head -n1`):

**Meilisearch version** (`./meilisearch --version`):

**meilisearch-rails version** (`bundle info meilisearch-rails`):

**rails version** (`bundle info rails`):

### Reproduction script:

<!-- Write a script that reproduces your issue. Feel free to get started with the example below -->

<!--
```ruby
require "bundler/inline"

gemfile(true) do
source "https://rubygems.org"
ruby '3.3.7'

gem 'minitest', '~> 5.25', '>= 5.25.4'
gem 'rails', '~> 8.0', '>= 8.0.2'
gem 'sqlite3', '~> 2', platform: %i[rbx ruby]
gem 'jdbc-sqlite3', platform: :jruby

gem 'meilisearch-rails', ENV["MEILISEARCH_RAILS_VERSION"] || "~> 0.14.2"
# If you want to test against changes that have been not released yet
# gem "meilisearch-rails", github: "meilisearch/meilisearch-rails", branch: 'main'

# Use MongoDB
# gem 'mongoid', '~> 9.0', '>= 9.0.6'

# Use Sequel
# gem 'sequel', '~> 5.90'

# Open a debugging session with the `debugger` method
# gem 'debug'
end

require 'minitest/autorun'

MeiliSearch::Rails.configuration = {
meilisearch_url: ENV.fetch('MEILISEARCH_HOST', 'http://127.0.0.1:7700'),
meilisearch_api_key: ENV.fetch('MEILISEARCH_API_KEY', 'masterKey'),
per_environment: true
}

###############################
# ActiveRecord database setup #
###############################
# require 'active_record'
#
# ar_db_file = Tempfile.new
# ActiveRecord::Base.establish_connection(
# 'adapter' => defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3',
# 'database' => ar_db_file.path,
# 'pool' => 5,
# 'timeout' => 5000
# )
#
# ActiveRecord::Schema[8.0].define do
# create_table "ar_books", force: :cascade do |t|
# t.string "title"
# t.string "author"
# t.datetime "created_at", null: false
# t.datetime "updated_at", null: false
# end
# end
#
# class ArBook < ActiveRecord::Base
# include MeiliSearch::Rails
#
# meilisearch
# end

#########################
# Sequel database setup #
#########################
# require 'sequel'
#
# def sequel_db
# @sequel_db_file ||= Tempfile.new
# @sequel_db ||= Sequel.connect(if defined?(JRUBY_VERSION)
# "jdbc:sqlite:#{@sequel_db_file.path}"
# else
# { 'adapter' => 'sqlite',
# 'database' => @sequel_db_file.path }
# end)
# end
#
# sequel_db.create_table(:sequel_books) do
# primary_key :id
# String :title
# String :author
# end
#
# class SequelBook < Sequel::Model(sequel_db)
# plugin :active_model
# include MeiliSearch::Rails
#
# meilisearch
# end

##########################
# Mongoid database setup #
##########################
# Mongoid.load_configuration({
# clients: {
# default: {
# database: "bug_report_#{SecureRandom.hex(8)}",
# hosts: ['localhost:27017'],
# options: {
# read: { mode: :primary },
# max_pool_size: 1
# }
# }
# }
# })
#
# class MongoBook
# include Mongoid::Document
# include Mongoid::Timestamps
#
# field :title, type: String
# field :price_cents, type: Integer
#
# include MeiliSearch::Rails
#
# meilisearch
# end

# Run this method before searching to make sure Meilisearch is up to date
def await_last_task
task = MeiliSearch::Rails.client.tasks['results'].first
MeiliSearch::Rails.client.wait_for_task task['uid']
end

class BugTest < Minitest::Test
def test_my_bug
# your code here
end
end
```
-->
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
name: Feature Request & Enhancement 💡
about: Suggest a new idea for the project.
title: ''
labels: ''
labels: ["enhancement"]
assignees: ''
---

<!-- This is not an exhaustive model but a help. No step is mandatory. -->

**Description**
Brief explanation of the feature.
### Description
<!-- Brief explanation of the feature. -->

**Basic example**
If the proposal involves something new or a change, include a basic example. How would you use the feature? In which context?
### Basic example
<!--
If the proposal involves something new or a change, include a basic example.
How would you use the feature? In which context?
-->

**Other**
Any other things you want to add.
### Other
<!-- Any other things you want to add. -->