super 0.20.0 → 0.21.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 +4 -4
- data/README.md +1 -1
- data/app/controllers/super/application_controller.rb +8 -17
- data/app/controllers/super/sitewide_controller.rb +33 -0
- data/app/controllers/super/substructure_controller.rb +41 -86
- data/app/controllers/super/view_controller.rb +55 -0
- data/app/views/super/application/_display_index.html.erb +8 -2
- data/app/views/super/application/_display_show.html.erb +10 -2
- data/app/views/super/application/_filter.html.erb +63 -59
- data/app/views/super/application/_layout.html.erb +0 -2
- data/app/views/super/application/_query.html.erb +13 -12
- data/app/views/super/application/_sort.html.erb +18 -14
- data/app/views/super/application/_view_chain.html.erb +23 -4
- data/config/locales/en.yml +3 -0
- data/lib/super/badge.rb +11 -2
- data/lib/super/cheat.rb +6 -1
- data/lib/super/display/schema_types.rb +37 -14
- data/lib/super/display.rb +5 -4
- data/lib/super/error.rb +2 -2
- data/{app/helpers → lib}/super/form_builder_helper.rb +11 -0
- data/lib/super/navigation.rb +40 -40
- data/lib/super/query.rb +61 -0
- data/lib/super/{engine.rb → railtie.rb} +7 -1
- data/lib/super/reset.rb +7 -0
- data/lib/super/schema.rb +8 -2
- data/lib/super/sort.rb +1 -3
- data/lib/super/useful/deprecations.rb +18 -0
- data/lib/super/version.rb +1 -1
- data/lib/super/view_chain.rb +14 -4
- data/lib/super.rb +8 -2
- metadata +9 -49
- data/config/routes.rb +0 -4
- data/lib/super/query/form_object.rb +0 -48
@@ -3,7 +3,7 @@
|
|
3
3
|
module Super
|
4
4
|
class Display
|
5
5
|
class SchemaTypes
|
6
|
-
TYPES = Useful::Enum.new(:
|
6
|
+
TYPES = Useful::Enum.new(:attribute, :record, :none)
|
7
7
|
|
8
8
|
class Builder
|
9
9
|
extend Useful::Builder
|
@@ -15,37 +15,47 @@ module Super
|
|
15
15
|
builder def real; @real = true; end
|
16
16
|
builder def computed; @real = false; end
|
17
17
|
|
18
|
-
|
18
|
+
# @deprecated Prefer {#attribute}
|
19
|
+
builder def column
|
20
|
+
Useful::Deprecation["0.22"].deprecation_warning(":column", "use :attribute instead")
|
21
|
+
@type = :attribute
|
22
|
+
end
|
23
|
+
builder def attribute; @type = :attribute; end
|
19
24
|
builder def record; @type = :record; end
|
20
25
|
builder def none; @type = :none; end
|
21
26
|
|
22
27
|
builder def ignore_nil; @ignore_nil = true; end
|
23
28
|
|
29
|
+
builder def attribute_name(name); @attribute_name = name; end
|
30
|
+
|
24
31
|
def build
|
25
32
|
Built.new(
|
26
33
|
real: @real,
|
27
34
|
type: @type,
|
28
35
|
ignore_nil: !!@ignore_nil,
|
36
|
+
attribute_name: @attribute_name,
|
29
37
|
&@transform_block
|
30
38
|
)
|
31
39
|
end
|
32
40
|
end
|
33
41
|
|
34
42
|
class Built
|
35
|
-
def initialize(real:, type:, ignore_nil:, &transform_block)
|
43
|
+
def initialize(real:, type:, ignore_nil:, attribute_name:, &transform_block)
|
36
44
|
@real = real
|
37
45
|
@type = type
|
38
46
|
@ignore_nil = ignore_nil
|
47
|
+
@attribute_name = attribute_name
|
39
48
|
@transform_block = transform_block
|
40
49
|
end
|
41
50
|
|
42
51
|
def real?; @real; end
|
43
52
|
attr_reader :type
|
53
|
+
attr_reader :attribute_name
|
44
54
|
|
45
55
|
def present(attribute_name, value = nil)
|
46
56
|
if @transform_block.nil?
|
47
57
|
if attribute_name
|
48
|
-
raise Error::ArgumentError, "Transformation block is not set for
|
58
|
+
raise Error::ArgumentError, "Transformation block is not set for attribute: #{attribute_name}"
|
49
59
|
else
|
50
60
|
raise Error::ArgumentError, "Transformation block is not set!"
|
51
61
|
end
|
@@ -61,6 +71,7 @@ module Super
|
|
61
71
|
end
|
62
72
|
end
|
63
73
|
|
74
|
+
# @deprecated
|
64
75
|
class Badge
|
65
76
|
extend Useful::Builder
|
66
77
|
|
@@ -107,26 +118,36 @@ module Super
|
|
107
118
|
@fields = fields
|
108
119
|
end
|
109
120
|
|
110
|
-
def real(type = :
|
121
|
+
def real(type = :attribute, &transform_block)
|
122
|
+
if type == :column
|
123
|
+
Useful::Deprecation["0.22"].deprecation_warning(":column", "use :attribute instead")
|
124
|
+
type = :attribute
|
125
|
+
end
|
126
|
+
|
111
127
|
TYPES
|
112
128
|
.case(type)
|
113
|
-
.when(:
|
114
|
-
.when(:record)
|
115
|
-
.when(:none)
|
129
|
+
.when(:attribute) { Builder.new.real.ignore_nil.attribute.transform(&transform_block) }
|
130
|
+
.when(:record) { Builder.new.real.ignore_nil.record.transform(&transform_block) }
|
131
|
+
.when(:none) { Builder.new.real.ignore_nil.none.transform(&transform_block) }
|
116
132
|
.result
|
117
133
|
end
|
118
134
|
|
119
|
-
def computed(type = :
|
135
|
+
def computed(type = :attribute, &transform_block)
|
136
|
+
if type == :column
|
137
|
+
Useful::Deprecation["0.22"].deprecation_warning(":column", "use :attribute instead")
|
138
|
+
type = :attribute
|
139
|
+
end
|
140
|
+
|
120
141
|
TYPES
|
121
142
|
.case(type)
|
122
|
-
.when(:
|
123
|
-
.when(:record)
|
124
|
-
.when(:none)
|
143
|
+
.when(:attribute) { Builder.new.computed.ignore_nil.attribute.transform(&transform_block) }
|
144
|
+
.when(:record) { Builder.new.computed.ignore_nil.record.transform(&transform_block) }
|
145
|
+
.when(:none) { Builder.new.computed.ignore_nil.none.transform(&transform_block) }
|
125
146
|
.result
|
126
147
|
end
|
127
148
|
|
128
149
|
def manual(&transform_block)
|
129
|
-
real(:
|
150
|
+
real(:attribute, &transform_block)
|
130
151
|
end
|
131
152
|
|
132
153
|
def batch
|
@@ -146,8 +167,10 @@ module Super
|
|
146
167
|
end
|
147
168
|
end
|
148
169
|
|
170
|
+
# @deprecated Use {#real} or {#computed} instead, and return an instance of {Super::Badge}
|
149
171
|
def badge(*builder_methods)
|
150
|
-
|
172
|
+
Useful::Deprecation["0.22"].deprecation_warning("#badge", "use #real or #computed instead, and return an instance of Super::Badge")
|
173
|
+
builder_methods = %i[real ignore_nil attribute] if builder_methods.empty?
|
151
174
|
builder = builder_methods.each_with_object(Builder.new) do |builder_method, builder|
|
152
175
|
builder.public_send(builder_method)
|
153
176
|
end
|
data/lib/super/display.rb
CHANGED
@@ -26,7 +26,9 @@ module Super
|
|
26
26
|
include Schema::Common
|
27
27
|
|
28
28
|
def initialize
|
29
|
-
@fields = Super::Schema::Fields.new
|
29
|
+
@fields = Super::Schema::Fields.new(
|
30
|
+
transform_value_on_set: -> (val) { if val.respond_to?(:build) then val.build else val end }
|
31
|
+
)
|
30
32
|
@schema_types = SchemaTypes.new(fields: @fields)
|
31
33
|
|
32
34
|
yield(@fields, @schema_types)
|
@@ -43,7 +45,7 @@ module Super
|
|
43
45
|
|
44
46
|
def to_partial_path
|
45
47
|
if @action_inquirer.nil?
|
46
|
-
raise Super::Error::
|
48
|
+
raise Super::Error::Initialization,
|
47
49
|
"You must call the `#apply` method after instantiating Super::Display"
|
48
50
|
elsif @action_inquirer.index?
|
49
51
|
"display_index"
|
@@ -57,7 +59,6 @@ module Super
|
|
57
59
|
# @private
|
58
60
|
def render_attribute(template:, record:, column:)
|
59
61
|
formatter = @fields[column]
|
60
|
-
formatter = formatter.build if formatter.respond_to?(:build)
|
61
62
|
|
62
63
|
formatted =
|
63
64
|
SchemaTypes::TYPES
|
@@ -65,7 +66,7 @@ module Super
|
|
65
66
|
.when(:record) do
|
66
67
|
formatter.present(column, record)
|
67
68
|
end
|
68
|
-
.when(:
|
69
|
+
.when(:attribute) do
|
69
70
|
value = record.public_send(column)
|
70
71
|
formatter.present(column, value)
|
71
72
|
end
|
data/lib/super/error.rb
CHANGED
@@ -24,9 +24,9 @@ module Super
|
|
24
24
|
)
|
25
25
|
end
|
26
26
|
end
|
27
|
-
# Error raised when something wasn't
|
27
|
+
# Error raised when something wasn't initialized correctly, and if there isn't
|
28
28
|
# a more specific error
|
29
|
-
class
|
29
|
+
class Initialization < Error; end
|
30
30
|
class ArgumentError < Error; end
|
31
31
|
class AlreadyRegistered < Error; end
|
32
32
|
class AlreadyTranscribed < Error; end
|
@@ -28,5 +28,16 @@ module Super
|
|
28
28
|
ensure
|
29
29
|
ActionView::Base.field_error_proc = original
|
30
30
|
end
|
31
|
+
|
32
|
+
# Super's version of `#fields_for`
|
33
|
+
def super_fields_for(*args, **options, &block)
|
34
|
+
original = ActionView::Base.field_error_proc
|
35
|
+
ActionView::Base.field_error_proc = FormBuilder::FIELD_ERROR_PROC
|
36
|
+
|
37
|
+
options[:builder] ||= FormBuilder
|
38
|
+
return fields_for(*args, **options, &block)
|
39
|
+
ensure
|
40
|
+
ActionView::Base.field_error_proc = original
|
41
|
+
end
|
31
42
|
end
|
32
43
|
end
|
data/lib/super/navigation.rb
CHANGED
@@ -4,14 +4,14 @@ module Super
|
|
4
4
|
class Navigation
|
5
5
|
def initialize
|
6
6
|
@builder = Builder.new
|
7
|
-
|
8
|
-
if
|
9
|
-
|
7
|
+
result = yield @builder
|
8
|
+
if result.is_a?(Array)
|
9
|
+
Useful::Deprecation["0.22"].deprecation_warning("returning an array", "calling a Super::Navigation builder method defines the navigation")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
def definition
|
14
|
-
return @
|
14
|
+
return @definition if instance_variable_defined?(:@definition)
|
15
15
|
|
16
16
|
searcher = RouteFormatterButReallySearcher.new
|
17
17
|
inspector = ActionDispatch::Routing::RoutesInspector.new(Rails.application.routes.routes)
|
@@ -19,37 +19,12 @@ module Super
|
|
19
19
|
all_matches = searcher.matches
|
20
20
|
unused_matches = all_matches.each_with_object({}) { |match, hash| hash[match] = true }
|
21
21
|
|
22
|
-
defs =
|
23
|
-
|
24
|
-
@defs = expand_directives(defs, all_matches, unused_matches.keys)
|
22
|
+
defs = validate_and_determine_explicit_links(@builder.build, unused_matches)
|
23
|
+
@definition = expand_directives(defs, all_matches, unused_matches.keys)
|
25
24
|
end
|
26
25
|
|
27
26
|
private
|
28
27
|
|
29
|
-
# This expands the syntax sugar that allows `nav.menu("Name")[nav.link(Item)]`
|
30
|
-
def expand_proc_syntax_sugar(definition)
|
31
|
-
definition.map do |link_or_menu_or_rest_or_menuproc|
|
32
|
-
link_or_menu_or_rest =
|
33
|
-
if link_or_menu_or_rest_or_menuproc.is_a?(Proc)
|
34
|
-
link_or_menu_or_rest_or_menuproc.call
|
35
|
-
else
|
36
|
-
link_or_menu_or_rest_or_menuproc
|
37
|
-
end
|
38
|
-
|
39
|
-
if link_or_menu_or_rest.is_a?(Menu)
|
40
|
-
link_or_menu_or_rest.links = link_or_menu_or_rest.links.map do |menu_item|
|
41
|
-
if menu_item.is_a?(Proc)
|
42
|
-
menu_item.call
|
43
|
-
else
|
44
|
-
menu_item
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
link_or_menu_or_rest
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
28
|
def validate_and_determine_explicit_links(definition, unused_links)
|
54
29
|
definition.each do |link_or_menu_or_rest|
|
55
30
|
if link_or_menu_or_rest.is_a?(Super::Link)
|
@@ -103,31 +78,56 @@ module Super
|
|
103
78
|
Menu = Struct.new(:title, :links)
|
104
79
|
|
105
80
|
class Builder
|
81
|
+
def initialize
|
82
|
+
@links = []
|
83
|
+
@menu_level = 0
|
84
|
+
end
|
85
|
+
|
86
|
+
def build
|
87
|
+
@links
|
88
|
+
end
|
89
|
+
|
106
90
|
def link(model, **kwargs)
|
107
91
|
text = model.model_name.human.pluralize
|
108
92
|
parts = Super::Link.polymorphic_parts(model)
|
109
93
|
|
110
|
-
Super::Link.new(text, parts, **kwargs)
|
94
|
+
@links.push(Super::Link.new(text, parts, **kwargs))
|
95
|
+
self
|
111
96
|
end
|
112
97
|
|
113
98
|
def link_to(*args, **kwargs)
|
114
|
-
Super::Link.new(*args, **kwargs)
|
99
|
+
@links.push(Super::Link.new(*args, **kwargs))
|
100
|
+
self
|
115
101
|
end
|
116
102
|
|
117
|
-
def menu(title
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
103
|
+
def menu(title)
|
104
|
+
if @menu_level > 0
|
105
|
+
raise Super::Error::ArgumentError, "Navigation menus can't be nested"
|
106
|
+
end
|
107
|
+
|
108
|
+
begin
|
109
|
+
@menu_level += 1
|
110
|
+
original_links = @links
|
111
|
+
@links = []
|
112
|
+
yield
|
113
|
+
menu_links = @links
|
114
|
+
ensure
|
115
|
+
@links = original_links
|
116
|
+
@menu_level -= 1
|
122
117
|
end
|
118
|
+
|
119
|
+
@links.push(Menu.new(title, menu_links))
|
120
|
+
self
|
123
121
|
end
|
124
122
|
|
125
123
|
def rest
|
126
|
-
REST
|
124
|
+
@links.push(REST)
|
125
|
+
self
|
127
126
|
end
|
128
127
|
|
129
128
|
def all
|
130
|
-
ALL
|
129
|
+
@links.push(ALL)
|
130
|
+
self
|
131
131
|
end
|
132
132
|
end
|
133
133
|
|
data/lib/super/query.rb
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Super
|
4
|
+
class Query
|
5
|
+
def initialize(model:, params:, current_path:)
|
6
|
+
@model = model
|
7
|
+
@params = params
|
8
|
+
@path = current_path
|
9
|
+
@addons = {}
|
10
|
+
@backwards_addons = {}
|
11
|
+
end
|
12
|
+
|
13
|
+
attr_reader :addons
|
14
|
+
attr_reader :model
|
15
|
+
attr_reader :params
|
16
|
+
attr_reader :path
|
17
|
+
attr_reader :backwards_addons
|
18
|
+
|
19
|
+
private :model
|
20
|
+
private :params
|
21
|
+
private :backwards_addons
|
22
|
+
|
23
|
+
def build(klass, namespace:, **additional_initialization_arguments)
|
24
|
+
params_for_querier =
|
25
|
+
params.fetch(namespace) { ActiveSupport::HashWithIndifferentAccess.new }
|
26
|
+
|
27
|
+
instance = klass.new(
|
28
|
+
model: model,
|
29
|
+
params: params_for_querier,
|
30
|
+
**additional_initialization_arguments
|
31
|
+
)
|
32
|
+
|
33
|
+
addons[namespace] = instance
|
34
|
+
backwards_addons[instance] = namespace
|
35
|
+
instance
|
36
|
+
end
|
37
|
+
|
38
|
+
def namespace_for(query_form_object)
|
39
|
+
backwards_addons.fetch(query_form_object)
|
40
|
+
end
|
41
|
+
|
42
|
+
def form_options
|
43
|
+
{
|
44
|
+
url: path,
|
45
|
+
method: :get
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
def apply_changes(records)
|
50
|
+
addons.each_value do |addon|
|
51
|
+
records = addon.apply_changes(records)
|
52
|
+
end
|
53
|
+
|
54
|
+
records
|
55
|
+
end
|
56
|
+
|
57
|
+
def to_partial_path
|
58
|
+
"query"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module Super
|
4
4
|
# Configures the host Rails app to work with Super
|
5
|
-
class
|
5
|
+
class Railtie < ::Rails::Engine
|
6
6
|
isolate_namespace Super
|
7
7
|
|
8
8
|
initializer "super.assets.precompile" do |app|
|
@@ -11,6 +11,12 @@ module Super
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
+
initializer "super.inclusion" do
|
15
|
+
ActiveSupport.on_load(:action_view) do
|
16
|
+
include Super::FormBuilderHelper
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
14
20
|
config.to_prepare do
|
15
21
|
Super::Plugin::Registry.controller.ordered do |klass, method_name|
|
16
22
|
Super::ApplicationController.public_send(method_name, klass)
|
data/lib/super/reset.rb
CHANGED
@@ -16,6 +16,8 @@ module Super
|
|
16
16
|
# Defined in Super::ApplicationController
|
17
17
|
current_action: true,
|
18
18
|
with_current_action: true,
|
19
|
+
|
20
|
+
# Keep all of the ones in Super::SitewideController
|
19
21
|
}
|
20
22
|
|
21
23
|
included do
|
@@ -27,6 +29,11 @@ module Super
|
|
27
29
|
undef_method :update
|
28
30
|
undef_method :destroy
|
29
31
|
|
32
|
+
Super::ViewController.private_instance_methods(false).each do |imethod|
|
33
|
+
next if KEEP.key?(imethod)
|
34
|
+
undef_method imethod
|
35
|
+
end
|
36
|
+
|
30
37
|
Super::SubstructureController.private_instance_methods(false).each do |imethod|
|
31
38
|
next if KEEP.key?(imethod)
|
32
39
|
undef_method imethod
|
data/lib/super/schema.rb
CHANGED
@@ -14,8 +14,9 @@ module Super
|
|
14
14
|
class Fields
|
15
15
|
include Enumerable
|
16
16
|
|
17
|
-
def initialize
|
17
|
+
def initialize(transform_value_on_set: nil)
|
18
18
|
@backing = {}
|
19
|
+
@transform_value_on_set = transform_value_on_set
|
19
20
|
end
|
20
21
|
|
21
22
|
def [](key)
|
@@ -23,7 +24,12 @@ module Super
|
|
23
24
|
end
|
24
25
|
|
25
26
|
def []=(key, value)
|
26
|
-
@backing[key] =
|
27
|
+
@backing[key] =
|
28
|
+
if @transform_value_on_set
|
29
|
+
@transform_value_on_set.call(value)
|
30
|
+
else
|
31
|
+
value
|
32
|
+
end
|
27
33
|
end
|
28
34
|
|
29
35
|
def keys
|
data/lib/super/sort.rb
CHANGED
@@ -7,11 +7,9 @@ module Super
|
|
7
7
|
|
8
8
|
def initialize(model:, params:, default:, sortable_columns:)
|
9
9
|
@model = model
|
10
|
-
@params = params
|
10
|
+
@params = params
|
11
11
|
@default = default
|
12
12
|
@sortable_columns = sortable_columns.map(&:to_s)
|
13
|
-
|
14
|
-
@params.permit!
|
15
13
|
end
|
16
14
|
|
17
15
|
attr_reader :sortable_columns
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_support/deprecation"
|
4
|
+
|
5
|
+
module Super
|
6
|
+
module Useful
|
7
|
+
class Deprecation
|
8
|
+
VERSIONS = {
|
9
|
+
"0.22" => ActiveSupport::Deprecation.new("0.22", "Super")
|
10
|
+
}
|
11
|
+
private_constant :VERSIONS
|
12
|
+
|
13
|
+
def self.[](version)
|
14
|
+
VERSIONS.fetch(version)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/super/version.rb
CHANGED
data/lib/super/view_chain.rb
CHANGED
@@ -6,10 +6,6 @@ module Super
|
|
6
6
|
@data = ReorderableHash.new(chain)
|
7
7
|
end
|
8
8
|
|
9
|
-
def chain
|
10
|
-
@chain ||= @data.values
|
11
|
-
end
|
12
|
-
|
13
9
|
def insert(*args, **kwargs)
|
14
10
|
if instance_variable_defined?(:@chain)
|
15
11
|
raise Error::ViewChain::ChainAlreadyStarted
|
@@ -21,5 +17,19 @@ module Super
|
|
21
17
|
def to_partial_path
|
22
18
|
"view_chain"
|
23
19
|
end
|
20
|
+
|
21
|
+
def shift
|
22
|
+
chain.shift
|
23
|
+
end
|
24
|
+
|
25
|
+
def empty?
|
26
|
+
chain.empty?
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def chain
|
32
|
+
@chain ||= @data.to_h
|
33
|
+
end
|
24
34
|
end
|
25
35
|
end
|
data/lib/super.rb
CHANGED
@@ -2,10 +2,15 @@
|
|
2
2
|
|
3
3
|
require "tsort"
|
4
4
|
|
5
|
+
if !ENV["SUPER_SKIP_REQUIRE_CSV"]
|
6
|
+
require "csv"
|
7
|
+
end
|
8
|
+
|
5
9
|
require "rails/engine"
|
6
10
|
|
7
11
|
require "super/schema/common"
|
8
12
|
require "super/useful/builder"
|
13
|
+
require "super/useful/deprecations"
|
9
14
|
require "super/useful/enum"
|
10
15
|
require "super/useful/i19"
|
11
16
|
|
@@ -35,6 +40,7 @@ require "super/form_builder/action_text_methods"
|
|
35
40
|
require "super/form_builder/base_methods"
|
36
41
|
require "super/form_builder/flatpickr_methods"
|
37
42
|
require "super/form_builder/option_methods"
|
43
|
+
require "super/form_builder_helper"
|
38
44
|
require "super/layout"
|
39
45
|
require "super/link"
|
40
46
|
require "super/link_builder"
|
@@ -44,7 +50,7 @@ require "super/pagination"
|
|
44
50
|
require "super/panel"
|
45
51
|
require "super/partial"
|
46
52
|
require "super/plugin"
|
47
|
-
require "super/query
|
53
|
+
require "super/query"
|
48
54
|
require "super/reorderable_hash"
|
49
55
|
require "super/reset"
|
50
56
|
require "super/schema"
|
@@ -54,4 +60,4 @@ require "super/version"
|
|
54
60
|
require "super/view_chain"
|
55
61
|
require "super/view_helper"
|
56
62
|
|
57
|
-
require "super/
|
63
|
+
require "super/railtie"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zach Ahn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -128,48 +128,6 @@ dependencies:
|
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: minitest-ci
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - ">="
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: appraisal
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - ">="
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - ">="
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: yard
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - ">="
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - ">="
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0'
|
173
131
|
- !ruby/object:Gem::Dependency
|
174
132
|
name: mocha
|
175
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,8 +212,9 @@ files:
|
|
254
212
|
- app/assets/javascripts/super/application.js
|
255
213
|
- app/assets/stylesheets/super/application.css
|
256
214
|
- app/controllers/super/application_controller.rb
|
215
|
+
- app/controllers/super/sitewide_controller.rb
|
257
216
|
- app/controllers/super/substructure_controller.rb
|
258
|
-
- app/
|
217
|
+
- app/controllers/super/view_controller.rb
|
259
218
|
- app/views/layouts/super/application.html.erb
|
260
219
|
- app/views/super/application/_batch_button.html.erb
|
261
220
|
- app/views/super/application/_batch_checkbox.csv.erb
|
@@ -295,7 +254,6 @@ files:
|
|
295
254
|
- app/views/super/feather/README.md
|
296
255
|
- app/views/super/feather/_x.html
|
297
256
|
- config/locales/en.yml
|
298
|
-
- config/routes.rb
|
299
257
|
- frontend/super-frontend/dist/application.css
|
300
258
|
- frontend/super-frontend/dist/application.js
|
301
259
|
- frontend/super-frontend/dist/package.json
|
@@ -324,7 +282,6 @@ files:
|
|
324
282
|
- lib/super/display.rb
|
325
283
|
- lib/super/display/guesser.rb
|
326
284
|
- lib/super/display/schema_types.rb
|
327
|
-
- lib/super/engine.rb
|
328
285
|
- lib/super/error.rb
|
329
286
|
- lib/super/filter.rb
|
330
287
|
- lib/super/filter/form_object.rb
|
@@ -342,6 +299,7 @@ files:
|
|
342
299
|
- lib/super/form_builder/base_methods.rb
|
343
300
|
- lib/super/form_builder/flatpickr_methods.rb
|
344
301
|
- lib/super/form_builder/option_methods.rb
|
302
|
+
- lib/super/form_builder_helper.rb
|
345
303
|
- lib/super/layout.rb
|
346
304
|
- lib/super/link.rb
|
347
305
|
- lib/super/link_builder.rb
|
@@ -352,7 +310,8 @@ files:
|
|
352
310
|
- lib/super/partial.rb
|
353
311
|
- lib/super/partial/resolving.rb
|
354
312
|
- lib/super/plugin.rb
|
355
|
-
- lib/super/query
|
313
|
+
- lib/super/query.rb
|
314
|
+
- lib/super/railtie.rb
|
356
315
|
- lib/super/reorderable_hash.rb
|
357
316
|
- lib/super/reset.rb
|
358
317
|
- lib/super/schema.rb
|
@@ -360,6 +319,7 @@ files:
|
|
360
319
|
- lib/super/schema/guesser.rb
|
361
320
|
- lib/super/sort.rb
|
362
321
|
- lib/super/useful/builder.rb
|
322
|
+
- lib/super/useful/deprecations.rb
|
363
323
|
- lib/super/useful/enum.rb
|
364
324
|
- lib/super/useful/i19.rb
|
365
325
|
- lib/super/version.rb
|
@@ -390,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
390
350
|
- !ruby/object:Gem::Version
|
391
351
|
version: '0'
|
392
352
|
requirements: []
|
393
|
-
rubygems_version: 3.
|
353
|
+
rubygems_version: 3.2.33
|
394
354
|
signing_key:
|
395
355
|
specification_version: 4
|
396
356
|
summary: A simple, powerful, zero dependency Rails admin framework
|
data/config/routes.rb
DELETED