foobara 0.0.39 → 0.0.41

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bf050110d18ea4044f2f757e1f1ca259817ee14b70d9bda10c6bc595334fb31
4
- data.tar.gz: 3e09509445c5f5a5e2d68eceb02636033bba1df6cdbc324349b6ae92c044083f
3
+ metadata.gz: cda698679edac42fcee6ab465b327133ffa4f4e434feace0de447c177622d606
4
+ data.tar.gz: 923e1d3e3c5eae09e16da7b256bb471e0656b2f76719c63d5ff105cc31283d8e
5
5
  SHA512:
6
- metadata.gz: 4761fb5fb340f5f4d34b48b3609b5c1a43e365a4fa11f775c9ac8c1fcbecc88855e9dfc08380b20c11dead7aa5974145c1013f7b23db689452c5021c35b6d3a4
7
- data.tar.gz: e9a736a451d1f33569dedf51c978c38cd3391052c7c48e1016d519b9716789588951a1a530848991fdeb374944c260604e4443aaa47392708187ad285ff85aba
6
+ metadata.gz: c6b9d3ee2509a34e40c114f6558199d80c4b5408b7614200fab48cd19e2328eafaf2a73956d4a31a686a5cdda49e3615af3737638df4412467f99ed2ff7c9013
7
+ data.tar.gz: 71f4f90c3d98e638d722cc47f5a821b2bba17c257ada30a77769bd6f4d62abff84c775cbc1dc99f4e065939f14a488782eb34994fc2e097f07604c3272cc0eb4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.0.41] - 2024-12-19
2
+
3
+ - Allow marking a project as a project from outside of the monorepo
4
+
1
5
  ## [0.0.39] - 2024-12-18
2
6
 
3
7
  - Introduce processor .requires_type? concept and extract PrimaryKey caster to a proper location
@@ -3,14 +3,13 @@ module Foobara
3
3
  # TODO: make this MonorepoProject and have a more generic Project so that other projects outside of the
4
4
  # repo can have things like reset_all called on th.
5
5
  class Project
6
- attr_accessor :symbol
6
+ attr_accessor :symbol, :project_path
7
7
 
8
- def initialize(symbol)
8
+ # TODO: we should move these concepts out of "Monorepo" and maybe into Foobara because we sometimes need to
9
+ # be able to install!/reset foobara code that's been extracted into a gem
10
+ def initialize(symbol, project_path: nil)
9
11
  self.symbol = symbol
10
- end
11
-
12
- def project_path
13
- "projects/#{symbol}"
12
+ self.project_path = project_path || "#{__dir__}/../../../../../projects/#{symbol}"
14
13
  end
15
14
 
16
15
  def require_path
@@ -27,7 +26,7 @@ module Foobara
27
26
 
28
27
  def load
29
28
  require require_path
30
- Util.require_directory("#{__dir__}/../../../../../#{project_path}/src")
29
+ Util.require_directory("#{project_path}/src")
31
30
  end
32
31
 
33
32
  def install!
@@ -27,14 +27,14 @@ module Foobara
27
27
  end
28
28
  end
29
29
 
30
- def project(symbol)
30
+ def project(symbol, project_path: nil)
31
31
  if all_projects.key?(symbol)
32
32
  # :nocov:
33
33
  raise ArgumentError, "Project #{symbol} already loaded"
34
34
  # :nocov:
35
35
  end
36
36
 
37
- project = Project.new(symbol)
37
+ project = Project.new(symbol, project_path:)
38
38
  project.load
39
39
 
40
40
  all_projects[symbol] = project
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.39
4
+ version: 0.0.41
5
5
  platform: ruby
6
6
  original_platform: ''
7
7
  authors:
8
8
  - Miles Georgi
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-18 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foobara-util