From bbbdd7c578b4e965992606fa5bf8050b406ce1a0 Mon Sep 17 00:00:00 2001 From: jonpwilson Date: Tue, 18 Oct 2016 15:46:27 +0100 Subject: [PATCH 1/9] Added code coverage to Travis --- .travis.yml | 9 ++++++--- android-devices.gemspec | 2 ++ spec/android_devices_spec.rb | 4 +++- spec/spec_helper.rb | 3 +++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 spec/spec_helper.rb diff --git a/.travis.yml b/.travis.yml index 551cdb6..f1fe7a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ language: ruby rvm: - - 2.2 - - jruby - - rbx-2 +- 2.2 +- jruby script: bundle exec rspec +addons: + code_climate: + repo_token: + secure: mL/zNHPcqVpHdodXoYWAzFJgTpm5YWvwyB16ScVLe17Rfx4VikeanDZM3t/fAI2jiBjOku+zJZ62MpnTezoKF3iYwbNRqBa7urB31eeu+9rBt+dtxe60W+dDBZ0K0nABvKaixA3EK/7TZeNmadIpBJO3+74viKaYvy0fIbTwLWObaD+bmTHTOnXsu+qo31a/b4pAV2AZzNnmIrxk4/t9zU9m+kgeMyLsZs8io7FLgmnWHdpkTTS5T6qS++YCSfXrHsDtSgPshBuMhu47A8cXW6lVKVShskhkk+W132+Ar6MytndJqrORpS4znEbyb9g1JRTBirIFaiwzoqE9HZqH698qHm79rSQOvf/4MFVXqCR+Q10crPE3nq8/APxkCewwCw3Po2N/2QAUjGmKhiBlUiDJB3Hg/Zdqoli85i/lWGJKkXIOD7vnHw0HcmLKMWeivMfgD3O6GoJUSr2oFWZr92vToalUb2QKbuhFkfmjXbkO6wt1i3ALs+q7p1NbtyYwexp/9FK3yR14tBWdcstscsREo6Ozm2n+rIGxLEcoOFAXiBQkkJfV+g4+Z7YjfO3nH+vqpEBY0VsyfeP+Q26cty2CQS1+jA5Q1ytLKFFxwx9nXKmW23E0Wq9bdi77zPGhqtoX0kFC2yKi2p+iLedAyAvpoXrQrJmhMo9cbjqzCFM= diff --git a/android-devices.gemspec b/android-devices.gemspec index 0d1b661..19a8c46 100644 --- a/android-devices.gemspec +++ b/android-devices.gemspec @@ -10,6 +10,8 @@ Gem::Specification.new do |spec| spec.authors = ['Jon Wilson'] spec.email = ['jon.wilson01@bbc.co.uk'] spec.summary = %q{Human readable Android device names} + spec.license = 'MIT' + spec.homepage = 'https://github.com/bbc/android-devices' spec.files = `git ls-files -z`.split("\x0") spec.require_paths = ['lib'] diff --git a/spec/android_devices_spec.rb b/spec/android_devices_spec.rb index 9650b03..0ef1b56 100644 --- a/spec/android_devices_spec.rb +++ b/spec/android_devices_spec.rb @@ -1,3 +1,5 @@ +require 'spec_helper' + describe Android::Devices do describe 'check' do @@ -33,4 +35,4 @@ expect(Android::Devices.search_by_manufacturer('Samsung').count).to be(3) end end -end \ No newline at end of file +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..2f34442 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,3 @@ + +require 'codeclimate-test-reporter' +CodeClimate::TestReporter.start From 46dce8d82f8ff233da734f4377e38c92440c6979 Mon Sep 17 00:00:00 2001 From: jonpwilson Date: Tue, 18 Oct 2016 15:47:36 +0100 Subject: [PATCH 2/9] Corrected spacing --- android-devices.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-devices.gemspec b/android-devices.gemspec index 19a8c46..0e318bd 100644 --- a/android-devices.gemspec +++ b/android-devices.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |spec| spec.email = ['jon.wilson01@bbc.co.uk'] spec.summary = %q{Human readable Android device names} spec.license = 'MIT' - spec.homepage = 'https://github.com/bbc/android-devices' + spec.homepage = 'https://github.com/bbc/android-devices' spec.files = `git ls-files -z`.split("\x0") spec.require_paths = ['lib'] From 7f41ab787a9df5666959b6c780d24742509dded1 Mon Sep 17 00:00:00 2001 From: jonpwilson Date: Tue, 18 Oct 2016 15:48:36 +0100 Subject: [PATCH 3/9] Added codeclimate gem to the test group --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index fa75df1..cf2b3bf 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ source 'https://rubygems.org' +gem 'codeclimate-test-reporter', group: :test, require: nil + gemspec From 4d95ae5cc2774617278df354cb88da044706414f Mon Sep 17 00:00:00 2001 From: jonpwilson Date: Tue, 18 Oct 2016 15:50:31 +0100 Subject: [PATCH 4/9] Corrected spacing --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f1fe7a5..943f739 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: ruby rvm: -- 2.2 -- jruby + - 2.2 + - jruby script: bundle exec rspec addons: code_climate: From 741c88ccec13b12c94d5955ade3a6742ca24bf93 Mon Sep 17 00:00:00 2001 From: jonpwilson Date: Tue, 18 Oct 2016 16:08:32 +0100 Subject: [PATCH 5/9] Removed spacing --- spec/spec_helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2f34442..9797982 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,2 @@ - require 'codeclimate-test-reporter' CodeClimate::TestReporter.start From 7fac4993f8d00a63e1743fb124b1e60a658fbd45 Mon Sep 17 00:00:00 2001 From: jonpwilson Date: Mon, 24 Oct 2016 10:57:53 +0100 Subject: [PATCH 6/9] Corrected secure config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 943f739..327f9ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,4 @@ script: bundle exec rspec addons: code_climate: repo_token: - secure: mL/zNHPcqVpHdodXoYWAzFJgTpm5YWvwyB16ScVLe17Rfx4VikeanDZM3t/fAI2jiBjOku+zJZ62MpnTezoKF3iYwbNRqBa7urB31eeu+9rBt+dtxe60W+dDBZ0K0nABvKaix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/W0j9UA5Wncww8DTD8gxyLKSx5xCBFJ0P8yypxG0obGHh0m3cqj429UDeh3T8AqQJbHcog+QTh/e7zsJEREZmgkfn2blbxH9MDgpgvjU/Cw2a0mJsSrLQJwOoTlsnKL3xodT9CuRittyDPa0yDMGcX/y0xa/M= From 25a9436c216cd65d7b7b82fee57583d3332e3d19 Mon Sep 17 00:00:00 2001 From: Jon Wilson Date: Wed, 2 Nov 2016 14:54:09 +0000 Subject: [PATCH 7/9] Added .rspec config and updated spec_helper --- .rspec | 2 ++ spec/spec_helper.rb | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 .rspec diff --git a/.rspec b/.rspec new file mode 100644 index 0000000..83e16f8 --- /dev/null +++ b/.rspec @@ -0,0 +1,2 @@ +--color +--require spec_helper diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9797982..b628a91 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,2 +1,4 @@ require 'codeclimate-test-reporter' CodeClimate::TestReporter.start + +$LOAD_PATH.unshift('./lib/') From a0b24e84f3e6e7f1ca7675eace097b1248301d60 Mon Sep 17 00:00:00 2001 From: Jon Wilson Date: Wed, 2 Nov 2016 15:04:44 +0000 Subject: [PATCH 8/9] Trying to debug coverage reporting --- spec/spec_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b628a91..4f652b1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,5 @@ require 'codeclimate-test-reporter' CodeClimate::TestReporter.start +SimpleCov.start $LOAD_PATH.unshift('./lib/') From 449d958558d7a9ab1027d3abe7ed7fdc3d51662b Mon Sep 17 00:00:00 2001 From: Jon Wilson Date: Wed, 2 Nov 2016 15:33:25 +0000 Subject: [PATCH 9/9] Fixed code coverage issues --- android-devices.gemspec | 8 +------- lib/android/devices.rb | 1 - lib/android/devices/version.rb | 5 ----- spec/android_devices_spec.rb | 1 + spec/spec_helper.rb | 2 +- 5 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 lib/android/devices/version.rb diff --git a/android-devices.gemspec b/android-devices.gemspec index 0e318bd..c3315c3 100644 --- a/android-devices.gemspec +++ b/android-devices.gemspec @@ -1,12 +1,6 @@ -lib = File.expand_path('../lib', __FILE__) - -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) - -require 'android/devices' - Gem::Specification.new do |spec| spec.name = 'android-devices' - spec.version = Android::Devices::VERSION + spec.version = '1.0.1' spec.authors = ['Jon Wilson'] spec.email = ['jon.wilson01@bbc.co.uk'] spec.summary = %q{Human readable Android device names} diff --git a/lib/android/devices.rb b/lib/android/devices.rb index ab7cb21..a5e4100 100644 --- a/lib/android/devices.rb +++ b/lib/android/devices.rb @@ -1,4 +1,3 @@ -require 'android/devices/version' require 'android/devices/model' require 'csv' diff --git a/lib/android/devices/version.rb b/lib/android/devices/version.rb deleted file mode 100644 index 53a3fca..0000000 --- a/lib/android/devices/version.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Android - module Devices - VERSION = '1.0.0' - end -end diff --git a/spec/android_devices_spec.rb b/spec/android_devices_spec.rb index 0ef1b56..525a514 100644 --- a/spec/android_devices_spec.rb +++ b/spec/android_devices_spec.rb @@ -1,4 +1,5 @@ require 'spec_helper' +require 'android/devices' describe Android::Devices do describe 'check' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4f652b1..93c6f67 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,5 @@ require 'codeclimate-test-reporter' + CodeClimate::TestReporter.start -SimpleCov.start $LOAD_PATH.unshift('./lib/')