rails-timeago.gemspec in rails-timeago-2.19.0 vs rails-timeago.gemspec in rails-timeago-2.19.1

- old
+ new

@@ -1,23 +1,39 @@ -# -*- encoding: utf-8 -*- # frozen_string_literal: true -require File.expand_path('../lib/rails-timeago/version', __FILE__) +require_relative 'lib/rails-timeago/version' -Gem::Specification.new do |gem| - gem.authors = ['Jan Graichen'] - gem.email = ['jan.graichen@altimos.de'] - gem.description = 'jQuery Timeago helper for Rails 3' - gem.summary = 'A Rails Helper to create time tags usable for jQuery Timeago plugin' - gem.homepage = 'https://github.com/jgraichen/rails-timeago' - gem.license = 'MIT' +Gem::Specification.new do |spec| + spec.name = 'rails-timeago' + spec.version = Rails::Timeago::VERSION + spec.authors = ['Jan Graichen'] + spec.email = ['jgraichen@altimos.de'] - gem.executables = `git ls-files -- bin/*`.split("\n").map {|f| File.basename(f) } - gem.files = `git ls-files`.split("\n").reject {|file| file =~ /^scripts/ } - gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - gem.name = 'rails-timeago' - gem.require_paths = ['lib'] - gem.version = Rails::Timeago::VERSION + spec.summary = 'jQuery Timeago helper for Rails 3' + spec.description = 'A Rails Helper to create time tags usable for jQuery Timeago plugin' + spec.homepage = 'https://github.com/jgraichen/rails-timeago' + spec.license = 'MIT' - gem.add_dependency 'activesupport', '>= 3.1' - gem.add_dependency 'actionpack', '>= 3.1' + spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0') + + spec.metadata['homepage_uri'] = spec.homepage + spec.metadata['source_code_uri'] = 'https://github.com/jgraichen/rails-timeago' + spec.metadata['changelog_uri'] = 'https://github.com/jgraichen/rails-timeago/blob/master/CHANGELOG.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. + spec.files = Dir.chdir(File.expand_path(__dir__)) do + `git ls-files -z`.split("\x0").select do |f| + f.match %r{\A + ((?:lib|vendor)/)| + ((?:CHANGELOG.md|README.md|LICENSE|.*\.gemspec)\z) + }x + end + end + + spec.bindir = 'exe' + spec.executables = spec.files.grep(%r{\Aexe/}) {|f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.add_dependency 'actionpack', '>= 3.1' + spec.add_dependency 'activesupport', '>= 3.1' end