Skip to content

Commit

Permalink
Merge branch 'tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorSheehan1 committed Feb 4, 2018
2 parents 5435082 + e4e9f42 commit 7f855fb
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 9 deletions.
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
os: linux
sudo: required
env: DISPLAY=':99.0'
dist: trusty
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable

language: ruby
rvm:
- 2.3.0

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3 # give xvfb some time to start
- bundle exec jekyll serve & # start a Web server (use & to start in new process)
- sleep 3 # give Web server some time to bind to sockets, etc

script:
- bundle exec rspec
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2018 Conor Sheehan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/ConorSheehan1/ConorSheehan1.github.io.svg?branch=master)](https://travis-ci.org/ConorSheehan1/ConorSheehan1.github.io)

## Local setup
1. install dependencies
```
Expand Down
11 changes: 8 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ layout: default

* [https://conorsgapminder.herokuapp.com](https://conorsgapminder.herokuapp.com)
* Visualising GDP and life expectancy of countries (d3.js)
* [Source](https://github.com/ConorSheehan1/InfoVisD3)

* [https://conorsworldmap.herokuapp.com](https://conorsworldmap.herokuapp.com)
* Visualizing GDP grouped by government type, using (d3.js, datamaps)
* Visualizing GDP grouped by government type, using (d3.js, datamaps)
* [Source](https://github.com/ConorSheehan1/InfoVisD3)

# Things I've worked on

* [http://restimator.herokuapp.com](http://restimator.herokuapp.com)
* Estimating the occupancy of rooms in the UCD computer science building based on WiFI logs (flask, scikit, pandas)
* Estimating the occupancy of rooms in the UCD computer science building based on WiFI logs (flask, scikit, pandas)
* [Source](https://github.com/ConorSheehan1/ReSTimator_Team1100)

* [https://dubbikesmap-api-heroku.herokuapp.com/](https://dubbikesmap-api-heroku.herokuapp.com/)
* Dublin Bikes WebApp built on jcdecaux api
* Dublin Bikes WebApp built on jcdecaux api
* [Source](https://github.com/ConorSheehan1/dublin_bikes)


# What I like

Expand Down
7 changes: 1 addition & 6 deletions spec/home_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,12 @@
all('a').each do |link|
http_status = Faraday.head(link[:href].to_s).status
puts "#{link.text}, #{http_status}"
# linked in returns 999 code (possibly filter by user agent)
# linkedin returns 999 code (possibly filter by user agent)
# to account for redirects and cases where bots are refused,
# only check for typical client and server side errors
expect((400..500)).not_to include(http_status)
end
end
end

it "does throw 400/500 error for url which fails" do
http_status = Faraday.head("https://en.wikipedia.org/__wiki_/").status
expect((400..500)).to include(http_status)
end

end
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require 'rack/jekyll'
require 'rack/test'
require 'pry'
require 'yaml'

RSpec.configure do |config|
config.expect_with :rspec do |expectations|
Expand Down

0 comments on commit 7f855fb

Please sign in to comment.