hanamismith 0.49.0 → 0.50.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10fe7dd2d05906100558c794fb23524c86585ac2a9350933d79927ed72bf4034
4
- data.tar.gz: aa155e6a53d45842e1ad20c235507a09f2a07f0782c34bfcd0d58d6c35e0d680
3
+ metadata.gz: 9154addcf31c7ef6d982ad21c46934aa373d19f2e383108bcd1a33913a2b0af8
4
+ data.tar.gz: 502aa10ebf6b9b3d8b625a96468e2130dcdcda35536439d76099b55f3904b75b
5
5
  SHA512:
6
- metadata.gz: 3f2a8607f93b2369ae2702f4db91b6111bb4e3191ece92f8b3f7cc6998604ad4007c269978aabd5eed2fec6cb7bba4036fcf59477a48f92bb3ef821a31ebc896
7
- data.tar.gz: 02bd71d9f19edb7d2dcf0c7becc7a797e41604bc7366178eb647f85186f4445de6437050b1af58a15c352d79e0813f0d169aa9d34b53fb165354e3b26b1bc85a
6
+ metadata.gz: 1763140c326bb92b67dcebafa0dea8fd97c4b508119e16b6ada84acbc56e9f420298850b091bdd5ba10e7d62bc4ceff8e896fea3610d111bf34e85c9c740e477
7
+ data.tar.gz: 9ea7d4d26f5782460edfd73e114f94c1994c1d3e6bc745f9a51a8910b93a491c1f5eed901de542abc67b94fb15bf188cbf6034b97db659131de0b5130a56d537
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -32,14 +32,14 @@ toc::[]
32
32
  * Uses {dotenv_link} for managing your environment configurations.
33
33
  * Provides support for Continuous Integration systems like link:https://circleci.com[Circle CI] (default) and link:https://docs.github.com/en/actions[GitHub Actions].
34
34
  * Provides the `/up` health check endpoint via the `Health` slice.
35
- * Uses link:https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md[YJIT] as a provider so you can deploy with YJIT disabled (i.e. `RUBYOPT=--yjit-disable --yjit-exec-mem-size=192`) and let the application enable upon boot.
35
+ * Configures link:https://github.com/ruby/ruby/blob/master/doc/yjit/yjit.md[YJIT] so you can deploy with YJIT disabled (i.e. `RUBYOPT=--yjit-disable --yjit-exec-mem-size=192`) and let the application enable upon boot.
36
36
  * Disables link:https://github.com/ruby/irb[IRB] console autocomplete when used in production-like environments. You can re-enable IRB autocomplete by setting `IRB_USE_AUTOCOMPLETE=true` before launching your console in non development or test environments.
37
37
 
38
38
  == Screenshots/Screencasts
39
39
 
40
40
  image:https://alchemists.io/images/projects/hanamismith/screenshots/home.png[Home,width=702,height=694,role=focal_point]
41
41
 
42
- The above is a screenshot of a _Demo_ project that was generated and run locally. For a fully working demonstration application -- as built by this gem -- check out the link:https://github.com/bkuhlmann/hemo[Hemo] project. Here's a quick screencast overview of this demonstration application in action:
42
+ The above is a screenshot of a _Demo_ project that was generated locally. For a fully working demonstration application -- as built by this gem -- check out the link:https://github.com/bkuhlmann/hemo[Hemo] project as shown in this screencast:
43
43
 
44
44
  video::https://alchemists.io/videos/projects/hemo/demo.mp4[poster=https://alchemists.io/images/projects/hemo/demo.png,width=1280,height=720,role=focal_point]
45
45
 
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.49.0"
5
+ spec.version = "0.50.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/hanamismith"
@@ -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 "Configurating databases..."
29
- Runner.call "bin/hanami db prepare"
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
@@ -13,7 +13,6 @@ module Hanamismith
13
13
  BUILDERS = [
14
14
  Rubysmith::Builders::Init,
15
15
  Builders::Core,
16
- Builders::Providers::YJIT,
17
16
  Builders::Refinement,
18
17
  Builders::Icon,
19
18
  Builders::Stylesheet,
@@ -3,6 +3,7 @@ require "hanami"
3
3
  <% namespace do %>
4
4
  # The application base configuration.
5
5
  class App < Hanami::App
6
+ RubyVM::YJIT.enable
6
7
  Dry::Schema.load_extensions :monads
7
8
  Dry::Validation.load_extensions :monads
8
9
 
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.0
4
+ version: 0.50.0
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-09 00:00:00.000000000 Z
38
+ date: 2024-11-22 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -252,7 +252,6 @@ files:
252
252
  - lib/hanamismith/builders/icon.rb
253
253
  - lib/hanamismith/builders/javascript.rb
254
254
  - lib/hanamismith/builders/node.rb
255
- - lib/hanamismith/builders/providers/yjit.rb
256
255
  - lib/hanamismith/builders/puma/configuration.rb
257
256
  - lib/hanamismith/builders/puma/procfile.rb
258
257
  - lib/hanamismith/builders/pwa.rb
@@ -276,7 +275,6 @@ files:
276
275
  - lib/hanamismith/import.rb
277
276
  - lib/hanamismith/templates/%project_name%/.circleci/config.yml.erb
278
277
  - lib/hanamismith/templates/%project_name%/.github/workflows/ci.yml.erb
279
- - lib/hanamismith/templates/%project_name%/.node-version.erb
280
278
  - lib/hanamismith/templates/%project_name%/Guardfile.erb
281
279
  - lib/hanamismith/templates/%project_name%/Procfile.dev.erb
282
280
  - lib/hanamismith/templates/%project_name%/Procfile.erb
metadata.gz.sig CHANGED
Binary file
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "refinements/struct"
4
-
5
- module Hanamismith
6
- module Builders
7
- module Providers
8
- # Builds project skeleton for YJIT provider.
9
- class YJIT < Rubysmith::Builders::Abstract
10
- using Refinements::Struct
11
-
12
- def call
13
- path = "%project_name%/config/providers/yjit.rb.erb"
14
- builder.call(settings.merge(template_path: path)).render
15
- true
16
- end
17
- end
18
- end
19
- end
20
- end