eac_rails_utils 0.25.0 → 0.26.1
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/app/helpers/eac_rails_utils/menus_helper/bootstrap_gui_builder.rb +1 -1
- data/lib/eac_rails_utils/engine.rb +4 -1
- data/lib/eac_rails_utils/engine_helper.rb +1 -5
- data/lib/eac_rails_utils/menus/action.rb +0 -3
- data/lib/eac_rails_utils/menus/group.rb +0 -4
- data/lib/eac_rails_utils/menus/node.rb +0 -2
- data/lib/eac_rails_utils/menus.rb +0 -2
- data/lib/eac_rails_utils/models/tableless/attributes.rb +0 -2
- data/lib/eac_rails_utils/models/tableless/columns.rb +0 -2
- data/lib/eac_rails_utils/models/tableless/strict_loading.rb +1 -5
- data/lib/eac_rails_utils/models/tableless.rb +1 -2
- data/lib/eac_rails_utils/models/tableless_associations/autosave_association.rb +1 -0
- data/lib/eac_rails_utils/models/tableless_associations/hooks.rb +0 -1
- data/lib/eac_rails_utils/models/tableless_associations/override_methods.rb +1 -0
- data/lib/eac_rails_utils/models/tableless_associations.rb +1 -7
- data/lib/eac_rails_utils/models/validations.rb +0 -2
- data/lib/eac_rails_utils/models.rb +0 -2
- data/lib/eac_rails_utils/patches/active_model.rb +0 -1
- data/lib/eac_rails_utils/patches/active_model_associations.rb +0 -2
- data/lib/eac_rails_utils/patches/application.rb +0 -2
- data/lib/eac_rails_utils/patches/numeric/number_helper.rb +2 -4
- data/lib/eac_rails_utils/patches/numeric.rb +0 -1
- data/lib/eac_rails_utils/patches/rails_5_2/active_model_association_method_fix.rb +0 -4
- data/lib/eac_rails_utils/patches/rails_5_2.rb +0 -3
- data/lib/eac_rails_utils/patches.rb +0 -2
- data/lib/eac_rails_utils/rspec/setup/models_utils.rb +1 -3
- data/lib/eac_rails_utils/rspec/setup.rb +0 -2
- data/lib/eac_rails_utils/rspec.rb +0 -1
- data/lib/eac_rails_utils/version.rb +1 -1
- data/lib/eac_rails_utils.rb +8 -2
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0288b47ddd64d26a39dd15bd9889b436f4ce0fc42eb40f4b657609b5c7c02e1
|
4
|
+
data.tar.gz: f77b76d93994f9721c45f9d8b17987149fa72f0825bbde21df7940481d254836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7f096af4855442654c1ac6a5cb71f6f83069d498e83fc78c44efa82f6e73600b642f3c5988cf3575591071be96c6289d4524e456d8bad192d86fdf53bf01e45
|
7
|
+
data.tar.gz: 94b8b007ee7443408e58ba53040c52d0ffb5c44e2e99e0bc0801f34222ec7b6523494b4d61a18dce004a0e5d071be123bb169d026fd8ff25787540a8c4a73bc4
|
@@ -85,7 +85,7 @@ module EacRailsUtils
|
|
85
85
|
options[:method] = options[:link_method]
|
86
86
|
options.delete(:link_method)
|
87
87
|
end
|
88
|
-
options[:class] =
|
88
|
+
options[:class] = @options[:button_class].to_s.strip if entry[:level].zero? # rubocop:disable Rails/HelperInstanceVariable
|
89
89
|
options
|
90
90
|
end
|
91
91
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
3
|
module EacRailsUtils
|
6
4
|
module EngineHelper
|
7
5
|
class << self
|
@@ -30,9 +28,7 @@ module EacRailsUtils
|
|
30
28
|
end
|
31
29
|
|
32
30
|
# @return [EacRailsUtils::Menus::Group]
|
33
|
-
|
34
|
-
::EacRailsUtils::EnginesHelper.root_menu
|
35
|
-
end
|
31
|
+
delegate :root_menu, to: :'::EacRailsUtils::EnginesHelper'
|
36
32
|
end
|
37
33
|
end
|
38
34
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
3
|
module EacRailsUtils
|
6
4
|
module Models
|
7
5
|
class Tableless
|
@@ -16,9 +14,7 @@ module EacRailsUtils
|
|
16
14
|
end
|
17
15
|
|
18
16
|
# @return [Boolean]
|
19
|
-
|
20
|
-
self.class.strict_loading?
|
21
|
-
end
|
17
|
+
delegate :strict_loading?, to: :class
|
22
18
|
end
|
23
19
|
end
|
24
20
|
end
|
@@ -6,7 +6,6 @@ module EacRailsUtils
|
|
6
6
|
module Hooks
|
7
7
|
def self.init
|
8
8
|
ActiveSupport.on_load(:active_record) do
|
9
|
-
require 'eac_rails_utils/models/tableless_associations/association_scope_extension'
|
10
9
|
ActiveRecord::Associations::AssociationScope.prepend(
|
11
10
|
EacRailsUtils::Models::TablelessAssociations::AssociationScopeExtension
|
12
11
|
)
|
@@ -1,11 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_rails_utils/models/tableless_associations/initialize_extension'
|
4
|
-
require 'eac_rails_utils/models/tableless_associations/active_record_reflection'
|
5
|
-
require 'eac_rails_utils/models/tableless_associations/autosave_association'
|
6
|
-
require 'eac_rails_utils/models/tableless_associations/override_methods'
|
7
|
-
require 'eac_rails_utils/models/tableless_associations/has_many_for_active_model'
|
8
|
-
require 'eac_rails_utils/models/tableless_associations/has_many_for_active_model_association'
|
9
3
|
require 'active_support/core_ext/module'
|
10
4
|
|
11
5
|
module EacRailsUtils
|
@@ -31,7 +25,7 @@ module EacRailsUtils
|
|
31
25
|
end
|
32
26
|
|
33
27
|
# define association like ActiveRecord
|
34
|
-
def has_many(name, scope = nil, **options, &extension) # rubocop:disable
|
28
|
+
def has_many(name, scope = nil, **options, &extension) # rubocop:disable Metrics/MethodLength, Naming/PredicatePrefix
|
35
29
|
options.reverse_merge!(active_model: true, target_ids: "#{name.to_s.singularize}_ids")
|
36
30
|
if scope.is_a?(Hash)
|
37
31
|
options.merge!(scope)
|
@@ -23,9 +23,7 @@ class Numeric
|
|
23
23
|
end
|
24
24
|
|
25
25
|
# @return [Object] A object that extends [ActionView::Helpers::NumberHelper]
|
26
|
-
|
27
|
-
self.class.number_helper
|
28
|
-
end
|
26
|
+
delegate :number_helper, to: :class
|
29
27
|
|
30
28
|
# @return [String]
|
31
29
|
def to_currency(options = {})
|
@@ -59,6 +57,6 @@ class Numeric
|
|
59
57
|
|
60
58
|
# @return [String]
|
61
59
|
def with_precision(options = {})
|
62
|
-
number_helper.number_with_precision(self, default_precision_options(options)
|
60
|
+
number_helper.number_with_precision(self, default_precision_options(options))
|
63
61
|
end
|
64
62
|
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils/core_ext'
|
4
|
-
|
5
3
|
module EacRailsUtils
|
6
4
|
module Rspec
|
7
5
|
module Setup
|
@@ -12,7 +10,7 @@ module EacRailsUtils
|
|
12
10
|
send(record_variable).send("#{attribute}=", value)
|
13
11
|
end
|
14
12
|
|
15
|
-
it "#{record_variable} should be #{
|
13
|
+
it "#{record_variable} should be #{'not ' unless valid}valid" do
|
16
14
|
expect(send(record_variable).valid?).to(send("be_#{valid ? 'truthy' : 'falsy'}"),
|
17
15
|
-> { send(record_variable).errors.messages })
|
18
16
|
end
|
data/lib/eac_rails_utils.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'eac_ruby_utils
|
3
|
+
require 'eac_ruby_utils'
|
4
|
+
EacRubyUtils::RootModuleSetup.perform __FILE__ do
|
5
|
+
ignore 'patches'
|
6
|
+
end
|
4
7
|
|
5
8
|
module EacRailsUtils
|
6
|
-
::EacRubyUtils.require_sub __FILE__
|
7
9
|
end
|
10
|
+
|
11
|
+
require 'rails'
|
12
|
+
|
13
|
+
require 'eac_rails_utils/engine'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_rails_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- E.A.C.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap-sass
|
@@ -36,14 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.128'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.128.3
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
43
46
|
requirements:
|
44
47
|
- - "~>"
|
45
48
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
49
|
+
version: '0.128'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.128.3
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: rails
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,20 +104,14 @@ dependencies:
|
|
98
104
|
requirements:
|
99
105
|
- - "~>"
|
100
106
|
- !ruby/object:Gem::Version
|
101
|
-
version: '0.
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: 0.10.1
|
107
|
+
version: '0.11'
|
105
108
|
type: :development
|
106
109
|
prerelease: false
|
107
110
|
version_requirements: !ruby/object:Gem::Requirement
|
108
111
|
requirements:
|
109
112
|
- - "~>"
|
110
113
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0.
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: 0.10.1
|
114
|
+
version: '0.11'
|
115
115
|
description:
|
116
116
|
email:
|
117
117
|
executables: []
|