nope 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README +9 -0
- data/Rakefile +18 -0
- data/lib/nope.rb +23 -0
- data/lib/nope/version.rb +5 -0
- data/test/nope/nope_test.rb +13 -0
- data/test/test_helper.rb +3 -0
- metadata +53 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3feb5499d697d569666d9dcda42cece8da69e57a
|
4
|
+
data.tar.gz: af5004a93bae70010c0a567313148087fb48c403
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a0802daea495d8c010a51e87127a51dbc4fdf409e23a269b0439141e37d363d1ce64b659cc8685bb11e28b064e28c42f441cdf67f277761256b0fc90716f7f3d
|
7
|
+
data.tar.gz: 23245002e0e604dad2c383b19084b10d81449793856d4843393f68612a2ede046498890f1f11b4ca26e5c6f3da97aabd886512e6085e6855510722bbd2d8628c
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2014 Genadi Samokovarov
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
Nope adds yes, no, on and off into Object.
|
2
|
+
|
3
|
+
You can use them in configuration files or wherever they make more
|
4
|
+
sense to you than a plain true or false.
|
5
|
+
|
6
|
+
Do the usual, gem install nope to install it and require 'nope' into
|
7
|
+
your projects to get the methods.
|
8
|
+
|
9
|
+
Thats it.
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rake/testtask'
|
8
|
+
|
9
|
+
Rake::TestTask.new(:test) do |t|
|
10
|
+
t.libs << 'lib'
|
11
|
+
t.libs << 'test'
|
12
|
+
t.pattern = 'test/**/*_test.rb'
|
13
|
+
t.verbose = false
|
14
|
+
end
|
15
|
+
|
16
|
+
Bundler::GemHelper.install_tasks
|
17
|
+
|
18
|
+
task default: :test
|
data/lib/nope.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Nope adds +yes+, +no+, +on+ and +off+ into Object.
|
2
|
+
#
|
3
|
+
# You can use them in configuration files or wherever they make more sense to
|
4
|
+
# you than a plain +true+ or +false+.
|
5
|
+
#
|
6
|
+
# Thats it.
|
7
|
+
module Nope
|
8
|
+
# Alias for +true+.
|
9
|
+
def yes
|
10
|
+
true
|
11
|
+
end
|
12
|
+
|
13
|
+
alias :on :yes
|
14
|
+
|
15
|
+
# Alias for +false+.
|
16
|
+
def no
|
17
|
+
false
|
18
|
+
end
|
19
|
+
|
20
|
+
alias :off :no
|
21
|
+
end
|
22
|
+
|
23
|
+
Object.send(:include, Nope)
|
data/lib/nope/version.rb
ADDED
data/test/test_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nope
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Genadi Samokovarov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description:
|
14
|
+
email:
|
15
|
+
- gsamokovarov@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- MIT-LICENSE
|
21
|
+
- README
|
22
|
+
- Rakefile
|
23
|
+
- lib/nope.rb
|
24
|
+
- lib/nope/version.rb
|
25
|
+
- test/nope/nope_test.rb
|
26
|
+
- test/test_helper.rb
|
27
|
+
homepage: https://github.com/gsamokovarov/nope
|
28
|
+
licenses:
|
29
|
+
- MIT
|
30
|
+
metadata: {}
|
31
|
+
post_install_message:
|
32
|
+
rdoc_options: []
|
33
|
+
require_paths:
|
34
|
+
- lib
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
requirements: []
|
46
|
+
rubyforge_project:
|
47
|
+
rubygems_version: 2.2.0
|
48
|
+
signing_key:
|
49
|
+
specification_version: 4
|
50
|
+
summary: Nope adds yes, no, on and off into Object.
|
51
|
+
test_files:
|
52
|
+
- test/nope/nope_test.rb
|
53
|
+
- test/test_helper.rb
|