From 7063e71f864d9afbfb296495ec01b19233ff9c8c Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 24 Sep 2017 06:09:44 -0300 Subject: Update Gemfile and gemspec to current defaults * Remove deprecated has_rdoc option * Remove test_files option * Remove platform. Has already a default. * Update files option * Move some basic dependencies into gemspec file * Call gemspec on Gemfile so we can test gem source at console --- .travis.yml | 6 ++++-- Gemfile | 24 ++++++++---------------- Rakefile | 8 -------- highline.gemspec | 41 ++++++++++++++++++++--------------------- 4 files changed, 32 insertions(+), 47 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5657690..88f04ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,14 @@ language: ruby dist: trusty sudo: false +cache: bundler script: "bundle exec rake test" rvm: - 1.9 - 2.0 - 2.1 - 2.2 + - 2.3 - ruby-head - rbx-3.81 - jruby-19mode # JRuby in 1.9 mode @@ -23,6 +25,6 @@ matrix: - rvm: jruby-19mode # JRuby in 1.9 mode - rvm: jruby-head include: - - rvm: 2.3 + - rvm: 2.4 script: "bundle exec rake test && bundle exec codeclimate-test-reporter" # Run only for 2.3 -bundler_args: --without development +bundler_args: --without code_quality diff --git a/Gemfile b/Gemfile index b6322dd..953f086 100644 --- a/Gemfile +++ b/Gemfile @@ -2,13 +2,10 @@ source "https://rubygems.org" -gem "rake", require: false -gem "rdoc", require: false +git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } -group :development, :test do - gem "code_statistics", require: false - gem "minitest", require: false -end +# Specify your gem's dependencies in tgem.gemspec +gemspec # Reporting only at one ruby version of travis matrix (no repetition) gem "codeclimate-test-reporter", group: :test, require: false @@ -18,16 +15,11 @@ platform :ruby do gem "simplecov", group: :test end -group :development do - gem "pronto" +group :code_quality do + gem "pronto", require: false gem "pronto-poper", require: false gem "pronto-reek", require: false gem "pronto-rubocop", require: false - - # Using strict versions of flay and pronto-flay while - # PR https://github.com/mmozuras/pronto-flay/pull/11/files - # is not merged - gem "flay", "2.7.0" - gem "flog" - gem "pronto-flay", "0.6.1", require: false -end + gem "pronto-flay", require: false + gem "flog", require: false +end \ No newline at end of file diff --git a/Rakefile b/Rakefile index 248701e..45def2d 100644 --- a/Rakefile +++ b/Rakefile @@ -1,11 +1,7 @@ # encoding: utf-8 require "rake/testtask" -require "rubygems/package_task" require "bundler/gem_tasks" -require "code_statistics" - -require "rubygems" task default: [:test] @@ -16,10 +12,6 @@ Rake::TestTask.new do |test| test.test_files = FileList["test/test*.rb"] end -Gem::PackageTask.new(SPEC) do |package| - # do nothing: I just need a gem but this block is required -end - desc "Run some interactive acceptance tests" task :acceptance do load "test/acceptance/acceptance.rb" diff --git a/highline.gemspec b/highline.gemspec index b0d6009..69dbc60 100644 --- a/highline.gemspec +++ b/highline.gemspec @@ -4,33 +4,32 @@ lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "highline/version" -GEM_VERSION = HighLine::VERSION +Gem::Specification.new do |spec| + spec.name = "highline" + spec.version = HighLine::VERSION + spec.author = "James Edward Gray II" + spec.email = "james@graysoftinc.com" -SPEC = Gem::Specification.new do |spec| - spec.name = "highline" - spec.version = GEM_VERSION - spec.platform = Gem::Platform::RUBY - spec.summary = "HighLine is a high-level command-line IO library." - spec.files = `git ls-files`.split("\n") - - spec.test_files = `git ls-files -- test/*.rb`.split("\n") - spec.has_rdoc = "yard" - spec.extra_rdoc_files = %w[README.md TODO Changelog.md LICENSE] - - spec.require_path = "lib" - - spec.author = "James Edward Gray II" - spec.email = "james@graysoftinc.com" - spec.rubyforge_project = "highline" - spec.homepage = "https://github.com/JEG2/highline" - spec.license = "Ruby" - spec.description = <