mono_repo_deps 0.2.0 → 0.2.1

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: 689c1b114e7155c4f979478cf0923505fa425c106f9b9a9f2f9cc019d9539a4e
4
- data.tar.gz: dc52f23c181e507fac026baedd3a5e11277df5b15fb9b81723ebae0fa04884bb
3
+ metadata.gz: 95e49884e5cf67ed63ea7575df321c0166b5ac505b602d99facf24b866dff026
4
+ data.tar.gz: e9ce0647794d26570f0e45af5346e27778bc7bc67edce058b801c20250055513
5
5
  SHA512:
6
- metadata.gz: 3372ecbbf1912fa2ea402467d760a486dfdfaf2e4acb7dd9c99236d6b58a89cea20b0c2adf44681fe956fee140f338ff405cb3297f3c65d8562e40402252f0ab
7
- data.tar.gz: 44ac182cf6738033b9b010931b7da4e8b96e553c8c9f89b4429e3d157f40535f75596639d827d2316972dc12b47f36e4014b9dba7a32810a010966c30c515146
6
+ metadata.gz: 7f8e7acfd621406055e2091119857f595d6ba1899f90b5e6c164210f6c81dcb635359942f91cc1797197e4ab83bc89eae6db7837bdeafcd8491d3a1cc93d3d8a
7
+ data.tar.gz: c04cef773cdb54ca0357d827f9594767203f291c4416d1f5a1557d03f9febeaf86524ef7f1ae39e5b7e8f3a84a417cf74e56e8d60cedbfbc2599fdc8e460fbda
@@ -34,7 +34,7 @@ class MonoRepoDeps::Package::DependencyBypasser
34
34
  package_name: name,
35
35
  imported: imported,
36
36
  packages_order: packages_order,
37
- env: env# MonoRepoDeps::Package::DEFAULT_ENV,
37
+ env: MonoRepoDeps::Package::DEFAULT_ENV,
38
38
  )
39
39
  end
40
40
 
@@ -16,7 +16,15 @@ class MonoRepoDeps::Package::Repo
16
16
 
17
17
  sig do
18
18
  params(
19
- name: T.nilable(T.any(String, Symbol)),
19
+ name: T.nilable(
20
+ T.any(
21
+ String,
22
+ Symbol,
23
+ T::Array[
24
+ T.any(String, Symbol)
25
+ ]
26
+ )
27
+ ),
20
28
  )
21
29
  .returns(T::Array[MonoRepoDeps::Package])
22
30
  end
@@ -33,11 +33,6 @@ class MonoRepoDeps::Package
33
33
  default_deps | env_deps
34
34
  end
35
35
 
36
- def get_bc
37
- # /app/bounded_contexts/jobs/microservices/jobs_app
38
- @root_path.split('/')[3]
39
- end
40
-
41
36
  def get_dependency_envs
42
37
  @dependencies.keys
43
38
  end
@@ -49,4 +44,8 @@ class MonoRepoDeps::Package
49
44
  def entrypoint_file
50
45
  File.join( self.workdir_path, "#{name}.rb" )
51
46
  end
47
+
48
+ def specs_path
49
+ File.join( self.root_path, '/spec/' )
50
+ end
52
51
  end
@@ -13,7 +13,7 @@ class MonoRepoDeps::Task::Manager
13
13
  args: T.anything,
14
14
  kwargs: T.anything
15
15
  )
16
- .void
16
+ .returns(T::Boolean)
17
17
  end
18
18
  def method_missing(method_name, *args, **kwargs)
19
19
  task = MonoRepoDeps.current_project.tasks.detect { _1.name == method_name } || (raise StandardError.new("task '#{method_name}' not found for project"))
@@ -22,34 +22,15 @@ class MonoRepoDeps::Task::Manager
22
22
  when :package
23
23
  statuses = kwargs[:packages].inject({}) do |result, package_name|
24
24
  package = packages_repo.find!(package_name.to_sym)
25
- result[package.name] = do_in_child(task.block, package, kwargs[:args])
25
+ result[package.name] = task.block.call(package, kwargs[:args])
26
26
  result
27
27
  end
28
28
 
29
- failed_packages = statuses.reject {|package_name, exitstatus| exitstatus.success?}
29
+ failed_packages = statuses.reject {|package_name, exitstatus| exitstatus == 0}
30
30
 
31
- if failed_packages.any?
32
- puts failed_packages.keys
33
- exit 1
34
- end
31
+ failed_packages.any? ? false : true
35
32
  else
