initial commit

This commit is contained in:
ZippyDev 2019-01-20 08:53:02 -07:00
commit ef52201905
17 changed files with 308 additions and 0 deletions

11
.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
/.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
# rspec failure tracking
.rspec_status

3
.rspec Normal file
View File

@ -0,0 +1,3 @@
--format documentation
--color
--require spec_helper

17
.rubocop.yml Normal file
View File

@ -0,0 +1,17 @@
AllCops:
TargetRubyVersion: 2.5
Documentation:
Enabled: false
LineLength:
Max: 120
Style/RaiseArgs:
EnforcedStyle: compact
Metrics/AbcSize:
Enabled: false
Metrics/MethodLength:
Max: 25
Lint/Debugger:
Enabled: false
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'

1
.ruby-version Normal file
View File

@ -0,0 +1 @@
2.5.1

7
.travis.yml Normal file
View File

@ -0,0 +1,7 @@
---
sudo: false
language: ruby
cache: bundler
rvm:
- 2.4.4
before_install: gem install bundler -v 1.17.1

6
Gemfile Normal file
View File

@ -0,0 +1,6 @@
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# Specify your gem's dependencies in ncaa.gemspec
gemspec

96
Gemfile.lock Normal file
View File

@ -0,0 +1,96 @@
PATH
remote: .
specs:
ncaa (0.1.0)
activesupport (~> 5.1)
multi_json (~> 1.13)
nokogiri (~> 1.10)
rest-client (~> 2.0)
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
coderay (1.1.2)
concurrent-ruby (1.1.4)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
docile (1.3.1)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
hashdiff (0.3.8)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.5.2)
concurrent-ruby (~> 1.0)
json (2.1.0)
method_source (0.9.2)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mini_portile2 (2.4.0)
minitest (5.11.3)
multi_json (1.13.1)
netrc (0.11.0)
nokogiri (1.10.1)
mini_portile2 (~> 2.4.0)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.3)
rake (12.3.2)
rest-client (2.0.2)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
safe_yaml (1.0.4)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
webmock (3.5.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
PLATFORMS
ruby
DEPENDENCIES
bundler (~> 1.16)
ncaa!
pry (~> 0.11)
rake (~> 12.3)
rspec (~> 3.8)
simplecov (~> 0.16)
webmock (~> 3.4)
BUNDLED WITH
1.16.3

21
LICENSE.txt Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2019 ZippyDev
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.

39
README.md Normal file
View File

@ -0,0 +1,39 @@
# Ncaa
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ncaa`. To experiment with that code, run `bin/console` for an interactive prompt.
TODO: Delete this and the text above, and describe your gem
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'ncaa'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install ncaa
## Usage
TODO: Write usage instructions here
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ncaa.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

6
Rakefile Normal file
View File

@ -0,0 +1,6 @@
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec

14
bin/console Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env ruby
require "bundler/setup"
require "ncaa"
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start
require "irb"
IRB.start(__FILE__)

8
bin/setup Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx
bundle install
# Do any other automated setup that you need to do here

11
lib/ncaa.rb Normal file
View File

@ -0,0 +1,11 @@
# frozen_string_literal: true
require 'ncaa/version'
require 'ncaa/base'
require 'ncaa/client/base'
module Ncaa
class Error < StandardError; end
# Your code goes here...
end

3
lib/ncaa/version.rb Normal file
View File

@ -0,0 +1,3 @@
module Ncaa
VERSION = "0.1.0"
end

38
ncaa.gemspec Normal file
View File

@ -0,0 +1,38 @@
# frozen_string_literal: true
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'ncaa/version'
Gem::Specification.new do |spec|
spec.name = 'ncaa'
spec.version = Ncaa::VERSION
spec.authors = ['ZippyDev']
spec.email = ['ZippyDev@protonmail.com']
spec.summary = 'NCAA Sports Data'
spec.description = 'NCAA Sports Data'
spec.homepage = 'https://gitlab.com/snogrammer/ncaa'
spec.license = 'MIT'
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
spec.add_dependency 'activesupport', '~> 5.1'
spec.add_dependency 'multi_json', '~> 1.13'
spec.add_dependency 'nokogiri', '~> 1.10'
spec.add_dependency 'rest-client', '~> 2.0'
spec.add_development_dependency 'bundler', '~> 1.16'
spec.add_development_dependency 'pry', '~> 0.11'
spec.add_development_dependency 'rake', '~> 12.3'
spec.add_development_dependency 'rspec', '~> 3.8'
spec.add_development_dependency 'simplecov', '~> 0.16'
spec.add_development_dependency 'webmock', '~> 3.4'
end

11
spec/ncaa_spec.rb Normal file
View File

@ -0,0 +1,11 @@
# frozen_string_literal: true
RSpec.describe Ncaa do
it 'has a version number' do
expect(Ncaa::VERSION).not_to be nil
end
it 'does something useful' do
expect(false).to eq(true)
end
end

16
spec/spec_helper.rb Normal file
View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
require 'bundler/setup'
require 'ncaa'
RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
config.example_status_persistence_file_path = '.rspec_status'
# Disable RSpec exposing methods globally on `Module` and `main`
config.disable_monkey_patching!
config.expect_with :rspec do |c|
c.syntax = :expect
end
end