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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fdfc267670291ff9caefe6dfee13d22561acaac5286f31eee8124f980b32936
4
- data.tar.gz: e1308d57584b7bfc37ab11e125e0cc3f4bc4bab28a9da0eac62ba4f85c7a2642
3
+ metadata.gz: 99c7a32415edfe0c4a0e96334efc38324f4d40084d53654116c34259adb509be
4
+ data.tar.gz: 113d6cb9f651d3722b3985a12dc74df8438f5eb62e8f76daa9e80b7cd283a005
5
5
  SHA512:
6
- metadata.gz: bff40a5481025d39c46822f193b49e2df35ad946c6c60cb1c8f366767d4e1915cddb92f82962af36a4c832c99c48e38eb8c4756edf1594d4f537ca4d312b1078
7
- data.tar.gz: 50346320272ecf16a63b4736a3736b9c9c5621a6a403c720e29ea284c3431be07389ef67dcbaa0cd6d05e6eb2ecd8f71713d51a47f67b82390d0dd6e210c4d86
6
+ metadata.gz: 4d198549961191ea64da224f1a6a0920bb72eff7becf3b3c285c6d89c908c6d72943a4637f646a3d0f6284555b07850dc073ec1cb99924c084ed6ab66f281e05
7
+ data.tar.gz: 9ec8c2212ccdcdf2bd379d5c7cf496eea1daba2c655abd21bc374c8f685e2254b45742977ebd25adb3906742c1d01892061a059680666a6cadcf9b0f71f3e143
data/.rubocop.yml CHANGED
@@ -1,13 +1,13 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
- require:
3
+ plugins:
4
4
  - rubocop-performance
5
5
  - rubocop-rake
6
6
  - rubocop-rspec
7
7
 
8
8
  AllCops:
9
9
  NewCops: enable
10
- TargetRubyVersion: 2.6
10
+ TargetRubyVersion: 3.4
11
11
 
12
12
  Style/StringLiterals:
13
13
  Enabled: true
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.4.2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.2] - 2024-02-27
4
+
5
+ - Update Ruby 3.4 and Relax Rails Constraint
6
+
3
7
  ## [0.1.1] - 2022-12-21
4
8
 
5
9
  Change the option :header_models_context_key to :as
data/Gemfile CHANGED
@@ -14,3 +14,5 @@ gem "rubocop"
14
14
  gem "rubocop-performance"
15
15
  gem "rubocop-rake"
16
16
  gem "rubocop-rspec"
17
+
18
+ # gem "csvbuilder-core", path: "../csvbuilder-core"
data/Gemfile.lock CHANGED
@@ -1,76 +1,102 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csvbuilder-dynamic-columns-core (0.1.0)
5
- activesupport (>= 5.2, < 8)
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 (6.1.7)
12
- concurrent-ruby (~> 1.0, >= 1.0.2)
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
- tzinfo (~> 2.0)
16
- zeitwerk (~> 2.3)
22
+ securerandom (>= 0.3)
23
+ tzinfo (~> 2.0, >= 2.0.5)
24
+ uri (>= 0.13.1)
17
25
  ast (2.4.2)
18
- concurrent-ruby (1.1.10)
19
- csvbuilder-core (0.1.2)
20
- activesupport (>= 5.2, < 8)
21
- diff-lcs (1.5.0)
22
- i18n (1.12.0)
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.6.3)
25
- minitest (5.16.3)
26
- parallel (1.22.1)
27
- parser (3.1.3.0)
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.0.6)
31
- regexp_parser (2.6.1)
32
- rexml (3.2.5)
33
- rspec (3.12.0)
34
- rspec-core (~> 3.12.0)
35
- rspec-expectations (~> 3.12.0)
36
- rspec-mocks (~> 3.12.0)
37
- rspec-core (3.12.0)
38
- rspec-support (~> 3.12.0)
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.12.0)
42
- rspec-mocks (3.12.1)
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.12.0)
45
- rspec-support (3.12.0)
46
- rubocop (1.41.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.1.2.1)
70
+ parser (>= 3.3.0.2)
50
71
  rainbow (>= 2.2.2, < 4.0)
51
- regexp_parser (>= 1.8, < 3.0)
52
- rexml (>= 3.2.5, < 4.0)
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 (>= 1.4.0, < 3.0)
56
- rubocop-ast (1.24.0)
57
- parser (>= 3.1.1.0)
58
- rubocop-performance (1.15.2)
59
- rubocop (>= 1.7.0, < 2.0)
60
- rubocop-ast (>= 0.4.0)
61
- rubocop-rake (0.6.0)
62
- rubocop (~> 1.0)
63
- rubocop-rspec (2.16.0)
64
- rubocop (~> 1.33)
65
- ruby-progressbar (1.11.0)
66
- tzinfo (2.0.5)
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 (2.3.0)
69
- zeitwerk (2.6.6)
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-21
73
- x86_64-linux
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.3.22
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:
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  # Runtime dependencies
6
- gem "activesupport", "~> 5.2"
6
+ gem "activemodel", "~> 7.0"
7
7
 
8
8
  # Libraries dependencies
9
9
  gem "csvbuilder-core"
@@ -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
- def call_process_cell(*args)
40
- row_model.public_send(process_cell_method_name, *args)
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, &block)
52
- row_model_class.define_proxy_method(process_cell_method_name(column_name), &block)
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
@@ -4,7 +4,7 @@ module Csvbuilder
4
4
  module Dynamic
5
5
  module Columns
6
6
  module Core
7
- VERSION = "0.1.1"
7
+ VERSION = "0.1.2"
8
8
  end
9
9
  end
10
10
  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.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: 2022-12-29 00:00:00.000000000 Z
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: '8'
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: 2.6.0
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.3.22
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"