singer 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b91934a916b675cfddecdac26f48673a77e9e2f014ae94a7db7623df0adaac67
4
- data.tar.gz: f8a8384bdbba9f096d303e91fbd68a2b1063239d89e5f072d1e8e551cee1b7d2
3
+ metadata.gz: 61d9abf1b94fa1a0b85d2770ab2f4ec38b81f9a99855054d4eeab41f69ce8e49
4
+ data.tar.gz: f4a433fdbfa9bc1b64847936f9033387cdc36d5490a03b497f25b49fa8c5347e
5
5
  SHA512:
6
- metadata.gz: 5a0d34e3e4ba0b18a55151f796f30d8b0bad715f74a084f37456a4cdebb74d8f66543db90003dc84877a19ef295f0664f1e5ba190cd137d67a670f8819802d01
7
- data.tar.gz: d9245c0f2fcbc5671a078daf5bcf71977ba2ec661c1b599e0aedaa2e679948bc4d9ebad738a6302daefe515dae253a5d8d59d6b12b0779b7796b6c9bf52b35d2
6
+ metadata.gz: ce7559042aaa658bfd03921901218444ea33dbf0406b04654f0b79371c8812fd3bcd6b879176b8670cf7f74db17cc9ee2f84316c94bcd1e06ab6a86f390275e9
7
+ data.tar.gz: c5d81b77aabe190a6e6d214857c551753270afda439367b0312df7cf9f3ec11f05030edd468b8327100369b517f3e56fb19760dd22460131f3b5f79be7c71adb
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2025 Emil Chludziński
3
+ Copyright (c) 2025-2026 Emil Chludziński
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -19,13 +19,17 @@ For `PROJECT_NAME`, using `snake_case` is best, although an attempt will be made
19
19
 
20
20
  ## Writing your own templates
21
21
 
22
- Many features of Singer will become clearer when seeing actual usage - please feel encouraged to examine the templates shipped with the gem (you can find them in `templates_from_gem` shown by the `singer --show-paths`).
22
+ Many features of Singer will become clearer when seeing actual usage - please feel encouraged to examine the templates shipped with the gem (you can find them in `templates_from_gem` shown by the `singer --list-paths`).
23
23
 
24
24
  ### Template location
25
25
 
26
- User-provided templates should be placed in the directory named `templates_from_user` in the `singer --show-paths` output.
26
+ User-provided templates should be placed in the directory named `templates_from_user` in the `singer --list-paths` output.
27
27
  Each template resides in a subdirectory - the subdirectory's name becomes the template's name, and is not included in the generated paths (Singer will only replicate the directory structure _inside_ it).
28
28
 
29
+ ### Using templates from somewhere else
30
+
31
+ You can also, instead of the name of a known template via `[TEMPLATE_NAME]`, specify the full path to your custom template with the `--template-path` option.
32
+
29
33
  ### Variables available to templates
30
34
 
31
35
  Templates written in ERB or other templating mechanisms that execute Ruby code will have access to `Singer.configuration` object and its accessors. For example, the following code in a `my_template`'s file:
@@ -1,3 +1,3 @@
1
1
  module Singer
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.0'.freeze
3
3
  end
@@ -0,0 +1,9 @@
1
+ class Test<%= Singer.configuration.project_name_camelcase %> < Minitest::Test
2
+ def setup
3
+ @<%= Singer.configuration.project_name_snakecase %> = <%= Singer.configuration.project_name_camelcase %>.new
4
+ end
5
+
6
+ def test_something
7
+ flunk
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: singer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Chludziński
@@ -25,7 +25,8 @@ dependencies:
25
25
  version: '0'
26
26
  description: |
27
27
  Singer is a highly configurable templating system intended for generating Ruby boilerplate.
28
- It aims to make creating and extending Sinatra apps easier.
28
+ Its main aim is to make creating and extending Sinatra apps easier.
29
+ It can also be used to generate pretty much any other files from templates, with defined directory structure.
29
30
  email:
30
31
  - tanstaafl@tlen.pl
31
32
  executables:
@@ -63,6 +64,7 @@ files:
63
64
  - templates/tdd/Gemfile
64
65
  - templates/tdd/lib/__PROJECT_NAME_SNAKECASE__.rb
65
66
  - templates/tdd/test/test___PROJECT_NAME_SNAKECASE__.rb
67
+ - templates/test/test/test___PROJECT_NAME_SNAKECASE__.rb
66
68
  homepage: https://gitlab.com/tanstaafl/singer/
67
69
  licenses:
68
70
  - MIT