airview 0.2.1 → 0.2.3
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/README.md +23 -0
- data/app/assets/javascripts/airview/application.js +3 -5
- data/app/helpers/airview/application_helper.rb +5 -3
- data/lib/airview/query.rb +2 -0
- data/lib/airview/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 818f5fc3b045a29acecfdf4352cbea1a673d9bfb2ce30db20e9f2db6eb797062
|
|
4
|
+
data.tar.gz: 7d06133865f8cdf9557092d8e15069a469a9fe81d770adcb8b53804474870c38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e711c7f917912ba073405b8fcb29411ff5e18b973f01b60c163ada52a0c16c037d79224fed264a5d426174035adf4aa11de23c4a19482f5676dda4e235230e2
|
|
7
|
+
data.tar.gz: 2d46b4f195550f6e1cbfc0f64623526c290ebf55eb58cc8f9b2d9058ce298eda6716dbbe1c98f9d7a51587e10481eff4c68d2297ed19e507d791f1b5b342f831
|
data/README.md
CHANGED
|
@@ -56,6 +56,29 @@ bundle exec rake
|
|
|
56
56
|
|
|
57
57
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
58
58
|
|
|
59
|
+
To publish a new version to RubyGems:
|
|
60
|
+
|
|
61
|
+
1. Update `Airview::VERSION` in `lib/airview/version.rb`.
|
|
62
|
+
2. Run the test suite:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bundle exec rake
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
3. Build the gem:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
gem build airview.gemspec
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
4. Push the generated `.gem` file:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
gem push airview-VERSION.gem
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Replace `VERSION` with the version number you are publishing.
|
|
81
|
+
|
|
59
82
|
## Contributing
|
|
60
83
|
|
|
61
84
|
Bug reports and pull requests are welcome on GitHub at https://github.com/jacksonriso/airview. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
|
|
@@ -194,11 +194,11 @@
|
|
|
194
194
|
function operatorOptionsForFieldType(fieldType) {
|
|
195
195
|
if (fieldType === "boolean") return [["is checked", "is_true"], ["is unchecked", "is_false"]];
|
|
196
196
|
if (["integer", "float", "decimal"].includes(fieldType)) {
|
|
197
|
-
return [["=", "equals"], [">", "gt"], ["<", "lt"], [">=", "gte"], ["<=", "lte"], ["is empty", "is_empty"]];
|
|
197
|
+
return [["=", "equals"], [">", "gt"], ["<", "lt"], [">=", "gte"], ["<=", "lte"], ["is empty", "is_empty"], ["is not empty", "is_not_empty"]];
|
|
198
198
|
}
|
|
199
|
-
if (["date", "datetime"].includes(fieldType)) return [["is", "equals"], ["before", "before"], ["after", "after"], ["is empty", "is_empty"]];
|
|
199
|
+
if (["date", "datetime"].includes(fieldType)) return [["is", "equals"], ["before", "before"], ["after", "after"], ["is empty", "is_empty"], ["is not empty", "is_not_empty"]];
|
|
200
200
|
|
|
201
|
-
return [["contains", "contains"], ["equals", "equals"], ["starts with", "starts_with"], ["is empty", "is_empty"]];
|
|
201
|
+
return [["contains", "contains"], ["does not contain", "does_not_contain"], ["equals", "equals"], ["starts with", "starts_with"], ["is empty", "is_empty"], ["is not empty", "is_not_empty"]];
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
function updateFilterOperator(row, fieldType) {
|
|
@@ -317,9 +317,7 @@
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
if (event.target.matches("[data-airview-remove-filter]")) {
|
|
320
|
-
var filterForm = event.target.closest("form");
|
|
321
320
|
event.target.closest("[data-airview-filter-condition]").remove();
|
|
322
|
-
if (filterForm) filterForm.requestSubmit();
|
|
323
321
|
}
|
|
324
322
|
|
|
325
323
|
var filterFieldOption = event.target.closest && event.target.closest("[data-airview-filter-field-option]");
|
|
@@ -135,15 +135,17 @@ module Airview
|
|
|
135
135
|
when :boolean
|
|
136
136
|
[["is checked", "is_true"], ["is unchecked", "is_false"]]
|
|
137
137
|
when :integer, :float, :decimal
|
|
138
|
-
[["=", "equals"], [">", "gt"], ["<", "lt"], [">=", "gte"], ["<=", "lte"], ["is empty", "is_empty"]]
|
|
138
|
+
[["=", "equals"], [">", "gt"], ["<", "lt"], [">=", "gte"], ["<=", "lte"], ["is empty", "is_empty"], ["is not empty", "is_not_empty"]]
|
|
139
139
|
when :date, :datetime
|
|
140
|
-
[["is", "equals"], ["before", "before"], ["after", "after"], ["is empty", "is_empty"]]
|
|
140
|
+
[["is", "equals"], ["before", "before"], ["after", "after"], ["is empty", "is_empty"], ["is not empty", "is_not_empty"]]
|
|
141
141
|
else
|
|
142
142
|
[
|
|
143
143
|
["contains", "contains"],
|
|
144
|
+
["does not contain", "does_not_contain"],
|
|
144
145
|
["equals", "equals"],
|
|
145
146
|
["starts with", "starts_with"],
|
|
146
|
-
["is empty", "is_empty"]
|
|
147
|
+
["is empty", "is_empty"],
|
|
148
|
+
["is not empty", "is_not_empty"]
|
|
147
149
|
]
|
|
148
150
|
end
|
|
149
151
|
|
data/lib/airview/query.rb
CHANGED
|
@@ -139,6 +139,8 @@ module Airview
|
|
|
139
139
|
case operator
|
|
140
140
|
when "equals"
|
|
141
141
|
scope.where(field.attribute_name => value)
|
|
142
|
+
when "does_not_contain"
|
|
143
|
+
scope.where.not(column.matches("%#{sanitize_like(value)}%"))
|
|
142
144
|
when "starts_with"
|
|
143
145
|
scope.where(column.matches("#{sanitize_like(value)}%"))
|
|
144
146
|
else
|
data/lib/airview/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: airview
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jacksonriso
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|