Skip to content

Commit

Permalink
Merge pull request #1 from mkouhei/apply-ci
Browse files Browse the repository at this point in the history
Apply Tracis-CI, Coveralls.
  • Loading branch information
mkouhei committed Sep 11, 2015
2 parents 428cfa2 + e9d01af commit 300446c
Show file tree
Hide file tree
Showing 6 changed files with 267 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -2,3 +2,5 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in mtodos.gemspec
gemspec

gem 'coveralls', require: false
5 changes: 5 additions & 0 deletions README.md
@@ -1,5 +1,10 @@
# MTodos (Debian pacakge Maintainer ToDo notifier)

## Status

[![Build Status](https://travis-ci.org/mkouhei/mtodos.svg)](https://travis-ci.org/mkouhei/mtodos)
[![Coverage Status](https://coveralls.io/repos/mkouhei/mtodos/badge.svg?branch=master&service=github)](https://coveralls.io/github/mkouhei/mtodos?branch=master)

## Installation

Add this line to your application's Gemfile:
Expand Down
1 change: 1 addition & 0 deletions mtodos.gemspec
Expand Up @@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler", "~> 1.10"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec"
spec.add_development_dependency "webmock"
spec.add_development_dependency "simplecov"
spec.add_dependency "memcached"
end
239 changes: 239 additions & 0 deletions spec/data/udd.debian.org.json
@@ -0,0 +1,239 @@
[
{
":shortname": "rc_std_ae0b0e7487e87af44c1b78efbbec037c",
":type": "RC bug",
":source": "blockdiag",
":link": "http://bugs.debian.org/796371",
":description": "RC bug needs fixing",
":details": "#796371: blockdiag: FTBFS: unknown format: SVG",
":updated": {
"^t": 1441802898
},
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "rc_std_f091c6a1583a4f3648991ad47b67501a",
":type": "RC bug",
":source": "nwdiag",
":link": "http://bugs.debian.org/796429",
":description": "RC bug needs fixing",
":details": "#796429: nwdiag: FTBFS: TypeError: 'NoneType' object is not callable",
":updated": {
"^t": 1441802896
},
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "rc_std_87b5328fc6e4b58d7da73dd6ebae9997",
":type": "RC bug",
":source": "seqdiag",
":link": "http://bugs.debian.org/796481",
":description": "RC bug needs fixing",
":details": "#796481: seqdiag: FTBFS: TypeError: coercing to Unicode: need string or buffer, bool found",
":updated": {
"^t": 1441846446
},
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "rc_std_c8f7be813b60241bc590926f86cd0f7d",
":type": "RC bug",
":source": "actdiag",
":link": "http://bugs.debian.org/798547",
":description": "RC bug needs fixing",
":details": "#798547: actdiag: FTBFS: TypeError: coercing to Unicode: need string or buffer, bool found",
":updated": {
"^t": 1441891986
},
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "vcs_a586b5acb5a2f9f22e6fabe567fe5bc4",
":type": "vcs",
":source": "backup2swift",
":link": "http://anonscm.debian.org/gitweb/?p=openstack/backup2swift.git",
":description": "New version",
":details": " ready for upload",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_fe0e468b3f010271c7a6963bd4727efb",
":type": "uscan error",
":source": "sphinxcontrib-nwdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n http://pypi.python.org/packages/source/s/sphinxcontrib-nwdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_488f3d00e30247919fb99edffd0f5d8e",
":type": "uscan error",
":source": "sphinxcontrib-blockdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n http://pypi.python.org/packages/source/s/sphinxcontrib-blockdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_26c5c686a73948e03ed5f77353e0e8a0",
":type": "uscan error",
":source": "nwdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n https://pypi.python.org/packages/source/n/nwdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_1c978829f67c21014a3665f00232013b",
":type": "uscan error",
":source": "swiftsc",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n http://pypi.python.org/packages/source/s/swiftsc/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "newupstream_0ad0e1e9912b4e1745864456991a7901",
":type": "new upstream",
":source": "django-shortuuidfield",
":link": null,
":description": "New version available",
":details": "0.1.3",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_5b48e0fa6a7d5d87abde7ff709e58086",
":type": "uscan error",
":source": "backup2swift",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n http://pypi.python.org/packages/source/b/backup2swift/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_c81f8694c8b2e63bfdeea18319e0384a",
":type": "uscan error",
":source": "blockdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n https://pypi.python.org/packages/source/b/blockdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_cf1434bf751dcd7215b39f61493d7d6e",
":type": "uscan error",
":source": "sphinxcontrib-seqdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n http://pypi.python.org/packages/source/s/sphinxcontrib-seqdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "newupstream_6d5778f1a5fabcc09f4759c0c1cc521b",
":type": "new upstream",
":source": "django-guardian",
":link": null,
":description": "New version available",
":details": "1.3",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_97ef59e09d1ab5e07b2f5d32104148d2",
":type": "uscan error",
":source": "seqdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n https://pypi.python.org/packages/source/s/seqdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_ef1c4409d1a4ece692196f5d5d6f7067",
":type": "uscan error",
":source": "actdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n https://pypi.python.org/packages/source/a/actdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "scanerror_d008414a08dcfcafa14d35523bfb1991",
":type": "uscan error",
":source": "sphinxcontrib-actdiag",
":link": null,
":description": "debian/watch: uscan returned an error",
":details": "uscan warning: reading webpage\n http://pypi.python.org/packages/source/s/sphinxcontrib-actdiag/ failed: 404 Not Found",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_sphinxcontrib-nwdiag_0.9.0-1.1_1444394896",
":type": "testing auto-removal",
":source": "sphinxcontrib-nwdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: )",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_sphinxcontrib-blockdiag_1.5.0-1.1_1444394898",
":type": "testing auto-removal",
":source": "sphinxcontrib-blockdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: )",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_nwdiag_1.0.3-3_1444394896",
":type": "testing auto-removal",
":source": "nwdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: #796429)",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_blockdiag_1.4.7-1_1444394898",
":type": "testing auto-removal",
":source": "blockdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: #796371)",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_sphinxcontrib-seqdiag_0.8.0-1.1_1444394898",
":type": "testing auto-removal",
":source": "sphinxcontrib-seqdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: )",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_seqdiag_0.9.3-4_1444394898",
":type": "testing auto-removal",
":source": "seqdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: #796481)",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_actdiag_0.5.3-4_1444394898",
":type": "testing auto-removal",
":source": "actdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: )",
":reason": "Maintained by dummy@example.org"
},
{
":shortname": "autoremoval_sphinxcontrib-actdiag_0.8.0-1.1_1444394898",
":type": "testing auto-removal",
":source": "sphinxcontrib-actdiag",
":link": null,
":description": "Testing auto-removal",
":details": "on 2015-10-09 (bug: )",
":reason": "Maintained by dummy@example.org"
}
]
14 changes: 12 additions & 2 deletions spec/mtodos_spec.rb
@@ -1,13 +1,23 @@
require 'spec_helper'
require 'webmock'
require 'mtodos'

include WebMock::API


describe Mtodos do
data = File.read('spec/data/udd.debian.org.json')
stub_request(:any, 'udd.debian.org').to_return(
:body => data,
:status => 200,
:headers => {'Content-Length' => 7632}
)
it 'has a version number' do
expect(Mtodos::VERSION).not_to be nil
end

it 'does something useful' do
expect(false).to eq(true)
it 'initialize Client with cache file' do
Mtodos::Client.new('https://udd.debian.org/dmd/?email1=dummy%40example.org&format=json#todo')
expect(File.exist?('mtodos.cache')).to eq(true)
end
end
9 changes: 8 additions & 1 deletion spec/spec_helper.rb
@@ -1,11 +1,18 @@
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'simplecov'


SimpleCov.start do
add_filter '/\.bundle/'
end

if ENV['CI']
require 'coveralls'
Coveralls.wear!

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[Coveralls::SimpleCov::Formatter]
SimpleCov.start 'test_frameworks'
end

RSpec.configure do |config|
config.run_all_when_everything_filtered = true
config.filter_run :focus
Expand Down

0 comments on commit 300446c

Please sign in to comment.