From 2999686cf0d1e9abc8f1671f0a2613070199c482 Mon Sep 17 00:00:00 2001 From: Alex Semyonov Date: Sun, 10 Jan 2016 11:35:13 +0300 Subject: [PATCH] Update dependencies, set up Travis CI --- .gitignore | 1 + .travis.yml | 6 ++++++ Gemfile | 2 +- Rakefile | 6 ++---- lib/ymaps.rb | 2 ++ test/test_ymaps.rb | 3 --- ymaps.gemspec | 28 +++++++++++++++------------- 7 files changed, 27 insertions(+), 21 deletions(-) create mode 100644 .travis.yml diff --git a/.gitignore b/.gitignore index 20f6f31..dda0db2 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ pkg ## PROJECT::SPECIFIC Gemfile.lock +.ruby-version diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b4adbe6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +sudo: false +language: ruby +cache: bundler +rvm: + - 1.9.3 + - 2.3.0 diff --git a/Gemfile b/Gemfile index c80ee36..fa75df1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ -source "http://rubygems.org" +source 'https://rubygems.org' gemspec diff --git a/Rakefile b/Rakefile index 7a0fde4..13e4cb3 100644 --- a/Rakefile +++ b/Rakefile @@ -17,12 +17,10 @@ begin end rescue LoadError task :rcov do - abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" + abort 'RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov' end end -task :test => :check_dependencies - task :default => :test begin @@ -30,6 +28,6 @@ begin YARD::Rake::YardocTask.new(:doc) rescue LoadError task :doc do - abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard" + abort 'YARD is not available. In order to run yardoc, you must: sudo gem install yard' end end diff --git a/lib/ymaps.rb b/lib/ymaps.rb index 40ccd6f..00d8e71 100644 --- a/lib/ymaps.rb +++ b/lib/ymaps.rb @@ -1,3 +1,5 @@ +require 'active_support/core_ext/module/attribute_accessors' + module YMaps mattr_accessor :key self.key = 'REPLACE_WITH_YOUR_YANDEX_KEY' diff --git a/test/test_ymaps.rb b/test/test_ymaps.rb index 6a5938e..a726bf2 100644 --- a/test/test_ymaps.rb +++ b/test/test_ymaps.rb @@ -1,7 +1,4 @@ require 'helper' class TestYmaps < Test::Unit::TestCase - should "probably rename this file and start testing for real" do - flunk "hey buddy, you should probably rename this file and start testing for real" - end end diff --git a/ymaps.gemspec b/ymaps.gemspec index 744e0dc..cb238a0 100644 --- a/ymaps.gemspec +++ b/ymaps.gemspec @@ -3,24 +3,26 @@ $:.push File.expand_path('../lib', __FILE__) require 'ymaps/version' Gem::Specification.new do |s| - s.name = 'ymaps' - s.version = YMaps::VERSION - s.platform = Gem::Platform::RUBY - s.authors = ['Alexander Semyonov'] - s.email = ['al@semyonov.us'] - s.homepage = 'http://github.com/rotuka/ymaps' - s.summary = %q{Helpers for using YMaps} + s.name = 'ymaps' + s.version = YMaps::VERSION + s.platform = Gem::Platform::RUBY + s.authors = ['Alexander Semyonov'] + s.email = ['al@semyonov.us'] + s.homepage = 'http://github.com/rotuka/ymaps' + s.summary = %q{Helpers for using YMaps} s.description = %q{Different helpers for generating YMapsML, using YMaps widgets and geocoding via Yandex.Maps} s.rubyforge_project = 'ymaps' - s.files = `git ls-files`.split("\n") - s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } - s.require_paths = ["lib"] + s.files = `git ls-files`.split("\n") + s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") + s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } + s.require_paths = ['lib'] - s.add_dependency('geokit', '~> 1.5') + s.add_dependency('geokit', '~> 1.5') s.add_development_dependency('shoulda', '>= 0') - s.add_development_dependency('yard', '>= 0') + s.add_development_dependency('yard', '>= 0') + s.add_development_dependency('rake', '>= 0') + s.add_development_dependency('test-unit', '>= 0') end