mono_repo_deps 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.ruby-version +1 -0
  4. data/.standard.yml +3 -0
  5. data/CHANGELOG.md +5 -0
  6. data/CODE_OF_CONDUCT.md +84 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +193 -0
  9. data/Rakefile +8 -0
  10. data/example/Gemfile +1 -0
  11. data/example/Gemfile.lock +51 -0
  12. data/example/MonoRepoConfig.rb +16 -0
  13. data/example/bounded_contexts/cart/cart_app/Package.rb +11 -0
  14. data/example/bounded_contexts/cart/cart_app/bin/console +11 -0
  15. data/example/bounded_contexts/cart/cart_app/package/cart_app.rb +2 -0
  16. data/example/bounded_contexts/cart/cart_core/Package.rb +12 -0
  17. data/example/bounded_contexts/cart/cart_core/bin/console +9 -0
  18. data/example/bounded_contexts/cart/cart_core/package/cart_core.rb +2 -0
  19. data/example/bounded_contexts/cart/cart_datasets/Package.rb +10 -0
  20. data/example/bounded_contexts/cart/cart_datasets/bin/console +9 -0
  21. data/example/bounded_contexts/cart/cart_datasets/package/cart_datasets.rb +2 -0
  22. data/example/bounded_contexts/orders/orders_app/Package.rb +12 -0
  23. data/example/bounded_contexts/orders/orders_app/bin/console +9 -0
  24. data/example/bounded_contexts/orders/orders_app/package/orders_app.rb +2 -0
  25. data/example/bounded_contexts/orders/orders_core/Package.rb +13 -0
  26. data/example/bounded_contexts/orders/orders_core/bin/console +9 -0
  27. data/example/bounded_contexts/orders/orders_core/package/orders_core.rb +2 -0
  28. data/example/bounded_contexts/orders/orders_datasets/Package.rb +11 -0
  29. data/example/bounded_contexts/orders/orders_datasets/bin/console +9 -0
  30. data/example/bounded_contexts/orders/orders_datasets/package/orders_datasets.rb +2 -0
  31. data/example/bounded_contexts/orders/orders_query_api/Package.rb +13 -0
  32. data/example/bounded_contexts/orders/orders_query_api/bin/console +9 -0
  33. data/example/bounded_contexts/orders/orders_query_api/package/cart_query_api.rb +2 -0
  34. data/example/bounded_contexts/orders/paypal_client/Package.rb +9 -0
  35. data/example/bounded_contexts/orders/paypal_client/bin/console +9 -0
  36. data/example/bounded_contexts/orders/paypal_client/package/paypal_client.rb +2 -0
  37. data/example/bounded_contexts/shared/db_connection/Package.rb +10 -0
  38. data/example/bounded_contexts/shared/db_connection/bin/console +9 -0
  39. data/example/bounded_contexts/shared/db_connection/package/db_connection.rb +2 -0
  40. data/example/bounded_contexts/shared/test_utils/Package.rb +9 -0
  41. data/example/bounded_contexts/shared/test_utils/bin/console +9 -0
  42. data/example/bounded_contexts/shared/test_utils/package/test_utils.rb +2 -0
  43. data/example/bounded_contexts/storefront/storefront_app/Package.rb +11 -0
  44. data/example/bounded_contexts/storefront/storefront_app/bin/console +9 -0
  45. data/example/bounded_contexts/storefront/storefront_app/package/storefront_app.rb +2 -0
  46. data/example/bounded_contexts/storefront/storefront_core/Package.rb +11 -0
  47. data/example/bounded_contexts/storefront/storefront_core/bin/console +9 -0
  48. data/example/bounded_contexts/storefront/storefront_core/package/storefront_core.rb +2 -0
  49. data/example/bounded_contexts/storefront/storefront_datasets/Package.rb +11 -0
  50. data/example/bounded_contexts/storefront/storefront_datasets/bin/console +9 -0
  51. data/example/bounded_contexts/storefront/storefront_datasets/package/storefront_datasets.rb +2 -0
  52. data/example/configs/cart_app/default.yml +4 -0
  53. data/example/configs/cart_app/test.yml +3 -0
  54. data/example/configs/orders_app/default.yml +4 -0
  55. data/example/configs/orders_app/test.yml +2 -0
  56. data/exe/mono_repo_deps +15 -0
  57. data/exe/mrd +15 -0
  58. data/lib/mono_repo_deps/config/loader.rb +74 -0
  59. data/lib/mono_repo_deps/config/manager.rb +20 -0
  60. data/lib/mono_repo_deps/config.rb +23 -0
  61. data/lib/mono_repo_deps/loaders/base.rb +63 -0
  62. data/lib/mono_repo_deps/loaders/zeitwerk.rb +77 -0
  63. data/lib/mono_repo_deps/package/builder.rb +27 -0
  64. data/lib/mono_repo_deps/package/dependency_bypasser.rb +44 -0
  65. data/lib/mono_repo_deps/package/factory.rb +100 -0
  66. data/lib/mono_repo_deps/package/find_root.rb +33 -0
  67. data/lib/mono_repo_deps/package/indexer.rb +30 -0
  68. data/lib/mono_repo_deps/package/initializer.rb +38 -0
  69. data/lib/mono_repo_deps/package/list.rb +10 -0
  70. data/lib/mono_repo_deps/package/repo.rb +55 -0
  71. data/lib/mono_repo_deps/package.rb +48 -0
  72. data/lib/mono_repo_deps/project/builder.rb +20 -0
  73. data/lib/mono_repo_deps/project/factory.rb +115 -0
  74. data/lib/mono_repo_deps/project/find_root.rb +31 -0
  75. data/lib/mono_repo_deps/project/initializer.rb +26 -0
  76. data/lib/mono_repo_deps/project.rb +43 -0
  77. data/lib/mono_repo_deps/task/manager.rb +55 -0
  78. data/lib/mono_repo_deps/task.rb +21 -0
  79. data/lib/mono_repo_deps/version.rb +5 -0
  80. data/lib/mono_repo_deps.rb +138 -0
  81. data/sig/mono_repo_deps.rbs +4 -0
  82. metadata +314 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 753c01bf44250b01efb5d8cbc531c0dff8ffc286f4b188871c9918fac7b2e470
