dry-transformer 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -1
  3. data/LICENSE +1 -1
  4. data/README.md +6 -5
  5. data/dry-transformer.gemspec +26 -14
  6. data/lib/dry/transformer/{array.rb → array_transformations.rb} +1 -5
  7. data/lib/dry/transformer/{class.rb → class_transformations.rb} +0 -0
  8. data/lib/dry/transformer/coercions.rb +6 -6
  9. data/lib/dry/transformer/function.rb +0 -2
  10. data/lib/dry/transformer/{hash.rb → hash_transformations.rb} +50 -73
  11. data/lib/dry/transformer/pipe/class_interface.rb +3 -3
  12. data/lib/dry/transformer/pipe/dsl.rb +1 -1
  13. data/lib/dry/transformer/pipe.rb +0 -2
  14. data/lib/dry/transformer/{proc.rb → proc_transformations.rb} +0 -0
  15. data/lib/dry/transformer/recursion.rb +0 -2
  16. data/lib/dry/transformer/version.rb +1 -1
  17. data/lib/dry/transformer.rb +20 -10
  18. data/lib/dry-transformer.rb +1 -1
  19. metadata +33 -66
  20. data/.codeclimate.yml +0 -12
  21. data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
  22. data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
  23. data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
  24. data/.github/workflows/custom_ci.yml +0 -66
  25. data/.github/workflows/docsite.yml +0 -34
  26. data/.github/workflows/sync_configs.yml +0 -34
  27. data/.gitignore +0 -16
  28. data/.rspec +0 -4
  29. data/.rubocop.yml +0 -95
  30. data/CODE_OF_CONDUCT.md +0 -13
  31. data/CONTRIBUTING.md +0 -29
  32. data/Gemfile +0 -19
  33. data/Rakefile +0 -6
  34. data/docsite/source/built-in-transformations.html.md +0 -47
  35. data/docsite/source/index.html.md +0 -15
  36. data/docsite/source/transformation-objects.html.md +0 -32
  37. data/docsite/source/using-standalone-functions.html.md +0 -82
  38. data/lib/dry/transformer/all.rb +0 -11
  39. data/spec/spec_helper.rb +0 -31
  40. data/spec/unit/array/combine_spec.rb +0 -224
  41. data/spec/unit/array_transformations_spec.rb +0 -233
  42. data/spec/unit/class_transformations_spec.rb +0 -50
  43. data/spec/unit/coercions_spec.rb +0 -132
  44. data/spec/unit/conditional_spec.rb +0 -48
  45. data/spec/unit/function_not_found_error_spec.rb +0 -12
  46. data/spec/unit/function_spec.rb +0 -193
  47. data/spec/unit/hash_transformations_spec.rb +0 -490
  48. data/spec/unit/proc_transformations_spec.rb +0 -20
  49. data/spec/unit/recursion_spec.rb +0 -145
  50. data/spec/unit/registry_spec.rb +0 -202
  51. data/spec/unit/store_spec.rb +0 -198
  52. data/spec/unit/transformer/class_interface_spec.rb +0 -350
  53. data/spec/unit/transformer/dsl_spec.rb +0 -15
  54. data/spec/unit/transformer/instance_methods_spec.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b479f91512fd97581875e395c171f70031cd6316e7e546f634285a4db46c183
4
- data.tar.gz: b6b5dcc266532598a8b656d5a0597809ea90de917b2f624e95886ddadfa1b378
3
+ metadata.gz: 6c7c1900796125a73ede474825b9da2021aa274e9b5a34f0e45a161c6abef772
4
+ data.tar.gz: a642ff796d204314dfc2650d65f6c42bd8d25e991aa144f5d680f1d08083ea08
5
5
  SHA512:
