any 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +74 -0
- data/Guardfile +16 -0
- data/LICENSE.txt +21 -0
- data/README.md +105 -0
- data/Rakefile +5 -3
- data/any.gemspec +29 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/any.rb +29 -12
- data/lib/any/version.rb +3 -0
- metadata +111 -67
- data/Changelog.markdown +0 -8
- data/Readme.markdown +0 -11
- data/init.rb +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7f16d3b57611b4f542704564cee6a770489cce27682961bbd973604c4d380ea7
|
4
|
+
data.tar.gz: d7b2eeb418966a87dc097491d2b34f7132ddd300dcc5e371382fb764f3a7a0ff
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3460dda87623bef8340ef564298891d54bcf81691c7afa87cf9eb634594aaa858294d33bcfb626fcc8b7a6da0d9c95c819743e327779b72ae57042c6308c5159
|
7
|
+
data.tar.gz: 13d8a7e8f343547a5642a076d37249abbaa8fd07abe4ec27038b6a9d8bab0fd0729e0aac8d0cf0c7dda907c471b6eea891586599866ab5eb42c763fac56a4bf0
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at keystonelemur@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
any (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
coderay (1.1.2)
|
10
|
+
diff-lcs (1.3)
|
11
|
+
ffi (1.9.25)
|
12
|
+
formatador (0.2.5)
|
13
|
+
guard (2.14.2)
|
14
|
+
formatador (>= 0.2.4)
|
15
|
+
listen (>= 2.7, < 4.0)
|
16
|
+
lumberjack (>= 1.0.12, < 2.0)
|
17
|
+
nenv (~> 0.1)
|
18
|
+
notiffany (~> 0.0)
|
19
|
+
pry (>= 0.9.12)
|
20
|
+
shellany (~> 0.0)
|
21
|
+
thor (>= 0.18.1)
|
22
|
+
guard-compat (1.2.1)
|
23
|
+
guard-rspec (4.7.3)
|
24
|
+
guard (~> 2.1)
|
25
|
+
guard-compat (~> 1.1)
|
26
|
+
rspec (>= 2.99.0, < 4.0)
|
27
|
+
listen (3.1.5)
|
28
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
29
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
30
|
+
ruby_dep (~> 1.2)
|
31
|
+
lumberjack (1.0.13)
|
32
|
+
method_source (0.9.0)
|
33
|
+
nenv (0.3.0)
|
34
|
+
notiffany (0.1.1)
|
35
|
+
nenv (~> 0.1)
|
36
|
+
shellany (~> 0.0)
|
37
|
+
pry (0.11.3)
|
38
|
+
coderay (~> 1.1.0)
|
39
|
+
method_source (~> 0.9.0)
|
40
|
+
qo (0.3.0)
|
41
|
+
rake (10.5.0)
|
42
|
+
rb-fsevent (0.10.3)
|
43
|
+
rb-inotify (0.9.10)
|
44
|
+
ffi (>= 0.5.0, < 2)
|
45
|
+
rspec (3.8.0)
|
46
|
+
rspec-core (~> 3.8.0)
|
47
|
+
rspec-expectations (~> 3.8.0)
|
48
|
+
rspec-mocks (~> 3.8.0)
|
49
|
+
rspec-core (3.8.0)
|
50
|
+
rspec-support (~> 3.8.0)
|
51
|
+
rspec-expectations (3.8.0)
|
52
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
53
|
+
rspec-support (~> 3.8.0)
|
54
|
+
rspec-mocks (3.8.0)
|
55
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
56
|
+
rspec-support (~> 3.8.0)
|
57
|
+
rspec-support (3.8.0)
|
58
|
+
ruby_dep (1.5.0)
|
59
|
+
shellany (0.0.1)
|
60
|
+
thor (0.20.0)
|
61
|
+
|
62
|
+
PLATFORMS
|
63
|
+
ruby
|
64
|
+
|
65
|
+
DEPENDENCIES
|
66
|
+
any!
|
67
|
+
bundler (~> 1.16)
|
68
|
+
guard-rspec
|
69
|
+
qo (= 0.3.0)
|
70
|
+
rake (~> 10.0)
|
71
|
+
rspec (~> 3.0)
|
72
|
+
|
73
|
+
BUNDLED WITH
|
74
|
+
1.16.1
|
data/Guardfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
2
|
+
require "guard/rspec/dsl"
|
3
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
4
|
+
|
5
|
+
# Feel free to open issues for suggestions and improvements
|
6
|
+
|
7
|
+
# RSpec files
|
8
|
+
rspec = dsl.rspec
|
9
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
10
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
11
|
+
watch(rspec.spec_files)
|
12
|
+
|
13
|
+
# Ruby files
|
14
|
+
ruby = dsl.ruby
|
15
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
16
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Brandon Weaver
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
# Any
|
2
|
+
|
3
|
+
Any is a simple gem. When you compare it against anything, it's always true.
|
4
|
+
|
5
|
+
This is a play at Scala's Any type, mostly used for pattern matching type
|
6
|
+
techniques.
|
7
|
+
|
8
|
+
* https://docs.scala-lang.org/tour/unified-types.html
|
9
|
+
* https://www.scala-lang.org/api/2.12.3/scala/Any.html
|
10
|
+
|
11
|
+
## Credits
|
12
|
+
|
13
|
+
Thanks to [@soffes](https://github.com/soffes) for allowing me to repurpose the gem `Any`!
|
14
|
+
|
15
|
+
The original will be maintained at versions 0.0.1 and 0.0.2 from [this repo](https://github.com/soffes/any)
|
16
|
+
|
17
|
+
## Usage
|
18
|
+
|
19
|
+
Note that I'm using Qo here. If these two issues are
|
20
|
+
added in Ruby 2.6+ it'll enable us to do this without
|
21
|
+
the need for Qo:
|
22
|
+
|
23
|
+
* Hash#=== - https://bugs.ruby-lang.org/issues/14869
|
24
|
+
* Array#=== - https://bugs.ruby-lang.org/issues/14916
|
25
|
+
|
26
|
+
I've commented on each to note this.
|
27
|
+
|
28
|
+
For now, I will leave Qo in the specs so that we don't
|
29
|
+
have a hard dependency on 2.6+, especially considering
|
30
|
+
that at the time of writing this it's still in development.
|
31
|
+
|
32
|
+
```ruby
|
33
|
+
require 'qo' # gem install qo @ v0.3.0
|
34
|
+
|
35
|
+
case ['Foo', 25]
|
36
|
+
when Qo[/^F/, Any] then true
|
37
|
+
else false
|
38
|
+
end
|
39
|
+
# => true
|
40
|
+
|
41
|
+
case {id: 1, name: 'foo', age: 42}
|
42
|
+
when Qo[id: Any, name: /^f/, age: Any] then true
|
43
|
+
else false
|
44
|
+
end
|
45
|
+
# => true
|
46
|
+
|
47
|
+
case {id: 1, name: 'foo'}
|
48
|
+
when Qo[id: Any, name: /^f/, age: Any] then true
|
49
|
+
else false
|
50
|
+
end
|
51
|
+
# => false
|
52
|
+
```
|
53
|
+
|
54
|
+
Qo behaves much like the proposals, except in that it's permissive
|
55
|
+
for Arrays of mismatched lengths and works with Objects.
|
56
|
+
|
57
|
+
In 2.6+, assuming the two above are accepted, you could do this:
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
case ['Foo', 25]
|
61
|
+
when [/^F/, Any] then true
|
62
|
+
else false
|
63
|
+
end
|
64
|
+
# => true
|
65
|
+
|
66
|
+
case {id: 1, name: 'foo', age: 42}
|
67
|
+
when {id: Any, name: /^f/, age: Any} then true
|
68
|
+
else false
|
69
|
+
end
|
70
|
+
# => true
|
71
|
+
|
72
|
+
case {id: 1, name: 'foo'}
|
73
|
+
when {id: Any, name: /^f/, age: Any} then true
|
74
|
+
else false
|
75
|
+
end
|
76
|
+
# => false
|
77
|
+
```
|
78
|
+
|
79
|
+
## Installation
|
80
|
+
|
81
|
+
Add this line to your application's Gemfile:
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
gem 'any'
|
85
|
+
```
|
86
|
+
|
87
|
+
And then execute:
|
88
|
+
|
89
|
+
$ bundle
|
90
|
+
|
91
|
+
Or install it yourself as:
|
92
|
+
|
93
|
+
$ gem install any
|
94
|
+
|
95
|
+
## Contributing
|
96
|
+
|
97
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/baweaver/any. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
98
|
+
|
99
|
+
## License
|
100
|
+
|
101
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
102
|
+
|
103
|
+
## Code of Conduct
|
104
|
+
|
105
|
+
Everyone interacting in the Any project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/baweaver/any/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
data/any.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "any/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "any"
|
8
|
+
spec.version = Any::VERSION
|
9
|
+
spec.authors = ["Brandon Weaver"]
|
10
|
+
spec.email = ["keystonelemur@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{An Any type, much like Scala, that matches anything.}
|
13
|
+
# spec.description = %q{TODO: Write a longer description or delete this line.}
|
14
|
+
spec.homepage = "https://www.github.com/baweaver/any"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "guard-rspec"
|
28
|
+
spec.add_development_dependency "qo", '0.3.0'
|
29
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "any"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/any.rb
CHANGED
@@ -1,15 +1,32 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
require "any/version"
|
2
|
+
|
3
|
+
class Any
|
4
|
+
class << self
|
5
|
+
# Always returns true in a comparison
|
6
|
+
#
|
7
|
+
# @param other [Any]
|
8
|
+
# Any other type
|
9
|
+
#
|
10
|
+
# @return true
|
11
|
+
def ==(other)
|
12
|
+
true
|
9
13
|
end
|
10
|
-
end
|
11
|
-
end
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
+
# Always returns true in a comparison
|
16
|
+
#
|
17
|
+
# @param other [Any]
|
18
|
+
# Any other type
|
19
|
+
#
|
20
|
+
# @return true
|
21
|
+
def ===(other)
|
22
|
+
true
|
23
|
+
end
|
24
|
+
|
25
|
+
# Always returns true from a proc
|
26
|
+
#
|
27
|
+
# @return Proc[Any] => true
|
28
|
+
def to_proc
|
29
|
+
proc { true }
|
30
|
+
end
|
31
|
+
end
|
15
32
|
end
|
data/lib/any/version.rb
ADDED
metadata
CHANGED
@@ -1,85 +1,129 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: any
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease: false
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 0.0.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
13
|
-
-
|
6
|
+
authors:
|
7
|
+
- Brandon Weaver
|
14
8
|
autorequire:
|
15
|
-
bindir:
|
9
|
+
bindir: exe
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
date: 2018-08-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
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.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.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'
|
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'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard-rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
23
63
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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: qo
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.3.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.3.0
|
83
|
+
description:
|
84
|
+
email:
|
85
|
+
- keystonelemur@gmail.com
|
38
86
|
executables: []
|
39
|
-
|
40
87
|
extensions: []
|
41
|
-
|
42
88
|
extra_rdoc_files: []
|
43
|
-
|
44
|
-
|
45
|
-
-
|
46
|
-
-
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
|
+
- CODE_OF_CONDUCT.md
|
94
|
+
- Gemfile
|
95
|
+
- Gemfile.lock
|
96
|
+
- Guardfile
|
97
|
+
- LICENSE.txt
|
98
|
+
- README.md
|
47
99
|
- Rakefile
|
48
|
-
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
100
|
+
- any.gemspec
|
101
|
+
- bin/console
|
102
|
+
- bin/setup
|
103
|
+
- lib/any.rb
|
104
|
+
- lib/any/version.rb
|
105
|
+
homepage: https://www.github.com/baweaver/any
|
106
|
+
licenses:
|
107
|
+
- MIT
|
108
|
+
metadata: {}
|
54
109
|
post_install_message:
|
55
110
|
rdoc_options: []
|
56
|
-
|
57
|
-
require_paths:
|
111
|
+
require_paths:
|
58
112
|
- lib
|
59
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
-
|
61
|
-
requirements:
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
62
115
|
- - ">="
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
version: "0"
|
68
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
|
-
requirements:
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
71
120
|
- - ">="
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
segments:
|
75
|
-
- 0
|
76
|
-
version: "0"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
77
123
|
requirements: []
|
78
|
-
|
79
124
|
rubyforge_project:
|
80
|
-
rubygems_version:
|
125
|
+
rubygems_version: 2.7.6
|
81
126
|
signing_key:
|
82
|
-
specification_version:
|
83
|
-
summary:
|
127
|
+
specification_version: 4
|
128
|
+
summary: An Any type, much like Scala, that matches anything.
|
84
129
|
test_files: []
|
85
|
-
|
data/Changelog.markdown
DELETED
data/Readme.markdown
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# Any
|
2
|
-
|
3
|
-
Any provides a super easy way to get any model instance from an Active Record model. This is really handy when testing or populating your database with dummy data.
|
4
|
-
|
5
|
-
## Usage
|
6
|
-
|
7
|
-
Say you have a model named `Post`. All you have to do is:
|
8
|
-
|
9
|
-
Post.any
|
10
|
-
|
11
|
-
If you have no posts, it will return `nil` instead.
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "any"
|