Skip to content

Commit

Permalink
feat: updated gemspec_and_gemfile section per tamatebako/tebako#215 r…
Browse files Browse the repository at this point in the history
…eview
  • Loading branch information
maxirmx committed Jan 12, 2025
1 parent 9a4087d commit 1e9cf5e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tutorial/2_packaging_scenarios/Lesson-2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,13 @@ But now Tebako recognizes that it packages a gem and applies a different deploym
... stripping the output
----

Tebako installs the gem into its Ruby environment and assumes the entry point is the wrapper created by the `gem` command in the `binary` directory.
Note that the entry point script must be explicitly specified as one of the gem executables.
Tebako uses the link:https://guides.rubygems.org/command-reference/#gem-install[`gem install` command] to place the application into its embedded filesystem.
The configuration created during this process is defined by the gem specification (`gemspec`).
For Tebako to process the `gemspec` correctly, it must define the link:https://guides.rubygems.org/specification-reference/#bindir[`bindir`]
and the link:https://guides.rubygems.org/specification-reference/#executables[`executables`] within the `bindir`. According to the gemspec documentation:
_“... you don’t specify the full path (as in bin/rake); all application-style files are expected to be found in bindir ...”_
Tebako adheres to this convention by expecting the entry point to be listed as an executable and located in the `bindir` specified in the `gemspec.
Tebako sets the `bindir` option of the `gem install` command to a path within its memory filesystem, such as `\__tebako_memfs__\bin`. This path is effectively the default `bindir` for `gem install` (typically, the folder where the Ruby executable resides). Notably, the gem specification does not indicate that the `bindir` option for `gem install` can be modified or restricted by the gem itself.

== Packaging a Gem Without Bundling

Expand Down

0 comments on commit 1e9cf5e

Please sign in to comment.