Skip to content

Commit f6762ba

Browse files
add hello_world binary
1 parent ff43dca commit f6762ba

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
require "hello_world"
5+
6+
name = ARGV[0] || "World"
7+
speaker = HelloWorld::Speaker.new(name)
8+
puts speaker.message

examples/deep_gem/hello_world/hello_world.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Gem::Specification.new do |s|
1414

1515
s.summary = "Example"
1616
s.description = "Example gem"
17-
s.files = Dir["lib/**/*"]
17+
s.files = Dir["lib/**/*"] + Dir["bin/*"]
18+
s.executables = ["hello_world"]
1819

1920
s.require_paths = ["lib"]
2021
s.required_ruby_version = Gem::Requirement.new(">= 2.6")

0 commit comments

Comments
 (0)