Skip to content

Commit

Permalink
Gemfile, makefile, sorbet
Browse files Browse the repository at this point in the history
  • Loading branch information
helenye-stripe committed Feb 12, 2024
1 parent aaad633 commit f39b7d9
Show file tree
Hide file tree
Showing 59 changed files with 225,423 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ group :development do
# don't install on truffleruby
gem "jaro_winkler", "1.5.4" unless RUBY_ENGINE == "truffleruby"

gem "sorbet", group: :development
gem "tapioca", require: false, group: %i[development test]
gem "sorbet-static"
gem "tapioca"

platforms :mri do
gem "byebug"
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ codegen-format:

ci-test:
bundle install && bundle exec rake test
bundle exec srb tc
@version=$$(ruby -e "puts RUBY_VERSION.split('.')[0..1].join.to_i"); \
if [ $$version -ge 27 ]; then \
echo "Ruby version >= 2.7, continue with srb tc"; \
bundle exec srb tc; \
else \
echo "Ruby version < 2.7, skipping srb tc"; \
fi

test: ci-test
27 changes: 27 additions & 0 deletions bin/tapioca
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
# The application 'tapioca' is installed as part of a gem, and
# this file is here to facilitate running it.
#

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)

bundle_binstub = File.expand_path("bundle", __dir__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

load Gem.bin_path("tapioca", "tapioca")
6 changes: 0 additions & 6 deletions lib/stripe/api_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ def self.object_name
const_get(:OBJECT_NAME)
end

OBJECT_NAME = ""

def self.object_name
""
end

def self.class_name
name.split("::")[-1]
end
Expand Down
4 changes: 4 additions & 0 deletions sorbet/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--dir
.
--ignore=tmp/
--ignore=vendor/
1 change: 1 addition & 0 deletions sorbet/rbi/annotations/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.rbi linguist-vendored=true
3 changes: 3 additions & 0 deletions sorbet/rbi/annotations/coveralls_reborn.rbi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Coveralls
def wear; end
end
1 change: 1 addition & 0 deletions sorbet/rbi/gems/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.rbi linguist-generated=true
Loading

0 comments on commit f39b7d9

Please sign in to comment.