From 72a7bd64546f497f3d0ed043e0cd5b4d16e791f6 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Fri, 14 Aug 2020 20:40:09 +0530 Subject: [PATCH 1/3] Add missing information in gemspec - Add required Ruby version - Add License - Add required Rails version - Add deprecation warning for breaking changes --- invoicing.gemspec | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/invoicing.gemspec b/invoicing.gemspec index 115c579..8778dc9 100644 --- a/invoicing.gemspec +++ b/invoicing.gemspec @@ -1,28 +1,36 @@ -$:.push File.expand_path("../lib", __FILE__) +$LOAD_PATH.push File.expand_path('lib', __dir__) # Maintain your gem's version: -require "invoicing/version" +require 'invoicing/version' # Describe your gem and declare its dependencies: Gem::Specification.new do |s| - s.name = "invoicing" + s.name = 'invoicing' s.version = Invoicing::VERSION - s.authors = ["Martin Kleppmann"] - s.email = ["@martinkl"] - s.homepage = "http://invoicing.codemancers.com/" - s.summary = "Ruby Invoicing Framework" + s.license = 'MIT' + s.authors = ['Martin Kleppmann', 'Codemancers'] + s.email = ['hello@codemancers.com'] + s.homepage = 'http://invoicing.codemancers.com/' + s.summary = 'Ruby Invoicing Framework' s.description = <<-DESC -This is a framework for generating and displaying invoices (ideal for commercial - Rails apps). It allows for flexible business logic; provides tools for tax - handling, commission calculation etc. It aims to be both developer-friendly - and accountant-friendly. -DESC + This is a framework for generating and displaying invoices (ideal for commercial + Rails apps). It allows for flexible business logic; provides tools for tax + handling, commission calculation etc. It aims to be both developer-friendly + and accountant-friendly. + DESC - s.files = Dir["{lib}/**/*", "LICENSE", "Rakefile", "README.md"] + s.post_install_message = <<-POST_INSTALL + 1.2.x will be the last version to support Ruby < 2.4 and Rails < 5. + The next version will introduce breaking changes including removal of the `FindSubClasses` class + POST_INSTALL - s.add_dependency "rails", ">= 3.2.13" + s.files = Dir['{lib}/**/*', 'LICENSE', 'Rakefile', 'README.md'] - s.add_development_dependency "sqlite3", "< 1.4" - s.add_development_dependency "minitest" - s.add_development_dependency "uuid" + s.required_ruby_version = '>= 2.0.0' + + s.add_runtime_dependency 'rails', '>= 3.2.13', '< 5.2' + + s.add_development_dependency 'minitest', '> 4' + s.add_development_dependency 'sqlite3', '< 1.4' + s.add_development_dependency 'uuid', '> 2' end From 48948da683a1075289c547daa148ead1f6f338a2 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Fri, 14 Aug 2020 21:13:32 +0530 Subject: [PATCH 2/3] Remove Rails 5.2 from Travis Rails 5.2 will be supported in the next major version --- .travis.yml | 6 ++--- Gemfile | 24 ++++++------------- ...emfile.rails-5.1.x => Gemfile.rails-4.2.x} | 3 +-- 3 files changed, 11 insertions(+), 22 deletions(-) rename gemfiles/{Gemfile.rails-5.1.x => Gemfile.rails-4.2.x} (83%) diff --git a/.travis.yml b/.travis.yml index 33bcef9..c319c6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ gemfile: - gemfiles/Gemfile.rails-3.2.x - gemfiles/Gemfile.rails-4.0.x - gemfiles/Gemfile.rails-4.1.x + - gemfiles/Gemfile.rails-4.2.x - gemfiles/Gemfile.rails-5.0.x - - gemfiles/Gemfile.rails-5.1.x matrix: exclude: @@ -24,9 +24,9 @@ matrix: - rvm: 2.1.10 gemfile: gemfiles/Gemfile.rails-5.0.x - rvm: 2.0.0 - gemfile: gemfiles/Gemfile.rails-5.1.x + gemfile: Gemfile - rvm: 2.1.10 - gemfile: gemfiles/Gemfile.rails-5.1.x + gemfile: Gemfile before_install: - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true diff --git a/Gemfile b/Gemfile index 15f62cd..b2060bd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,22 +1,12 @@ -source "http://rubygems.org" +# -*- ruby -*- -# Declare your gem's dependencies in invoicing.gemspec. -# Bundler will treat runtime dependencies like base dependencies, and -# development dependencies will be added by default to the :development group. -gemspec +source 'http://rubygems.org' -# Declare any dependencies that are still in development here instead of in -# your gemspec. These might include edge Rails or gems from your path or -# Git. Remember to move these dependencies to your gemspec before releasing -# your gem to rubygems.org. +gemspec -gem "pry-rails" -gem "minitest" +gem 'minitest' +gem 'rails', '~> 5.1.0' -# Issue in database cleaner for sqlite support -# https://github.com/bmabey/database_cleaner/issues/224 -# https://github.com/bmabey/database_cleaner/pull/241 -gem "database_cleaner", "~> 1.0.1" -gem "rake", "~> 11" +gem 'database_cleaner', github: 'tommeier/database_cleaner', branch: 'fix-superclass-1-1-1' -gem "coveralls", "~> 0.7.0", require: false +gem 'coveralls', '~> 0.7.0', require: false diff --git a/gemfiles/Gemfile.rails-5.1.x b/gemfiles/Gemfile.rails-4.2.x similarity index 83% rename from gemfiles/Gemfile.rails-5.1.x rename to gemfiles/Gemfile.rails-4.2.x index 45e1e3d..dd9f46d 100644 --- a/gemfiles/Gemfile.rails-5.1.x +++ b/gemfiles/Gemfile.rails-4.2.x @@ -3,8 +3,7 @@ source "http://rubygems.org" gemspec path: ".." -gem "rails", "~> 5.1.0" -gem "minitest" +gem "rails", "~> 4.2.0" gem "database_cleaner", github: "tommeier/database_cleaner", branch: "fix-superclass-1-1-1" From 582fee2ce5ffba5ad2bb282e9ec118b49a38e7b3 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Fri, 14 Aug 2020 21:47:52 +0530 Subject: [PATCH 3/3] Bump gem version to 1.2.0 --- lib/invoicing/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/invoicing/version.rb b/lib/invoicing/version.rb index c7f9194..e953f45 100644 --- a/lib/invoicing/version.rb +++ b/lib/invoicing/version.rb @@ -1,7 +1,7 @@ module Invoicing module Version MAJOR = 1 - MINOR = 1 + MINOR = 2 BUILD = 0 def to_a