toolx 0.2.0 → 0.2.2
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/tasks/aliases.rake +4 -2
- data/lib/tasks/annotate_rb.rake +8 -1
- data/lib/tasks/types.rake +16 -0
- data/lib/templates/.annotaterb.yml +58 -0
- data/lib/templates/types.rb +4 -0
- data/lib/toolx/core/operation/params_wrapper.rb +2 -0
- data/lib/toolx/core/operation/response_wrapper.rb +2 -0
- data/lib/toolx/version.rb +1 -1
- data/lib/toolx.rb +1 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9155a4cd82106186e76da35529769fffb623cd797e5f2475835830a4c835655
|
4
|
+
data.tar.gz: cb4c8e54f4ffc0b163cdb5e9774bb17e5b759600d7e8a79b719f1067aa041783
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e5c3dd888e0962f0f89d7cb14f4e11a2ddc84a3695814ca0a9e4a23ec5ebc63694d2593ad3ef63e3ea9b6e444ac02a4d0b259b71a4ced70b5b8c0557c9795ad
|
7
|
+
data.tar.gz: a553bd9dc0cdc781153ea8c8d25773900d0448bff3b380c235cb42e2c66b1cee85af7dbfa6a8def379f0cb0c89fb1298eae489dc7d12fb9ec6f44be82da9f92e
|
data/lib/tasks/aliases.rake
CHANGED
@@ -2,7 +2,7 @@ namespace :toolx do
|
|
2
2
|
namespace :aliases do
|
3
3
|
desc 'Generate toolx_aliases.rb'
|
4
4
|
task :generate do
|
5
|
-
file_name = Rails.root.join('
|
5
|
+
file_name = Rails.root.join('config', 'initializers', 'toolx_aliases.rb')
|
6
6
|
return if File.exist?(file_name)
|
7
7
|
|
8
8
|
File.open(file_name, 'w') do |file|
|
@@ -14,6 +14,8 @@ namespace :toolx do
|
|
14
14
|
# DateTimeToBoolean = Toolx::Core::Concerns::DateTimeToBoolean
|
15
15
|
# CustomIdentifier = Toolx::Core::Concerns::CustomIdentifier
|
16
16
|
# Transformer = Toolx::Core::Concerns::Transformer
|
17
|
+
# Keygen = Toolx::Core::Concerns::Keygen
|
18
|
+
# Tokenizer = Toolx::Core::Concerns::Tokenizer
|
17
19
|
|
18
20
|
NestedError = Toolx::Core::Errors::NestedError
|
19
21
|
NestedStandardError = Toolx::Core::Errors::NestedStandardError
|
@@ -46,7 +48,7 @@ namespace :toolx do
|
|
46
48
|
RUBY
|
47
49
|
puts "\n"
|
48
50
|
puts "Add line below to config/application.rb"
|
49
|
-
puts "require_relative '
|
51
|
+
puts "require_relative 'initializers/toolx_aliases'"
|
50
52
|
end
|
51
53
|
end
|
52
54
|
end
|
data/lib/tasks/annotate_rb.rake
CHANGED
@@ -3,7 +3,14 @@ namespace :toolx do
|
|
3
3
|
desc 'Generate annotate rake tasks'
|
4
4
|
task :generate do
|
5
5
|
file_name = Rails.root.join('lib', 'tasks', 'annotate_rb.rake')
|
6
|
-
|
6
|
+
next puts "Already executed" if File.exist?(file_name)
|
7
|
+
|
8
|
+
template_root_path = File.expand_path("../templates", __dir__)
|
9
|
+
config_name = '.annotaterb.yml'
|
10
|
+
basic_configuration = File.read(File.join(template_root_path, config_name), trim_mode: '-')
|
11
|
+
File.write(Rails.root.join(config_name).to_s, basic_configuration)
|
12
|
+
|
13
|
+
puts "Basic configuration for annotate_rb gem created at #{config_name}"
|
7
14
|
|
8
15
|
File.open(file_name, 'w') do |file|
|
9
16
|
file.write <<~RUBY
|
@@ -0,0 +1,16 @@
|
|
1
|
+
namespace :toolx do
|
2
|
+
namespace :types do
|
3
|
+
desc 'Generate types.rb initializer for custom types (operations, etc.)'
|
4
|
+
task :generate do
|
5
|
+
file_name = Rails.root.join('config', 'initializers', 'types.rb')
|
6
|
+
next puts "Already executed" if File.exist?(file_name)
|
7
|
+
|
8
|
+
template_root_path = File.expand_path("../templates", __dir__)
|
9
|
+
source_file_name = 'types.rb'
|
10
|
+
source = File.read(File.join(template_root_path, source_file_name), trim_mode: '-')
|
11
|
+
File.write(Rails.root.join(file_name).to_s, source)
|
12
|
+
|
13
|
+
puts "Types generated at #{Pathname.new(file_name).relative_path_from(Rails.root)}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
:position: before
|
3
|
+
:position_in_additional_file_patterns: before
|
4
|
+
:position_in_class: after
|
5
|
+
:position_in_factory: after
|
6
|
+
:position_in_fixture: after
|
7
|
+
:position_in_routes: after
|
8
|
+
:position_in_serializer: after
|
9
|
+
:position_in_test: after
|
10
|
+
:classified_sort: true
|
11
|
+
:exclude_controllers: true
|
12
|
+
:exclude_factories: false
|
13
|
+
:exclude_fixtures: true
|
14
|
+
:exclude_helpers: true
|
15
|
+
:exclude_scaffolds: true
|
16
|
+
:exclude_serializers: false
|
17
|
+
:exclude_sti_subclasses: false
|
18
|
+
:exclude_tests: true
|
19
|
+
:force: false
|
20
|
+
:format_markdown: false
|
21
|
+
:format_rdoc: false
|
22
|
+
:format_yard: false
|
23
|
+
:frozen: false
|
24
|
+
:ignore_model_sub_dir: false
|
25
|
+
:ignore_unknown_models: false
|
26
|
+
:include_version: false
|
27
|
+
:show_check_constraints: false
|
28
|
+
:show_complete_foreign_keys: false
|
29
|
+
:show_foreign_keys: true
|
30
|
+
:show_indexes: true
|
31
|
+
:simple_indexes: false
|
32
|
+
:sort: true
|
33
|
+
:timestamp: false
|
34
|
+
:trace: false
|
35
|
+
:with_comment: true
|
36
|
+
:with_column_comments: true
|
37
|
+
:with_table_comments: true
|
38
|
+
:active_admin: false
|
39
|
+
:command:
|
40
|
+
:debug: false
|
41
|
+
:hide_default_column_types: ''
|
42
|
+
:hide_limit_column_types: ''
|
43
|
+
:ignore_columns:
|
44
|
+
:ignore_routes:
|
45
|
+
:models: true
|
46
|
+
:routes: false
|
47
|
+
:skip_on_db_migrate: false
|
48
|
+
:target_action: :do_annotations
|
49
|
+
:wrapper:
|
50
|
+
:wrapper_close:
|
51
|
+
:wrapper_open:
|
52
|
+
:classes_default_to_s: []
|
53
|
+
:additional_file_patterns: []
|
54
|
+
:model_dir:
|
55
|
+
- app/models
|
56
|
+
:require: []
|
57
|
+
:root_dir:
|
58
|
+
- ''
|
data/lib/toolx/version.rb
CHANGED
data/lib/toolx.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toolx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pawel Niemczyk
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-06-
|
10
|
+
date: 2025-06-29 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: statesman
|
@@ -281,9 +281,12 @@ files:
|
|
281
281
|
- lib/tasks/aliases.rake
|
282
282
|
- lib/tasks/annotate_rb.rake
|
283
283
|
- lib/tasks/stateman.rake
|
284
|
+
- lib/tasks/types.rake
|
285
|
+
- lib/templates/.annotaterb.yml
|
284
286
|
- lib/templates/stateman/migration.rb.erb
|
285
287
|
- lib/templates/stateman/state_machine.rb.erb
|
286
288
|
- lib/templates/stateman/transition.rb.erb
|
289
|
+
- lib/templates/types.rb
|
287
290
|
- lib/toolx.rb
|
288
291
|
- lib/toolx/core/concerns/custom_identifier.rb
|
289
292
|
- lib/toolx/core/concerns/date_time_to_boolean.rb
|
@@ -332,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
335
|
- !ruby/object:Gem::Version
|
333
336
|
version: '0'
|
334
337
|
requirements: []
|
335
|
-
rubygems_version: 3.6.
|
338
|
+
rubygems_version: 3.6.3
|
336
339
|
specification_version: 4
|
337
340
|
summary: Toolx is a set of tools for Ruby on Rails applications that simplifies common
|
338
341
|
tasks and enhances development experience.
|