diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000000..e1d1604df2 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: YysDKPzbssfETbQG7t2zEQOxPraO4Or1b \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4e6fc8715c..c8722d6107 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ pkg/* +# Ignore Coveralls files +.coveralls/* + # Ignore Vim backup files. *~ diff --git a/Gemfile.lock b/Gemfile.lock index 9f57a1abf4..9b133e6390 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,8 +9,16 @@ GEM specs: ast (2.4.0) concurrent-ruby (1.0.5) + coveralls (0.8.21) + json (>= 1.8, < 3) + simplecov (~> 0.14.1) + term-ansicolor (~> 1.3) + thor (~> 0.19.4) + tins (~> 1.6) + docile (1.1.5) i18n (0.9.1) concurrent-ruby (~> 1.0) + json (2.1.0) minitest (5.10.3) parallel (1.12.1) parser (2.5.1.0) @@ -27,15 +35,25 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.9.0) + simplecov (0.14.1) + docile (~> 1.1.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.2) + term-ansicolor (1.6.0) + tins (~> 1.0) test-unit (3.2.6) power_assert + thor (0.19.4) timecop (0.9.1) + tins (1.16.3) unicode-display_width (1.3.2) PLATFORMS ruby DEPENDENCIES + coveralls faker! minitest rake @@ -44,4 +62,4 @@ DEPENDENCIES timecop BUNDLED WITH - 1.16.1.pre1 + 1.16.1 diff --git a/README.md b/README.md index 5219d8bbbf..2f16edefd6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Faker [![Build Status](https://travis-ci.org/stympy/faker.svg?branch=master)](https://travis-ci.org/stympy/faker) [![Gem Version](https://badge.fury.io/rb/faker.svg)](https://badge.fury.io/rb/faker) +# Faker [![Build Status](https://travis-ci.org/stympy/faker.svg?branch=master)](https://travis-ci.org/stympy/faker) [![Gem Version](https://badge.fury.io/rb/faker.svg)](https://badge.fury.io/rb/faker) [![Coverage Status](https://coveralls.io/repos/github/stympy/faker/badge.svg?branch=master)](https://coveralls.io/github/stympy/faker?branch=master) This gem is a port of Perl's Data::Faker library that generates fake data. diff --git a/faker.gemspec b/faker.gemspec index 0ae1b657c8..48337d76f3 100644 --- a/faker.gemspec +++ b/faker.gemspec @@ -13,6 +13,7 @@ Gem::Specification.new do |s| s.license = 'MIT' s.add_runtime_dependency('i18n', '>= 0.7') + s.add_development_dependency('coveralls') s.add_development_dependency('minitest') s.add_development_dependency('rake') s.add_development_dependency('rubocop') diff --git a/test/test_helper.rb b/test/test_helper.rb index 634c3ea32a..9838472c54 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -5,6 +5,10 @@ YAML::ENGINE.yamler = 'psych' if defined? YAML::ENGINE require File.expand_path(File.dirname(__FILE__) + '/../lib/faker') +# add Coveralls support +require 'coveralls' +Coveralls.wear! + # configure I18n locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales') I18n.available_locales = Dir[locales_path + '/*'].map do |file|