k_domain 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +5 -3
- data/.gitignore +1 -0
- data/.rubocop.yml +8 -3
- data/Gemfile +1 -1
- data/k_domain.gemspec +1 -1
- data/lib/k_domain/domain_model/build_rich_models.rb +64 -0
- data/lib/k_domain/domain_model/load.rb +3 -1
- data/lib/k_domain/domain_model/transform.rb +13 -11
- data/lib/k_domain/domain_model/transform_steps/step6_rails_structure_models.rb +1 -0
- data/lib/k_domain/domain_model/transform_steps/step7_rails_structure_controllers.rb +3 -0
- data/lib/k_domain/queries/_.rb +4 -0
- data/lib/k_domain/queries/base_query.rb +13 -0
- data/lib/k_domain/queries/domain_model_query.rb +88 -0
- data/lib/k_domain/rails_code_extractor/shim_loader.rb +4 -2
- data/lib/k_domain/schemas/_.rb +1 -1
- data/lib/k_domain/schemas/domain.rb +5 -1
- data/lib/k_domain/schemas/{domain_model.rb → main_dataset.rb} +2 -2
- data/lib/k_domain/version.rb +1 -1
- data/lib/k_domain.rb +3 -1
- data/templates/custom/action_controller.rb +0 -29
- data/templates/custom/controller_interceptors.rb +9 -7
- data/templates/custom/model_interceptors.rb +27 -3
- data/templates/rails/active_record.rb +2 -0
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56185cb3b21dcdc594e86e2f90a5700705e308210cf531371d717798ee7762c4
|
4
|
+
data.tar.gz: ec39dc47a6b40b875134431205d7d8da54e83aa7a1818c352dcde485e5f31682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 639891b42099979c7955fa0586bc8e408900c97a3b0f4197704dd0f4e05765679b80ba83926c9b3c4307e8154f830ef90a4793097901007b11710f93010e1c04
|
7
|
+
data.tar.gz: 37c2f1076fddfd3c01da39dada2c579f62cda2af50aa1ba0105184c93c9f1442e4ec66d86e154b02d997310ec09d182991e9a054e5e340759bb11eead4d296bb
|
data/.github/workflows/main.yml
CHANGED
@@ -25,7 +25,9 @@ jobs:
|
|
25
25
|
run: |
|
26
26
|
gem install bundler -v 2.2.5
|
27
27
|
bundle install
|
28
|
-
- name: Run tests
|
29
|
-
run: bundle exec rspec
|
30
28
|
- name: Run rubocop
|
31
|
-
run:
|
29
|
+
run: |
|
30
|
+
bundle exec rubocop -v
|
31
|
+
bundle exec rubocop
|
32
|
+
- name: Run tests
|
33
|
+
run: bundle exec rspec --tag ~skip_on_gha
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# require: rubocop-rake
|
2
2
|
AllCops:
|
3
|
-
TargetRubyVersion: 2.
|
3
|
+
TargetRubyVersion: 2.7
|
4
4
|
DisplayCopNames: true
|
5
5
|
ExtraDetails: true
|
6
6
|
NewCops: enable
|
@@ -10,6 +10,7 @@ AllCops:
|
|
10
10
|
- "templates/**/*"
|
11
11
|
- "lib/k_domain/schemas/domain/old/**/*"
|
12
12
|
- "spec/k_domain/ruby_loader/**/*"
|
13
|
+
- "hooks/**/*"
|
13
14
|
|
14
15
|
Metrics/PerceivedComplexity:
|
15
16
|
Exclude:
|
@@ -68,8 +69,6 @@ Metrics/MethodLength:
|
|
68
69
|
|
69
70
|
Layout/LineLength:
|
70
71
|
Max: 200
|
71
|
-
# Ignores annotate output
|
72
|
-
IgnoredPatterns: ['\A# \*\*']
|
73
72
|
IgnoreCopDirectives: true
|
74
73
|
Exclude:
|
75
74
|
- "lib/k_domain/domain_model/transform_steps/*.rb"
|
@@ -116,6 +115,12 @@ Style/FormatStringToken:
|
|
116
115
|
Style/Documentation:
|
117
116
|
Enabled: false
|
118
117
|
|
118
|
+
Style/OpenStructUse:
|
119
|
+
Enabled: false
|
120
|
+
|
119
121
|
Layout/SpaceBeforeComma:
|
120
122
|
Enabled: false
|
123
|
+
|
124
|
+
Gemspec/RequireMFA:
|
125
|
+
Enabled: false
|
121
126
|
# My Preferences - End
|
data/Gemfile
CHANGED
@@ -25,7 +25,7 @@ group :development, :test do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# If local dependency
|
28
|
-
if ENV
|
28
|
+
if ENV.fetch('KLUE_LOCAL_GEMS', 'false').downcase == 'true'
|
29
29
|
group :development, :test do
|
30
30
|
puts 'Using Local GEMs'
|
31
31
|
gem 'k_log' , path: '../k_log'
|
data/k_domain.gemspec
CHANGED
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Loads the db schema object and works through a series of enrichment steps to
|
4
|
+
# that builds the domain modal
|
5
|
+
|
6
|
+
module KDomain
|
7
|
+
module DomainModel
|
8
|
+
class BuildRichModels
|
9
|
+
include KLog::Logging
|
10
|
+
|
11
|
+
attr_reader :db_schema
|
12
|
+
attr_reader :target_step_file
|
13
|
+
attr_reader :query
|
14
|
+
|
15
|
+
def initialize(domain_model: , target_folder:)
|
16
|
+
@domain_model = domain_model
|
17
|
+
@target_folder = target_folder
|
18
|
+
@query = KDomain::Queries::DomainModelQuery.new(domain_model)
|
19
|
+
end
|
20
|
+
|
21
|
+
def call
|
22
|
+
FileUtils.mkdir_p(target_folder)
|
23
|
+
|
24
|
+
export_domain_models(query.all.take(3))
|
25
|
+
end
|
26
|
+
|
27
|
+
def export_domain_models(models)
|
28
|
+
models.each do |model|
|
29
|
+
json = JSON.pretty_generate(build_rich_model(model))
|
30
|
+
target_file = File.join(target_folder, model.name + '.json')
|
31
|
+
File.write(target_file, json)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def build_rich_model(model)
|
36
|
+
{
|
37
|
+
name: model.name,
|
38
|
+
name_plural: model.name_plural,
|
39
|
+
table_name: model.table_name,
|
40
|
+
type: model.type,
|
41
|
+
pk: model.pk.to_h,
|
42
|
+
file: model.file,
|
43
|
+
exist: model.ruby?,
|
44
|
+
main_key: model.main_key,
|
45
|
+
traits: model.traits,
|
46
|
+
columns: {
|
47
|
+
all: model.columns.map(&:to_h),
|
48
|
+
data: model.columns_data.map(&:to_h),
|
49
|
+
primary: model.columns_primary.map(&:to_h),
|
50
|
+
foreign_key: model.columns_foreign_key.map(&:to_h),
|
51
|
+
foreign_type: model.columns_foreign_type.map(&:to_h),
|
52
|
+
timestamp: model.columns_timestamp.map(&:to_h),
|
53
|
+
deleted_at: model.columns_deleted_at.map(&:to_h),
|
54
|
+
virtual: model.columns_virtual.map(&:to_h),
|
55
|
+
data_foreign: model.columns_data_foreign.map(&:to_h),
|
56
|
+
data_primary: model.columns_data_primary.map(&:to_h),
|
57
|
+
data_virtual: model.columns_data_virtual.map(&:to_h),
|
58
|
+
data_foreign_virtual: model.columns_data_foreign_virtual.map(&:to_h)
|
59
|
+
}
|
60
|
+
}
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -22,8 +22,10 @@ module KDomain
|
|
22
22
|
json = File.read(source_file)
|
23
23
|
@raw_data = KUtil.data.json_parse(json, as: :hash_symbolized)
|
24
24
|
|
25
|
-
|
25
|
+
# This line is slow on big datasets
|
26
|
+
@data = KDomain::Schemas::MainDataset.new(@raw_data)
|
26
27
|
|
28
|
+
# This line is also slow on big datasets
|
27
29
|
enrichment
|
28
30
|
end
|
29
31
|
|
@@ -14,17 +14,19 @@ module KDomain
|
|
14
14
|
attr_reader :model_path
|
15
15
|
attr_reader :controller_path
|
16
16
|
attr_reader :route_path
|
17
|
-
attr_reader :
|
17
|
+
attr_reader :model_shim_loader
|
18
|
+
attr_reader :controller_shim_loader
|
18
19
|
|
19
20
|
# rubocop:disable Metrics/ParameterLists
|
20
|
-
def initialize(db_schema: , target_file: , target_step_file: , model_path:, route_path:, controller_path:,
|
21
|
-
@db_schema
|
22
|
-
@target_step_file
|
23
|
-
@target_file
|
24
|
-
@model_path
|
25
|
-
@controller_path
|
26
|
-
@route_path
|
27
|
-
@
|
21
|
+
def initialize(db_schema: , target_file: , target_step_file: , model_path:, route_path:, controller_path:, model_shim_loader: nil, controller_shim_loader: nil)
|
22
|
+
@db_schema = db_schema
|
23
|
+
@target_step_file = target_step_file
|
24
|
+
@target_file = target_file
|
25
|
+
@model_path = model_path
|
26
|
+
@controller_path = controller_path
|
27
|
+
@route_path = route_path
|
28
|
+
@model_shim_loader = model_shim_loader
|
29
|
+
@controller_shim_loader = controller_shim_loader
|
28
30
|
end
|
29
31
|
# rubocop:enable Metrics/ParameterLists
|
30
32
|
|
@@ -35,8 +37,8 @@ module KDomain
|
|
35
37
|
valid &&= Step2DomainModels.run(domain_data, model_path: model_path, step_file: step_file('02-domain-model'))
|
36
38
|
valid &&= Step4RailsResourceModels.run(domain_data, model_path: model_path, step_file: step_file('04-rails-resource-models'))
|
37
39
|
valid &&= Step5RailsResourceRoutes.run(domain_data, route_path: route_path, controller_path: controller_path, step_file: step_file('05-rails-resource-routes'))
|
38
|
-
valid &&= Step6RailsStructureModels.run(domain_data, model_path: model_path, step_file: step_file('06-rails-structure-models'), shim_loader:
|
39
|
-
valid &&= Step7RailsStructureControllers.run(domain_data, controller_path: controller_path, step_file: step_file('07-rails-structure-controllers'), shim_loader:
|
40
|
+
valid &&= Step6RailsStructureModels.run(domain_data, model_path: model_path, step_file: step_file('06-rails-structure-models'), shim_loader: model_shim_loader)
|
41
|
+
valid &&= Step7RailsStructureControllers.run(domain_data, controller_path: controller_path, step_file: step_file('07-rails-structure-controllers'), shim_loader: controller_shim_loader)
|
40
42
|
valid &&= Step8DomainColumns.run(domain_data, step_file: step_file('08-domain-columns'))
|
41
43
|
valid &&= Step20Dictionary.run(domain_data, step_file: step_file('20-dictionary'))
|
42
44
|
|
@@ -37,6 +37,7 @@ class Step6RailsStructureModels < KDomain::DomainModel::Step
|
|
37
37
|
|
38
38
|
def attach_behavior_and_functions
|
39
39
|
rails_structure_models.select { |model| model[:exist] }.each do |model|
|
40
|
+
# puts "model: #{model[:model_name]}"
|
40
41
|
model[:behaviours] = extract_behavior(model[:file])
|
41
42
|
klass_name = model[:behaviours][:class_name]
|
42
43
|
model[:functions] = extract_functions(klass_name)
|
@@ -58,7 +58,10 @@ class Step7RailsStructureControllers < KDomain::DomainModel::Step
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def attach_behavior_and_functions
|
61
|
+
rails_structure_controllers.sort_by! { |controller| controller[:full_file] }
|
62
|
+
|
61
63
|
rails_structure_controllers.select { |controller| controller[:exist] }.each do |controller|
|
64
|
+
# puts "controller: #{controller[:full_file]}"
|
62
65
|
unless File.exist?(controller[:full_file])
|
63
66
|
log.error 'Controller apparently exists but no file found, this means that you need re-run rake routes'
|
64
67
|
puts controller[:full_file]
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module KDomain
|
4
|
+
module Queries
|
5
|
+
# Query models found on the domain model
|
6
|
+
# by
|
7
|
+
# has ruby file
|
8
|
+
# has primary key
|
9
|
+
# column count
|
10
|
+
# data column count
|
11
|
+
# foreign key column count
|
12
|
+
# has timestamp (created_at, updated_at) columns
|
13
|
+
# has created_at
|
14
|
+
# has updated_at
|
15
|
+
# has deleted_at
|
16
|
+
# has polymorphic foreign keys
|
17
|
+
# has virtual columns
|
18
|
+
# virtual column filters (token, encrypted_password, etc)
|
19
|
+
class DomainModelQuery < BaseQuery
|
20
|
+
def all
|
21
|
+
domain_model.domain.models
|
22
|
+
end
|
23
|
+
|
24
|
+
def query(**filters)
|
25
|
+
@query = all.clone
|
26
|
+
|
27
|
+
filters.each do |key, value|
|
28
|
+
send("filter_#{key}", value)
|
29
|
+
end
|
30
|
+
|
31
|
+
@query
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def filter_ruby(value)
|
37
|
+
@query.select! { |model| model.ruby? == value }
|
38
|
+
end
|
39
|
+
|
40
|
+
def filter_pk(value)
|
41
|
+
@query.select! { |model| model.pk.exist? == value }
|
42
|
+
end
|
43
|
+
|
44
|
+
def filter_column_count(block)
|
45
|
+
@query.select! { |model| block.call(model.columns.count) }
|
46
|
+
end
|
47
|
+
|
48
|
+
def filter_data_column_count(block)
|
49
|
+
@query.select! { |model| block.call(model.columns_data.count) }
|
50
|
+
end
|
51
|
+
|
52
|
+
def filter_foreign_key_column_count(block)
|
53
|
+
@query.select! { |model| block.call(model.columns_foreign_key.count) }
|
54
|
+
end
|
55
|
+
alias filter_fk_column_count filter_foreign_key_column_count
|
56
|
+
alias filter_fk_count filter_foreign_key_column_count
|
57
|
+
|
58
|
+
def filter_polymorphic_foreign_key_column_count(block)
|
59
|
+
@query.select! { |model| block.call(model.columns_foreign_type.count) }
|
60
|
+
end
|
61
|
+
alias filter_poly_fk_column_count filter_polymorphic_foreign_key_column_count
|
62
|
+
alias filter_poly_fk_count filter_polymorphic_foreign_key_column_count
|
63
|
+
|
64
|
+
def filter_timestamp(value)
|
65
|
+
@query.select! { |model| (model.columns_timestamp.count == 2) == value }
|
66
|
+
end
|
67
|
+
|
68
|
+
def filter_created_at(value)
|
69
|
+
@query.select! { |model| (model.columns.any? { |column| column.name == 'created_at' } == value) }
|
70
|
+
end
|
71
|
+
|
72
|
+
def filter_updated_at(value)
|
73
|
+
@query.select! { |model| (model.columns.any? { |column| column.name == 'updated_at' } == value) }
|
74
|
+
end
|
75
|
+
|
76
|
+
def filter_deleted_at(value)
|
77
|
+
@query.select! { |model| (model.columns.any? { |column| column.name == 'deleted_at' } == value) }
|
78
|
+
end
|
79
|
+
# has virtual columns
|
80
|
+
# virtual column filters (token, encrypted_password, etc)
|
81
|
+
|
82
|
+
# # HELP: this filter affects table rows, eg. if a table has less the 2 columns then include the table
|
83
|
+
# low_column: -> (model) { model.columns.length < 5 },
|
84
|
+
# suspected_m2m: -> (model) { model.columns_foreign.length == 2 && model.columns_data.length < 3 },
|
85
|
+
# invalid_types: -> (model) { model.columns.any? { |c| [c.db_type, c.csharp_type, c.ruby_type].include?('******') } },
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -18,8 +18,10 @@ module KDomain
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def call
|
21
|
-
|
22
|
-
|
21
|
+
shim_files.select { |sf| sf[:exist] }.each do |sf|
|
22
|
+
require sf[:file]
|
23
|
+
end
|
24
|
+
nil
|
23
25
|
end
|
24
26
|
|
25
27
|
def register(name, file)
|
data/lib/k_domain/schemas/_.rb
CHANGED
@@ -53,6 +53,10 @@ module KDomain
|
|
53
53
|
attribute :name , Types::Strict::String.optional.default(nil)
|
54
54
|
attribute :type , Types::Strict::String.optional.default(nil)
|
55
55
|
attribute :exist , Types::Strict::Bool
|
56
|
+
|
57
|
+
def exist?
|
58
|
+
exist
|
59
|
+
end
|
56
60
|
end
|
57
61
|
|
58
62
|
attribute :name , Types::Strict::String
|
@@ -97,7 +101,7 @@ module KDomain
|
|
97
101
|
@columns_primary ||= columns_for_structure_types(:primary_key)
|
98
102
|
end
|
99
103
|
|
100
|
-
def
|
104
|
+
def columns_foreign_key
|
101
105
|
@columns_foreign ||= columns_for_structure_types(:foreign_key)
|
102
106
|
end
|
103
107
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
#
|
3
|
+
# MainDataset holds the entire domain model including database and ancillary information
|
4
4
|
module KDomain
|
5
5
|
module Schemas
|
6
|
-
class
|
6
|
+
class MainDataset < Dry::Struct
|
7
7
|
attribute :domain , KDomain::Schemas::Domain
|
8
8
|
attribute :database , KDomain::Schemas::Database
|
9
9
|
attribute :dictionary , KDomain::Schemas::Dictionary
|
data/lib/k_domain/version.rb
CHANGED
data/lib/k_domain.rb
CHANGED
@@ -12,7 +12,9 @@ require 'k_domain/raw_db_schema/load'
|
|
12
12
|
require 'k_domain/domain_model/transform'
|
13
13
|
require 'k_domain/domain_model/transform_steps/_'
|
14
14
|
require 'k_domain/domain_model/load'
|
15
|
+
require 'k_domain/domain_model/build_rich_models'
|
15
16
|
require 'k_domain/rails_code_extractor/_'
|
17
|
+
require 'k_domain/queries/_'
|
16
18
|
|
17
19
|
# # This is useful if you want to initialize structures via Hash
|
18
20
|
# class SymbolizeStruct < Dry::Struct
|
@@ -38,7 +40,7 @@ module KDomain
|
|
38
40
|
# Your code goes here...
|
39
41
|
end
|
40
42
|
|
41
|
-
if ENV
|
43
|
+
if ENV.fetch('KLUE_DEBUG', 'false').downcase == 'true'
|
42
44
|
namespace = 'KDomain::Version'
|
43
45
|
file_path = $LOADED_FEATURES.find { |f| f.include?('k_domain/version') }
|
44
46
|
version = KDomain::VERSION.ljust(9)
|
@@ -3,34 +3,5 @@ module ActionController
|
|
3
3
|
def self.require(require)
|
4
4
|
add(:require, require)
|
5
5
|
end
|
6
|
-
# def self.rescue_from(type)#, &block)
|
7
|
-
# # block_source = nil
|
8
|
-
# # block_source = lambda_source(block, 'default_scope') if block_given?
|
9
|
-
|
10
|
-
# add(:rescue_from, {
|
11
|
-
# type: type#,
|
12
|
-
# # block: block_source
|
13
|
-
# })
|
14
|
-
# end
|
15
|
-
# def self.helper_method(*names)
|
16
|
-
# add(:helper_method, {
|
17
|
-
# names: names
|
18
|
-
# })
|
19
|
-
# end
|
20
|
-
# def self.helper(name)
|
21
|
-
# add(:helper, {
|
22
|
-
# name: name
|
23
|
-
# })
|
24
|
-
# end
|
25
|
-
# def self.http_basic_authenticate_with(**opts)
|
26
|
-
# add(:http_basic_authenticate_with, {
|
27
|
-
# opts: opts
|
28
|
-
# })
|
29
|
-
# end
|
30
|
-
# def self.protect_from_forgery(**opts)
|
31
|
-
# add(:protect_from_forgery, {
|
32
|
-
# opts: opts
|
33
|
-
# })
|
34
|
-
# end
|
35
6
|
end
|
36
7
|
end
|
@@ -10,18 +10,14 @@ class Rails
|
|
10
10
|
)
|
11
11
|
end
|
12
12
|
end
|
13
|
-
class RegionConfig
|
14
|
-
def self.require_value(*_p, **_o, &block); end
|
15
|
-
end
|
16
|
-
|
17
13
|
class ApplicationController < ActionController::Base
|
14
|
+
def self.require(*_p, **_o); end
|
18
15
|
end
|
19
16
|
|
20
17
|
module Admin
|
21
18
|
class BaseController < ActionController::Base
|
22
19
|
end
|
23
20
|
end
|
24
|
-
|
25
21
|
module Api
|
26
22
|
module V1
|
27
23
|
class BaseController < ActionController::Base
|
@@ -38,12 +34,18 @@ module Portal
|
|
38
34
|
class BaseController < ApplicationController
|
39
35
|
end
|
40
36
|
end
|
41
|
-
|
42
37
|
module ActiveRecord
|
43
38
|
class RecordNotFound
|
44
39
|
end
|
45
40
|
end
|
46
|
-
|
41
|
+
class RegionConfig < ActiveRecord::Base
|
42
|
+
def self.require_value(*_p, **_o, &block)
|
43
|
+
return 'ABC'
|
44
|
+
end
|
45
|
+
def self.get_value
|
46
|
+
return 'ABC'
|
47
|
+
end
|
48
|
+
end
|
47
49
|
module Aws
|
48
50
|
class Credentials
|
49
51
|
def initialize(*_p, **_o, &block); end
|
@@ -41,17 +41,41 @@ module ApiLoggable; end
|
|
41
41
|
module Excludable; end
|
42
42
|
module Bookmarkable; end
|
43
43
|
module Categorizable; end
|
44
|
-
module PgSearch
|
44
|
+
module PgSearch
|
45
|
+
module Model
|
46
|
+
end
|
47
|
+
end
|
45
48
|
module Excludable; end
|
46
|
-
module JsonbStore
|
49
|
+
module JsonbStore
|
50
|
+
def self.included(klass)
|
51
|
+
klass.extend(ClassMethods)
|
52
|
+
end
|
47
53
|
|
54
|
+
module ClassMethods
|
55
|
+
def jsonb_store(*_p, **_o); end
|
56
|
+
end
|
57
|
+
end
|
48
58
|
module ActionView
|
49
59
|
module Helpers
|
50
60
|
module NumberHelper
|
51
61
|
end
|
52
62
|
end
|
53
63
|
end
|
54
|
-
|
64
|
+
module PrintSpeak
|
65
|
+
class Application
|
66
|
+
def self.google_oath_secret_key
|
67
|
+
'ABC'
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
class RegionConfig < ActiveRecord::Base
|
72
|
+
def self.require_value(*_p, **_o, &block)
|
73
|
+
'ABC'
|
74
|
+
end
|
75
|
+
def self.get_value
|
76
|
+
return 'ABC'
|
77
|
+
end
|
78
|
+
end
|
55
79
|
module RailsUpgrade
|
56
80
|
def rails4?
|
57
81
|
true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: k_domain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- lib/k_domain/config/_.rb
|
102
102
|
- lib/k_domain/config/config.rb
|
103
103
|
- lib/k_domain/config/configuration.rb
|
104
|
+
- lib/k_domain/domain_model/build_rich_models.rb
|
104
105
|
- lib/k_domain/domain_model/load.rb
|
105
106
|
- lib/k_domain/domain_model/transform.rb
|
106
107
|
- lib/k_domain/domain_model/transform_steps/_.rb
|
@@ -113,6 +114,9 @@ files:
|
|
113
114
|
- lib/k_domain/domain_model/transform_steps/step6_rails_structure_models.rb
|
114
115
|
- lib/k_domain/domain_model/transform_steps/step7_rails_structure_controllers.rb
|
115
116
|
- lib/k_domain/domain_model/transform_steps/step8_domain_columns.rb
|
117
|
+
- lib/k_domain/queries/_.rb
|
118
|
+
- lib/k_domain/queries/base_query.rb
|
119
|
+
- lib/k_domain/queries/domain_model_query.rb
|
116
120
|
- lib/k_domain/rails_code_extractor/_.rb
|
117
121
|
- lib/k_domain/rails_code_extractor/extract_controller.rb
|
118
122
|
- lib/k_domain/rails_code_extractor/extract_model.rb
|
@@ -140,9 +144,9 @@ files:
|
|
140
144
|
- lib/k_domain/schemas/domain/old/statistics.rb
|
141
145
|
- lib/k_domain/schemas/domain/old/validate.rb
|
142
146
|
- lib/k_domain/schemas/domain/old/validates.rb
|
143
|
-
- lib/k_domain/schemas/domain_model.rb
|
144
147
|
- lib/k_domain/schemas/domain_types.rb
|
145
148
|
- lib/k_domain/schemas/investigate.rb
|
149
|
+
- lib/k_domain/schemas/main_dataset.rb
|
146
150
|
- lib/k_domain/schemas/rails_resource.rb
|
147
151
|
- lib/k_domain/schemas/rails_structure.rb
|
148
152
|
- lib/k_domain/version.rb
|
@@ -171,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
175
|
requirements:
|
172
176
|
- - ">="
|
173
177
|
- !ruby/object:Gem::Version
|
174
|
-
version: '2.
|
178
|
+
version: '2.7'
|
175
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
180
|
requirements:
|
177
181
|
- - ">="
|