36
33
  raise StandardError.new("unsupported task subject: #{task.on}")
37
34
  end
38
35
  end
39
-
40
- private
41
-
42
- def do_in_child(block, *args)
43
- read, write = IO.pipe
44
-
45
- pid = fork do
46
- read.close
47
- block.call(*args)
48
- end
49
-
50
- write.close
51
- Process.wait(pid)
52
-
53
- exit($?.exitstatus)
54
- end
55
36
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MonoRepoDeps
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/mono_repo_deps/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "mono_repo_deps"
7
+ spec.version = MonoRepoDeps::VERSION
8
+ spec.authors = ["Nikita Kononov"]
9
+ spec.email = ["vocrsz@gmail.com"]
10
+
11
+ spec.summary = "A Ruby gem for efficiently managing dependencies within a monorepo."
12
+ spec.description = <<-DESC
13
+ MonoRepoDeps is a powerful tool designed to streamline the process of splitting code into separate packages
14
+ within a monorepository. It provides a flexible and easy-to-use solution for managing dependencies between
15
+ packages, making it ideal for large-scale projects with complex codebases.
16
+
17
+ Key Features:
18
+ - Simplifies the organization of code in a monorepo structure.
19
+ - Manages dependencies seamlessly between different packages.
20
+ - Enhances collaboration and code sharing among teams working on interconnected components.
21
+ - Offers a straightforward and customizable configuration for your monorepo setup.
22
+
23
+ How to Use:
24
+ - Install the gem using `gem install MonoRepoDeps`.
25
+ - Configure MonoRepoDeps with your monorepo specifications.
26
+ - Enjoy a more efficient and organized development workflow.
27
+
28
+ Visit the official documentation for detailed instructions and examples.
29
+
30
+ GitHub Repository: https://github.com/droidlabs/MonoRepoDeps
31
+ DESC
32
+ spec.homepage = "https://github.com/droidlabs/mono_repo_deps"
33
+ spec.license = "MIT"
34
+ spec.required_ruby_version = ">= 2.7.0"
35
+
36
+ # spec.metadata["allowed_push_host"] = "Set to your gem server 'https://example.com'"
37
+
38
+ spec.metadata["homepage_uri"] = spec.homepage
39
+ spec.metadata["source_code_uri"] = "https://github.com/droidlabs/mono_repo_deps"
40
+ spec.metadata["changelog_uri"] = "https://github.com/droidlabs/mono_repo_deps"
41
+
42
+ # Specify which files should be added to the gem when it is released.
43
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
44
+ spec.files = Dir.chdir(__dir__) do
45
+ `git ls-files -z`.split("\x0").reject do |f|
46
+ (File.expand_path(f) == __FILE__) ||
47
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
48
+ end
49
+ end
50
+ spec.bindir = "exe"
51
+ spec.executables = spec.files.grep(/\Aexe\//) { |f| File.basename(f) }
52
+ spec.require_paths = ["lib"]
53
+
54
+ spec.add_dependency 'sorbet-runtime', "~> 0.5.11164"
55
+
56
+ spec.add_dependency "dry-auto_inject", "~> 1.0.1"
57
+ spec.add_dependency "dry-core", "~> 1.0.0"
58
+ spec.add_dependency "dry-configurable", "~> 1.0.1"
59
+ spec.add_dependency "dry-container", "~> 0.11.0"
60
+ spec.add_dependency "dry-system", "~> 1.0.1"
61
+
62
+ spec.add_dependency "zeitwerk", "~> 2.6.12"
63
+
64
+ spec.add_dependency "thor"
65
+
66
+ spec.add_development_dependency "bundler", "~> 2.2"
67
+ spec.add_development_dependency "rake", "~> 13.0"
68
+ spec.add_development_dependency "rspec", "~> 3.0"
69
+ spec.add_development_dependency "pry"
70
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mono_repo_deps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Kononov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-28 00:00:00.000000000 Z
11
+ date: 2024-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime
@@ -284,6 +284,7 @@ files:
284
284
  - lib/mono_repo_deps/task.rb
285
285
  - lib/mono_repo_deps/task/manager.rb
286
286
  - lib/mono_repo_deps/version.rb
287
+ - mono_repo_deps.gemspec
287
288
  - sig/mono_repo_deps.rbs
288
289
  homepage: https://github.com/droidlabs/mono_repo_deps
289
290
  licenses: