Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ jobs:
- name: Run tests
run: bundle exec rake test

# - name: Run steep check
# run: bundle exec steep check

- name: Run rubocop
run: bundle exec rubocop
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ gem "maxitest", "~> 7.0"
gem "rake", "~> 13.0"
gem "rake-compiler", "~> 1.3"
gem "rake-compiler-dock"
gem "rbs-inline", "~> 0.13.0"
gem "rubocop"
29 changes: 18 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ GEM
ast (2.4.3)
date (3.5.1)
erb (6.0.1)
glamour (0.2.1)
glamour (0.2.1-aarch64-linux-gnu)
glamour (0.2.1-aarch64-linux-musl)
glamour (0.2.1-arm-linux-gnu)
glamour (0.2.1-arm-linux-musl)
glamour (0.2.1-arm64-darwin)
glamour (0.2.1-x86-linux-gnu)
glamour (0.2.1-x86-linux-musl)
glamour (0.2.1-x86_64-darwin)
glamour (0.2.1-x86_64-linux-gnu)
glamour (0.2.1-x86_64-linux-musl)
glamour (0.2.2)
glamour (0.2.2-aarch64-linux-gnu)
glamour (0.2.2-aarch64-linux-musl)
glamour (0.2.2-arm-linux-gnu)
glamour (0.2.2-arm-linux-musl)
glamour (0.2.2-arm64-darwin)
glamour (0.2.2-x86-linux-gnu)
glamour (0.2.2-x86-linux-musl)
glamour (0.2.2-x86_64-darwin)
glamour (0.2.2-x86_64-linux-gnu)
glamour (0.2.2-x86_64-linux-musl)
harmonica (0.1.0)
io-console (0.8.2)
irb (1.16.0)
Expand Down Expand Up @@ -63,6 +63,12 @@ GEM
rake-compiler (1.3.1)
rake
rake-compiler-dock (1.11.0)
rbs (3.10.3)
logger
tsort
rbs-inline (0.13.0)
prism (>= 0.29)
rbs (>= 3.8.0)
rdoc (7.0.2)
erb
psych (>= 4.0.0)
Expand Down Expand Up @@ -116,6 +122,7 @@ DEPENDENCIES
rake (~> 13.0)
rake-compiler (~> 1.3)
rake-compiler-dock
rbs-inline (~> 0.13.0)
rubocop

BUNDLED WITH
Expand Down
18 changes: 18 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,22 @@ rescue LoadError => e
end
end

task :rbs_inline do
require "open3"

command = "bundle exec rbs-inline --opt-out --output=sig/ lib/"

_stdout, stderr, status = Open3.capture3(command)

puts "Running `#{command}`"

if stderr.strip.include?("🎉 Generated 0 RBS files under sig/")
puts "RBS files in sig/ are up to date"
exit status.exitstatus
else
puts "RBS files in sig/ are not up to date"
exit 1
end
end

task default: [:test, :rubocop, :compile]
5 changes: 4 additions & 1 deletion sig/bubbletea.rbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Generated from lib/bubbletea.rb with RBS::Inline

module Bubbletea
VERSION: String
class Error < StandardError
end
end
80 changes: 80 additions & 0 deletions sig/bubbletea/commands.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Generated from lib/bubbletea/commands.rb with RBS::Inline

module Bubbletea
class Command
end

class QuitCommand < Command
end

class BatchCommand < Command
attr_reader commands: untyped

def initialize: (untyped commands) -> untyped
end

class TickCommand < Command
attr_reader duration: untyped

attr_reader callback: untyped

def initialize: (untyped duration) ?{ (?) -> untyped } -> untyped
end

class SendMessage < Command
attr_reader message: untyped

attr_reader delay: untyped

def initialize: (untyped message, ?delay: untyped) -> untyped
end

class SequenceCommand < Command
attr_reader commands: untyped

def initialize: (untyped commands) -> untyped
end

class EnterAltScreenCommand < Command
end

class ExitAltScreenCommand < Command
end

class SetWindowTitleCommand < Command
attr_reader title: untyped

def initialize: (untyped title) -> untyped
end

class PutsCommand < Command
attr_reader text: untyped

def initialize: (untyped text) -> untyped
end

class SuspendCommand < Command
end

def self.quit: () -> untyped

def self.batch: (*untyped commands) -> untyped

def self.tick: (untyped duration) ?{ (?) -> untyped } -> untyped

def self.send_message: (untyped message, ?delay: untyped) -> untyped

def self.sequence: (*untyped commands) -> untyped

def self.none: () -> untyped

def self.enter_alt_screen: () -> untyped

def self.exit_alt_screen: () -> untyped

def self.set_window_title: (untyped title) -> untyped

def self.puts: (untyped text) -> untyped

def self.suspend: () -> untyped
end
Loading
Loading