4
+ data.tar.gz: ef3809b782fc7dd37ea35c0cfa96e24ede49e29b3a99ab4392f27ee55a512a83
5
+ SHA512:
6
+ metadata.gz: 9b913cf21b3d81488e457f2d258dafe97d6bb6b1315a62874b6ece02c6807c1350fdf4cc54c45e36f06d18acebbbdb9734a3dc518e1488f2b0e6b2a81728c310
7
+ data.tar.gz: 4f6f61ba7ae8e7d98d30eac631e60432b8ebcbbb2a88383bc8a0ce1aea63726dd4fb29e977d66085274e67ec26d8c30cb3df0c71557e525aa07dd206b1d7f7bf
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.6
data/.standard.yml ADDED
@@ -0,0 +1,3 @@
1
+ # For available configuration options, see:
2
+ # https://github.com/testdouble/standard
3
+ ruby_version: 2.7
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-08-09
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at vocrsz@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Nikita Kononov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,193 @@
1
+ # MonoRepoDeps
2
+
3
+ Dependency manager to split and organize Ruby modules and namespaces into highlevel packages and manage relations between them
4
+ Next version of [Rdm gem](https://github.com/droidlabs/rdm)
5
+
6
+ ## Idea
7
+ Main goal to implement the gem was to give developers an ability to keep a large codebase in the single git repository (monorepository) with easy access to:
8
+ 1) require only needed dependencies
9
+ 2) set up loading policies and inflection rules
10
+ 3) manage configuration for different environments
11
+ 4) run specific tasks on selected packages
12
+
13
+ ## Example Project File Structure
14
+ ```bash
15
+ ├── MonoRepoConfig.rb
16
+ ├── Gemfile
17
+ ├── Gemfile.lock
18
+ ├── bounded_contexts
19
+ │ ├── orders
20
+ │ │ ├── bin
21
+ │ │ │ └── run
22
+ │ │ ├── package
23
+ │ │ │ ├── orders
24
+ │ │ │ │ └── export_orders.rb
25
+ │ │ │ │
26
+ │ │ │ └── orders.rb
27
+ │ │ │
28
+ │ │ └── Package.rb
29
+ │ │
30
+ │ ├── orders_db
31
+ │ │ ├── package
32
+ │ │ │ └── orders_db.rb
33
+ │ │ │
34
+ │ │ └── Package.rb
35
+ │ │
36
+ │ └── cart
37
+ │ ├── package
38
+ │ │ └── orders.rb
39
+ │ │
40
+ │ └── Package.rb
41
+
42
+ └── configs
43
+ ├── orders_config
44
+ │ ├── default.yml
45
+ │ └── test.yml
46
+
47
+ └── api_client_config
48
+ ├── default.yml
49
+ └── test.yml
50
+ ```
51
+
52
+ ## Package
53
+ The main MonoRepoDeps entity is the "package".
54
+ Package configuration is defined in Package.rb file.
55
+ Each package also have an 'entrypoint' file, which can be defined as package namespace module.
56
+
57
+ For example for orders package from project structure above entrypoint file could look the following way:
58
+ ```ruby
59
+ module Orders
60
+ end
61
+
62
+ require 'some_gem'
63
+
64
+ SomeGem.example_initialization_for(__dir__)
65
+ ```
66
+
67
+ You can declare dependencies rules which will determine what packages should be imported before you will initialize current one
68
+ ```ruby
69
+ # ./bounded_contexts/orders/Package.rb
70
+
71
+ package do
72
+ name 'marketplace'
73
+ end
74
+
75
+ dependency do
76
+ import 'orders_db'
77
+ end
78
+
79
+ dependency :test do
80
+ import 'cart'
81
+ end
82
+ ```
83
+
84
+ Having that configuration you can call the following code in your bin/run file
85
+ ```bash
86
+ #!/usr/bin/env ruby
87
+ require 'bundler/setup'
88
+ require 'mono_repo_deps'
89
+ MonoRepoDeps.init_package
90
+
91
+ Orders::ExportOrders.new.call
92
+ ```
93
+
94
+ Let's take a look at ```MonoRepoDeps.init_package``` command. That is the core feature of MonoRepoDeps and it does the following actions
95
+ 1. Detect which package the caller file belongs to
96
+ You can also provide that file directly using 'from:' parameter
97
+ ```MonoRepoDeps.init_package(from: __FILE__)```
98
+ or providing package name
99
+ ```MonoRepoDeps.init_package('orders')```
100
+ 2. Build dependencies tree: inside each project we have ```dependency do; end``` block which is provide us information which packages should be loaded before the current one
101
+ 3. For each file in dependency tree:
102
+ * Using Project Code Loader to autoload/preload package classes and modules
103
+ * Call ```require``` for entrypoint file
104
+
105
+ ## Configs
106
+ MonoRepoDeps Configs provides interface to declare and access key-value storage can be specified for certain environment
107
+
108
+ Instead of using ENV['SOME_VARIABLE_NAME'] in your ruby files you can set up MonoRepoDeps Configs and use env variables in your code like this:
109
+ ```ruby
110
+ MonoRepoDeps.configs.api_client.some_variable_name
111
+ ```
112
+ Let's define MonoRepoDeps Config for ```api_client```
113
+ ```yml
114
+ # ./configs/api_client/default.yml
115
+ api_client:
116
+ some_variable_name: ENV['SOME_VARIABLE_NAME']
117
+
118
+ # ./configs/api_client/test.yml
119
+ api_client:
120
+ some_variable_name: ENV['SOME_VARIABLE_NAME'] + ENV['TEST_ENV_NUMBER']
121
+ ```
122
+
123
+ Rdm looks up for configs in directory have been set in MonoRepoConfig.rb file with ```set_configs_dir``` method
124
+ Each config has at least default.yml configuration which can be complemented with :env.yml files
125
+ Running ```MonoRepoDeps.init_package``` with specified :env will check if corresponding :env.yml file exists and merge it's values to the default configuration
126
+
127
+ ## Project
128
+ The 2 main entities within MonoRepoDeps project are 'project' and 'package'
129
+ Project declaration stored in MonoRepoConfig.rb and a parent directory of the file is considered as the project root
130
+
131
+ ### Project Configuration File Example
132
+
133
+ ```ruby
134
+ setup do |project|
135
+ # set up project.env
136
+ set_env(ENV['RUBY_ENV'] || raise('RUBY_ENV environment variable is not set'))
137
+
138
+ # set up directory to look up for project configs
139
+ set_configs_dir 'configs'
140
+
141
+ # set up directory to look up for packages
142
+ set_package_dirname 'package'
143
+ set_packages_lookup_subdir 'bounded_contexts'
144
+
145
+ # code loader configuration
146
+ set_loader :zeitwerk do
147
+ # file patterns to exclude in ruby autoloading
148
+ ignore "**/schema_migrations"
149
+ ignore "**/data_migrations"
150
+
151
+ # rules to overwrite default filename-to-class strategy
152
+ overwrite ->(kname) { kname.gsub(/Foo/) { _1.upcase } }
153
+ overwrite ->(kname) { kname.gsub('Baz', 'BazBar') }
154
+
155
+ # another way to define inflection rules
156
+ inflect "uuid_generator" => "UUIDGenerator"
157
+ end
158
+
159
+ # definition of the task to run rspec on the specific package
160
+ register_task :rspec_run, on: :package do |package, args|
161
+ Dir.chdir(package.root_path) do
162
+ require 'rspec'
163
+
164
+ status = RSpec::Core::Runner.run(args, $stderr, $stdout).to_i
165
+
166
+ exit(status)
167
+ end
168
+ end
169
+ end
170
+ ```
171
+
172
+ ## Tasks
173
+ MonoRepoDeps tasks are an easy way to declare some procedures can be called on you packages/package
174
+
175
+ ### Examples
176
+ ```ruby
177
+ # MonoRepoConfig.rb
178
+ setup do |project|
179
+ # ...
180
+ register_task :puts_package_name, on: :package do |package, args|
181
+ puts [package.name, args].inspect
182
+ end
183
+ # ...
184
+ end
185
+ ```
186
+
187
+ You can call defined task that way:
188
+ ```ruby
189
+ MonoRepoDeps.tasks.puts_package_name(
190
+ packages: MonoRepoDeps.packages.filter(name: "orders"),
191
+ args: [1, 2, 3]
192
+ )
193
+ ```
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: %i[spec]
data/example/Gemfile ADDED
@@ -0,0 +1 @@
1
+ gem 'mono_repo_deps', path: '../'
@@ -0,0 +1,51 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ mono_repo_deps (0.1.13)
5
+ dry-auto_inject (~> 1.0.1)
6
+ dry-configurable (~> 1.0.1)
7
+ dry-container (~> 0.11.0)
8
+ dry-core (~> 1.0.0)
9
+ dry-system (~> 1.0.1)
10
+ sorbet-static-and-runtime (~> 0.5.11105)
11
+ thor
12
+ zeitwerk (~> 2.6.12)
13
+
14
+ GEM
15
+ specs:
16
+ concurrent-ruby (1.2.2)
17
+ dry-auto_inject (1.0.1)
18
+ dry-core (~> 1.0)
19
+ zeitwerk (~> 2.6)
20
+ dry-configurable (1.0.1)
21
+ dry-core (~> 1.0, < 2)
22
+ zeitwerk (~> 2.6)
23
+ dry-container (0.11.0)
24
+ concurrent-ruby (~> 1.0)
25
+ dry-core (1.0.0)
26
+ concurrent-ruby (~> 1.0)
27
+ zeitwerk (~> 2.6)
28
+ dry-inflector (1.0.0)
29
+ dry-system (1.0.1)
30
+ dry-auto_inject (~> 1.0, < 2)
31
+ dry-configurable (~> 1.0, < 2)
32
+ dry-core (~> 1.0, < 2)
33
+ dry-inflector (~> 1.0, < 2)
34
+ sorbet (0.5.11105)
35
+ sorbet-static (= 0.5.11105)
36
+ sorbet-runtime (0.5.11105)
37
+ sorbet-static (0.5.11105-x86_64-linux)
38
+ sorbet-static-and-runtime (0.5.11105)
39
+ sorbet (= 0.5.11105)
40
+ sorbet-runtime (= 0.5.11105)
41
+ thor (1.3.0)
42
+ zeitwerk (2.6.12)
43
+
44
+ PLATFORMS
45
+ x86_64-linux
46
+
47
+ DEPENDENCIES
48
+ mono_repo_deps!
49
+
50
+ BUNDLED WITH
51
+ 2.4.20
@@ -0,0 +1,16 @@
1
+ setup do |project|
2
+ set_env ->() { :test }
3
+
4
+ set_configs_dir 'configs'
5
+ set_package_dirname 'package'
6
+
7
+ set_loader :zeitwerk do |project|
8
+ inflect 'filename' => "FileName"
9
+ overwrite ->(klass_name) { klass_name.gsub(/Api/) { _1.upcase } }
10
+ ignore "**/schema_migrations"
11
+ end
12
+
13
+ register_task :print_package_name, on: :package do |package, args|
14
+ puts package.entrypoint_file
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ package do
2
+ name 'cart_app'
3
+ end
4
+
5
+ dependency do
6
+ import 'cart_core'
7
+ end
8
+
9
+ dependency :test do
10
+ import 'test_utils'
11
+ end
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ # MonoRepoDeps.init(__dir__)
7
+
8
+ MonoRepoDeps.import_package(:storefront_core)
9
+
10
+ require 'irb'
11
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module CartApp
2
+ end
@@ -0,0 +1,12 @@
1
+ package do
2
+ name 'cart_core'
3
+ end
4
+
5
+ dependency do
6
+ import 'cart_datasets'
7
+ import 'orders_query_api', only: ['orders_datasets']
8
+ end
9
+
10
+ dependency :test do
11
+ import 'test_utils'
12
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module CartCore
2
+ end
@@ -0,0 +1,10 @@
1
+ package do
2
+ name 'cart_datasets'
3
+ end
4
+
5
+ dependency do
6
+ import 'db_connection'
7
+ end
8
+
9
+ dependency :test do
10
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module CartDatasets
2
+ end
@@ -0,0 +1,12 @@
1
+ package do
2
+ name 'orders_app'
3
+ end
4
+
5
+ dependency do
6
+ import 'orders_core'
7
+ end
8
+
9
+ dependency :test do
10
+ import 'test_utils'
11
+ import 'storefront_core'
12
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module OrdersApp
2
+ end
@@ -0,0 +1,13 @@
1
+ package do
2
+ name 'orders_core'
3
+ end
4
+
5
+ dependency do
6
+ import 'orders_datasets'
7
+ import 'paypal_client'
8
+ end
9
+
10
+ dependency :test do
11
+ import 'test_utils'
12
+ import 'storefront_core'
13
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module OrdersCore
2
+ end
@@ -0,0 +1,11 @@
1
+ package do
2
+ name 'orders_datasets'
3
+ end
4
+
5
+ dependency do
6
+ import 'db_connection'
7
+ end
8
+
9
+ dependency :test do
10
+ import 'test_utils'
11
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module OrdersDatasets
2
+ end
@@ -0,0 +1,13 @@
1
+ package do
2
+ name 'cart_query_api'
3
+ end
4
+
5
+ dependency do
6
+ import 'orders_core'
7
+ import 'orders_datasets'
8
+ end
9
+
10
+ dependency :test do
11
+ import 'test_utils'
12
+ import 'storefront_core'
13
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module CartQueryApi
2
+ end
@@ -0,0 +1,9 @@
1
+ package do
2
+ name 'paypal_client'
3
+ end
4
+
5
+ dependency do
6
+ end
7
+
8
+ dependency :test do
9
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module PaypalClient
2
+ end
@@ -0,0 +1,10 @@
1
+ package do
2
+ name 'db_connection'
3
+ end
4
+
5
+ dependency do
6
+ end
7
+
8
+ dependency :test do
9
+ import 'test_utils'
10
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'mono_repo_deps'
5
+
6
+ MonoRepoDeps.init(__dir__)
7
+
8
+ require 'irb'
9
+ IRB.start
@@ -0,0 +1,2 @@
1
+ module DbConnection
2
+ end