Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
Initial commit - a blankish gem
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Gauld committed Jun 10, 2018
0 parents commit c9212fb
Show file tree
Hide file tree
Showing 11 changed files with 248 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Because this is a gem, ignore Gemfile.lock:

Gemfile.lock

# And because this is Ruby, ignore the following
# (source: https://github.com/github/gitignore/blob/master/Ruby.gitignore):

todo.txt
*.gem
*.rbc
.bundle
.config
coverage
InstalledFiles
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
gemfiles/*.lock

# YARD artifacts
.yardoc
_yardoc
doc/
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--color
--format documentation
--require spec_helper
41 changes: 41 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
language: ruby
rvm:
- 2.2.0
- 2.2.1
- 2.2.2
- 2.2.3
- 2.2.4
- 2.2.5
- 2.2.6
- 2.2.7
- 2.2.8
- 2.2.9
- 2.3.0
- 2.3.1
- 2.3.2
- 2.3.3
- 2.3.4
- 2.3.5
- 2.3.6
- 2.4.0
- 2.4.1
- 2.4.2
- 2.4.3
- 2.5.0
- 2.5.1
gemfile:
- Gemfile
branches:
only:
- master
- staging
- /gh(?:\d)+(?:-.+)?/
- /dev_ver_\d+\.\d+/
before_install: gem update bundler
script: bundle exec rspec
notifications:
slack:
on_success: always
on_failure: always
rooms:
- secure: CH9idL8/an98uf8uvZ0Pzp7LN9ejdFXh40L6obz5x3tViTzvqo2pqNdryom1E6Dw3NJ7nh4h91XxAq6IZLzrwhSGVGri4tA6EPls6NnkN/UvaK/oCt71ZUaC07hb7SSrc+sQN2CRXMFzxkRBvQ8EKlq+F+Qtj28h0Rebfd79CE+i2NYuAtimYRezOmyLKYUHKRkhYtXbR12FKkNW+2pNNx/Aq02bP/sMXTVdk3k+1bsnpjOoan0m7c2SUkYRD9vmY4u9vxTt2lFFJ+V5NWntXb3y5ttctR9EukULHS2mqFA4q+i6OAJaJUIGWCeWTsB1V3fPuICcZHPV1gF4wVAfV/xees1STJuzGRBpIRTUPd/iXfnNT35e5o97quSHolYx0nCRstonW8IOwlegDqJCbmu8nAaP2M42VkZ4u0Qi1MgzFZ3XcmlLsIrypQHbLnQZKgcnBPxY/8AuqDY9JgiY9RaTMT5xyPox33yAC41MaNYouicyfFSZ4Q+4QFNaPtjaG+N5VR7neMGa5uCXGFHR8H5pWDV5oUFlZzep3bMnrkT9nb/56UjZlAF94nYPEs0nsEm+r35b/g/WWGB+t8UpHzl/jK0s74NbASu+MyNN6X+FiaxOB3WvaFz0wJNqN46SINJjHk1CDhquD1qoyLI+R6AtrRkFvlgaXf6RCSfsWCo=
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Version 0.0.1

* Initial release.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

# Specify your gem's dependencies in rail_feeds.gemspec
gemspec
32 changes: 32 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
##Copyright
Copyright (c) 2018, Robert Gauld. All rights reserved.


##License
This code can be used under the BSD License (reproduced below).
Commiters to the project give Robert Gauld the right to redistribute their commits
under the BSD license.


###BSD License
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[![Gem Version](https://badge.fury.io/rb/rail_feeds.png)](http://badge.fury.io/rb/rail_feeds)

Master branch:
[![Build Status](https://secure.travis-ci.org/robertgauld/rail_feeds.png?branch=master)](http://travis-ci.org/robertgauld/rail_feeds)
[![Coveralls Status](https://coveralls.io/repos/robertgauld/rail_feeds/badge.png?branch=master)](https://coveralls.io/r/robertgauld/rail_feeds)
[![Code Climate](https://codeclimate.com/github/robertgauld/rail_feeds.png?branch=master)](https://codeclimate.com/github/robertgauld/rail_feeds)

Staging branch:
[![Build Status](https://secure.travis-ci.org/robertgauld/rail_feeds.png?branch=staging)](http://travis-ci.org/robertgauld/rail_feeds)
[![Coveralls Status](https://coveralls.io/repos/robertgauld/rail_feeds/badge.png?branch=master)](https://coveralls.io/r/robertgauld/rail_feeds)


## Build State
This project uses continuous integration to help ensure that a quality product is delivered.
Travis CI monitors two branches (versions) of the code - Master (which is what gets released)
and Staging (which is what is currently being developed ready for moving to master).


## Ruby Versions
This gem supports the following versions of ruby, it may work on other versions but is not tested against them so don't rely on it.

* 2.2.0 - 2.2.9
* 2.3.0 - 2.3.6
* 2.4.0 - 2.4.3
* 2.5.0 - 2.5.1


## Rail Feeds

Make use of the various open data rails feeds in the UK.
For more details of what feeds are available visit [The Open Rail Data Wiki](https://wiki.openraildata.com).

## Installation

Add to your Gemfile and run the `bundle` command to install it.

```ruby
gem 'rail_feeds', '~> 2.0'
```



## Documentation & Versioning

Documentation can be found on [rubydoc.info](http://rubydoc.info/github/robertgauld/rail_feeds/master/frames)
Some guides can be found in the [doc folder of the repo](https://github.com/robertgauld/rail_feeds/tree/master/doc).

We follow the [Semantic Versioning](http://semver.org/) concept.


## Feed Support

| Source | Module | Module Alias | Support |
| ------------- | ----------------------- | ------------ | ------- |
| Network Rail | RailFeeds::NetworkRail | NetRailFeeds | |
| National Rail | RailFeeds::NationalRail | NatRailFeeds | None yet - any volunteers? |
11 changes: 11 additions & 0 deletions lib/rail_feeds/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module RailFeeds
class Version
MAJOR = 0.freeze
MINOR = 0.freeze
PATCH = 1.freeze

def self.to_s
@@to_s ||= [MAJOR, MINOR, PATCH].join('.')
end
end
end
27 changes: 27 additions & 0 deletions rail_feeds.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$:.push File.expand_path('../lib', __FILE__)
require File.join(File.dirname(__FILE__), 'lib', 'rail_feeds', 'version')

Gem::Specification.new do |s|
s.name = 'rail_feeds'
s.license = 'BSD 3 clause'
s.version = RailFeeds::Version
s.authors = ['Robert Gauld']
s.email = ['robert@robertgauld.co.uk']
s.homepage = 'https://github.com/robertgauld/rail_feeds'
s.summary = %q{Make use of the various open data rails feeds in the UK.}
s.description = %q{Make use of the various open data rails feeds in the UK. Currently only some from Network Rail.}

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
s.require_paths = ['lib']

s.add_development_dependency 'rake', '~> 12.0'
s.add_development_dependency 'rspec', '>= 3.7', '< 4'
s.add_development_dependency 'guard-rspec', '~> 4.2', '>= 4.2.5'
s.add_development_dependency 'rb-inotify', '~> 0.9'
s.add_development_dependency 'coveralls', '~> 0.7'
s.add_development_dependency 'simplecov', '~> 0.7'
s.add_development_dependency 'rubocop', '~> 0.57.1'

end
11 changes: 11 additions & 0 deletions spec/rail_feeds_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
describe RailFeeds do

it 'Has a version' do
expect(RailFeeds::Version).to_not be_nil
expect(RailFeeds::Version::MAJOR).to_not be_nil
expect(RailFeeds::Version::MINOR).to_not be_nil
expect(RailFeeds::Version::PATCH).to_not be_nil
expect(RailFeeds::Version.to_s).to_not be_empty
end

end
33 changes: 33 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require 'simplecov'
SimpleCov.coverage_dir(File.join('tmp', 'coverage'))
SimpleCov.start do
add_filter 'spec/'
end

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

require 'rail_feeds'

RSpec.configure do |config|

# == Mock Framework
#
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
#
# config.mock_with :mocha
# config.mock_with :flexmock
# config.mock_with :rr
config.mock_with :rspec do |configuration|
# Using the expect syntax is preferable to the should syntax in some cases.
# The problem here is that the :should syntax that RSpec uses can fail in
# the case of proxy objects, and objects that include the delegate module.
# Essentially it requires that we define methods on every object in the
# system. Not owning every object means that we cannot ensure this works in
# a consistent manner. The expect syntax gets around this problem by not
# relying on RSpec specific methods being defined on every object in the
# system.
# configuration.syntax = [:expect, :should]
configuration.syntax = :expect
end
end

0 comments on commit c9212fb

Please sign in to comment.