azahara_schema 0.1.14 → 0.1.15
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/lib/azahara_schema/engine.rb +0 -12
- data/lib/azahara_schema/schema.rb +3 -3
- data/lib/azahara_schema/version.rb +1 -1
- data/lib/azahara_schema.rb +15 -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: 1fb614b3d7982f90a86d0547134ed3db62a1ff2911a32bc3435f926f88f94914
|
4
|
+
data.tar.gz: 810f524d838d463f6b79afba770da2fdfb86478da815a9575b33dae5557c8e4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63995b8180a247a3877c4f1b7a6c6cb7566c97d96003f83179f3f23b8286ad5ad53ea9ffc9a68cfe94c1924577040182ebb468f0d7bdf8dca2203362d9e0c292
|
7
|
+
data.tar.gz: bc211c1576ce84012dbd3e20a621526bc7a46abc73002a1b3098df9600fec7b527617d5ed6e13cefe3e3bebde5988511289b11d4ca6e310f9d46c71d73369715
|
@@ -1,15 +1,3 @@
|
|
1
|
-
require 'azahara_schema/field_format'
|
2
|
-
require 'azahara_schema/attribute'
|
3
|
-
require 'azahara_schema/association_attribute'
|
4
|
-
require 'azahara_schema/aggregation_attribute'
|
5
|
-
require 'azahara_schema/derived_attribute'
|
6
|
-
require 'azahara_schema/attribute_name'
|
7
|
-
require 'azahara_schema/outputs'
|
8
|
-
require 'azahara_schema/output'
|
9
|
-
require 'azahara_schema/schema'
|
10
|
-
require 'azahara_schema/model_schema'
|
11
|
-
require 'azahara_schema/attribute_formatter'
|
12
|
-
|
13
1
|
module AzaharaSchema
|
14
2
|
class Engine < ::Rails::Engine
|
15
3
|
isolate_namespace AzaharaSchema
|
@@ -68,7 +68,7 @@ module AzaharaSchema
|
|
68
68
|
# DEFAULTS
|
69
69
|
|
70
70
|
def default_outputs
|
71
|
-
[]
|
71
|
+
[AzaharaSchema::Outputs.registered_outputs.keys.first].compact
|
72
72
|
end
|
73
73
|
|
74
74
|
def default_columns
|
@@ -273,8 +273,8 @@ module AzaharaSchema
|
|
273
273
|
#serialization
|
274
274
|
def from_params(params)
|
275
275
|
if params[:f]
|
276
|
-
filter_params = params[:f].permit(available_filters.keys).to_h
|
277
|
-
filter_params.each{|name,
|
276
|
+
filter_params = params[:f].permit(available_filters.keys + [available_filters.keys.inject({}){|o,name| o[name] = []; o }]).to_h
|
277
|
+
filter_params.each{|name, filter_value| filter_value.is_a?(Array) ? add_filter(name, '=', filter_value) : add_short_filter(name, filter_value) }
|
278
278
|
end
|
279
279
|
if params[:c].is_a?(Array)
|
280
280
|
self.column_names = params[:c].to_a
|
data/lib/azahara_schema.rb
CHANGED
@@ -1,4 +1,18 @@
|
|
1
|
-
require
|
1
|
+
require 'azahara_schema/field_format'
|
2
|
+
require 'azahara_schema/attribute'
|
3
|
+
require 'azahara_schema/association_attribute'
|
4
|
+
require 'azahara_schema/aggregation_attribute'
|
5
|
+
require 'azahara_schema/derived_attribute'
|
6
|
+
require 'azahara_schema/attribute_name'
|
7
|
+
require 'azahara_schema/outputs'
|
8
|
+
require 'azahara_schema/output'
|
9
|
+
require 'azahara_schema/schema'
|
10
|
+
require 'azahara_schema/model_schema'
|
11
|
+
require 'azahara_schema/attribute_formatter'
|
12
|
+
|
13
|
+
if Object.const_defined?('Rails')
|
14
|
+
require "azahara_schema/engine"
|
15
|
+
end
|
2
16
|
|
3
17
|
module AzaharaSchema
|
4
18
|
# Your code goes here...
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azahara_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|