foobara 0.7.5 → 0.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b1f7ca252d5b1f089c46c2bb7462cd3fc59d2140eff8ffb156d0236c5ce3c1a
4
- data.tar.gz: a8fdfa3f7c271648abed29612e3373e7cd4b09104204a90d0f4befa771214064
3
+ metadata.gz: a8d77b6195861bb3659af86790096cc49ecc48d02e7a92ebfadf05a612b62b3e
4
+ data.tar.gz: 58d3e97dfda3003354d06d97f17f4bd034461d8ce48d9e17b65b4ce9b0e62c53
5
5
  SHA512:
6
- metadata.gz: 494ab94671b30308f0cec81fb32aa1801080bfeed0da2c53713f5b85a23917ad0c1eb32576d7fe7a5549765336d70673bfa46f8bc2b02b41a040f27accd1cb1e
7
- data.tar.gz: 0c5defe3e4d38eb4cdd56194fdcd339666d726526003b97a989e227fb26ebec46ec7127a244eb5b13ced2c8386d88a55f08e401dd659681db2d1446976600ba4
6
+ metadata.gz: 04f58adfb26a188858319187d46cc9ee63b887cfaeae075a76a50264b66b1529714b76909dd8022cfb86191a42f6da6209adab9e15dc3aef2117830213f85b05
7
+ data.tar.gz: 340c6e764fd9f341b81139e9702b38df9478d0b037c1b60b1d82f6727e028406325d211ae35821486bd0d30e85a7c96e112fcdda27927063355d9157d35f64be
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 4.0.7
1
+ 4.0.9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.8.0] - 2026-11-17
2
+
3
+ - Eliminate dependency on the bigdecimal gem and relocate it to foobara-big-decimal-type
4
+
1
5
  # [0.7.5] - 2026-10-20
2
6
 
3
7
  - Make sure DetachedEntity handle reregistered types properly
@@ -18,14 +18,14 @@ module Foobara
18
18
  @all_projects ||= {}
19
19
  end
20
20
 
21
- def project(symbol, project_path: nil, eager_load_src: true)
21
+ def project(symbol, project_path: nil, eager_load_src: true, require_path: nil)
22
22
  if all_projects.key?(symbol)
23
23
  # simplecov:disable
24
24
  raise ArgumentError, "Project #{symbol} already loaded"
25
25
  # simplecov:enable
26
26
  end
27
27
 
28
- project = Project.new(symbol, project_path:, eager_load_src:)
28
+ project = Project.new(symbol, project_path:, eager_load_src:, require_path:)
29
29
  project.load
30
30
 
31
31
  all_projects[symbol] = project
@@ -1,17 +1,14 @@
1
1
  module Foobara
2
2
  class Project
3
- attr_accessor :symbol, :project_path, :eager_load_src
3
+ attr_accessor :symbol, :project_path, :eager_load_src, :require_path
4
4
 
5
- def initialize(symbol, project_path: nil, eager_load_src: true)
5
+ def initialize(symbol, project_path: nil, eager_load_src: true, require_path: nil)
6
+ self.require_path = require_path || "foobara/#{symbol}"
6
7
  self.eager_load_src = eager_load_src
7
8
  self.symbol = symbol
8
9
  self.project_path = project_path || "#{__dir__}/../../#{symbol}"
9
10
  end
10
11
 
11
- def require_path
12
- "foobara/#{symbol}"
13
- end
14
-
15
12
  def module_name
16
13
  Util.classify(symbol)
17
14
  end
data/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Foobara
2
2
  module Version
3
- VERSION = "0.7.5".freeze
3
+ VERSION = "0.8.0".freeze
4
4
  MINIMUM_RUBY_VERSION = [">= 3.4.0", "< 4.1"].freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -9,20 +9,6 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: bigdecimal
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - ">="
17
- - !ruby/object:Gem::Version
18
- version: '0'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
25
- version: '0'
26
12
  - !ruby/object:Gem::Dependency
27
13
  name: foobara-lru-cache
28
14
  requirement: !ruby/object:Gem::Requirement
@@ -80,9 +66,6 @@ files:
80
66
  - README.md
81
67
  - lib/foobara.rb
82
68
  - lib/foobara/all.rb
83
- - projects/big_decimal/lib/foobara/big_decimal.rb
84
- - projects/big_decimal/src/casters/integer.rb
85
- - projects/big_decimal/src/casters/string.rb
86
69
  - projects/command/lib/foobara/command.rb
87
70
  - projects/command/src/command.rb
88
71
  - projects/command/src/command_pattern_implementation.rb
@@ -556,7 +539,6 @@ require_paths:
556
539
  - projects/entities/projects/nested_transactionable/lib
557
540
  - projects/entities/projects/persistence/lib
558
541
  - projects/entities/projects/weak_object_set/lib
559
- - projects/big_decimal/lib
560
542
  - projects/command/lib
561
543
  - projects/command_connectors/lib
562
544
  - projects/domain_mapper/lib
@@ -577,7 +559,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
577
559
  - !ruby/object:Gem::Version
578
560
  version: '0'
579
561
  requirements: []
580
- rubygems_version: 4.0.20
562
+ rubygems_version: 4.0.24
581
563
  specification_version: 4
582
564
  summary: A command-centric and discoverable software framework with a focus on domain
583
565
  concepts and abstracting away integration code
@@ -1,16 +0,0 @@
1
- require "foobara/builtin_types"
2
- require "bigdecimal"
3
-
4
- module Foobara
5
- module BigDecimal
6
- class << self
7
- def install!
8
- BuiltinTypes.build_and_register!(:big_decimal, BuiltinTypes[:number])
9
- end
10
-
11
- def reset_all = install!
12
- end
13
- end
14
- end
15
-
16
- Foobara.project("big_decimal", project_path: "#{__dir__}/../..")
@@ -1,21 +0,0 @@
1
- module Foobara
2
- module BuiltinTypes
3
- module BigDecimal
4
- module Casters
5
- class Integer < Value::Caster
6
- def applicable?(value)
7
- value.is_a?(::Integer)
8
- end
9
-
10
- def applies_message
11
- "be a an Integer"
12
- end
13
-
14
- def cast(integer)
15
- BigDecimal(integer)
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,24 +0,0 @@
1
- module Foobara
2
- module BuiltinTypes
3
- module BigDecimal
4
- module Casters
5
- class String < Value::Caster
6
- FLOAT_REGEX = /^-?\d+(\.\d+)?([eE]-?\d+)?$/
7
-
8
- def applicable?(value)
9
- value.is_a?(::String) && value =~ FLOAT_REGEX
10
- end
11
-
12
- def applies_message
13
- "be a string of digits with one decimal point optionally amongst " \
14
- "them and optionally with a minus sign in front and optionally an exponent denoted with e"
15
- end
16
-
17
- def cast(string)
18
- BigDecimal(string)
19
- end
20
- end
21
- end
22
- end
23
- end
24
- end