A library for handling DID identifiers used in Bluesky AT Protocol

added simplecov for test coverage reporting

+31 -2
+1
.gitignore
··· 1 1 .bundle 2 2 .DS_Store 3 3 .rspec_status 4 + coverage 4 5 Gemfile.lock
+4 -2
Gemfile
··· 5 5 # Specify your gem's dependencies in didkit.gemspec 6 6 gemspec 7 7 8 - gem "rake", "~> 13.0" 9 - gem "rspec", "~> 3.0" 8 + gem 'rake', '~> 13.0' 9 + gem 'rspec', '~> 3.0' 10 10 gem 'irb' 11 + 11 12 gem 'mocha' 13 + gem 'simplecov' 12 14 gem 'webmock'
+26
spec/spec_helper.rb
··· 1 1 # frozen_string_literal: true 2 2 3 + require 'simplecov' 4 + 5 + SimpleCov.start do 6 + enable_coverage :branch 7 + add_filter "/spec/" 8 + end 9 + 3 10 require 'didkit' 4 11 require 'json' 5 12 require 'webmock/rspec' ··· 13 20 end 14 21 15 22 config.mock_with :mocha 23 + end 24 + 25 + module SimpleCov 26 + module Formatter 27 + class HTMLFormatter 28 + def format(result) 29 + # silence the stdout summary, just save the html files 30 + unless @inline_assets 31 + Dir[File.join(@public_assets_dir, "*")].each do |path| 32 + FileUtils.cp_r(path, asset_output_path, remove_destination: true) 33 + end 34 + end 35 + 36 + File.open(File.join(output_path, "index.html"), "wb") do |file| 37 + file.puts template("layout").result(binding) 38 + end 39 + end 40 + end 41 + end 16 42 end 17 43 18 44 BSKY_APP_DID = 'did:plc:z72i7hdynmk6r22z27h6tvur'