jets-hanami 0.2.0.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2618b780adfd786d2a1f17a58c851ab6d8c107bd3141cb8e52969ce69dc7f6a5
4
+ data.tar.gz: a7b81765a7f50d98a9f57512711f1cc7bed4656a4b6ff2b6ee5d2ecea351f845
5
+ SHA512:
6
+ metadata.gz: bfe6885becc45c91603b1e752620715385dc9f4ef887fef0e7ebe710c5e116f37fbc40685e4ab7d6a3771d29965cd6d6d8d71befe54c637fef3a812621365a85
7
+ data.tar.gz: 61c986618a6a0764fb7acd4091afd6750ab7de53375e817b1438b4e485b27f96ab740d1712a8620b388e764bfa18b2353929ee61d6740b98c9370c9060d3570a
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
5
+
6
+ ## [0.2.0.beta] - 2024-05-21
7
+
8
+ - Hamami boot decorater to call Jets.boot
9
+
10
+ ## [0.1.0] - 2024-05-21
11
+
12
+ - Initial release
data/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # Jets Hanami Support
2
+
3
+ [![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)
4
+
5
+ A [Jets Plugin](https://docs.rubyonjets.com/docs/plugins/) for Hanami and [Jets](http://rubyonjets.com/).
6
+
7
+ ## Usage
8
+
9
+ Add gem to your Gemfile, bundle, and deploy
10
+
11
+ bundle add "jets-hanami"
12
+ jets init
13
+ jets deploy
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,25 @@
1
+ require "zeitwerk"
2
+
3
+ module Jets
4
+ module Hanami
5
+ class Autoloader
6
+ class Inflector < Zeitwerk::Inflector
7
+ def camelize(basename, _abspath)
8
+ map = {cli: "CLI", version: "VERSION"}
9
+ map[basename.to_sym] || super
10
+ end
11
+ end
12
+
13
+ class << self
14
+ def setup
15
+ loader = Zeitwerk::Loader.new
16
+ loader.inflector = Inflector.new
17
+ lib = File.expand_path("../..", __dir__) # lib
18
+ loader.push_dir(lib)
19
+ loader.ignore("#{lib}/jets-hanami.rb")
20
+ loader.setup
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,16 @@
1
+ require "hanami"
2
+ require "jets"
3
+
4
+ module Jets::Hanami
5
+ module Decorator
6
+ def boot
7
+ super
8
+ # Note: Does not really do anything since the Jets loader
9
+ # will disregard the paths controlled by Hanami. But it's here
10
+ # for future reference
11
+ Jets.boot # sets up autoloader
12
+ end
13
+ end
14
+ end
15
+
16
+ Hanami.singleton_class.prepend Jets::Hanami::Decorator
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jets
4
+ module Hanami
5
+ VERSION = "0.2.0.beta"
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "jets/hanami/autoloader"
4
+ Jets::Hanami::Autoloader.setup
5
+
6
+ require "memoist"
7
+ require "rainbow/ext/string"
8
+
9
+ module Jets
10
+ module Hanami
11
+ class Error < StandardError; end
12
+ end
13
+ end
14
+
15
+ require "jets/hanami/decorator"
@@ -0,0 +1 @@
1
+ require_relative "jets/hanami"
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jets-hanami
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0.beta
5
+ platform: ruby
6
+ authors:
7
+ - Tung Nguyen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-05-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: memoist
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rainbow
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: hanami
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: zeitwerk
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description:
84
+ email:
85
+ executables: []
86
+ extensions: []
87
+ extra_rdoc_files: []
88
+ files:
89
+ - ".rspec"
90
+ - CHANGELOG.md
91
+ - README.md
92
+ - Rakefile
93
+ - lib/jets-hanami.rb
94
+ - lib/jets/hanami.rb
95
+ - lib/jets/hanami/autoloader.rb
96
+ - lib/jets/hanami/decorator.rb
97
+ - lib/jets/hanami/version.rb
98
+ homepage: https://github.com/rubyonjets/jets-hanami
99
+ licenses: []
100
+ metadata:
101
+ homepage_uri: https://github.com/rubyonjets/jets-hanami
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 3.2.0
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubygems_version: 3.5.10
118
+ signing_key:
119
+ specification_version: 4
120
+ summary: Jets Hanami Support
121
+ test_files: []