fuuu 0.1.0 → 0.1.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 +4 -4
- data/README.md +27 -4
- data/lib/fuuu.rb +3 -3
- data/lib/fuuu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eea09623695299f2e6be3d612c9f95ce6a40857
|
4
|
+
data.tar.gz: 4417fd796fbd1e606f6cdc4d89c457391a469db4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4895a468fefe8a5d3c33dd56058d996a658f675e695014672a8adbe67c5f5efab71d580308e2db28ad18277795ea1f4b95ce2cea0d128a30e3423b85ef986d2d
|
7
|
+
data.tar.gz: b560e606f1d00217cd903ab0071dd1d61ee1752090a338ab5ed81491d9c16741d2746cd57d4ca417974508f48dfd2f2b827567dc4fe8fda854101bb8fd8a97fc
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Fuuu
|
2
2
|
|
3
|
-
|
3
|
+
Copy/pasting error messages? It's so 2015!
|
4
4
|
|
5
|
-
|
5
|
+
Fuuu is a development tool that automates Stack Overflow searches.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,7 +22,30 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
When you have a line of code that throws an exception and you can't figure out why, put that line in a block and pass it to fuuu.
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
nil.a_method_that_throws_undefined_method
|
29
|
+
# => NoMethodError: undefined method `a_method_that_throws_undefined_method' for nil:NilClass
|
30
|
+
|
31
|
+
fuuu { nil.a_method_that_throws_undefined_method }
|
32
|
+
# It will open http://stackoverflow.com/search?q=[ruby]"undefined method `a_method_that_throws_undefined_method' for nil:NilClass" in your default browser
|
33
|
+
|
34
|
+
```
|
35
|
+
|
36
|
+
If you forget how many 'u's there are, put as much as you want.
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
fuuu { nil.foo }
|
40
|
+
# works
|
41
|
+
|
42
|
+
fu { nil.foo }
|
43
|
+
# works
|
44
|
+
|
45
|
+
fuuuuuuuuuuuuuuuuuuuuuuuuuu { nil.foo }
|
46
|
+
# works
|
47
|
+
```
|
48
|
+
|
26
49
|
|
27
50
|
## Development
|
28
51
|
|
@@ -32,7 +55,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
55
|
|
33
56
|
## Contributing
|
34
57
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
58
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sophiedeziel/fuuu. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
36
59
|
|
37
60
|
|
38
61
|
## License
|
data/lib/fuuu.rb
CHANGED
@@ -12,7 +12,7 @@ module Fuuu
|
|
12
12
|
def self.method_missing(method_name, *args, &block)
|
13
13
|
if matches_fuuu?(method_name)
|
14
14
|
begin
|
15
|
-
block.call
|
15
|
+
block.call
|
16
16
|
rescue => e
|
17
17
|
Launchy.open("http://stackoverflow.com/search?q=[ruby]\"#{e.message}\"")
|
18
18
|
end
|
@@ -28,9 +28,9 @@ module Fuuu
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
def method_missing(method)
|
31
|
+
def method_missing(method, *args, &block)
|
32
32
|
if Fuuu.respond_to?(method)
|
33
|
-
Fuuu.send(method)
|
33
|
+
Fuuu.send(method, *args, &block)
|
34
34
|
else
|
35
35
|
super(method)
|
36
36
|
end
|
data/lib/fuuu/version.rb
CHANGED