csvbuilder-dynamic-columns-core 0.1.1 → 0.1.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/.rubocop.yml +2 -2
- data/.tool-versions +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +77 -51
- data/README.md +4 -0
- data/gemfiles/{Gemfile.5.2._gemfile → Gemfile.8.0._gemfile} +1 -1
- data/lib/csvbuilder/dynamic/columns/core/concerns/dynamic_columns_base.rb +1 -0
- data/lib/csvbuilder/dynamic/columns/core/internal/dynamic_column_attribute_base.rb +23 -4
- data/lib/csvbuilder/dynamic/columns/core/version.rb +1 -1
- metadata +19 -14
- data/gemfiles/Gemfile.6.1._gemfile +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99c7a32415edfe0c4a0e96334efc38324f4d40084d53654116c34259adb509be
|
4
|
+
data.tar.gz: 113d6cb9f651d3722b3985a12dc74df8438f5eb62e8f76daa9e80b7cd283a005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d198549961191ea64da224f1a6a0920bb72eff7becf3b3c285c6d89c908c6d72943a4637f646a3d0f6284555b07850dc073ec1cb99924c084ed6ab66f281e05
|
7
|
+
data.tar.gz: 9ec8c2212ccdcdf2bd379d5c7cf496eea1daba2c655abd21bc374c8f685e2254b45742977ebd25adb3906742c1d01892061a059680666a6cadcf9b0f71f3e143
|
data/.rubocop.yml
CHANGED
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.4.2
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,76 +1,102 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
csvbuilder-dynamic-columns-core (0.1.
|
5
|
-
activesupport (>= 5.2
|
4
|
+
csvbuilder-dynamic-columns-core (0.1.2)
|
5
|
+
activesupport (>= 5.2)
|
6
|
+
csv
|
6
7
|
csvbuilder-core
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
10
11
|
specs:
|
11
|
-
activesupport (
|
12
|
-
|
12
|
+
activesupport (8.0.1)
|
13
|
+
base64
|
14
|
+
benchmark (>= 0.3)
|
15
|
+
bigdecimal
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
17
|
+
connection_pool (>= 2.2.5)
|
18
|
+
drb
|
13
19
|
i18n (>= 1.6, < 2)
|
20
|
+
logger (>= 1.4.2)
|
14
21
|
minitest (>= 5.1)
|
15
|
-
|
16
|
-
|
22
|
+
securerandom (>= 0.3)
|
23
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
24
|
+
uri (>= 0.13.1)
|
17
25
|
ast (2.4.2)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
26
|
+
base64 (0.2.0)
|
27
|
+
benchmark (0.4.0)
|
28
|
+
bigdecimal (3.1.9)
|
29
|
+
concurrent-ruby (1.3.5)
|
30
|
+
connection_pool (2.5.0)
|
31
|
+
csv (3.3.2)
|
32
|
+
csvbuilder-core (0.1.4)
|
33
|
+
activesupport (>= 5.2)
|
34
|
+
csv
|
35
|
+
diff-lcs (1.6.0)
|
36
|
+
drb (2.2.1)
|
37
|
+
i18n (1.14.7)
|
23
38
|
concurrent-ruby (~> 1.0)
|
24
|
-
json (2.
|
25
|
-
|
26
|
-
|
27
|
-
|
39
|
+
json (2.10.1)
|
40
|
+
language_server-protocol (3.17.0.4)
|
41
|
+
lint_roller (1.1.0)
|
42
|
+
logger (1.6.6)
|
43
|
+
minitest (5.25.4)
|
44
|
+
parallel (1.26.3)
|
45
|
+
parser (3.3.7.1)
|
28
46
|
ast (~> 2.4.1)
|
47
|
+
racc
|
48
|
+
racc (1.8.1)
|
29
49
|
rainbow (3.1.1)
|
30
|
-
rake (13.
|
31
|
-
regexp_parser (2.
|
32
|
-
|
33
|
-
|
34
|
-
rspec-
|
35
|
-
rspec-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
rspec-expectations (3.12.1)
|
50
|
+
rake (13.2.1)
|
51
|
+
regexp_parser (2.10.0)
|
52
|
+
rspec (3.13.0)
|
53
|
+
rspec-core (~> 3.13.0)
|
54
|
+
rspec-expectations (~> 3.13.0)
|
55
|
+
rspec-mocks (~> 3.13.0)
|
56
|
+
rspec-core (3.13.3)
|
57
|
+
rspec-support (~> 3.13.0)
|
58
|
+
rspec-expectations (3.13.3)
|
40
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-mocks (3.
|
60
|
+
rspec-support (~> 3.13.0)
|
61
|
+
rspec-mocks (3.13.2)
|
43
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
46
|
-
rubocop (1.
|
63
|
+
rspec-support (~> 3.13.0)
|
64
|
+
rspec-support (3.13.2)
|
65
|
+
rubocop (1.73.0)
|
47
66
|
json (~> 2.3)
|
67
|
+
language_server-protocol (~> 3.17.0.2)
|
68
|
+
lint_roller (~> 1.1.0)
|
48
69
|
parallel (~> 1.10)
|
49
|
-
parser (>= 3.
|
70
|
+
parser (>= 3.3.0.2)
|
50
71
|
rainbow (>= 2.2.2, < 4.0)
|
51
|
-
regexp_parser (>=
|
52
|
-
|
53
|
-
rubocop-ast (>= 1.23.0, < 2.0)
|
72
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
73
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
54
74
|
ruby-progressbar (~> 1.7)
|
55
|
-
unicode-display_width (>=
|
56
|
-
rubocop-ast (1.
|
57
|
-
parser (>= 3.
|
58
|
-
rubocop-performance (1.
|
59
|
-
|
60
|
-
rubocop
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
rubocop (
|
65
|
-
|
66
|
-
|
75
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
76
|
+
rubocop-ast (1.38.1)
|
77
|
+
parser (>= 3.3.1.0)
|
78
|
+
rubocop-performance (1.24.0)
|
79
|
+
lint_roller (~> 1.1)
|
80
|
+
rubocop (>= 1.72.1, < 2.0)
|
81
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
82
|
+
rubocop-rake (0.7.1)
|
83
|
+
lint_roller (~> 1.1)
|
84
|
+
rubocop (>= 1.72.1)
|
85
|
+
rubocop-rspec (3.5.0)
|
86
|
+
lint_roller (~> 1.1)
|
87
|
+
rubocop (~> 1.72, >= 1.72.1)
|
88
|
+
ruby-progressbar (1.13.0)
|
89
|
+
securerandom (0.4.1)
|
90
|
+
tzinfo (2.0.6)
|
67
91
|
concurrent-ruby (~> 1.0)
|
68
|
-
unicode-display_width (
|
69
|
-
|
92
|
+
unicode-display_width (3.1.4)
|
93
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
94
|
+
unicode-emoji (4.0.4)
|
95
|
+
uri (1.0.3)
|
70
96
|
|
71
97
|
PLATFORMS
|
72
|
-
arm64-darwin-
|
73
|
-
|
98
|
+
arm64-darwin-24
|
99
|
+
ruby
|
74
100
|
|
75
101
|
DEPENDENCIES
|
76
102
|
csvbuilder-dynamic-columns-core!
|
@@ -82,4 +108,4 @@ DEPENDENCIES
|
|
82
108
|
rubocop-rspec
|
83
109
|
|
84
110
|
BUNDLED WITH
|
85
|
-
2.
|
111
|
+
2.6.2
|
data/README.md
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
|
5
5
|
The Dynamic Columns Core contains the shared components used and extended by the Dynamic Columns Exporter and the Dynamic Columns Importer. It carries the architecture for the Dynamic Columns feature, and it can’t be used alone.
|
6
6
|
|
7
|
+
See:
|
8
|
+
- [Csvbuilder::Dynamic::Columns::Exporter](https://github.com/joel/csvbuilder-dynamic-columns-exporter)
|
9
|
+
- [Csvbuilder::Dynamic::Columns::Importer](https://github.com/joel/csvbuilder-dynamic-columns-importer)
|
10
|
+
|
7
11
|
## Installation
|
8
12
|
|
9
13
|
Install the gem and add to the application's Gemfile by executing:
|
@@ -43,6 +43,7 @@ module Csvbuilder
|
|
43
43
|
# @param column_name [Symbol] the cell's column_name
|
44
44
|
def define_dynamic_attribute_method(column_name)
|
45
45
|
define_proxy_method(column_name) do
|
46
|
+
# Proxy to the concret implementation if DynamicColumnAttributeBase#value
|
46
47
|
original_attribute(column_name)
|
47
48
|
end
|
48
49
|
|
@@ -31,16 +31,35 @@ module Csvbuilder
|
|
31
31
|
|
32
32
|
protected
|
33
33
|
|
34
|
+
# Instance access to singularized name of the dynamic_column
|
35
|
+
#
|
36
|
+
# @return [Symbol] value
|
34
37
|
def process_cell_method_name
|
35
38
|
self.class.process_cell_method_name(header_models_context_key)
|
36
39
|
end
|
37
40
|
|
41
|
+
# Calls the singularized method of the dynamic_column
|
42
|
+
#
|
43
|
+
# i.e: With dynamic_column :skills
|
44
|
+
# => :skill
|
45
|
+
#
|
38
46
|
# Calls the process_cell to return the value of a Attribute given the args
|
39
|
-
|
40
|
-
|
47
|
+
#
|
48
|
+
# @return [Object] value
|
49
|
+
def call_process_cell(*)
|
50
|
+
row_model.public_send(process_cell_method_name, *)
|
41
51
|
end
|
42
52
|
|
43
53
|
class << self
|
54
|
+
# The singularized name of the dynamic_column
|
55
|
+
#
|
56
|
+
# i.e: With dynamic_column :skills
|
57
|
+
# => :skill
|
58
|
+
#
|
59
|
+
# i.e: With dynamic_column :skills, as: :programming_languages
|
60
|
+
# => :programming_language
|
61
|
+
#
|
62
|
+
# @return [Symbol] Symbol
|
44
63
|
def process_cell_method_name(column_name)
|
45
64
|
column_name.to_s.singularize.to_sym
|
46
65
|
end
|
@@ -48,8 +67,8 @@ module Csvbuilder
|
|
48
67
|
# define a method to process each cell of the attribute method
|
49
68
|
# process_cell = one cell
|
50
69
|
# attribute_method = many cells = [process_cell(), process_cell()...]
|
51
|
-
def define_process_cell(row_model_class, column_name, &
|
52
|
-
row_model_class.define_proxy_method(process_cell_method_name(column_name), &
|
70
|
+
def define_process_cell(row_model_class, column_name, &)
|
71
|
+
row_model_class.define_proxy_method(process_cell_method_name(column_name), &)
|
53
72
|
end
|
54
73
|
end
|
55
74
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csvbuilder-dynamic-columns-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Azemar
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-02-27 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -17,9 +16,6 @@ dependencies:
|
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: '5.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '8'
|
23
19
|
type: :runtime
|
24
20
|
prerelease: false
|
25
21
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +23,20 @@ dependencies:
|
|
27
23
|
- - ">="
|
28
24
|
- !ruby/object:Gem::Version
|
29
25
|
version: '5.2'
|
30
|
-
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: csv
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
33
40
|
- !ruby/object:Gem::Dependency
|
34
41
|
name: csvbuilder-core
|
35
42
|
requirement: !ruby/object:Gem::Requirement
|
@@ -55,6 +62,7 @@ files:
|
|
55
62
|
- ".rspec"
|
56
63
|
- ".rubocop.yml"
|
57
64
|
- ".rubocop_todo.yml"
|
65
|
+
- ".tool-versions"
|
58
66
|
- CHANGELOG.md
|
59
67
|
- CODE_OF_CONDUCT.md
|
60
68
|
- Gemfile
|
@@ -62,9 +70,8 @@ files:
|
|
62
70
|
- LICENSE.txt
|
63
71
|
- README.md
|
64
72
|
- Rakefile
|
65
|
-
- gemfiles/Gemfile.5.2._gemfile
|
66
|
-
- gemfiles/Gemfile.6.1._gemfile
|
67
73
|
- gemfiles/Gemfile.7.0._gemfile
|
74
|
+
- gemfiles/Gemfile.8.0._gemfile
|
68
75
|
- lib/.DS_Store
|
69
76
|
- lib/csvbuilder/.DS_Store
|
70
77
|
- lib/csvbuilder/dynamic/.DS_Store
|
@@ -86,7 +93,6 @@ metadata:
|
|
86
93
|
source_code_uri: https://github.com/joel/csvbuilder-dynamic-columns
|
87
94
|
changelog_uri: https://github.com/joel/csvbuilder-dynamic-columns/blob/main/CHANGELOG.md
|
88
95
|
rubygems_mfa_required: 'true'
|
89
|
-
post_install_message:
|
90
96
|
rdoc_options: []
|
91
97
|
require_paths:
|
92
98
|
- lib
|
@@ -94,15 +100,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
94
100
|
requirements:
|
95
101
|
- - ">="
|
96
102
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
103
|
+
version: '3.4'
|
98
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
105
|
requirements:
|
100
106
|
- - ">="
|
101
107
|
- !ruby/object:Gem::Version
|
102
108
|
version: '0'
|
103
109
|
requirements: []
|
104
|
-
rubygems_version: 3.
|
105
|
-
signing_key:
|
110
|
+
rubygems_version: 3.6.2
|
106
111
|
specification_version: 4
|
107
112
|
summary: Csvbuilder Dynamic Columns contain the components to handle CSV dynamic columns
|
108
113
|
test_files: []
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
# Runtime dependencies
|
6
|
-
gem "activesupport", "~> 6.1"
|
7
|
-
|
8
|
-
# Libraries dependencies
|
9
|
-
gem "csvbuilder-core"
|
10
|
-
|
11
|
-
# Development dependencies
|
12
|
-
gem "rake"
|
13
|
-
gem "rspec"
|
14
|
-
gem "rubocop"
|
15
|
-
gem "rubocop-performance"
|
16
|
-
gem "rubocop-rake"
|
17
|
-
gem "rubocop-rspec"
|