trestle-search 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +26 -0
- data/.github/workflows/rspec.yml +52 -0
- data/.gitignore +2 -0
- data/Gemfile +11 -5
- data/README.md +4 -0
- data/app/assets/bundle/trestle/search.css +1 -1
- data/app/views/trestle/search/_search.html.erb +1 -3
- data/gemfiles/rails-6.0.gemfile +5 -2
- data/gemfiles/rails-6.1.gemfile +17 -0
- data/gemfiles/rails-7.0.gemfile +17 -0
- data/gemfiles/rails-7.1.gemfile +17 -0
- data/lib/trestle/search/version.rb +1 -1
- data/package.json +12 -12
- data/trestle-search.gemspec +4 -4
- data/webpack.config.js +15 -15
- data/yarn.lock +2038 -3740
- metadata +20 -26
- data/.travis.yml +0 -22
- data/gemfiles/rails-4.2.gemfile +0 -14
- data/gemfiles/rails-5.0.gemfile +0 -14
- data/gemfiles/rails-5.1.gemfile +0 -14
- data/gemfiles/rails-5.2.gemfile +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1df45597ebe609e810ac3abfb19ea0355ce6f3e5257abe234d0db52520612fc2
|
4
|
+
data.tar.gz: 7a0bf19efeabfa9e717c8d070936608c7dc02e9155a7211af4383adc91701b2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceebae083e563dc093dfc04b157b9976d9d87b7382f1e2d5189bc4f669a2cd07d6d897018a9e0a354bdac3dbf8799282a57dcda6a6c8bd8b02f57f2bb028f8b7
|
7
|
+
data.tar.gz: 01fa168282d6041a9cf6f3d6f7de2c3ea5ba9f1ab7511d4e6b1af51ea7d0e438dddc5e1ffbafc11f6f5cd7dcee8c05b1c2386a23c19a92f5258cac9dee54a752
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Publish gem
|
2
|
+
|
3
|
+
on: workflow_dispatch
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
push:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
permissions:
|
10
|
+
contents: write
|
11
|
+
id-token: write
|
12
|
+
|
13
|
+
# If you configured a GitHub environment on RubyGems, you must use it here.
|
14
|
+
environment: release
|
15
|
+
|
16
|
+
steps:
|
17
|
+
# Set up
|
18
|
+
- uses: actions/checkout@v4
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
bundler-cache: true
|
23
|
+
ruby-version: ruby
|
24
|
+
|
25
|
+
# Release
|
26
|
+
- uses: rubygems/release-gem@v1
|
@@ -0,0 +1,52 @@
|
|
1
|
+
name: RSpec
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
strategy:
|
8
|
+
fail-fast: false
|
9
|
+
matrix:
|
10
|
+
include:
|
11
|
+
- gemfile: rails-6.0
|
12
|
+
ruby: '2.7'
|
13
|
+
- gemfile: rails-6.1
|
14
|
+
ruby: '2.7'
|
15
|
+
- gemfile: rails-6.1
|
16
|
+
ruby: '3.0'
|
17
|
+
- gemfile: rails-7.0
|
18
|
+
ruby: '2.7'
|
19
|
+
- gemfile: rails-7.0
|
20
|
+
ruby: '3.0'
|
21
|
+
- gemfile: rails-7.1
|
22
|
+
ruby: '3.2'
|
23
|
+
runs-on: ubuntu-latest
|
24
|
+
env:
|
25
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v4
|
28
|
+
|
29
|
+
- name: Install Ruby
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby }}
|
33
|
+
bundler-cache: true
|
34
|
+
|
35
|
+
- name: Run Specs
|
36
|
+
run: bundle exec rake
|
37
|
+
|
38
|
+
- name: Coveralls Parallel
|
39
|
+
uses: coverallsapp/github-action@v2
|
40
|
+
with:
|
41
|
+
flag-name: run-${{ join(matrix.*, '-') }}
|
42
|
+
parallel: true
|
43
|
+
|
44
|
+
finish:
|
45
|
+
needs: test
|
46
|
+
if: ${{ always() }}
|
47
|
+
runs-on: ubuntu-latest
|
48
|
+
steps:
|
49
|
+
- name: Coveralls Finished
|
50
|
+
uses: coverallsapp/github-action@v2
|
51
|
+
with:
|
52
|
+
parallel-finished: true
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
# Specify your gem's dependencies in trestle-auth.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
3
|
group :test do
|
7
|
-
gem "
|
4
|
+
gem "rspec-rails"
|
5
|
+
|
6
|
+
gem 'coveralls_reborn', require: false
|
7
|
+
gem "capybara", ">= 3.39.0"
|
8
|
+
|
9
|
+
gem "sqlite3", "~> 1.4"
|
8
10
|
end
|
9
11
|
|
10
|
-
gem "
|
12
|
+
gem "rails", "~> 7.1.0"
|
13
|
+
gem "sprockets-rails"
|
11
14
|
|
12
15
|
gem "trestle", github: "TrestleAdmin/trestle"
|
16
|
+
|
17
|
+
# Specify your gem's dependencies in trestle-search.gemspec
|
18
|
+
gemspec
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Trestle Search (trestle-search)
|
2
2
|
|
3
|
+
[](https://rubygems.org/gems/trestle-search)
|
4
|
+
[](https://github.com/TrestleAdmin/trestle-search/actions)
|
5
|
+
[](https://coveralls.io/github/TrestleAdmin/trestle-search)
|
6
|
+
|
3
7
|
> Search plugin for the Trestle admin framework
|
4
8
|
|
5
9
|
|
@@ -1 +1 @@
|
|
1
|
-
.searchbox{
|
1
|
+
.searchbox{margin-right:auto;max-width:30em;width:100%}.searchbox .input-group{background:#fff;border:1px solid #ccc;border-radius:50rem}.searchbox .form-control,.searchbox .input-group-text{background:transparent;border:0}.searchbox .form-control{box-shadow:none;padding-left:0}.searchbox .form-control::-webkit-search-cancel-button{display:none}.searchbox .clear-search{color:#555;font-size:1.2rem;padding:.35rem;position:absolute;right:.75rem;z-index:5}.searchbox .clear-search:focus,.searchbox .clear-search:hover{color:#333}
|
@@ -1,9 +1,7 @@
|
|
1
1
|
<div class="searchbox">
|
2
2
|
<%= form_tag admin.path, method: :get do %>
|
3
3
|
<div class="input-group">
|
4
|
-
<
|
5
|
-
<span class="input-group-text"><icon class="fa fa-search"></icon></span>
|
6
|
-
</div>
|
4
|
+
<span class="input-group-text"><icon class="fa fa-search"></icon></span>
|
7
5
|
<%= link_to icon("fa fa-times"), admin.path, class: "clear-search" if params[:q].present? %>
|
8
6
|
<%= search_field_tag :q, params[:q], class: "form-control", autocomplete: "off", placeholder: admin.t("search.placeholder", default: "Search") %>
|
9
7
|
</div>
|
data/gemfiles/rails-6.0.gemfile
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :test do
|
4
|
-
gem "
|
4
|
+
gem "rspec-rails", "~> 5.0"
|
5
5
|
|
6
|
-
gem "
|
6
|
+
gem "coveralls_reborn", require: false
|
7
|
+
|
8
|
+
gem "capybara", ">= 3.39.0"
|
7
9
|
gem "sqlite3", "~> 1.4"
|
8
10
|
end
|
9
11
|
|
10
12
|
gem "rails", "~> 6.0.0"
|
13
|
+
gem "sprockets-rails"
|
11
14
|
|
12
15
|
gem "trestle", github: "TrestleAdmin/trestle"
|
13
16
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
group :test do
|
4
|
+
gem "rspec-rails", "~> 5.0"
|
5
|
+
|
6
|
+
gem "coveralls_reborn", require: false
|
7
|
+
|
8
|
+
gem "capybara", ">= 3.39.0"
|
9
|
+
gem "sqlite3", "~> 1.4"
|
10
|
+
end
|
11
|
+
|
12
|
+
gem "rails", "~> 6.1.0"
|
13
|
+
gem "sprockets-rails"
|
14
|
+
|
15
|
+
gem "trestle", github: "TrestleAdmin/trestle"
|
16
|
+
|
17
|
+
gemspec path: "../"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
group :test do
|
4
|
+
gem "rspec-rails"
|
5
|
+
|
6
|
+
gem "coveralls_reborn", require: false
|
7
|
+
|
8
|
+
gem "capybara", ">= 3.39.0"
|
9
|
+
gem "sqlite3", "~> 1.4"
|
10
|
+
end
|
11
|
+
|
12
|
+
gem "rails", "~> 7.0.0"
|
13
|
+
gem "sprockets-rails"
|
14
|
+
|
15
|
+
gem "trestle", github: "TrestleAdmin/trestle"
|
16
|
+
|
17
|
+
gemspec path: "../"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
group :test do
|
4
|
+
gem "rspec-rails"
|
5
|
+
|
6
|
+
gem "coveralls_reborn", require: false
|
7
|
+
|
8
|
+
gem "capybara", ">= 3.39.0"
|
9
|
+
gem "sqlite3", "~> 1.4"
|
10
|
+
end
|
11
|
+
|
12
|
+
gem "rails", "~> 7.1.0"
|
13
|
+
gem "sprockets-rails"
|
14
|
+
|
15
|
+
gem "trestle", github: "TrestleAdmin/trestle"
|
16
|
+
|
17
|
+
gemspec path: "../"
|
data/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "trestle-search",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.0",
|
4
4
|
"description": "Search plugin for the Trestle admin framework",
|
5
5
|
"main": "index.scss",
|
6
6
|
"repository": "https://github.com/TrestleAdmin/trestle-search.git",
|
7
7
|
"author": "Sam Pohlenz <sam@sampohlenz.com>",
|
8
|
-
"license": "LGPL-3.0",
|
8
|
+
"license": "LGPL-3.0-only",
|
9
9
|
"private": true,
|
10
10
|
"scripts": {
|
11
11
|
"dev": "webpack --mode development",
|
@@ -13,16 +13,16 @@
|
|
13
13
|
"watch": "webpack --mode development --watch"
|
14
14
|
},
|
15
15
|
"devDependencies": {
|
16
|
-
"autoprefixer": "^
|
17
|
-
"css-loader": "^
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"postcss-loader": "^
|
22
|
-
"sass-loader": "^
|
23
|
-
"webpack": "^
|
24
|
-
"webpack-cli": "^
|
25
|
-
"webpack-
|
16
|
+
"autoprefixer": "^10.2.6",
|
17
|
+
"css-loader": "^5.2.6",
|
18
|
+
"css-minimizer-webpack-plugin": "^3.0.2",
|
19
|
+
"mini-css-extract-plugin": "^2.0.0",
|
20
|
+
"node-sass": "^7.0.0",
|
21
|
+
"postcss-loader": "^6.1.1",
|
22
|
+
"sass-loader": "^12.1.0",
|
23
|
+
"webpack": "^5.42.0",
|
24
|
+
"webpack-cli": "^4.7.2",
|
25
|
+
"webpack-remove-empty-scripts": "^0.7.1"
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
28
|
"trestle": "https://github.com/TrestleAdmin/trestle.git"
|
data/trestle-search.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
|
10
10
|
spec.summary = "Search plugin for the Trestle admin framework"
|
11
11
|
spec.homepage = "https://www.trestle.io"
|
12
|
-
spec.license = "LGPL-3.0"
|
12
|
+
spec.license = "LGPL-3.0-only"
|
13
13
|
|
14
14
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
15
15
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
@@ -17,12 +17,12 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
21
21
|
|
22
22
|
spec.metadata["homepage_uri"] = spec.homepage
|
23
23
|
spec.metadata["source_code_uri"] = "https://github.com/TrestleAdmin/trestle-search"
|
24
24
|
|
25
|
-
spec.add_dependency "trestle", "~> 0.
|
25
|
+
spec.add_dependency "trestle", "~> 0.10.0"
|
26
26
|
|
27
|
-
spec.add_development_dependency "rspec-rails"
|
27
|
+
spec.add_development_dependency "rspec-rails"
|
28
28
|
end
|
data/webpack.config.js
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
const path = require('path');
|
2
2
|
|
3
|
+
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
3
4
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
4
|
-
const
|
5
|
-
const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
|
5
|
+
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
|
6
6
|
|
7
7
|
module.exports = {
|
8
|
+
mode: 'production',
|
8
9
|
entry: {
|
9
10
|
search: path.resolve(__dirname, 'frontend/index.scss')
|
10
11
|
},
|
@@ -12,18 +13,8 @@ module.exports = {
|
|
12
13
|
path: path.resolve(__dirname, 'app/assets/bundle/trestle')
|
13
14
|
},
|
14
15
|
optimization: {
|
15
|
-
splitChunks: {
|
16
|
-
cacheGroups: {
|
17
|
-
styles: {
|
18
|
-
name: 'bundle',
|
19
|
-
test: /\.css$/,
|
20
|
-
chunks: 'all',
|
21
|
-
enforce: true
|
22
|
-
}
|
23
|
-
}
|
24
|
-
},
|
25
16
|
minimizer: [
|
26
|
-
new
|
17
|
+
new CssMinimizerPlugin()
|
27
18
|
]
|
28
19
|
},
|
29
20
|
module: {
|
@@ -33,14 +24,23 @@ module.exports = {
|
|
33
24
|
use: [
|
34
25
|
{ loader: MiniCssExtractPlugin.loader },
|
35
26
|
{ loader: 'css-loader' },
|
36
|
-
{
|
27
|
+
{
|
28
|
+
loader: 'postcss-loader',
|
29
|
+
options: {
|
30
|
+
postcssOptions: {
|
31
|
+
plugins: [
|
32
|
+
['autoprefixer', {}]
|
33
|
+
]
|
34
|
+
}
|
35
|
+
}
|
36
|
+
},
|
37
37
|
{ loader: 'sass-loader' }
|
38
38
|
]
|
39
39
|
}
|
40
40
|
]
|
41
41
|
},
|
42
42
|
plugins: [
|
43
|
-
new
|
43
|
+
new RemoveEmptyScriptsPlugin(),
|
44
44
|
new MiniCssExtractPlugin({
|
45
45
|
filename: '[name].css'
|
46
46
|
})
|