From 60f3cd59280fbfbc2ceb9b041a53331c5bbc2df8 Mon Sep 17 00:00:00 2001 From: anero Date: Thu, 28 Sep 2023 10:54:59 -0300 Subject: [PATCH] Backport changes on gemspec from main --- Gemfile | 1 + Rakefile | 2 ++ lib/vertebrae.rb | 2 +- vertebrae.gemspec | 48 +++++++++++------------------------------------ 4 files changed, 15 insertions(+), 38 deletions(-) diff --git a/Gemfile b/Gemfile index ce1c29b..07e08ee 100644 --- a/Gemfile +++ b/Gemfile @@ -9,6 +9,7 @@ gem 'hashie', '> 3.5.7' # Include everything needed to run rake, tests, features, etc. group :development do gem "rspec" + gem "rake" gem "bundler" gem "webmock" gem "rspec-its" diff --git a/Rakefile b/Rakefile index 8f0cca6..17afcde 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,8 @@ require 'rubygems' require 'bundler' +require 'bundler/gem_tasks' + begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e diff --git a/lib/vertebrae.rb b/lib/vertebrae.rb index 0d8d83e..51886c0 100644 --- a/lib/vertebrae.rb +++ b/lib/vertebrae.rb @@ -13,7 +13,7 @@ require 'vertebrae/model' require 'vertebrae/version' -require 'railties' if defined? Rails +require 'vertebrae/railties' if defined? Rails module Vertebrae diff --git a/vertebrae.gemspec b/vertebrae.gemspec index 6c8eec1..9401967 100644 --- a/vertebrae.gemspec +++ b/vertebrae.gemspec @@ -2,11 +2,11 @@ lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require 'version' +require 'vertebrae/version' Gem::Specification.new do |s| s.name = "vertebrae".freeze - s.version = "0.6.2" + s.version = Vertebrae::VERSION s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] @@ -16,42 +16,14 @@ Gem::Specification.new do |s| s.email = "nathan@controlshiftlabs.com".freeze s.extra_rdoc_files = [ "LICENSE.txt", - "README.rdoc" - ] - s.files = [ - ".document", - ".github/workflows/ci.yml", - ".rspec", - ".rubocop.yml", - ".ruby-gemset", - ".ruby-version", - "Gemfile", - "LICENSE.txt", - "README.rdoc", - "Rakefile", - "VERSION", - "lib/api.rb", - "lib/authorization.rb", - "lib/base.rb", - "lib/configuration.rb", - "lib/connection.rb", - "lib/constants.rb", - "lib/core_ext/array.rb", - "lib/model.rb", - "lib/railties.rb", - "lib/request.rb", - "lib/response/raise_error.rb", - "lib/response_error.rb", - "lib/vertebrae.rb", - "spec/api_spec.rb", - "spec/configuration_spec.rb", - "spec/dummy/client.rb", - "spec/dummy/dummy.rb", - "spec/logger_spec.rb", - "spec/request_spec.rb", - "spec/spec_helper.rb", - "vertebrae.gemspec" + "README.md" ] + # Specify which files should be added to the gem when it is released. + # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + s.files = Dir.chdir(File.expand_path(__dir__)) do + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + end + s.homepage = "http://github.com/controlshift/vertebrae".freeze s.licenses = ["MIT".freeze] s.summary = "API Client Infrastructure".freeze @@ -66,6 +38,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency(%q.freeze, ["> 0.12.2"]) s.add_runtime_dependency(%q.freeze, ["> 3.5.7"]) s.add_development_dependency(%q.freeze, [">= 0"]) + s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) s.add_development_dependency(%q.freeze, [">= 0"]) @@ -76,6 +49,7 @@ Gem::Specification.new do |s| s.add_dependency(%q.freeze, ["> 0.12.2"]) s.add_dependency(%q.freeze, ["> 3.5.7"]) s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 0"])