A Ruby gem for streaming data from the Bluesky/ATProto firehose

added test config

+39 -5
+1
.gitignore
··· 2 .DS_Store 3 .rspec_status 4 .yardoc 5 doc 6 Gemfile.lock
··· 2 .DS_Store 3 .rspec_status 4 .yardoc 5 + coverage 6 doc 7 Gemfile.lock
+5
Gemfile
··· 7 8 gem "rake", "~> 13.0" 9 gem "rspec", "~> 3.0" 10 gem 'rdoc' 11 gem 'yard'
··· 7 8 gem "rake", "~> 13.0" 9 gem "rspec", "~> 3.0" 10 + 11 gem 'rdoc' 12 gem 'yard' 13 + 14 + gem 'mocha' 15 + gem 'simplecov' 16 + gem 'webmock'
+33 -5
spec/spec_helper.rb
··· 1 # frozen_string_literal: true 2 3 - require "skyfall" 4 5 RSpec.configure do |config| 6 # Enable flags like --only-failures and --next-failure 7 config.example_status_persistence_file_path = ".rspec_status" 8 9 - # Disable RSpec exposing methods globally on `Module` and `main` 10 - config.disable_monkey_patching! 11 - 12 config.expect_with :rspec do |c| 13 - c.syntax = :expect 14 end 15 end
··· 1 # frozen_string_literal: true 2 3 + require 'simplecov' 4 + 5 + SimpleCov.start do 6 + enable_coverage :branch 7 + add_filter "/spec/" 8 + end 9 + 10 + require 'skyfall' 11 + require 'webmock/rspec' 12 13 RSpec.configure do |config| 14 # Enable flags like --only-failures and --next-failure 15 config.example_status_persistence_file_path = ".rspec_status" 16 17 config.expect_with :rspec do |c| 18 + c.syntax = [:should, :expect] 19 end 20 + 21 + config.mock_with :mocha 22 end 23 + 24 + module SimpleCov 25 + module Formatter 26 + class HTMLFormatter 27 + def format(result) 28 + # silence the stdout summary, just save the html files 29 + unless @inline_assets 30 + Dir[File.join(@public_assets_dir, "*")].each do |path| 31 + FileUtils.cp_r(path, asset_output_path, remove_destination: true) 32 + end 33 + end 34 + 35 + File.open(File.join(output_path, "index.html"), "wb") do |file| 36 + file.puts template("layout").result(binding) 37 + end 38 + end 39 + end 40 + end 41 + end 42 + 43 + WebMock.enable!