6
- metadata.gz: 1e97fff09478334ab2117f61c5133cc2ab9ea11f53ab465dbe766f6b8239e10dc9e7b030b52a33ecd368b57aac71f5b8cb6f05b0e9726e38a705d759696f98c0
7
- data.tar.gz: 46927ebbf2cc102a4527a0369e6675613301f78f4be6838bc981667b464e515878a8f3fcf470229fb32d8ff3b8cf00dd903cbf3ed20aa35b6cdc0881afe70999
6
+ metadata.gz: 5cc3a05b5a3a792da5aad7b1f57d79e5598631de33b90f67509faf6c9a4478e382d191f4359553f849012f12e5cd0452a90df5a57f2fa98021835fe594ee553c
7
+ data.tar.gz: 7aa04fae45c928ad437526dbf0161130ba2f63c3883ef664d335acb08f21a90c5fad32726d0a0e9c0e698115c7ddaa8c68b23ad03737142e6bc8657f51cd545a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
- # v0.1.0 2019-12-28
1
+ <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
+
3
+ ## 1.0.0 2022-11-20
4
+
5
+
6
+ ### Changed
7
+
8
+ - Use Zeitwerk to auto-load the gem (via #14) (@solnic)
9
+ - Dropped dependency on dry-core (via #14) (@solnic)
10
+
11
+ [Compare v0.1.1...v1.0.0](https://github.com/dry-rb/dry-transformer/compare/v0.1.1...v1.0.0)
12
+
13
+ ## 0.1.1 2020-01-14
14
+
15
+
16
+ ### Fixed
17
+
18
+ - Fixed Dry::Transformer::HashTransformations.unwrap when hash contains root key (@AMHOL)
19
+
20
+
21
+ [Compare v0.1.0...v0.1.1](https://github.com/dry-rb/dry-transformer/compare/v0.1.0...v0.1.1)
22
+
23
+ ## 0.1.0 2019-12-28
2
24
 
3
25
  Initial port of the [transproc](https://github.com/solnic/transproc) gem.
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2019 dry-rb team
3
+ Copyright (c) 2015-2022 dry-rb team
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ <!--- this file is synced from dry-rb/template-gem project -->
1
2
  [gem]: https://rubygems.org/gems/dry-transformer
2
3
  [actions]: https://github.com/dry-rb/dry-transformer/actions
3
4
  [codacy]: https://www.codacy.com/gh/dry-rb/dry-transformer
@@ -10,19 +11,19 @@
10
11
  [![CI Status](https://github.com/dry-rb/dry-transformer/workflows/ci/badge.svg)][actions]
11
12
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/22edf59617be4aef97cfbe4e1c99f1ce)][codacy]
12
13
  [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/22edf59617be4aef97cfbe4e1c99f1ce)][codacy]
13
- [![Inline docs](http://inch-ci.org/github/dry-rb/dry-transformer.svg?branch=master)][inchpages]
14
+ [![Inline docs](http://inch-ci.org/github/dry-rb/dry-transformer.svg?branch=main)][inchpages]
14
15
 
15
16
  ## Links
16
17
 
17
- * [User documentation](http://dry-rb.org/gems/dry-transformer)
18
+ * [User documentation](https://dry-rb.org/gems/dry-transformer)
18
19
  * [API documentation](http://rubydoc.info/gems/dry-transformer)
19
20
 
20
21
  ## Supported Ruby versions
21
22
 
22
- This library officially supports following Ruby versions:
23
+ This library officially supports the following Ruby versions:
23
24
 
24
- * MRI >= `2.4`
25
- * jruby >= `9.2`
25
+ * MRI `>= 2.7.0`
26
+ * jruby `>= 9.3` (postponed until 2.7 is supported)
26
27
 
27
28
  ## License
28
29
 
@@ -1,22 +1,34 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ # this file is synced from dry-rb/template-gem project
4
+
5
+ lib = File.expand_path("lib", __dir__)
4
6
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'dry/transformer/version'
7
+ require "dry/transformer/version"
6
8
 
7
9
  Gem::Specification.new do |spec|
8
- spec.name = 'dry-transformer'
10
+ spec.name = "dry-transformer"
11
+ spec.authors = ["Piotr Solnica"]
12
+ spec.email = ["piotr.solnica@gmail.com"]
13
+ spec.license = "MIT"
9
14
  spec.version = Dry::Transformer::VERSION.dup
10
- spec.authors = ['Piotr Solnica']
11
- spec.email = ['piotr.solnica@gmail.com']
12
- spec.summary = 'Data transformation toolkit'
15
+
16
+ spec.summary = "Data transformation toolkit"
13
17
  spec.description = spec.summary
14
- spec.homepage = 'https://dry-rb.org/gems/dry-transformer/'
15
- spec.license = 'MIT'
16
-
17
- spec.files = `git ls-files -z`.split("\x0")
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ['lib']
21
- spec.required_ruby_version = '>= 2.3.0'
18
+ spec.homepage = "https://dry-rb.org/gems/dry-transformer"
19
+ spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "dry-transformer.gemspec", "lib/**/*"]
20
+ spec.bindir = "bin"
21
+ spec.executables = []
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
25
+ spec.metadata["changelog_uri"] = "https://github.com/dry-rb/dry-transformer/blob/main/CHANGELOG.md"
26
+ spec.metadata["source_code_uri"] = "https://github.com/dry-rb/dry-transformer"
27
+ spec.metadata["bug_tracker_uri"] = "https://github.com/dry-rb/dry-transformer/issues"
28
+
29
+ spec.required_ruby_version = ">= 2.7.0"
30
+
31
+ # to update dependencies edit project.yml
32
+ spec.add_runtime_dependency "zeitwerk", "~> 2.6"
33
+
22
34
  end
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/coercions'
4
- require 'dry/transformer/hash'
5
- require 'dry/transformer/array/combine'
6
-
7
3
  module Dry
8
4
  module Transformer
9
5
  # Transformation functions for Array objects
@@ -163,7 +159,7 @@ module Dry
163
159
  #
164
160
  # @api public
165
161
  def self.insert_key(array, key)
166
- map_array(array, ->(v) { { key => v } })
162
+ map_array(array, ->(v) { {key => v} })
167
163
  end
168
164
 
169
165
  # Adds missing keys with nil value to all tuples in array
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'date'
4
- require 'time'
5
- require 'bigdecimal'
6
- require 'bigdecimal/util'
3
+ require "date"
4
+ require "time"
5
+ require "bigdecimal"
6
+ require "bigdecimal/util"
7
7
 
8
8
  module Dry
9
9
  module Transformer
@@ -13,8 +13,8 @@ module Dry
13
13
  module Coercions
14
14
  extend Registry
15
15
 
16
- TRUE_VALUES = [true, 1, '1', 'on', 't', 'true', 'y', 'yes'].freeze
17
- FALSE_VALUES = [false, 0, '0', 'off', 'f', 'false', 'n', 'no', nil].freeze
16
+ TRUE_VALUES = [true, 1, "1", "on", "t", "true", "y", "yes"].freeze
17
+ FALSE_VALUES = [false, 0, "0", "off", "f", "false", "n", "no", nil].freeze
18
18
 
19
19
  BOOLEAN_MAP = Hash[
20
20
  TRUE_VALUES.product([true]) + FALSE_VALUES.product([false])
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/composite'
4
-
5
3
  module Dry
6
4
  module Transformer
7
5
  # Transformation proc wrapper allowing composition of multiple procs into
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/coercions'
4
-
5
3
  module Dry
6
4
  module Transformer
7
5
  # Transformation functions for Hash objects
@@ -20,27 +18,19 @@ module Dry
20
18
  module HashTransformations
21
19
  extend Registry
22
20
 
23
- if RUBY_VERSION >= '2.5'
24
- # Map all keys in a hash with the provided transformation function
25
- #
26
- # @example
27
- # Dry::Transformer(:map_keys, -> s { s.upcase })['name' => 'Jane']
28
- # # => {"NAME" => "Jane"}
29
- #
30
- # @param [Hash]
31
- #
32
- # @return [Hash]
33
- #
34
- # @api public
35
- def self.map_keys(source_hash, fn)
36
- Hash[source_hash].transform_keys!(&fn)
37
- end
38
- else
39
- def self.map_keys(source_hash, fn)
40
- Hash[source_hash].tap do |hash|
41
- hash.keys.each { |key| hash[fn[key]] = hash.delete(key) }
42
- end
43
- end
21
+ # Map all keys in a hash with the provided transformation function
22
+ #
23
+ # @example
24
+ # Dry::Transformer(:map_keys, -> s { s.upcase })['name' => 'Jane']
25
+ # # => {"NAME" => "Jane"}
26
+ #
27
+ # @param [Hash]
28
+ #
29
+ # @return [Hash]
30
+ #
31
+ # @api public
32
+ def self.map_keys(source_hash, fn)
33
+ Hash[source_hash].transform_keys!(&fn)
44
34
  end
45
35
 
46
36
  # Symbolize all keys in a hash
@@ -76,11 +66,11 @@ module Dry
76
66
  hash.each_with_object({}) do |(key, value), output|
77
67
  output[key.to_sym] =
78
68
  case value
79
- when Hash
69
+ when ::Hash
80
70
  deep_symbolize_keys(value)
81
- when Array
71
+ when ::Array
82
72
  value.map { |item|
83
- item.is_a?(Hash) ? deep_symbolize_keys(item) : item
73
+ item.is_a?(::Hash) ? deep_symbolize_keys(item) : item
84
74
  }
85
75
  else
86
76
  value
@@ -120,9 +110,9 @@ module Dry
120
110
  hash.each_with_object({}) do |(key, value), output|
121
111
  output[key.to_s] =
122
112
  case value
123
- when Hash
113
+ when ::Hash
124
114
  deep_stringify_keys(value)
125
- when Array
115
+ when ::Array
126
116
  value.map { |item|
127
117
  item.is_a?(Hash) ? deep_stringify_keys(item) : item
128
118
  }
@@ -132,27 +122,19 @@ module Dry
132
122
  end
133
123
  end
134
124
 
135
- if RUBY_VERSION >= '2.4'
136
- # Map all values in a hash using transformation function
137
- #
138
- # @example
139
- # Dry::Transformer(:map_values, -> v { v.upcase })[:name => 'Jane']
140
- # # => {"name" => "JANE"}
141
- #
142
- # @param [Hash]
143
- #
144
- # @return [Hash]
145
- #
146
- # @api public
147
- def self.map_values(source_hash, fn)
148
- Hash[source_hash].transform_values!(&fn)
149
- end
150
- else
151
- def self.map_values(source_hash, fn)
152
- Hash[source_hash].tap do |hash|
153
- hash.each { |key, value| hash[key] = fn[value] }
154
- end
155
- end
125
+ # Map all values in a hash using transformation function
126
+ #
127
+ # @example
128
+ # Dry::Transformer(:map_values, -> v { v.upcase })[:name => 'Jane']
129
+ # # => {"name" => "JANE"}
130
+ #
131
+ # @param [Hash]
132
+ #
133
+ # @return [Hash]
134
+ #
135
+ # @api public
136
+ def self.map_values(source_hash, fn)
137
+ Hash[source_hash].transform_values!(&fn)
156
138
  end
157
139
 
158
140
  # Rename all keys in a hash using provided mapping hash
@@ -211,26 +193,20 @@ module Dry
211
193
  Hash[hash].reject { |k, _| keys.include?(k) }
212
194
  end
213
195
 
214
- if RUBY_VERSION >= '2.5'
215
- # Accepts specified keys from a hash
216
- #
217
- # @example
218
- # Dry::Transformer(:accept_keys, [:name])[name: 'Jane', email: 'jane@doe.org']
219
- # # => {:name=>"Jane"}
220
- #
221
- # @param [Hash] hash The input hash
222
- # @param [Array] keys The keys to be accepted
223
- #
224
- # @return [Hash]
225
- #
226
- # @api public
227
- def self.accept_keys(hash, keys)
228
- Hash[hash].slice(*keys)
229
- end
230
- else
231
- def self.accept_keys(hash, keys)
232
- reject_keys(hash, hash.keys - keys)
233
- end
196
+ # Accepts specified keys from a hash
197
+ #
198
+ # @example
199
+ # Dry::Transformer(:accept_keys, [:name])[name: 'Jane', email: 'jane@doe.org']
200
+ # # => {:name=>"Jane"}
201
+ #
202
+ # @param [Hash] hash The input hash
203
+ # @param [Array] keys The keys to be accepted
204
+ #
205
+ # @return [Hash]
206
+ #
207
+ # @api public
208
+ def self.accept_keys(hash, keys)
209
+ Hash[hash].slice(*keys)
234
210
  end
235
211
 
236
212
  # Map a key in a hash with the provided transformation function
@@ -301,7 +277,7 @@ module Dry
301
277
  return source_hash unless source_hash[root]
302
278
 
303
279
  add_prefix = lambda do |key|
304
- combined = [root, key].join('_')
280
+ combined = [root, key].join("_")
305
281
  root.is_a?(::Symbol) ? combined.to_sym : combined
306
282
  end
307
283
 
@@ -310,9 +286,10 @@ module Dry
310
286
  keys = nested_hash.keys
311
287
  keys &= selected if selected
312
288
  new_keys = prefix ? keys.map(&add_prefix) : keys
289
+ nested_contains_root_key = nested_hash.key?(root)
313
290
 
314
291
  hash.update(Hash[new_keys.zip(keys.map { |key| nested_hash.delete(key) })])
315
- hash.delete(root) if nested_hash.empty?
292
+ hash.delete(root) if nested_hash.empty? && !nested_contains_root_key
316
293
  end
317
294
  end
318
295
 
@@ -410,9 +387,9 @@ module Dry
410
387
  else
411
388
  value
412
389
  end
413
- when Hash
390
+ when ::Hash
414
391
  eval_values(value, args, filters)
415
- when Array
392
+ when ::Array
416
393
  value.map { |item|
417
394
  item.is_a?(Hash) ? eval_values(item, args, filters) : item
418
395
  }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/pipe/dsl'
3
+ require "dry/transformer/pipe/dsl"
4
4
 
5
5
  module Dry
6
6
  module Transformer
@@ -36,7 +36,7 @@ module Dry
36
36
 
37
37
  subclass.container(@container) if defined?(@container)
38
38
 
39
- subclass.instance_variable_set('@dsl', dsl.dup) if dsl
39
+ subclass.instance_variable_set("@dsl", dsl.dup) if dsl
40
40
  end
41
41
 
42
42
  # Get or set the container to resolve transprocs from.
@@ -80,7 +80,7 @@ module Dry
80
80
  # @api public
81
81
  def new(*)
82
82
  super.tap do |transformer|
83
- transformer.instance_variable_set('@transproc', dsl.(transformer)) if dsl
83
+ transformer.instance_variable_set("@transproc", dsl.(transformer)) if dsl
84
84
  end
85
85
  end
86
86
  ruby2_keywords(:new) if respond_to?(:ruby2_keywords, true)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/compiler'
3
+ require "dry/transformer/compiler"
4
4
 
5
5
  module Dry
6
6
  module Transformer
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/pipe/class_interface'
4
-
5
3
  module Dry
6
4
  module Transformer
7
5
  # Pipe class for defining transprocs with a class DSL.
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/conditional'
4
-
5
3
  module Dry
6
4
  module Transformer
7
5
  # Recursive transformation functions
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Transformer
5
- VERSION = '0.1.0'
5
+ VERSION = "1.0.0"
6
6
  end
7
7
  end
@@ -1,16 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer/version'
4
- require 'dry/transformer/constants'
5
- require 'dry/transformer/function'
6
- require 'dry/transformer/error'
7
- require 'dry/transformer/store'
8
- require 'dry/transformer/registry'
3
+ require "zeitwerk"
9
4
 
10
- require 'dry/transformer/array'
11
- require 'dry/transformer/hash'
12
-
13
- require 'dry/transformer/pipe'
5
+ require_relative "transformer/constants"
6
+ require_relative "transformer/error"
14
7
 
15
8
  module Dry
16
9
  module Transformer
@@ -19,5 +12,22 @@ module Dry
19
12
  def self.[](registry)
20
13
  Pipe[registry]
21
14
  end
15
+
16
+ # @api private
17
+ def self.loader
18
+ @loader ||= Zeitwerk::Loader.new.tap do |loader|
19
+ root = File.expand_path("..", __dir__)
20
+ loader.tag = "dry-transformer"
21
+ loader.inflector = Zeitwerk::GemInflector.new("#{root}/dry-transformer.rb")
22
+ loader.push_dir(root)
23
+ loader.ignore(
24
+ "#{root}/dry-transformer.rb",
25
+ "#{root}/dry/transformer/{constants,error,version}.rb"
26
+ )
27
+ loader.inflector.inflect("dsl" => "DSL")
28
+ end
29
+ end
30
+
31
+ loader.setup
22
32
  end
23
33
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'dry/transformer'
3
+ require "dry/transformer"
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-transformer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-28 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-11-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: zeitwerk
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.6'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.6'
13
27
  description: Data transformation toolkit
14
28
  email:
15
29
  - piotr.solnica@gmail.com
@@ -17,34 +31,15 @@ executables: []
17
31
  extensions: []
18
32
  extra_rdoc_files: []
19
33
  files:
20
- - ".codeclimate.yml"
21
- - ".github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md"
22
- - ".github/ISSUE_TEMPLATE/---bug-report.md"
23
- - ".github/ISSUE_TEMPLATE/---feature-request.md"
24
- - ".github/workflows/custom_ci.yml"
25
- - ".github/workflows/docsite.yml"
26
- - ".github/workflows/sync_configs.yml"
27
- - ".gitignore"
28
- - ".rspec"
29
- - ".rubocop.yml"
30
34
  - CHANGELOG.md
31
- - CODE_OF_CONDUCT.md
32
- - CONTRIBUTING.md
33
- - Gemfile
34
35
  - LICENSE
35
36
  - README.md
36
- - Rakefile
37
- - docsite/source/built-in-transformations.html.md
38
- - docsite/source/index.html.md
39
- - docsite/source/transformation-objects.html.md
40
- - docsite/source/using-standalone-functions.html.md
41
37
  - dry-transformer.gemspec
42
38
  - lib/dry-transformer.rb
43
39
  - lib/dry/transformer.rb
44
- - lib/dry/transformer/all.rb
45
- - lib/dry/transformer/array.rb
46
40
  - lib/dry/transformer/array/combine.rb
47
- - lib/dry/transformer/class.rb
41
+ - lib/dry/transformer/array_transformations.rb
42
+ - lib/dry/transformer/class_transformations.rb
48
43
  - lib/dry/transformer/coercions.rb
49
44
  - lib/dry/transformer/compiler.rb
50
45
  - lib/dry/transformer/composite.rb
@@ -52,36 +47,24 @@ files:
52
47
  - lib/dry/transformer/constants.rb
53
48
  - lib/dry/transformer/error.rb
54
49
  - lib/dry/transformer/function.rb
55
- - lib/dry/transformer/hash.rb
50
+ - lib/dry/transformer/hash_transformations.rb
56
51
  - lib/dry/transformer/pipe.rb
57
52
  - lib/dry/transformer/pipe/class_interface.rb
58
53
  - lib/dry/transformer/pipe/dsl.rb
59
- - lib/dry/transformer/proc.rb
54
+ - lib/dry/transformer/proc_transformations.rb
60
55
  - lib/dry/transformer/recursion.rb
61
56
  - lib/dry/transformer/registry.rb
62
57
  - lib/dry/transformer/store.rb
63
58
  - lib/dry/transformer/version.rb
64
- - spec/spec_helper.rb
65
- - spec/unit/array/combine_spec.rb
66
- - spec/unit/array_transformations_spec.rb
67
- - spec/unit/class_transformations_spec.rb
68
- - spec/unit/coercions_spec.rb
69
- - spec/unit/conditional_spec.rb
70
- - spec/unit/function_not_found_error_spec.rb
71
- - spec/unit/function_spec.rb
72
- - spec/unit/hash_transformations_spec.rb
73
- - spec/unit/proc_transformations_spec.rb
74
- - spec/unit/recursion_spec.rb
75
- - spec/unit/registry_spec.rb
76
- - spec/unit/store_spec.rb
77
- - spec/unit/transformer/class_interface_spec.rb
78
- - spec/unit/transformer/dsl_spec.rb
79
- - spec/unit/transformer/instance_methods_spec.rb
80
- homepage: https://dry-rb.org/gems/dry-transformer/
59
+ homepage: https://dry-rb.org/gems/dry-transformer
81
60
  licenses:
82
61
  - MIT
83
- metadata: {}
84
- post_install_message:
62
+ metadata:
63
+ allowed_push_host: https://rubygems.org
64
+ changelog_uri: https://github.com/dry-rb/dry-transformer/blob/main/CHANGELOG.md
65
+ source_code_uri: https://github.com/dry-rb/dry-transformer
66
+ bug_tracker_uri: https://github.com/dry-rb/dry-transformer/issues
67
+ post_install_message:
85
68
  rdoc_options: []
86
69
  require_paths:
87
70
  - lib
@@ -89,31 +72,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
72
  requirements:
90
73
  - - ">="
91
74
  - !ruby/object:Gem::Version
92
- version: 2.3.0
75
+ version: 2.7.0
93
76
  required_rubygems_version: !ruby/object:Gem::Requirement
94
77
  requirements:
95
78
  - - ">="
96
79
  - !ruby/object:Gem::Version
97
80
  version: '0'
98
81
  requirements: []
99
- rubygems_version: 3.0.3
100
- signing_key:
82
+ rubygems_version: 3.3.7
83
+ signing_key:
101
84
  specification_version: 4
102
85
  summary: Data transformation toolkit
103
- test_files:
104
- - spec/spec_helper.rb
105
- - spec/unit/array/combine_spec.rb
106
- - spec/unit/array_transformations_spec.rb
107
- - spec/unit/class_transformations_spec.rb
108
- - spec/unit/coercions_spec.rb
109
- - spec/unit/conditional_spec.rb
110
- - spec/unit/function_not_found_error_spec.rb
111
- - spec/unit/function_spec.rb
112
- - spec/unit/hash_transformations_spec.rb
113
- - spec/unit/proc_transformations_spec.rb
114
- - spec/unit/recursion_spec.rb
115
- - spec/unit/registry_spec.rb
116
- - spec/unit/store_spec.rb
117
- - spec/unit/transformer/class_interface_spec.rb
118
- - spec/unit/transformer/dsl_spec.rb
119
- - spec/unit/transformer/instance_methods_spec.rb
86
+ test_files: []
data/.codeclimate.yml DELETED
@@ -1,12 +0,0 @@
1
- # this file is managed by dry-rb/devtools project
2
-
3
- version: "2"
4
-
5
- exclude_patterns:
6
- - "benchmarks/"
7
- - "examples/"
8
- - "spec/"
9
-
10
- plugins:
11
- rubocop:
12
- enabled: true
@@ -1,10 +0,0 @@
1
- ---
2
- name: "⚠️ Please don't ask for support via issues"
3
- about: See CONTRIBUTING.md for more information
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
-