trestle-search 0.4.2 → 0.5.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +50 -0
- data/.gitignore +2 -0
- data/Gemfile +7 -1
- 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-5.2.gemfile +5 -2
- data/gemfiles/rails-6.0.gemfile +4 -1
- data/gemfiles/rails-6.1.gemfile +17 -0
- data/gemfiles/{rails-4.2.gemfile → rails-7.0.gemfile} +7 -4
- data/gemfiles/{rails-5.0.gemfile → rails-7.1.gemfile} +7 -4
- data/lib/trestle/search/version.rb +1 -1
- data/package.json +12 -12
- data/trestle-search.gemspec +3 -3
- data/webpack.config.js +15 -15
- data/yarn.lock +2049 -4075
- metadata +18 -24
- data/.travis.yml +0 -22
- data/gemfiles/rails-5.1.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: c42f02ebcaea688ddcd3f938ad244560945d07ba240b78d255284125166501cf
|
4
|
+
data.tar.gz: 159eb551a40014b4f2fb4736b839496ee70d19690a3806003626baccd633926b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 192f8bbd91cfa90d09330150ab05873fa7fee38a94b58063ab827fd919c7b2e2679ce32e4352417d7e4948e93878b78c81e80f5762a33fc89d1dfbc911018a67
|
7
|
+
data.tar.gz: a49ef3f81ea20a99616e743d6194693d93b0976466b1331202294890b24e20fa727e324608a594903ebda08b1ecfcf6a5187a13194e01f66fa83219aa0776404
|
@@ -0,0 +1,50 @@
|
|
1
|
+
name: RSpec
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
strategy:
|
8
|
+
fail-fast: false
|
9
|
+
matrix:
|
10
|
+
gemfile: [ rails-5.2, rails-6.0, rails-6.1 ]
|
11
|
+
ruby: [ '2.7' ]
|
12
|
+
include:
|
13
|
+
- gemfile: rails-6.1
|
14
|
+
ruby: '3.0'
|
15
|
+
- gemfile: rails-7.0
|
16
|
+
ruby: '2.7'
|
17
|
+
- gemfile: rails-7.0
|
18
|
+
ruby: '3.0'
|
19
|
+
- gemfile: rails-7.1
|
20
|
+
ruby: '3.2'
|
21
|
+
runs-on: ubuntu-latest
|
22
|
+
env:
|
23
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v4
|
26
|
+
|
27
|
+
- name: Install Ruby
|
28
|
+
uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
31
|
+
bundler-cache: true
|
32
|
+
|
33
|
+
- name: Run Specs
|
34
|
+
run: bundle exec rake
|
35
|
+
|
36
|
+
- name: Coveralls Parallel
|
37
|
+
uses: coverallsapp/github-action@v2
|
38
|
+
with:
|
39
|
+
flag-name: run-${{ join(matrix.*, '-') }}
|
40
|
+
parallel: true
|
41
|
+
|
42
|
+
finish:
|
43
|
+
needs: test
|
44
|
+
if: ${{ always() }}
|
45
|
+
runs-on: ubuntu-latest
|
46
|
+
steps:
|
47
|
+
- name: Coveralls Finished
|
48
|
+
uses: coverallsapp/github-action@v2
|
49
|
+
with:
|
50
|
+
parallel-finished: true
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -4,9 +4,15 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :test do
|
7
|
+
gem "rspec-rails"
|
8
|
+
|
9
|
+
gem 'coveralls_reborn', require: false
|
7
10
|
gem "capybara"
|
11
|
+
|
12
|
+
gem "sqlite3", "~> 1.4"
|
8
13
|
end
|
9
14
|
|
10
|
-
gem "
|
15
|
+
gem "rails", "~> 7.1.0"
|
16
|
+
gem "sprockets-rails"
|
11
17
|
|
12
18
|
gem "trestle", github: "TrestleAdmin/trestle"
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Trestle Search (trestle-search)
|
2
2
|
|
3
|
+
[![RubyGem](https://img.shields.io/gem/v/trestle-search.svg?style=flat&colorB=4065a9)](https://rubygems.org/gems/trestle-search)
|
4
|
+
[![Build Status](https://img.shields.io/github/actions/workflow/status/TrestleAdmin/trestle-search/rspec.yml?style=flat)](https://github.com/TrestleAdmin/trestle-search/actions)
|
5
|
+
[![Coveralls](https://img.shields.io/coveralls/TrestleAdmin/trestle-search.svg?style=flat)](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-5.2.gemfile
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :test do
|
4
|
-
gem "
|
5
|
-
|
4
|
+
gem "rspec-rails", "~> 5.0"
|
5
|
+
|
6
|
+
gem "coveralls_reborn", require: false
|
6
7
|
|
8
|
+
gem "capybara"
|
7
9
|
gem "sqlite3", "~> 1.3.13"
|
8
10
|
end
|
9
11
|
|
10
12
|
gem "rails", "~> 5.2.0"
|
13
|
+
gem "sprockets-rails"
|
11
14
|
|
12
15
|
gem "trestle", github: "TrestleAdmin/trestle"
|
13
16
|
|
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
|
+
|
6
|
+
gem "coveralls_reborn", require: false
|
5
7
|
|
6
8
|
gem "capybara"
|
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"
|
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: "../"
|
@@ -1,13 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :test do
|
4
|
-
gem "
|
5
|
-
|
4
|
+
gem "rspec-rails"
|
5
|
+
|
6
|
+
gem "coveralls_reborn", require: false
|
6
7
|
|
7
|
-
gem "
|
8
|
+
gem "capybara"
|
9
|
+
gem "sqlite3", "~> 1.4"
|
8
10
|
end
|
9
11
|
|
10
|
-
gem "rails", "~>
|
12
|
+
gem "rails", "~> 7.0.0"
|
13
|
+
gem "sprockets-rails"
|
11
14
|
|
12
15
|
gem "trestle", github: "TrestleAdmin/trestle"
|
13
16
|
|
@@ -1,13 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :test do
|
4
|
-
gem "
|
5
|
-
|
4
|
+
gem "rspec-rails"
|
5
|
+
|
6
|
+
gem "coveralls_reborn", require: false
|
6
7
|
|
7
|
-
gem "
|
8
|
+
gem "capybara"
|
9
|
+
gem "sqlite3", "~> 1.4"
|
8
10
|
end
|
9
11
|
|
10
|
-
gem "rails", "~>
|
12
|
+
gem "rails", "~> 7.1.0"
|
13
|
+
gem "sprockets-rails"
|
11
14
|
|
12
15
|
gem "trestle", github: "TrestleAdmin/trestle"
|
13
16
|
|
data/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "trestle-search",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.0.pre",
|
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)/}) }
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
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.pre"
|
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
|
})
|