arfi 0.5.1 → 1.0.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/.env.sample +2 -0
- data/.rspec +1 -0
- data/.rubocop.yml +8 -1
- data/.rubocop_todo.yml +12 -0
- data/CHANGELOG.md +94 -0
- data/CODE_OF_CONDUCT.md +5 -1
- data/CONTRIBUTING.md +26 -0
- data/README.md +327 -118
- data/SECURITY.md +17 -0
- data/Steepfile +1 -29
- data/compose.yml +33 -0
- data/docscribe.yml +92 -0
- data/gemfiles/rails_6_0.gemfile +11 -0
- data/gemfiles/rails_6_1.gemfile +11 -0
- data/gemfiles/rails_7_0.gemfile +9 -0
- data/gemfiles/rails_7_1.gemfile +10 -0
- data/gemfiles/rails_7_2.gemfile +10 -0
- data/gemfiles/rails_8_0.gemfile +10 -0
- data/gemfiles/rails_8_1.gemfile +10 -0
- data/lib/arfi/cli.rb +24 -9
- data/lib/arfi/commands/f_idx.rb +5 -230
- data/lib/arfi/commands/functions.rb +128 -0
- data/lib/arfi/commands/functions_candidates.rb +133 -0
- data/lib/arfi/commands/functions_creation.rb +157 -0
- data/lib/arfi/commands/functions_helpers.rb +181 -0
- data/lib/arfi/commands/functions_paths.rb +131 -0
- data/lib/arfi/commands/functions_rendering.rb +137 -0
- data/lib/arfi/commands/init.rb +88 -0
- data/lib/arfi/commands/project.rb +5 -51
- data/lib/arfi/errors.rb +15 -3
- data/lib/arfi/extensions/active_record/base.rb +33 -23
- data/lib/arfi/extensions/active_record/connection_adapters/postgresql/database_statements.rb +159 -24
- data/lib/arfi/sql_function_loader.rb +289 -90
- data/lib/arfi/tasks/db.rake +60 -18
- data/lib/arfi/version.rb +1 -1
- data/lib/arfi.rb +2 -0
- data/rbs_collection.lock.yaml +93 -61
- data/sig/compat/active_record_base_compat.rbs +17 -0
- data/sig/compat/thor_dsl.rbs +8 -0
- data/sig/lib/arfi/commands/f_idx.rbs +5 -103
- data/sig/lib/arfi/commands/functions.rbs +99 -0
- data/sig/lib/arfi/commands/functions_candidates.rbs +25 -0
- data/sig/lib/arfi/commands/functions_creation.rbs +29 -0
- data/sig/lib/arfi/commands/functions_helpers.rbs +41 -0
- data/sig/lib/arfi/commands/functions_paths.rbs +25 -0
- data/sig/lib/arfi/commands/functions_rendering.rbs +25 -0
- data/sig/lib/arfi/commands/init.rbs +22 -0
- data/sig/lib/arfi/commands/project.rbs +5 -24
- data/sig/lib/arfi/extensions/active_record/base.rbs +5 -10
- data/sig/lib/arfi/extensions/active_record/connection_adapters/postgresql/database_statements.rbs +28 -0
- data/sig/lib/arfi/sql_function_loader.rbs +45 -87
- data/sig/lib/arfi/tasks/db.rbs +3 -0
- data/sig/lib/arfi/version.rbs +1 -1
- metadata +125 -14
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Arfi
|
|
2
|
+
module Commands
|
|
3
|
+
module FunctionsCandidates : Arfi::Commands::Functions
|
|
4
|
+
DEFAULT_SCHEMA: "public"
|
|
5
|
+
|
|
6
|
+
private
|
|
7
|
+
|
|
8
|
+
def collect_all_candidates: (::Pathname root, String adapter) -> Array[candidate]
|
|
9
|
+
|
|
10
|
+
def group_candidates_by_key: (Array[candidate] candidates) -> ::Hash[String, Array[candidate]]
|
|
11
|
+
|
|
12
|
+
def build_resolved_rows: (::Hash[String, Array[candidate]] by_key) -> Array[::Hash[Symbol, untyped]]
|
|
13
|
+
|
|
14
|
+
def generic_candidates: (::Pathname root) -> Array[candidate]
|
|
15
|
+
|
|
16
|
+
def adapter_candidates: (::Pathname adapter_root, String adapter) -> Array[candidate]
|
|
17
|
+
|
|
18
|
+
def collect_postgresql_schema_candidates: (::Pathname adapter_root, String adapter) -> Array[candidate]
|
|
19
|
+
|
|
20
|
+
def collect_candidates: (glob: ::Pathname, schema: String, source: String, origin: String, priority: Integer) -> Array[candidate]
|
|
21
|
+
|
|
22
|
+
def rel: (::Pathname | String path) -> String
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
module Arfi
|
|
2
|
+
module Commands
|
|
3
|
+
module FunctionsCreation : Arfi::Commands::Functions
|
|
4
|
+
DEFAULT_SCHEMA: "public"
|
|
5
|
+
|
|
6
|
+
ROOT_DIR: "db/functions"
|
|
7
|
+
|
|
8
|
+
ADAPTERS: ::Array[:postgresql | :mysql | :trilogy]
|
|
9
|
+
|
|
10
|
+
private
|
|
11
|
+
|
|
12
|
+
def ensure_dirs!: (adapter: String?, schema: String?) -> void
|
|
13
|
+
|
|
14
|
+
def write_file: (String? schema, String function_name, String content) -> void
|
|
15
|
+
|
|
16
|
+
def remove_function_file: (String? schema, String function_name) -> void
|
|
17
|
+
|
|
18
|
+
def build_postgresql_skeleton: (String? schema, String function_name) -> String
|
|
19
|
+
|
|
20
|
+
def build_mysql_skeleton: (String function_name) -> String
|
|
21
|
+
|
|
22
|
+
def evaluate_template: (String function_name, String? schema_name, String qualified_name, String original_ref) -> untyped
|
|
23
|
+
|
|
24
|
+
def build_sql_function: (String? schema, String function_name, original_ref: String) -> String
|
|
25
|
+
|
|
26
|
+
def build_from_file: (String? schema, String function_name, original_ref: String) -> String
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Arfi
|
|
2
|
+
module Commands
|
|
3
|
+
module FunctionsHelpers : Arfi::Commands::Functions
|
|
4
|
+
ADAPTERS: ::Array[:postgresql | :mysql | :trilogy]
|
|
5
|
+
|
|
6
|
+
IDENT: ::Regexp
|
|
7
|
+
|
|
8
|
+
DEFAULT_SCHEMA: "public"
|
|
9
|
+
|
|
10
|
+
ROOT_DIR: "db/functions"
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def validate_schema_format!: () -> void
|
|
15
|
+
|
|
16
|
+
def validate_adapter_option!: () -> void
|
|
17
|
+
|
|
18
|
+
def parse_function_ref: (String ref) -> [String?, String]
|
|
19
|
+
|
|
20
|
+
def validate_identifiers!: (String? schema, String function_name) -> void
|
|
21
|
+
|
|
22
|
+
def validate_function_ref!: (String ref) -> void
|
|
23
|
+
|
|
24
|
+
def check_schema_conflict!: (String? parsed_schema) -> void
|
|
25
|
+
|
|
26
|
+
def resolve_schema_name: (String? schema) -> String?
|
|
27
|
+
|
|
28
|
+
def resolve_adapter: () -> String
|
|
29
|
+
|
|
30
|
+
def resolve_functions_for: (adapter: String) -> Array[::Hash[Symbol, untyped]]
|
|
31
|
+
|
|
32
|
+
def adapter_opt: () -> String?
|
|
33
|
+
|
|
34
|
+
def infer_adapter_from_config: () -> String?
|
|
35
|
+
|
|
36
|
+
def schema_opt: () -> String?
|
|
37
|
+
|
|
38
|
+
def primary_db_config: () -> untyped
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Arfi
|
|
2
|
+
module Commands
|
|
3
|
+
module FunctionsPaths : Arfi::Commands::Functions
|
|
4
|
+
ROOT_DIR: "db/functions"
|
|
5
|
+
|
|
6
|
+
DEFAULT_SCHEMA: "public"
|
|
7
|
+
|
|
8
|
+
private
|
|
9
|
+
|
|
10
|
+
def canonical_path: (String? schema, String function_name) -> String
|
|
11
|
+
|
|
12
|
+
def function_paths: (String? schema, String function_name) -> Array[String]
|
|
13
|
+
|
|
14
|
+
def generic_canonical_path: (::Pathname root, String? schema, String function_name) -> String
|
|
15
|
+
|
|
16
|
+
def adapter_canonical_path: (::Pathname root, String? schema, String function_name) -> String
|
|
17
|
+
|
|
18
|
+
def generic_function_paths: (::Pathname root, String function_name) -> Array[String]
|
|
19
|
+
|
|
20
|
+
def postgresql_function_paths: (::Pathname root, String? schema, String function_name) -> Array[String]
|
|
21
|
+
|
|
22
|
+
def mysql_function_paths: (::Pathname root, String function_name) -> Array[String]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Arfi
|
|
2
|
+
module Commands
|
|
3
|
+
module FunctionsRendering : Arfi::Commands::Functions
|
|
4
|
+
private
|
|
5
|
+
|
|
6
|
+
def print_table: (Array[::Hash[Symbol, untyped]] rows) -> void
|
|
7
|
+
|
|
8
|
+
def render_list: (Array[::Hash[Symbol, untyped]] rows) -> void
|
|
9
|
+
|
|
10
|
+
def table_columns: () -> Array[String]
|
|
11
|
+
|
|
12
|
+
def stringify_rows: (Array[::Hash[Symbol, untyped]] rows) -> Array[::Hash[Symbol, untyped]]
|
|
13
|
+
|
|
14
|
+
def calculate_widths: (Array[String] cols, Array[::Hash[Symbol, untyped]] table) -> ::Hash[String, Integer]
|
|
15
|
+
|
|
16
|
+
def render_table_rows: (Array[::Hash[Symbol, untyped]] table, Array[String] cols, ::Hash[String, Integer] widths) -> void
|
|
17
|
+
|
|
18
|
+
def resolve_key_group: (Array[candidate] arr) -> Array[::Hash[Symbol, untyped]]
|
|
19
|
+
|
|
20
|
+
def all_mode_rows: (Array[candidate] arr, candidate chosen) -> Array[::Hash[Symbol, untyped]]
|
|
21
|
+
|
|
22
|
+
def default_mode_row: (candidate chosen, Array[candidate] arr) -> Array[::Hash[Symbol, untyped]]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Arfi
|
|
2
|
+
module Commands
|
|
3
|
+
class Init < Thor
|
|
4
|
+
ADAPTERS: ::Array[:postgresql | :mysql]
|
|
5
|
+
|
|
6
|
+
ROOT_DIR: "db/functions"
|
|
7
|
+
|
|
8
|
+
DEFAULT_SCHEMA: "public"
|
|
9
|
+
|
|
10
|
+
# steep:ignore:end
|
|
11
|
+
def create: () -> void
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def validate_schema_format!: () -> void
|
|
16
|
+
|
|
17
|
+
def create_base_dirs: () -> void
|
|
18
|
+
|
|
19
|
+
def create_adapter_dirs: () -> void
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -1,28 +1,9 @@
|
|
|
1
1
|
module Arfi
|
|
2
2
|
module Commands
|
|
3
|
-
class
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# This command is used to create `db/functions` directory.
|
|
9
|
-
#
|
|
10
|
-
# @example
|
|
11
|
-
# bundle exec arfi project create
|
|
12
|
-
# @return [void]
|
|
13
|
-
# @raise [Arfi::Errors::InvalidSchemaFormat] if ActiveRecord.schema_format is not :ruby.
|
|
14
|
-
def create: () -> void
|
|
15
|
-
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
# +Arfi::Commands::Project#functions_dir+ -> Pathname
|
|
19
|
-
#
|
|
20
|
-
# Helper method to get path to `db/functions` directory.
|
|
21
|
-
#
|
|
22
|
-
# @!visibility private
|
|
23
|
-
# @private
|
|
24
|
-
# @return [Pathname] Path to `db/functions` directory
|
|
25
|
-
def functions_dir: () -> Pathname
|
|
26
|
-
end
|
|
3
|
+
# +Arfi::Commands::Project+ class is used to create `db/functions` directory.
|
|
4
|
+
#
|
|
5
|
+
# Backward-compatible constant for code that references Arfi::Commands::Project.
|
|
6
|
+
# @deprecated
|
|
7
|
+
Project: untyped
|
|
27
8
|
end
|
|
28
9
|
end
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
module ActiveRecord
|
|
2
2
|
class Base
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# ActiveRecord::Base.function_exists?('my_function') #=> true
|
|
9
|
-
# ActiveRecord::Base.function_exists?('my_function123') #=> false
|
|
10
|
-
# @param [String] function_name The name of the function to check.
|
|
11
|
-
# @return [Boolean] Returns true if the function exists, false otherwise.
|
|
12
|
-
def self.function_exists?: (string function_name) -> bool
|
|
3
|
+
def self.function_exists?: (String function_name) -> bool
|
|
4
|
+
|
|
5
|
+
def self.pg_function_exists?: (String function_name) -> bool
|
|
6
|
+
|
|
7
|
+
def self.mysql_function_exists?: (String function_name) -> bool
|
|
13
8
|
end
|
|
14
9
|
end
|
data/sig/lib/arfi/extensions/active_record/connection_adapters/postgresql/database_statements.rbs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Arfi
|
|
2
|
+
module PostgreSQL
|
|
3
|
+
module DatabaseStatementsPatch
|
|
4
|
+
ARFI_UNDEFINED_FUNCTION: ::Regexp
|
|
5
|
+
|
|
6
|
+
THREAD_GUARD_KEY: :arfi_reloading_functions
|
|
7
|
+
|
|
8
|
+
# Rails 6/7: SELECT often goes through exec_query
|
|
9
|
+
def exec_query: (*untyped args, **untyped kwargs) -> untyped
|
|
10
|
+
|
|
11
|
+
# DDL often goes through execute
|
|
12
|
+
def execute: (*untyped args, **untyped kwargs) -> untyped
|
|
13
|
+
|
|
14
|
+
# Rails 7+/8 may use raw_execute
|
|
15
|
+
def raw_execute: (*untyped args, **untyped kwargs) -> untyped
|
|
16
|
+
|
|
17
|
+
def internal_exec_query: (*untyped args, **untyped kwargs) -> untyped
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
def arfi_try_reload_and_retry?: (untyped e) -> (false | true)
|
|
22
|
+
|
|
23
|
+
def arfi_extract_function_ident: (untyped message) -> (::Array[nil] | untyped)
|
|
24
|
+
|
|
25
|
+
def arfi_has_function_file_for?: (untyped schema, untyped fn) -> (false | untyped)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -1,94 +1,52 @@
|
|
|
1
1
|
module Arfi
|
|
2
|
-
|
|
2
|
+
type sql_file_item = {
|
|
3
|
+
schema: String,
|
|
4
|
+
base: String,
|
|
5
|
+
path: String,
|
|
6
|
+
priority: Integer
|
|
7
|
+
}
|
|
8
|
+
|
|
3
9
|
class SqlFunctionLoader
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# +Arfi::SqlFunctionLoader.load!+ -> (nil | void)
|
|
7
|
-
#
|
|
8
|
-
# Loads user defined SQL functions into database.
|
|
9
|
-
#
|
|
10
|
-
# @param task_name [String|nil] Name of the task.
|
|
11
|
-
# @return [nil] if there is no `db/functions` directory.
|
|
12
|
-
# @return [void] if there is no errors.
|
|
13
|
-
# @raise [Arfi::Errors::AdapterNotSupported] if database adapter is SQLite.
|
|
14
|
-
def self.load!: (task_name: nil | String) -> (nil | untyped)
|
|
15
|
-
|
|
16
|
-
# +Arfi::SqlFunctionLoader#sql_functions_by_adapter+ -> Array<String>
|
|
17
|
-
#
|
|
18
|
-
# Helper method to get list of SQL files for specific database adapter.
|
|
19
|
-
#
|
|
20
|
-
# @!visibility private
|
|
21
|
-
# @private
|
|
22
|
-
# @return [Array<String>] List of SQL files.
|
|
23
|
-
# @raise [Arfi::Errors::AdapterNotSupported] if database adapter is not supported.
|
|
24
|
-
def self.sql_functions_by_adapter: -> Array[String]
|
|
25
|
-
|
|
26
|
-
# +Arfi::SqlFunctionLoader#multi_db?+ -> Boolean
|
|
27
|
-
#
|
|
28
|
-
# Checks if the application has been configured to work with multiple databases.
|
|
29
|
-
#
|
|
30
|
-
# @return [Boolean]
|
|
31
|
-
def self.multi_db?: -> bool
|
|
32
|
-
|
|
33
|
-
# +Arfi::SqlFunctionLoader#populate_multiple_db+ -> void
|
|
34
|
-
#
|
|
35
|
-
# Loads user defined SQL functions into all databases.
|
|
36
|
-
#
|
|
37
|
-
# @!visibility private
|
|
38
|
-
# @private
|
|
39
|
-
# @return [void]
|
|
40
|
-
# @see Arfi::SqlFunctionLoader#multi_db?
|
|
41
|
-
# @see Arfi::SqlFunctionLoader#populate_db
|
|
42
|
-
def self.populate_multiple_db: -> void
|
|
43
|
-
|
|
44
|
-
# +Arfi::SqlFunctionLoader#raise_unless_supported_adapter+ -> void
|
|
45
|
-
#
|
|
46
|
-
# Checks if the database adapter is supported.
|
|
47
|
-
#
|
|
48
|
-
# @return [void]
|
|
49
|
-
# @raise [Arfi::Errors::AdapterNotSupported]
|
|
50
|
-
def self.raise_unless_supported_adapter: -> void
|
|
51
|
-
|
|
52
|
-
# +Arfi::SqlFunctionLoader#handle_db_population+ -> void
|
|
53
|
-
#
|
|
54
|
-
# Loads user defined SQL functions into database. This conditional branch was written this way because if we
|
|
55
|
-
# call db:migrate:db_name, then task_name will not be nil, but it will be zero if we call db:migrate. Then we
|
|
56
|
-
# check that the application has been configured to work with multiple databases in order to populate all
|
|
57
|
-
# databases, and only after this check can we populate the database in case the db:migrate (or any other) task
|
|
58
|
-
# has been called for configuration with a single database. Go to `lib/arfi/tasks/db.rake` for additional info.
|
|
59
|
-
#
|
|
60
|
-
# @!visibility private
|
|
61
|
-
# @private
|
|
62
|
-
# @return [void]
|
|
63
|
-
def self.handle_db_population: -> untyped
|
|
10
|
+
def self.load!: (?task_name: String?, ?connection: ::ActiveRecord::ConnectionAdapters::AbstractAdapter?, ?clear_active_connections: bool, ?verbose: bool) -> void
|
|
64
11
|
|
|
65
12
|
private
|
|
66
13
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
def self.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
14
|
+
def self.default_connection: () -> ::ActiveRecord::ConnectionAdapters::AbstractAdapter
|
|
15
|
+
|
|
16
|
+
def self.raise_unless_supported_adapter: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn) -> void
|
|
17
|
+
|
|
18
|
+
def self.multi_db?: () -> bool
|
|
19
|
+
|
|
20
|
+
def self.populate_multiple_db: (verbose: bool, ?task_name: String?) -> void
|
|
21
|
+
|
|
22
|
+
def self.current_db_config: () -> untyped
|
|
23
|
+
|
|
24
|
+
def self.populate_db: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn, verbose: bool, task_name: String?) -> void
|
|
25
|
+
|
|
26
|
+
def self.clear_active_connections_if_needed: (bool clear) -> void
|
|
27
|
+
|
|
28
|
+
def self.load_sql_file: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn, ::Pathname | String file, bool verbose, String? task_name) -> void
|
|
29
|
+
|
|
30
|
+
def self.log_sql_load: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn, ::Pathname | String file, String? task_name) -> void
|
|
31
|
+
|
|
32
|
+
def self.safe_db_env: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn) -> String
|
|
33
|
+
|
|
34
|
+
def self.safe_db_name: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn) -> String
|
|
35
|
+
|
|
36
|
+
def self.log: (::ActiveRecord::ConnectionAdapters::AbstractAdapter _conn, String msg) -> void
|
|
37
|
+
|
|
38
|
+
def self.sql_files: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn) -> Array[String]
|
|
39
|
+
|
|
40
|
+
def self.collect_adapter_sql_files: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn, ::Pathname adapter_root) -> Array[sql_file_item]
|
|
41
|
+
|
|
42
|
+
def self.collect_postgresql_sql_files: (::Pathname adapter_root) -> Array[sql_file_item]
|
|
43
|
+
|
|
44
|
+
def self.collect_adapter_public_sql_files: (::Pathname adapter_root) -> Array[sql_file_item]
|
|
45
|
+
|
|
46
|
+
def self.collect_sql: (glob: ::Pathname | String, schema: String, priority: Integer) -> Array[sql_file_item]
|
|
47
|
+
|
|
48
|
+
def self.finalize_items: (Array[sql_file_item] items) -> Array[String]
|
|
49
|
+
|
|
50
|
+
def self.adapter_root_for: (::ActiveRecord::ConnectionAdapters::AbstractAdapter conn, ::Pathname root) -> ::Pathname
|
|
93
51
|
end
|
|
94
52
|
end
|
data/sig/lib/arfi/version.rbs
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: arfi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- unurgunite
|
|
@@ -51,6 +51,34 @@ dependencies:
|
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: '1.3'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: docscribe
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '1.4'
|
|
61
|
+
type: :development
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - "~>"
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '1.4'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: dotenv
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0'
|
|
75
|
+
type: :development
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - ">="
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0'
|
|
54
82
|
- !ruby/object:Gem::Dependency
|
|
55
83
|
name: irb
|
|
56
84
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -66,19 +94,33 @@ dependencies:
|
|
|
66
94
|
- !ruby/object:Gem::Version
|
|
67
95
|
version: '1.15'
|
|
68
96
|
- !ruby/object:Gem::Dependency
|
|
69
|
-
name:
|
|
97
|
+
name: mysql2
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '0'
|
|
103
|
+
type: :development
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: '0'
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: pg
|
|
70
112
|
requirement: !ruby/object:Gem::Requirement
|
|
71
113
|
requirements:
|
|
72
114
|
- - ">="
|
|
73
115
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: 0
|
|
116
|
+
version: '0'
|
|
75
117
|
type: :development
|
|
76
118
|
prerelease: false
|
|
77
119
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
120
|
requirements:
|
|
79
121
|
- - ">="
|
|
80
122
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: 0
|
|
123
|
+
version: '0'
|
|
82
124
|
- !ruby/object:Gem::Dependency
|
|
83
125
|
name: rspec
|
|
84
126
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -107,6 +149,48 @@ dependencies:
|
|
|
107
149
|
- - ">="
|
|
108
150
|
- !ruby/object:Gem::Version
|
|
109
151
|
version: '1.21'
|
|
152
|
+
- !ruby/object:Gem::Dependency
|
|
153
|
+
name: rubocop-performance
|
|
154
|
+
requirement: !ruby/object:Gem::Requirement
|
|
155
|
+
requirements:
|
|
156
|
+
- - ">="
|
|
157
|
+
- !ruby/object:Gem::Version
|
|
158
|
+
version: '0'
|
|
159
|
+
type: :development
|
|
160
|
+
prerelease: false
|
|
161
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
162
|
+
requirements:
|
|
163
|
+
- - ">="
|
|
164
|
+
- !ruby/object:Gem::Version
|
|
165
|
+
version: '0'
|
|
166
|
+
- !ruby/object:Gem::Dependency
|
|
167
|
+
name: rubocop-rspec
|
|
168
|
+
requirement: !ruby/object:Gem::Requirement
|
|
169
|
+
requirements:
|
|
170
|
+
- - ">="
|
|
171
|
+
- !ruby/object:Gem::Version
|
|
172
|
+
version: '0'
|
|
173
|
+
type: :development
|
|
174
|
+
prerelease: false
|
|
175
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
176
|
+
requirements:
|
|
177
|
+
- - ">="
|
|
178
|
+
- !ruby/object:Gem::Version
|
|
179
|
+
version: '0'
|
|
180
|
+
- !ruby/object:Gem::Dependency
|
|
181
|
+
name: rubocop-sorted_methods_by_call
|
|
182
|
+
requirement: !ruby/object:Gem::Requirement
|
|
183
|
+
requirements:
|
|
184
|
+
- - "~>"
|
|
185
|
+
- !ruby/object:Gem::Version
|
|
186
|
+
version: '1.2'
|
|
187
|
+
type: :development
|
|
188
|
+
prerelease: false
|
|
189
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
190
|
+
requirements:
|
|
191
|
+
- - "~>"
|
|
192
|
+
- !ruby/object:Gem::Version
|
|
193
|
+
version: '1.2'
|
|
110
194
|
- !ruby/object:Gem::Dependency
|
|
111
195
|
name: steep
|
|
112
196
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -135,32 +219,48 @@ dependencies:
|
|
|
135
219
|
- - "~>"
|
|
136
220
|
- !ruby/object:Gem::Version
|
|
137
221
|
version: 0.9.37
|
|
138
|
-
description:
|
|
139
|
-
|
|
140
|
-
the project without switching to structure.sql.
|
|
141
|
-
|
|
142
|
-
'
|
|
143
|
-
email:
|
|
144
|
-
- senpaiguru1488@gmail.com
|
|
222
|
+
description: |
|
|
223
|
+
ARFI — ActiveRecord Functions Integration. Provides the ability to create and maintain SQL functions that
|
|
224
|
+
can be used across the project without switching to structure.sql.
|
|
145
225
|
executables:
|
|
146
226
|
- arfi
|
|
147
227
|
extensions: []
|
|
148
228
|
extra_rdoc_files: []
|
|
149
229
|
files:
|
|
230
|
+
- ".env.sample"
|
|
150
231
|
- ".rspec"
|
|
151
232
|
- ".rubocop.yml"
|
|
233
|
+
- ".rubocop_todo.yml"
|
|
152
234
|
- ".ruby-version"
|
|
153
235
|
- CHANGELOG.md
|
|
154
236
|
- CODE_OF_CONDUCT.md
|
|
237
|
+
- CONTRIBUTING.md
|
|
155
238
|
- LICENSE.txt
|
|
156
239
|
- README.md
|
|
157
240
|
- Rakefile
|
|
241
|
+
- SECURITY.md
|
|
158
242
|
- Steepfile
|
|
243
|
+
- compose.yml
|
|
244
|
+
- docscribe.yml
|
|
159
245
|
- exe/arfi
|
|
246
|
+
- gemfiles/rails_6_0.gemfile
|
|
247
|
+
- gemfiles/rails_6_1.gemfile
|
|
248
|
+
- gemfiles/rails_7_0.gemfile
|
|
249
|
+
- gemfiles/rails_7_1.gemfile
|
|
250
|
+
- gemfiles/rails_7_2.gemfile
|
|
251
|
+
- gemfiles/rails_8_0.gemfile
|
|
252
|
+
- gemfiles/rails_8_1.gemfile
|
|
160
253
|
- lib/arfi.rb
|
|
161
254
|
- lib/arfi/Rakefile
|
|
162
255
|
- lib/arfi/cli.rb
|
|
163
256
|
- lib/arfi/commands/f_idx.rb
|
|
257
|
+
- lib/arfi/commands/functions.rb
|
|
258
|
+
- lib/arfi/commands/functions_candidates.rb
|
|
259
|
+
- lib/arfi/commands/functions_creation.rb
|
|
260
|
+
- lib/arfi/commands/functions_helpers.rb
|
|
261
|
+
- lib/arfi/commands/functions_paths.rb
|
|
262
|
+
- lib/arfi/commands/functions_rendering.rb
|
|
263
|
+
- lib/arfi/commands/init.rb
|
|
164
264
|
- lib/arfi/commands/project.rb
|
|
165
265
|
- lib/arfi/errors.rb
|
|
166
266
|
- lib/arfi/extensions/active_record/base.rb
|
|
@@ -174,13 +274,24 @@ files:
|
|
|
174
274
|
- rbs_collection.lock.yaml
|
|
175
275
|
- rbs_collection.yaml
|
|
176
276
|
- sig/arfi.rbs
|
|
277
|
+
- sig/compat/active_record_base_compat.rbs
|
|
278
|
+
- sig/compat/thor_dsl.rbs
|
|
177
279
|
- sig/lib/arfi/cli.rbs
|
|
178
280
|
- sig/lib/arfi/commands/f_idx.rbs
|
|
281
|
+
- sig/lib/arfi/commands/functions.rbs
|
|
282
|
+
- sig/lib/arfi/commands/functions_candidates.rbs
|
|
283
|
+
- sig/lib/arfi/commands/functions_creation.rbs
|
|
284
|
+
- sig/lib/arfi/commands/functions_helpers.rbs
|
|
285
|
+
- sig/lib/arfi/commands/functions_paths.rbs
|
|
286
|
+
- sig/lib/arfi/commands/functions_rendering.rbs
|
|
287
|
+
- sig/lib/arfi/commands/init.rbs
|
|
179
288
|
- sig/lib/arfi/commands/project.rbs
|
|
180
289
|
- sig/lib/arfi/errors.rbs
|
|
181
290
|
- sig/lib/arfi/extensions/active_record/base.rbs
|
|
291
|
+
- sig/lib/arfi/extensions/active_record/connection_adapters/postgresql/database_statements.rbs
|
|
182
292
|
- sig/lib/arfi/railtie.rbs
|
|
183
293
|
- sig/lib/arfi/sql_function_loader.rbs
|
|
294
|
+
- sig/lib/arfi/tasks/db.rbs
|
|
184
295
|
- sig/lib/arfi/version.rbs
|
|
185
296
|
homepage: https://github.com/unurgunite/arfi
|
|
186
297
|
licenses:
|
|
@@ -198,14 +309,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
198
309
|
requirements:
|
|
199
310
|
- - ">="
|
|
200
311
|
- !ruby/object:Gem::Version
|
|
201
|
-
version: '
|
|
312
|
+
version: '2.7'
|
|
202
313
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
314
|
requirements:
|
|
204
315
|
- - ">="
|
|
205
316
|
- !ruby/object:Gem::Version
|
|
206
317
|
version: '0'
|
|
207
318
|
requirements: []
|
|
208
|
-
rubygems_version:
|
|
319
|
+
rubygems_version: 4.0.13
|
|
209
320
|
specification_version: 4
|
|
210
|
-
summary: ActiveRecord
|
|
321
|
+
summary: ActiveRecord Functions Integration.
|
|
211
322
|
test_files: []
|