rbytes 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +20 -0
- data/lib/ruby_bytes/compiler.rb +4 -0
- data/lib/ruby_bytes/publisher.rb +1 -1
- data/lib/ruby_bytes/thor.rb +1 -1
- data/lib/ruby_bytes/version.rb +1 -1
- data/templates/rbytes/core_ext.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8780a2ff433a3b3e11c59a05fe7bf73a1a742463c659bbf8abd835b17242d43
|
4
|
+
data.tar.gz: 10fd5d4eb9271e6e3be8fe2f71262e03a743dbf077b71a925498796c20e2cafe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c681d786e67cf6423e95b78b687bfec4dea5460ec3238656ed3319347240eae199a21fbf5bc05fb3d67a70fdd6862797712401085e239ce94c56ccb25f7ceea9
|
7
|
+
data.tar.gz: e8fae36e2fa7daa3acfd71a760b969e6c09c23dc248f1bedd479930e7c9e064b7c6027e987fa61683250c36a65398cc784f174f2f9890ce0a3764300abe76088
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -11,10 +11,13 @@ Ruby Bytes is a tool to build application templates for Ruby and Rails applicati
|
|
11
11
|
|
12
12
|
We also provide a [GitHub action](#github-action) to compile and deploy templates continuously.
|
13
13
|
|
14
|
+
> 📖 Read more about Ruby Bytes and application templates in the [Ruby Bytes, or generating standalone generators](https://evilmartians.com/chronicles/ruby-bytes-or-generating-standalone-generators) post.
|
15
|
+
|
14
16
|
## Examples
|
15
17
|
|
16
18
|
- [ruby-on-whales][]
|
17
19
|
- [view_component-contrib][]
|
20
|
+
- [rubocoping][]
|
18
21
|
|
19
22
|
See also examples in the [templates](https://github.com/palkan/rbytes/tree/master/templates) folder.
|
20
23
|
|
@@ -104,6 +107,22 @@ file "config/anycable.yml", ERB.new(
|
|
104
107
|
|
105
108
|
**NOTE:** By default, we assume that partials are stored next to the template's entry-point. Partials may have the "_" prefix and ".rb" or ".tt" suffixes.
|
106
109
|
|
110
|
+
Ruby Bytes can also import a sub-template into your template. Simply use the `#import_template` helper in your template:
|
111
|
+
|
112
|
+
```erb
|
113
|
+
# subtemplate/_partial.rb
|
114
|
+
say "Hello from subtemplate's partial!"
|
115
|
+
|
116
|
+
# subtemplate/subtemplate.rb
|
117
|
+
<%= include "partial" %>
|
118
|
+
|
119
|
+
# template.rb
|
120
|
+
<%= import_template("subtemplate/subtemplate.rb")>
|
121
|
+
```
|
122
|
+
|
123
|
+
Note that the full filename must be passed to the `#import_template` helper, including any file extension, unlike the `#include` helper. All templates within the subtemplate directory will consider that to be their root directory.
|
124
|
+
|
125
|
+
|
107
126
|
### Compiling templates
|
108
127
|
|
109
128
|
You can compile a template by using the `rbytes` executable:
|
@@ -268,3 +287,4 @@ The gem is available as open source under the terms of the [MIT License](http://
|
|
268
287
|
[RailsBytes]: https://railsbytes.com
|
269
288
|
[ruby-on-whales]: https://github.com/evilmartians/ruby-on-whales
|
270
289
|
[view_component-contrib]: https://github.com/palkan/view_component-contrib
|
290
|
+
[rubocoping]: https://github.com/evilmartians/rubocoping-generator
|
data/lib/ruby_bytes/compiler.rb
CHANGED
data/lib/ruby_bytes/publisher.rb
CHANGED
data/lib/ruby_bytes/thor.rb
CHANGED
data/lib/ruby_bytes/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbytes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|