ohno 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32cca550631a151218217c6b114431f1300bded0
4
- data.tar.gz: cef8ece4644299fe55af03ff81ab9407fbd65cb8
3
+ metadata.gz: 70e8a2140170d1dca7f9ac8f7cfe8c7d63ef93b3
4
+ data.tar.gz: 92471eede85b6031582a65f9dde2e90c7dd527ef
5
5
  SHA512:
6
- metadata.gz: 87d9ee256ba09bad609f9b822d5338de312f00b0e428fb6b04783d6cc67665398e4bad7478e78937ba611c24d97835823612b95d1898d8d65fc4c0d9b40811b7
7
- data.tar.gz: 25033290430198949ccac3ff74e3b87cc3c655a2945d4a4c0747c986511432ebb0d7c8ff96c67232e8d5a8ac4f8cb0a79c9b851360d0874b9b95c9f055725a6e
6
+ metadata.gz: 904d8c244434a721c002b0633f2e4f2595f2e72d742c980e6333d6368192a1c427e6854645777f0739110b2816e7527f77e4bb2acf31ce4ab43b770cd7ad4037
7
+ data.tar.gz: 59f6ec69cb26ff0e27ad71c9678663e90a4bb3b7a380d2718f1877f695ce7186eaf7007d885eaf46e7bc54318f4639a07cc4aee95db547529642f0b985484f04
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  Rakefile
2
2
  ohno-0.0.2.gem
3
3
  ohno-0.0.3.gem
4
+ ohno-0.0.4.gem
data/README.md CHANGED
@@ -3,11 +3,31 @@
3
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
4
 
5
5
  Have trouble with recursion? Just call stack_overflow method and call it a day!
6
+
6
7
  Not so good with math? Try out divide_by_zero!
8
+
7
9
  Need to buy some time? An infinite_loop is the one for you!
8
10
 
9
11
  Try these and much, much more!
10
12
 
13
+ ##Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ ```ruby
18
+ gem 'ohno'
19
+ ```
20
+
21
+ And then execute:
22
+ ```ruby
23
+ $ bundle
24
+ ```
25
+ Or install it yourself as:
26
+ ```ruby
27
+ $ gem install ohno
28
+ ```
29
+
30
+
11
31
  ##Usage
12
32
 
13
33
  Just slip any of these methods into your code and enjoy!
@@ -19,4 +39,12 @@ OhNo::index_error
19
39
  OhNo::type_error
20
40
  OhNo::no_method_error
21
41
  OhNo::argument_error
42
+ OhNo::load_error
43
+ OhNo::syntax_error
44
+ OhNo::i_wouldnt_if_i_were_you
45
+
22
46
  ```
47
+
48
+ ## Contributing
49
+
50
+ Bug reports and pull requests are welcome on GitHub at https://github.com/DouglasTGordon/OhNo.
data/lib/ohno.rb CHANGED
@@ -32,6 +32,27 @@ module OhNo
32
32
  i_take_one_argument("Here's", "a", "bunch", "of", "arguments")
33
33
  end
34
34
 
35
+ def self.load_error
36
+ require 'totally/a/real/file'
37
+ end
38
+
39
+ def self.syntax_error
40
+ eval("1+1=2")
41
+ end
42
+
43
+ def self.i_wouldnt_if_i_were_you
44
+ begin
45
+ uhoh
46
+ rescue Exception => e
47
+ p "told you so!"
48
+ retry while true
49
+ end
50
+ end
51
+
52
+ def self.regex_error
53
+ Regexp.new("?")
54
+ end
55
+
35
56
  private
36
57
 
37
58
  def i_take_one_argument(arg)
data/lib/ohno/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OhNo
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohno
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - DouglasTGordon