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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c44c519d3870778dc31c5eec549290d197ea2bb09eb3db856c4208a64e3be20c
4
- data.tar.gz: 712100fba45ffa35814854889da4f5e94be4e0f479a0863a73a2d3286f45bd04
3
+ metadata.gz: 1df45597ebe609e810ac3abfb19ea0355ce6f3e5257abe234d0db52520612fc2
4
+ data.tar.gz: 7a0bf19efeabfa9e717c8d070936608c7dc02e9155a7211af4383adc91701b2f
5
5
  SHA512:
6
- metadata.gz: 7791222516cebd2bea8d941279d7c71c6e120976cbebd229564925220e2e8fac794f240fcb25f8ba570b32acdf4fd5084bf202dd0abef7920525ea0d1f75b42e
7
- data.tar.gz: 76cb2f9208c783b2fe3ace5ed8bf8f36a0bb9a6e31f5fd5a89c9c43cf797306e38f3785217571e9fcad2cca773d3b1e969485c0ac32dc7ffbd6e342b46d5f35e
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
@@ -12,3 +12,5 @@
12
12
  /spec/dummy/*.sqlite3-journal
13
13
  /spec/dummy/log/*.log
14
14
  /spec/dummy/tmp/*
15
+ *.sqlite3-shm
16
+ *.sqlite3-wal
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 "capybara"
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 "sqlite3", "~> 1.4"
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
+ [![RubyGem](https://img.shields.io/gem/v/trestle-search?include_prereleases&color=%234d6bb2)](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{width:100%;max-width:30em;margin-right:auto}.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{padding-left:0;box-shadow:none}.searchbox .form-control::-webkit-search-cancel-button{display:none}.searchbox .clear-search{position:absolute;right:.75rem;z-index:5;color:#555;font-size:1.2rem;padding:.35rem}.searchbox .clear-search:focus,.searchbox .clear-search:hover{color:#333}
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
- <div class="input-group-prepend">
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>
@@ -1,13 +1,16 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :test do
4
- gem "coveralls", require: false
4
+ gem "rspec-rails", "~> 5.0"
5
5
 
6
- gem "capybara"
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: "../"
@@ -1,5 +1,5 @@
1
1
  module Trestle
2
2
  module Search
3
- VERSION = "0.4.3"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
data/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "trestle-search",
3
- "version": "0.4.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": "^9.6.1",
17
- "css-loader": "^3.2.0",
18
- "mini-css-extract-plugin": "^0.8.0",
19
- "node-sass": "^4.12.0",
20
- "optimize-css-assets-webpack-plugin": "^5.0.3",
21
- "postcss-loader": "^3.0.0",
22
- "sass-loader": "^8.0.0",
23
- "webpack": "^4.40.2",
24
- "webpack-cli": "^3.3.9",
25
- "webpack-fix-style-only-entries": "^0.4.0"
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"
@@ -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.3.0")
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.9.0", ">= 0.9.3"
25
+ spec.add_dependency "trestle", "~> 0.10.0"
26
26
 
27
- spec.add_development_dependency "rspec-rails", "~> 3.0"
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 OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
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 OptimizeCSSAssetsPlugin({})
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
- { loader: 'postcss-loader', options: { plugins: [ require('autoprefixer') ] } },
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 FixStyleOnlyEntriesPlugin(),
43
+ new RemoveEmptyScriptsPlugin(),
44
44
  new MiniCssExtractPlugin({
45
45
  filename: '[name].css'
46
46
  })