ohno 0.0.2
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 +1 -0
- data/README.md +22 -0
- data/Rakefile +2 -0
- data/lib/ohno/version.rb +3 -0
- data/lib/ohno.rb +41 -0
- data/ohno.gemspec +34 -0
- metadata +78 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: bac04724c7184a3b177a318f4cc18a3e2c48cf03
|
|
4
|
+
data.tar.gz: d9988e8d33662a5cb3b9225ca285f61c20a4ae5c
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: fbaf967d15d0fac3b97d3c0c70506cbc1d41cd4e8e1177d086605751b2981941733b7a8efacc9fd9f9ff3fa29a82d8eee3f2433c5d8fcc5982e5f76fffc09190
|
|
7
|
+
data.tar.gz: a9f5ecbc49a7091cf7c0a0dc8ef703053bf9184a6dbacdf1a98ae1df0df9c110a991d631cdeeb27c0f20cbab846ea8214729757b1c5543e896bd3cf110dd4bf0
|
data/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Rakefile
|
data/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#OhNo
|
|
2
|
+
|
|
3
|
+
Do you ever feel like you don't even know where your errors are coming from? Try OhNo! With OhNo, you'll know exactly how those bugs got there - you put them there!
|
|
4
|
+
|
|
5
|
+
Have trouble with recursion? Just call stack_overflow method and call it a day!
|
|
6
|
+
Not so good with math? Try out divide_by_zero!
|
|
7
|
+
Need to buy some time? An infinite_loop is the one for you!
|
|
8
|
+
|
|
9
|
+
Try these and much, much more!
|
|
10
|
+
|
|
11
|
+
##Usage
|
|
12
|
+
|
|
13
|
+
Just slip any of these methods into your code and enjoy!
|
|
14
|
+
```ruby
|
|
15
|
+
OhNo::infinite_loop
|
|
16
|
+
OhNo::stack_overflow
|
|
17
|
+
OhNo::divide_by_zero
|
|
18
|
+
OhNo::index_error
|
|
19
|
+
OhNo::type_error
|
|
20
|
+
OhNo::no_method_error
|
|
21
|
+
OhNo::argument_error
|
|
22
|
+
```
|
data/Rakefile
ADDED
data/lib/ohno/version.rb
ADDED
data/lib/ohno.rb
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module OhNo
|
|
2
|
+
|
|
3
|
+
def infinite_loop
|
|
4
|
+
until false
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def stack_overflow
|
|
9
|
+
stack_overflow
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def divide_by_zero
|
|
14
|
+
42/0
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def index_error
|
|
18
|
+
small_array = [1, 2, 3]
|
|
19
|
+
big_idx = 1_000_000
|
|
20
|
+
small_array.fetch(big_idx)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def type_error
|
|
24
|
+
20 / "spaghetti"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def no_method_error
|
|
28
|
+
youknowme!
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def argument_error
|
|
32
|
+
i_take_one_argument("Here's", "a", "bunch", "of", "arguments")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
def i_take_one_argument(arg)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
end
|
data/ohno.gemspec
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'ohno/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "ohno"
|
|
8
|
+
spec.version = OhNo::VERSION
|
|
9
|
+
spec.authors = ["DouglasTGordon"]
|
|
10
|
+
spec.email = ["douglastgordon@gmail.com"]
|
|
11
|
+
|
|
12
|
+
spec.summary = %q{Destroy your code.}
|
|
13
|
+
spec.description = %q{OhNo provides a bunch of methods that will cause your code to break. Use with caution.}
|
|
14
|
+
spec.homepage = "https://github.com/douglastgordon/Mayhem"
|
|
15
|
+
|
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
|
18
|
+
# if spec.respond_to?(:metadata)
|
|
19
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
|
20
|
+
# else
|
|
21
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
|
22
|
+
# "public gem pushes."
|
|
23
|
+
# end
|
|
24
|
+
|
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
26
|
+
f.match(%r{^(test|spec|features)/})
|
|
27
|
+
end
|
|
28
|
+
spec.bindir = "exe"
|
|
29
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
30
|
+
spec.require_paths = ["lib"]
|
|
31
|
+
|
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
34
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: ohno
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.2
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- DouglasTGordon
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2016-12-01 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.13'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.13'
|
|
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
|
+
description: OhNo provides a bunch of methods that will cause your code to break.
|
|
42
|
+
Use with caution.
|
|
43
|
+
email:
|
|
44
|
+
- douglastgordon@gmail.com
|
|
45
|
+
executables: []
|
|
46
|
+
extensions: []
|
|
47
|
+
extra_rdoc_files: []
|
|
48
|
+
files:
|
|
49
|
+
- ".gitignore"
|
|
50
|
+
- README.md
|
|
51
|
+
- Rakefile
|
|
52
|
+
- lib/ohno.rb
|
|
53
|
+
- lib/ohno/version.rb
|
|
54
|
+
- ohno.gemspec
|
|
55
|
+
homepage: https://github.com/douglastgordon/Mayhem
|
|
56
|
+
licenses: []
|
|
57
|
+
metadata: {}
|
|
58
|
+
post_install_message:
|
|
59
|
+
rdoc_options: []
|
|
60
|
+
require_paths:
|
|
61
|
+
- lib
|
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
- - ">="
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '0'
|
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
|
+
requirements:
|
|
69
|
+
- - ">="
|
|
70
|
+
- !ruby/object:Gem::Version
|
|
71
|
+
version: '0'
|
|
72
|
+
requirements: []
|
|
73
|
+
rubyforge_project:
|
|
74
|
+
rubygems_version: 2.5.1
|
|
75
|
+
signing_key:
|
|
76
|
+
specification_version: 4
|
|
77
|
+
summary: Destroy your code.
|
|
78
|
+
test_files: []
|