charsi 0.1.5 → 0.1.6
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/bin/charsi +0 -0
- data/charsi.gemspec +2 -2
- data/lib/charsi/template.rb +13 -1
- data/mise.toml +2 -0
- data/templates/site/.devcontainer/devcontainer.json.template +5 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 046616aec697f49e33f885112d18efb1d01d8d27a08b9d4c38dccfabe697ab06
|
|
4
|
+
data.tar.gz: 6c4aba3a7bf6d41d52fc074da33315d7e7c586c3edc96ea7c9a388dec432f1ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d2015813666747cd6f364b69c645f971d001b9b9858554c813416fed7f3f5fd825bf96ce840ef07819d2f35cf4224787284da67c85d2921a3088deb520027fd
|
|
7
|
+
data.tar.gz: deeb29c36d62814921bd344011c2d201396b81c2de531b0068d202be35c54d7e417e79105b02a11762baf2535ecb31af28c6b6d711d2d5d9aded3892b5585a8a
|
data/bin/charsi
CHANGED
|
File without changes
|
data/charsi.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = 'charsi'
|
|
3
|
-
spec.version = '0.1.
|
|
3
|
+
spec.version = '0.1.6'
|
|
4
4
|
|
|
5
5
|
spec.authors = ['Ryan Beasse']
|
|
6
6
|
spec.email = ['me@ryanbeasse.com']
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
19
19
|
spec.files = Dir.chdir(__dir__) do
|
|
20
20
|
`git ls-files -z`.split("\x0").reject do |f|
|
|
21
|
-
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[test/ .git .github
|
|
21
|
+
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[test/ .git .github])
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
|
data/lib/charsi/template.rb
CHANGED
|
@@ -17,7 +17,11 @@ module Charsi
|
|
|
17
17
|
output_file = determine_output_filename(view)
|
|
18
18
|
output_path = @config.path(:output_dir, output_file)
|
|
19
19
|
|
|
20
|
-
processed_view =
|
|
20
|
+
processed_view = if html?(output_file)
|
|
21
|
+
parse_erb_with_layout(view)
|
|
22
|
+
else
|
|
23
|
+
parse_erb(view)
|
|
24
|
+
end
|
|
21
25
|
|
|
22
26
|
Charsi::FileManagement.write(output_path, processed_view)
|
|
23
27
|
end
|
|
@@ -33,6 +37,14 @@ module Charsi
|
|
|
33
37
|
basename.include?('.') ? basename : "#{basename}.html"
|
|
34
38
|
end
|
|
35
39
|
|
|
40
|
+
def html?(filename)
|
|
41
|
+
File.extname(filename) == '.html'
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def parse_erb(view_path)
|
|
45
|
+
Tilt::ERBTemplate.new(view_path).render(@app)
|
|
46
|
+
end
|
|
47
|
+
|
|
36
48
|
def parse_erb_with_layout(view_path, layout: 'default.erb')
|
|
37
49
|
layout_path = @config.path(:layout_dir, layout)
|
|
38
50
|
|
data/mise.toml
ADDED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%= project_title %>",
|
|
3
3
|
"image": "mcr.microsoft.com/devcontainers/ruby:4",
|
|
4
|
+
"mounts": [
|
|
5
|
+
"source=${localEnv:USERPROFILE}/.claude,target=/home/vscode/.claude,type=bind,consistency=cached"
|
|
6
|
+
],
|
|
4
7
|
"postCreateCommand": "bundle install",
|
|
5
8
|
"customizations": {
|
|
6
9
|
"vscode": {
|
|
7
10
|
"extensions": [
|
|
8
|
-
"shopify.ruby-lsp"
|
|
11
|
+
"shopify.ruby-lsp",
|
|
12
|
+
"anthropic.claude-code"
|
|
9
13
|
]
|
|
10
14
|
}
|
|
11
15
|
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: charsi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Beasse
|
|
@@ -116,6 +116,7 @@ files:
|
|
|
116
116
|
- lib/charsi/generator.rb
|
|
117
117
|
- lib/charsi/server.rb
|
|
118
118
|
- lib/charsi/template.rb
|
|
119
|
+
- mise.toml
|
|
119
120
|
- templates/site/.devcontainer/devcontainer.json.template
|
|
120
121
|
- templates/site/CLAUDE.md.template
|
|
121
122
|
- templates/site/Gemfile.template
|