monoz 0.5.0 → 0.6.0

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: a4b5b401a4bf7239ed13540d493ca21b270307357e9e0c6aa4eaadacb7b0a887
4
- data.tar.gz: 0537ac18ffe150db50875fb8c1dd7537019792d50616cef4693f4fbf9192913d
3
+ metadata.gz: c0013889b9898c959838d428124b04fa0854671d15eb123d76f73c6731df02c6
4
+ data.tar.gz: 429449f0e251ca61ba961aa69158e44114d6950c92f173dcd8e8d5fa7249c5c2
5
5
  SHA512:
6
- metadata.gz: d2c82d448831e9cfec6901a3dcc09b9b2531a63621849a2def1c4b50aa2f150547148ef01a454eb7f57012922da93560fd3884f497ba79a9965f227be4e78abe
7
- data.tar.gz: a569b1c68211574c5e03beeb87a6d95b9cc7047d41c692c095f0e63168e5aec03fcc6bb3fe1f01c7ce0d6d980393148b7da327f9926df6e35655a32b73f18e59
6
+ metadata.gz: 23fe065b566bb689a741df6b05b8f294f01c74ea146c6cb6870a7b55f18ef0cf28646cb2ae85a7da1cd125ffa1d425623457f94456fe0fc928602fa6745c518d
7
+ data.tar.gz: ad78c15989fea4e158317f2cff8eb2f8e0fc84324e1c393a4c5359fb440ea3a97d6ebb06327d6fa88da1ad3b34a580d576a769e1efc1a811a105fd021db9ed69
@@ -24,11 +24,25 @@ module Monoz
24
24
  return help("bundle") if command.nil? || command.first == "help"
25
25
 
26
26
  projects = Monoz.projects.order(:dependants)
27
+ Monoz::Services::BundleService.new(self).link_local_gems!(projects)
27
28
  Monoz::Services::RunService.new(self).call(projects, "bundle", *command)
28
29
 
29
30
  say "The command ran successfully in all project directories without any errors.", [:green]
30
31
  end
31
32
 
33
+ desc "link", "Link gems to local directories in development."
34
+ def link
35
+ say "Linking gems to local directories by setting the source directory in bundle config", [:blue, :bold]
36
+ say "Please ensure you're not including ", :yellow
37
+ say ".bundle/config ", [:yellow, :bold]
38
+ say "file in your git repository by mistake", :yellow
39
+ say ""
40
+
41
+ Monoz::Services::BundleService.new(self).link_local_gems!(Monoz.projects)
42
+
43
+ say "Successfully linked all gem directories without any errors.", [:green]
44
+ end
45
+
32
46
  desc "projects", "Shows a list of projects in this repository"
33
47
  def projects
34
48
  Monoz.projects.order(:name).to_table
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Monoz
4
+ module Services
5
+ class BundleService < Monoz::Services::BaseService
6
+ def link_local_gems!(projects)
7
+ Monoz.projects.filter("gems").each do |gem|
8
+ command = "monoz bundle config local.#{gem.gem_name} #{gem.root_path}"
9
+ Monoz::Services::RunService.new(self).call(projects, *command.split(" "))
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -3,6 +3,7 @@
3
3
  require "yaml"
4
4
  require "fileutils"
5
5
  require "pty"
6
+ require "active_support/core_ext/array" # Import the necessary extension
6
7
 
7
8
  module Monoz
8
9
  module Responses
@@ -50,7 +51,7 @@ module Monoz
50
51
 
51
52
  say "Running ", nil, false
52
53
  say command.join(" "), [:bold], false
53
- say " in #{@projects.map { |p| p.name }.join(", ")}:"
54
+ say " in #{@projects.map { |p| p.name }.to_sentence}:"
54
55
 
55
56
  say ""
56
57
  run_commands
data/lib/monoz/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Monoz
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
data/lib/monoz.rb CHANGED
@@ -14,6 +14,7 @@ module Monoz
14
14
  module Services
15
15
  autoload "ActionService", "monoz/services/action_service"
16
16
  autoload "BaseService", "monoz/services/base_service"
17
+ autoload "BundleService", "monoz/services/bundle_service"
17
18
  autoload "InitService", "monoz/services/init_service"
18
19
  autoload "RunService", "monoz/services/run_service"
19
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monoz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kjellberg
@@ -72,6 +72,7 @@ files:
72
72
  - lib/monoz/project_collection.rb
73
73
  - lib/monoz/services/action_service.rb
74
74
  - lib/monoz/services/base_service.rb
75
+ - lib/monoz/services/bundle_service.rb
75
76
  - lib/monoz/services/init_service.rb
76
77
  - lib/monoz/services/run_service.rb
77
78
  - lib/monoz/spinner.rb