diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b844b14 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +Gemfile.lock diff --git a/Gemfile b/Gemfile index 4cd8666..e088013 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org/' -gem 'rspec', '~> 3.0.0' +gemspec diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 1a86be3..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,22 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - diff-lcs (1.2.5) - rspec (3.0.0) - rspec-core (~> 3.0.0) - rspec-expectations (~> 3.0.0) - rspec-mocks (~> 3.0.0) - rspec-core (3.0.3) - rspec-support (~> 3.0.0) - rspec-expectations (3.0.3) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.0.0) - rspec-mocks (3.0.3) - rspec-support (~> 3.0.0) - rspec-support (3.0.3) - -PLATFORMS - ruby - -DEPENDENCIES - rspec (~> 3.0.0) diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..b47086a --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright (c) 2014 Tom Stuart + +MIT License + +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. diff --git a/lib/monads.rb b/lib/monads.rb new file mode 100644 index 0000000..fc1e94d --- /dev/null +++ b/lib/monads.rb @@ -0,0 +1,4 @@ +require 'monads/eventually' +require 'monads/many' +require 'monads/optional' +require 'monads/version' diff --git a/lib/monads/version.rb b/lib/monads/version.rb new file mode 100644 index 0000000..966fd66 --- /dev/null +++ b/lib/monads/version.rb @@ -0,0 +1,3 @@ +module Monads + VERSION = '0.0.1' +end diff --git a/monads.gemspec b/monads.gemspec new file mode 100644 index 0000000..47d2261 --- /dev/null +++ b/monads.gemspec @@ -0,0 +1,19 @@ +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'monads/version' + +Gem::Specification.new do |spec| + spec.name = 'monads' + spec.version = Monads::VERSION + spec.author = 'Tom Stuart' + spec.email = 'tom@codon.com' + spec.summary = 'Simple Ruby implementations of some common monads.' + spec.homepage = 'https://github.com/tomstuart/monads' + spec.license = 'MIT' + + spec.files = `git ls-files -z`.split("\x0") + spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.require_paths = ['lib'] + + spec.add_development_dependency 'rspec', '~> 3.0', '>= 3.0.0' +end