hanamismith 0.48.0 → 0.49.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/hanamismith.gemspec +7 -7
- data/lib/hanamismith/builders/node.rb +37 -1
- data/lib/hanamismith/builders/setup.rb +5 -2
- data.tar.gz.sig +0 -0
- metadata +14 -15
- metadata.gz.sig +0 -0
- data/lib/hanamismith/templates/%project_name%/.node-version.erb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7ca049a274e49896527f571dd75fb145928c5e28f655127e37eca3503c91c30
|
4
|
+
data.tar.gz: 781e27aaaed6edbc65bc166c21f0ee1c0d13b3252a658550e435cbfce67cbe42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84d651bc213b4496c67d270458f5a937020e9e6a751c6a9b8f138632cea85ea335a38ed5f24d5646e3114ad4cc0fdef6cf9118ec28c802c6e540096c99f718b9
|
7
|
+
data.tar.gz: 26b68ddb5ceb1a88f9f804e84f56be9dbe6515f677a7e69b3ad02b06654a4b01a27c1acae8a134ad4893a3d085981756c08a86e066cdbeb525f3be2501a9a716
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/hanamismith.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "hanamismith"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "0.49.1"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/hanamismith"
|
@@ -23,17 +23,17 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
25
|
spec.required_ruby_version = ">= 3.3", "<= 3.4"
|
26
|
-
spec.add_dependency "cogger", "~> 0.
|
26
|
+
spec.add_dependency "cogger", "~> 0.31"
|
27
27
|
spec.add_dependency "containable", "~> 0.2"
|
28
28
|
spec.add_dependency "dry-monads", "~> 1.6"
|
29
29
|
spec.add_dependency "dry-schema", "~> 1.13"
|
30
|
-
spec.add_dependency "etcher", "~> 2.
|
30
|
+
spec.add_dependency "etcher", "~> 2.7"
|
31
31
|
spec.add_dependency "htmx", "~> 1.0"
|
32
|
-
spec.add_dependency "infusible", "~> 3.
|
32
|
+
spec.add_dependency "infusible", "~> 3.12"
|
33
33
|
spec.add_dependency "refinements", "~> 12.10"
|
34
|
-
spec.add_dependency "rubysmith", "~> 7.
|
35
|
-
spec.add_dependency "runcom", "~> 11.
|
36
|
-
spec.add_dependency "sod", "~> 0.
|
34
|
+
spec.add_dependency "rubysmith", "~> 7.9"
|
35
|
+
spec.add_dependency "runcom", "~> 11.10"
|
36
|
+
spec.add_dependency "sod", "~> 0.20"
|
37
37
|
spec.add_dependency "spek", "~> 3.0"
|
38
38
|
spec.add_dependency "zeitwerk", "~> 2.7"
|
39
39
|
|
@@ -1,18 +1,54 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "dry/monads"
|
4
|
+
require "refinements/pathname"
|
3
5
|
require "refinements/struct"
|
4
6
|
|
5
7
|
module Hanamismith
|
6
8
|
module Builders
|
7
9
|
# Builds project skeleton for Node.
|
8
10
|
class Node < Rubysmith::Builders::Abstract
|
11
|
+
include Dry::Monads[:result]
|
12
|
+
|
9
13
|
using Refinements::Struct
|
14
|
+
using Refinements::Pathname
|
15
|
+
|
16
|
+
def initialize(executor: Open3, **)
|
17
|
+
@executor = executor
|
18
|
+
super(**)
|
19
|
+
end
|
10
20
|
|
11
21
|
def call
|
22
|
+
build_version
|
12
23
|
builder.call(settings.merge(template_path: "%project_name%/package.json.erb")).render
|
13
|
-
builder.call(settings.merge(template_path: "%project_name%/.node-version.erb")).render
|
14
24
|
true
|
15
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
attr_reader :executor
|
30
|
+
|
31
|
+
def build_version
|
32
|
+
case load_version
|
33
|
+
in Success(text) then version_path.make_ancestors.write text.delete_prefix("v")
|
34
|
+
in Failure(message) then log_error message
|
35
|
+
else log_error "Shell failure. Is your environment configured properly?"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def load_version
|
40
|
+
executor.capture3("node", "--version").then do |stdout, _stderr, status|
|
41
|
+
return Success stdout if status.success?
|
42
|
+
|
43
|
+
Failure "Unable to obtain version for #{version_path.inspect}."
|
44
|
+
end
|
45
|
+
rescue Errno::ENOENT
|
46
|
+
Failure "Unable to find Node. Is Node installed?"
|
47
|
+
end
|
48
|
+
|
49
|
+
def version_path = settings.project_root.join ".node-version"
|
50
|
+
|
51
|
+
def log_error(message) = logger.error { message }
|
16
52
|
end
|
17
53
|
end
|
18
54
|
end
|
@@ -25,8 +25,11 @@ module Hanamismith
|
|
25
25
|
puts "Installing packages..."
|
26
26
|
Runner.call "npm install"
|
27
27
|
|
28
|
-
puts "
|
29
|
-
Runner.call "
|
28
|
+
puts "Configuring databases..."
|
29
|
+
Runner.call "hanami db prepare"
|
30
|
+
|
31
|
+
puts "Compiling assets..."
|
32
|
+
Runner.call "hanami assets compile"
|
30
33
|
CONTENT
|
31
34
|
end
|
32
35
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanamismith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.49.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-11-
|
38
|
+
date: 2024-11-15 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
46
|
+
version: '0.31'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
53
|
+
version: '0.31'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: containable
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,14 +99,14 @@ dependencies:
|
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '2.
|
102
|
+
version: '2.7'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '2.
|
109
|
+
version: '2.7'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: htmx
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,14 +127,14 @@ dependencies:
|
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '3.
|
130
|
+
version: '3.12'
|
131
131
|
type: :runtime
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '3.
|
137
|
+
version: '3.12'
|
138
138
|
- !ruby/object:Gem::Dependency
|
139
139
|
name: refinements
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,42 +155,42 @@ dependencies:
|
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '7.
|
158
|
+
version: '7.9'
|
159
159
|
type: :runtime
|
160
160
|
prerelease: false
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - "~>"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: '7.
|
165
|
+
version: '7.9'
|
166
166
|
- !ruby/object:Gem::Dependency
|
167
167
|
name: runcom
|
168
168
|
requirement: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: '11.
|
172
|
+
version: '11.10'
|
173
173
|
type: :runtime
|
174
174
|
prerelease: false
|
175
175
|
version_requirements: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: '11.
|
179
|
+
version: '11.10'
|
180
180
|
- !ruby/object:Gem::Dependency
|
181
181
|
name: sod
|
182
182
|
requirement: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
184
|
- - "~>"
|
185
185
|
- !ruby/object:Gem::Version
|
186
|
-
version: '0.
|
186
|
+
version: '0.20'
|
187
187
|
type: :runtime
|
188
188
|
prerelease: false
|
189
189
|
version_requirements: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
191
|
- - "~>"
|
192
192
|
- !ruby/object:Gem::Version
|
193
|
-
version: '0.
|
193
|
+
version: '0.20'
|
194
194
|
- !ruby/object:Gem::Dependency
|
195
195
|
name: spek
|
196
196
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,7 +276,6 @@ files:
|
|
276
276
|
- lib/hanamismith/import.rb
|
277
277
|
- lib/hanamismith/templates/%project_name%/.circleci/config.yml.erb
|
278
278
|
- lib/hanamismith/templates/%project_name%/.github/workflows/ci.yml.erb
|
279
|
-
- lib/hanamismith/templates/%project_name%/.node-version.erb
|
280
279
|
- lib/hanamismith/templates/%project_name%/Guardfile.erb
|
281
280
|
- lib/hanamismith/templates/%project_name%/Procfile.dev.erb
|
282
281
|
- lib/hanamismith/templates/%project_name%/Procfile.erb
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
23.1.0
|