results 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +36 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +29 -0
- data/Rakefile +26 -0
- data/lib/results.rb +4 -0
- data/lib/results/version.rb +4 -0
- data/results.gemspec +40 -0
- data/spec/results_spec.rb +24 -0
- data/spec/spec_helper.rb +25 -0
- metadata +156 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 33039153c74e13756f5a15c64d552fc64e1f82be
|
4
|
+
data.tar.gz: d169c2ae7b34c76a40560b88a6cbd90a76615baf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4ef21d48dd71bbabfd3aac219eebd0b217a526606e59125e3939500c678344f8e1356d8b961a9c384ee5da41a654b50fa71b073b4620496c3a5743b33a902d3b
|
7
|
+
data.tar.gz: 200415d4e0fd09f67ff95e3b8c58b2ebd26cb502fc2117e65fa852ff381f5aaed3275782115bd586e48fe553ab6f398c0f235efad2933babb31e3f158c821a1e
|
data/.gitignore
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/.idea
|
5
|
+
/*.iml
|
6
|
+
/coverage/
|
7
|
+
/InstalledFiles
|
8
|
+
/pkg/
|
9
|
+
/spec/reports/
|
10
|
+
/test/tmp/
|
11
|
+
/test/version_tmp/
|
12
|
+
/tmp/
|
13
|
+
|
14
|
+
## Specific to RubyMotion:
|
15
|
+
.dat*
|
16
|
+
.repl_history
|
17
|
+
build/
|
18
|
+
|
19
|
+
## Documentation cache and generated files:
|
20
|
+
/.yardoc/
|
21
|
+
/_yardoc/
|
22
|
+
/doc/
|
23
|
+
/rdoc/
|
24
|
+
|
25
|
+
## Environment normalisation:
|
26
|
+
/.bundle/
|
27
|
+
/lib/bundler/man/
|
28
|
+
|
29
|
+
# for a library or gem, you might want to ignore these files since the code is
|
30
|
+
# intended to run in multiple environments; otherwise, check them in:
|
31
|
+
Gemfile.lock
|
32
|
+
# .ruby-version
|
33
|
+
# .ruby-gemset
|
34
|
+
|
35
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
36
|
+
.rvmrc
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
results
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.1.0
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Marc Siegel
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
= Results =
|
2
|
+
[](http://badge.fury.io/rb/results)
|
3
|
+
[](https://travis-ci.org/ms-ati/results)
|
4
|
+
[](https://gemnasium.com/ms-ati/results)
|
5
|
+
[](https://codeclimate.com/github/ms-ati/results)
|
6
|
+
[](https://coveralls.io/r/ms-ati/results)
|
7
|
+
|
8
|
+
A functional combinator of results which are either Good or Bad inspired by the [ScalaUtils][1] [Or and Every][1] classes.
|
9
|
+
|
10
|
+
[1]: http://www.scalautils.org
|
11
|
+
[2]: http://www.scalautils.org/user_guide/OrAndEvery
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
# Coming soon...
|
17
|
+
```
|
18
|
+
|
19
|
+
More coming soon...
|
20
|
+
|
21
|
+
## TODO
|
22
|
+
|
23
|
+
1. Define api
|
24
|
+
1. Implement
|
25
|
+
1. Document using yard
|
26
|
+
1. Release 0.9.0 and solicit comments
|
27
|
+
1. Incorporate suggested changes
|
28
|
+
1. Release 1.0.0
|
29
|
+
1. Potentially incorporate as a depedendency into [Rumonade](https://github.com/ms-ati/rumonade)
|
data/Rakefile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rake/clean'
|
2
|
+
require 'bundler/gem_tasks'
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
|
5
|
+
# Default task for `rake` is to run rspec
|
6
|
+
task :default => [:spec]
|
7
|
+
|
8
|
+
# Use default rspec rake task
|
9
|
+
RSpec::Core::RakeTask.new
|
10
|
+
|
11
|
+
# Configure `rake clobber` to delete all generated files
|
12
|
+
CLOBBER.include('pkg', 'doc', 'coverage')
|
13
|
+
|
14
|
+
# Only configure yard doc generation when *not* on Travis or JRuby
|
15
|
+
if ENV['CI'] != 'true' && !(defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
16
|
+
require 'github/markup'
|
17
|
+
require 'redcarpet'
|
18
|
+
require 'yard'
|
19
|
+
require 'yard/rake/yardoc_task'
|
20
|
+
|
21
|
+
YARD::Rake::YardocTask.new do |t|
|
22
|
+
OTHER_PATHS = %w()
|
23
|
+
t.files = ['lib/**/*.rb', OTHER_PATHS]
|
24
|
+
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md)
|
25
|
+
end
|
26
|
+
end
|
data/lib/results.rb
ADDED
data/results.gemspec
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
$LOAD_PATH << File.expand_path('../lib', __FILE__)
|
2
|
+
require 'results/version'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'results'
|
6
|
+
s.version = Results::VERSION
|
7
|
+
s.author = 'Marc Siegel'
|
8
|
+
s.email = 'marc@usainnov.com'
|
9
|
+
s.homepage = 'http://ms-ati.github.com/results/'
|
10
|
+
s.summary = 'Results provides easy composition of Good and Bad results'
|
11
|
+
s.description = 'Results is a functional combinator of results which are either Good or Bad inspired by ScalaUtils\'s Or and Every classes'
|
12
|
+
s.license = 'MIT'
|
13
|
+
|
14
|
+
s.rubyforge_project = 'results'
|
15
|
+
|
16
|
+
# Assembles gem files via git commands
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = %w(lib)
|
21
|
+
|
22
|
+
# Adds runtime dependencies
|
23
|
+
s.add_dependency 'rescuer', '~> 0.1.0'
|
24
|
+
|
25
|
+
# Runs rspec tests from rake
|
26
|
+
s.add_development_dependency 'rake', '~> 10.3.0'
|
27
|
+
s.add_development_dependency 'rspec', '3.0.0.beta2'
|
28
|
+
|
29
|
+
# Generates yard documentation
|
30
|
+
if !(defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
31
|
+
# Github flavored markdown in YARD documentation
|
32
|
+
# http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
|
33
|
+
s.add_development_dependency 'yard'
|
34
|
+
s.add_development_dependency 'redcarpet'
|
35
|
+
s.add_development_dependency 'github-markup'
|
36
|
+
end
|
37
|
+
|
38
|
+
# Coveralls test coverage tool
|
39
|
+
s.add_development_dependency 'coveralls'
|
40
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'results'
|
3
|
+
|
4
|
+
describe Results do
|
5
|
+
|
6
|
+
##
|
7
|
+
# Construct indirectly by wrapping a block which may raise an exception
|
8
|
+
##
|
9
|
+
describe '.new' do
|
10
|
+
end
|
11
|
+
|
12
|
+
##
|
13
|
+
# Construct directly as Good
|
14
|
+
##
|
15
|
+
describe Results::Good do
|
16
|
+
end
|
17
|
+
|
18
|
+
##
|
19
|
+
# Construct directly as Bad
|
20
|
+
##
|
21
|
+
describe Results::Bad do
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'coveralls'
|
3
|
+
|
4
|
+
# On Ruby 1.9+ use SimpleCov and publish to Coveralls.io
|
5
|
+
if !RUBY_VERSION.start_with? '1.8'
|
6
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
7
|
+
SimpleCov::Formatter::HTMLFormatter,
|
8
|
+
Coveralls::SimpleCov::Formatter
|
9
|
+
]
|
10
|
+
SimpleCov.start do
|
11
|
+
add_filter '/spec/' # exclude test code
|
12
|
+
add_filter '/vendor/' # exclude gems which are vendored on Travis CI
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
lib_dir = File.join(File.dirname(File.dirname(__FILE__)), 'lib')
|
17
|
+
$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include? lib_dir
|
18
|
+
|
19
|
+
require 'rspec'
|
20
|
+
|
21
|
+
RSpec.configure do |config|
|
22
|
+
config.expect_with :rspec do |c|
|
23
|
+
c.syntax = :expect
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: results
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marc Siegel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rescuer
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 10.3.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 10.3.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.0.0.beta2
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.0.0.beta2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: redcarpet
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: github-markup
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: coveralls
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Results is a functional combinator of results which are either Good or
|
112
|
+
Bad inspired by ScalaUtils's Or and Every classes
|
113
|
+
email: marc@usainnov.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".ruby-gemset"
|
120
|
+
- ".ruby-version"
|
121
|
+
- ".travis.yml"
|
122
|
+
- Gemfile
|
123
|
+
- LICENSE
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- lib/results.rb
|
127
|
+
- lib/results/version.rb
|
128
|
+
- results.gemspec
|
129
|
+
- spec/results_spec.rb
|
130
|
+
- spec/spec_helper.rb
|
131
|
+
homepage: http://ms-ati.github.com/results/
|
132
|
+
licenses:
|
133
|
+
- MIT
|
134
|
+
metadata: {}
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubyforge_project: results
|
151
|
+
rubygems_version: 2.2.2
|
152
|
+
signing_key:
|
153
|
+
specification_version: 4
|
154
|
+
summary: Results provides easy composition of Good and Bad results
|
155
|
+
test_files: []
|
156
|
+
has_rdoc:
|