Skip to content

Commit 33f0d14

Browse files
authored
Merge pull request #88 from ruby-docx/measure_code_coverage
Starts measuring code coverage with coveralls
2 parents 40398fa + c951bfd commit 33f0d14

5 files changed

Lines changed: 17 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ Gemfile.lock
44
pkg/*
55
doc/
66
vendor/
7+
coverage/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Gem Version](https://badge.fury.io/rb/docx.svg)](https://badge.fury.io/rb/docx)
44
[![Build Status](https://travis-ci.org/ruby-docx/docx.svg?branch=master)](https://travis-ci.org/ruby-docx/docx)
5+
[![Coverage Status](https://coveralls.io/repos/github/ruby-docx/docx/badge.svg?branch=master)](https://coveralls.io/github/ruby-docx/docx?branch=master)
56
[![Gitter](https://badges.gitter.im/ruby-docx/community.svg)](https://gitter.im/ruby-docx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
67

78
A ruby library/gem for interacting with `.docx` files. currently capabilities include reading paragraphs/bookmarks, inserting text at bookmarks, reading tables/rows/columns/cells and saving the document.

docx.gemspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ Gem::Specification.new do |s|
1010
s.authors = ['Christopher Hunt', 'Marcus Ortiz', 'Higgins Dragon', 'Toms Mikoss', 'Sebastian Wittenkamp']
1111
s.email = ['chrahunt@gmail.com']
1212
s.homepage = 'https://github.com/chrahunt/docx'
13-
s.files = Dir["README.md", "LICENSE.md", "lib/**/*.rb"]
13+
s.files = Dir['README.md', 'LICENSE.md', 'lib/**/*.rb']
1414
s.required_ruby_version = '>= 2.4.0'
1515

1616
s.add_dependency 'nokogiri', '~> 1.10', '>= 1.10.4'
1717
s.add_dependency 'rubyzip', '~> 2.0'
1818

19-
s.add_development_dependency 'rspec', '~> 3.7'
19+
s.add_development_dependency 'coveralls', '~> 0.8'
2020
s.add_development_dependency 'rake', '~> 13.0'
21+
s.add_development_dependency 'rspec', '~> 3.7'
2122
end

spec/docx/document_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
14
require 'docx'
25
require 'tempfile'
36

spec/spec_helper.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
if ENV['COVERALLS_REPO_TOKEN']
4+
require 'coveralls'
5+
6+
Coveralls.wear!
7+
end
8+
19
# This file was generated by the `rspec --init` command. Conventionally, all
210
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
311
# Require this file using `require "spec_helper"` to ensure that it is only
@@ -8,7 +16,7 @@
816
config.treat_symbols_as_metadata_keys_with_true_values = true
917
config.run_all_when_everything_filtered = true
1018
config.filter_run :focus
11-
19+
1220
# Run specs in random order to surface order dependencies. If you find an
1321
# order dependency and want to debug it, you can fix the order by providing
1422
# the seed, which is printed after each run.

0 commit comments

Comments
 (0)