hanamismith 0.49.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 +1 -1
- data/lib/hanamismith/builders/node.rb +37 -1
- data/lib/hanamismith/builders/setup.rb +5 -2
- data.tar.gz.sig +0 -0
- metadata +2 -3
- 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
@@ -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.49.
|
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
|
@@ -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
|