stimpack 0.3.0 → 0.4.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: 8a182ce65cfc7f331c0b8aab98cb9f66f74e24b2892f07759b6fc0663d2ed9d2
4
- data.tar.gz: cfbdf8284d0b3c054c2708bd69bfc0eb63341044e93ca064cf9971b17e391a06
3
+ metadata.gz: 3cb6166834b2ea8ebd3623491464ee321b457fc4347c7f8af80e8efa47c18785
4
+ data.tar.gz: b165b651e620abd0197c509070049a2f9ff5523f2b5c4ab32b2b7d26392c8b16
5
5
  SHA512:
6
- metadata.gz: 7dfc2c8a19b50159cddb6f5ace4a593e8f69d8719ee607c3994fed1b1541cfb639fa1bba1bb458eff632487cf65e84181899bd3c3343192ddd5f03abd6f8bd7a
7
- data.tar.gz: 1c7f5dce375f55b6733ac771d86f3799aa408335e0d17b11cff6c9e7d47e7ff6d53ccd54c5f944419bad9a9eda2a0c2146c4048dcf26ff643e056119302fb66c
6
+ metadata.gz: 81f1124b9c8901a6a681f00385f9a5d67c48d035925c241b69ab68f0c9745d7b4c15decd45d59b1fceb6d9b552ec23c4431f900a230f77ef1954c5edba740bf0
7
+ data.tar.gz: e4c881c3356dab09454183967508051133a1054054fc10dc9106cae7fb5b2ef3378ff5c68da93dcfb119e55004144cb539c70ebf8c875ca9e301a4ecdafd2e94
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Stimpack
2
2
 
3
- `stimpack` makes integrating with [`packwerk`](https://github.com/Shopify/packwerk) easy and establishes conventions such that packwerk packages mimic the feel and structure of [Rails engines](https://guides.rubyonrails.org/engines.html), without all of the boilerplate. With `stimpack`, new packages' autoload paths are automatically added to Rails, so your code will immediately become usable and loadable without additional configuration.
3
+ `stimpack` establishes and implements a set of conventions for splitting up large monoliths built on top of [`packwerk`](https://github.com/Shopify/packwerk). With `stimpack`, new packages' autoload paths are automatically added to Rails, so your code will immediately become usable and loadable without additional configuration.
4
4
 
5
5
  Here is an example application that uses `stimpack`:
6
6
  ```
@@ -24,12 +24,12 @@ packs/
24
24
  some_other_non_namespaced_private_model.rb # this works too
25
25
  my_domain/
26
26
  my_private_namespacd_model.rb
27
- config/
28
- initializers/ # Initializers can live in packs and load as expected
29
27
  controllers/
30
28
  views/
31
- lib/
32
- tasks/
29
+ config/
30
+ initializers/ # Initializers can live in packs and load as expected
31
+ lib/
32
+ tasks/
33
33
  spec/ # With stimpack, specs for a pack live next to the pack
34
34
  public/
35
35
  my_domain_spec.rb
@@ -71,6 +71,17 @@ module MyCoolApp
71
71
  end
72
72
  ```
73
73
 
74
+ ### Splitting routes
75
+ `stimpack` allows you to split your application routes for every pack. You just have to create a file describing your routes and then `draw` them in your root `config/routes.rb` file.
76
+
77
+ ```ruby
78
+ # packs/my_domain/config/routes/my_domain.rb
79
+ resources :my_resource
80
+
81
+ # config/routes.rb
82
+ draw(:my_domain)
83
+ ```
84
+
74
85
  ### Making your Package an Engine
75
86
  Add `engine: true` to your `package.yml` to make it an actual Rails engine:
76
87
  ```yml
@@ -1,3 +1,3 @@
1
1
  module Stimpack
2
- VERSION = "0.3.0".freeze
2
+ VERSION = "0.4.0".freeze
3
3
  end
data/lib/stimpack.rb CHANGED
@@ -42,6 +42,7 @@ module Stimpack
42
42
  config
43
43
  config/locales
44
44
  config/initializers
45
+ config/routes
45
46
  )
46
47
  end
47
48
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-08 00:00:00.000000000 Z
11
+ date: 2022-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails