-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: refactor gem packaging tests to address #215
- Loading branch information
Showing
11 changed files
with
49 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require "text-table" | ||
require_relative "version" | ||
|
||
# Tebako test class | ||
class TebakoTest | ||
def msg | ||
table = Text::Table.new | ||
table.head = %w[A B] | ||
table.rows = [%w[a1 b1]] | ||
table.rows << %w[a2 b2] | ||
puts table | ||
end | ||
module Test | ||
# Tebako test class | ||
class TebakoTest | ||
def msg | ||
table = Text::Table.new | ||
table.head = %w[A B] | ||
table.rows = [%w[a1 b1]] | ||
table.rows << %w[a2 b2] | ||
table | ||
end | ||
|
||
def run | ||
puts <<~MSG | ||
Running packaged tebako-test gem version #{VERSION}. | ||
You shall see a nice text table below. | ||
def run! | ||
puts "Hello! This is test-11 talking from inside DwarFS" | ||
puts "You will now see a nice table that will be drawn for you by text-table gem." | ||
msg | ||
#{msg} | ||
MSG | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Test | ||
VERSION = "0.0.2" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
# frozen_string_literal: true | ||
require_relative "lib/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "tebako-test" | ||
s.version = "0.0.1" | ||
s.version = Test::VERSION | ||
s.summary = "A simple gem for tebako testing" | ||
s.authors = ["Ribose"] | ||
s.email = ["[email protected]"] | ||
s.files = ["bin/tebako-test-run.rb", "lib/tebako-test.rb"] | ||
s.files = Dir.glob("lib/**/*") + Dir.glob("exe/**/*") | ||
s.homepage = "https://github.com/tamitebako" | ||
s.license = "Unlicense" | ||
s.bindir = "bin" | ||
s.bindir = "exe" | ||
s.required_ruby_version = Gem::Requirement.new(">= 2.7.0") | ||
s.add_dependency "text-table", "~> 1.2.4" | ||
s.executables << "tebako-test-run.rb" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
|
||
puts "Hello! This is test-20 talking from inside DwarFS" | ||
|
||
require "net/http" | ||
|