From c285d68ee4e42db95b0d55b3a16e7918220522f7 Mon Sep 17 00:00:00 2001 From: Anonoz Chong Date: Thu, 9 Nov 2023 18:28:45 +0800 Subject: [PATCH] Bump to 0.0.2 --- CHANGELOG.md | 7 +++++++ lib/oyencov.rb | 5 ++--- lib/oyencov/api_connection.rb | 3 ++- lib/oyencov/version.rb | 3 +++ oyencov.gemspec | 8 +++++--- 5 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 lib/oyencov/version.rb diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..77676f4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## 0.0.2 (2023-11-09) + +1. Fully rebrand everything in codebase from OyenOnsen to OyenCov. +2. Make it run in test mode even when API key is not set. +3. Put `OyenCov::VERSION` in its own file, have everywhere else refer to it. diff --git a/lib/oyencov.rb b/lib/oyencov.rb index 7df461c..fcf3b77 100644 --- a/lib/oyencov.rb +++ b/lib/oyencov.rb @@ -1,16 +1,15 @@ require_relative "oyencov/configuration" require_relative "oyencov/simplecov_resultset_translator" +require_relative "oyencov/version" # For now, support only Rails. We bootstrap from Railtie. module OyenCov - VERSION = "0.0.1.pre" - def self.config @config ||= OyenCov::Configuration.new end !!ENV["OYENCOV_DEBUG"] && puts("[OyenCov] Checking Rails existence") - if defined?(Rails::Railtie) #&& ENV["OYENCOV_API_KEY"] + if defined?(Rails::Railtie) # && ENV["OYENCOV_API_KEY"] puts "[OyenCov] Starting Railtie" require_relative "oyencov/railtie" end diff --git a/lib/oyencov/api_connection.rb b/lib/oyencov/api_connection.rb index 782b3df..167f45c 100644 --- a/lib/oyencov/api_connection.rb +++ b/lib/oyencov/api_connection.rb @@ -1,5 +1,6 @@ require "faraday" require "singleton" +require_relative "version" module OyenCov class APIConnection < Faraday::Connection @@ -11,7 +12,7 @@ def initialize headers: { "Authorization" => "Bearer #{ENV["OYENCOV_API_KEY"]}", "Content-Type" => "application/json", - "User-Agent" => "oyencov-ruby 0.0.1" + "User-Agent" => "oyencov-ruby #{OyenCov::VERSION}" } }) do |f| f.request :json diff --git a/lib/oyencov/version.rb b/lib/oyencov/version.rb new file mode 100644 index 0000000..f6f7cce --- /dev/null +++ b/lib/oyencov/version.rb @@ -0,0 +1,3 @@ +module OyenCov + VERSION = "0.0.2".freeze +end diff --git a/oyencov.gemspec b/oyencov.gemspec index c9398d7..93a69ae 100644 --- a/oyencov.gemspec +++ b/oyencov.gemspec @@ -1,8 +1,10 @@ +require_relative "lib/oyencov/version" + Gem::Specification.new do |s| s.name = "oyencov" - s.version = "0.0.1.pre" + s.version = OyenCov::VERSION s.licenses = ["MIT"] - s.summary = "Calculates test coverage based on production runtime" + s.summary = "Usage-weighted test coverage for Rails" s.description = "Runtime and test reporters." s.executables = ["oyencov"] s.authors = ["Anonoz Chong"] @@ -10,7 +12,7 @@ Gem::Specification.new do |s| s.files = Dir["{lib}/**/*.*", "bin/*"] s.homepage = "https://www.oyencov.com" s.metadata = { - "source_code_uri" => "https://github.com/oyencovteam/sdk-ruby" + "source_code_uri" => "https://github.com/oyencov/sdk-ruby" } s.required_ruby_version = ">= 3.1.0"