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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03f6fb3f10d8f6e5fda5b14ad321aecb015589daaf88edca8f39e2480718a9c7
4
- data.tar.gz: aad1ac5ce05ba56de8300ac7da329570caf32f453b01934b0b79de150b361239
3
+ metadata.gz: c42f02ebcaea688ddcd3f938ad244560945d07ba240b78d255284125166501cf
4
+ data.tar.gz: 159eb551a40014b4f2fb4736b839496ee70d19690a3806003626baccd633926b
5
5
  SHA512:
6
- metadata.gz: 604d7af3a83850e67d5725d813b4f929f409ca8a5e0595d1b6972157cfae2e206f3f50225eac143306cf88bef9319eaf199c57b375ecc83368151854e81f6502
7
- data.tar.gz: 1c117833a047e64335a59f15dcce4dd24d85c089bfafafad6261cace4adeabc3cff130788b5577b35cc61a2ef66993d85f7308cf7ad95c550418f27915778d6b
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
@@ -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
@@ -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 "sqlite3", "~> 1.4"
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{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
5
- gem "capybara"
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
 
@@ -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
+
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 "coveralls", require: false
5
- gem "capybara"
4
+ gem "rspec-rails"
5
+
6
+ gem "coveralls_reborn", require: false
6
7
 
7
- gem "sqlite3", "~> 1.3.13"
8
+ gem "capybara"
9
+ gem "sqlite3", "~> 1.4"
8
10
  end
9
11
 
10
- gem "rails", "~> 4.2.0"
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 "coveralls", require: false
5
- gem "capybara"
4
+ gem "rspec-rails"
5
+
6
+ gem "coveralls_reborn", require: false
6
7
 
7
- gem "sqlite3", "~> 1.3.13"
8
+ gem "capybara"
9
+ gem "sqlite3", "~> 1.4"
8
10
  end
9
11
 
10
- gem "rails", "~> 5.0.0"
12
+ gem "rails", "~> 7.1.0"
13
+ gem "sprockets-rails"
11
14
 
12
15
  gem "trestle", github: "TrestleAdmin/trestle"
13
16
 
@@ -1,5 +1,5 @@
1
1
  module Trestle
2
2
  module Search
3
- VERSION = "0.4.2"
3
+ VERSION = "0.5.0.pre"
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.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": "^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)/}) }
@@ -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.9.0", ">= 0.9.3"
25
+ spec.add_dependency "trestle", "~> 0.10.0.pre"
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
  })