fuuu 0.1.1 → 1.0.0

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: 2eea09623695299f2e6be3d612c9f95ce6a40857
4
- data.tar.gz: 4417fd796fbd1e606f6cdc4d89c457391a469db4
3
+ metadata.gz: afcf8008aa51d30c7ea7dc1f3001104e1c7f4f2a
4
+ data.tar.gz: 0a080c4e5d8837f97388954811bdcadc784a80fc
5
5
  SHA512:
6
- metadata.gz: 4895a468fefe8a5d3c33dd56058d996a658f675e695014672a8adbe67c5f5efab71d580308e2db28ad18277795ea1f4b95ce2cea0d128a30e3423b85ef986d2d
7
- data.tar.gz: b560e606f1d00217cd903ab0071dd1d61ee1752090a338ab5ed81491d9c16741d2746cd57d4ca417974508f48dfd2f2b827567dc4fe8fda854101bb8fd8a97fc
6
+ metadata.gz: 1d91f39e035aa5644fe251c2bee617d85fc2c07d51e908bf88c58bd6fe4a069acc3eee849084fd5a25df5c70fb4140b8fcbbefe230a32c423c7dac4913178abd
7
+ data.tar.gz: cd8b45570dd03c4fcf002d35039c0defac11e41ce6a14736510bbd429759da28306a4551a3d03341db014ed0e5f0ce6eb443f258319d6f03b77079411f01dcb9
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Fuuu
2
2
 
3
+ ![alt tag](https://raw.githubusercontent.com/sophiedeziel/fuuu/master/fuuu.jpg)
4
+
3
5
  Copy/pasting error messages? It's so 2015!
4
6
 
5
7
  Fuuu is a development tool that automates Stack Overflow searches.
@@ -55,7 +57,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
55
57
 
56
58
  ## Contributing
57
59
 
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.
60
+ 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](http://contributor-covenant.org) code of conduct.
59
61
 
60
62
 
61
63
  ## License
@@ -22,5 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "bundler", "~> 1.10"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec"
25
+ spec.add_development_dependency "simplecov", "~> 0.11"
25
26
  spec.add_runtime_dependency "launchy"
26
27
  end
Binary file
@@ -2,37 +2,29 @@ require "fuuu/version"
2
2
  require 'launchy'
3
3
 
4
4
  module Fuuu
5
+ def self.included(mod)
6
+ 42.times do |i|
7
+ method_name = "f#{("u" * (i + 1))}"
5
8
 
6
- METHOD_PATTERN = /^f[u]+$/
7
-
8
- def self.respond_to?(method_name, include_private = false)
9
- super || matches_fuuu?(method_name)
10
- end
9
+ mod.define_singleton_method(method_name) do |&block|
10
+ Fuuu.fu_call &block
11
+ end
11
12
 
12
- def self.method_missing(method_name, *args, &block)
13
- if matches_fuuu?(method_name)
14
- begin
15
- block.call
16
- rescue => e
17
- Launchy.open("http://stackoverflow.com/search?q=[ruby]\"#{e.message}\"")
13
+ define_method(method_name) do |&block|
14
+ Fuuu.fu_call &block
18
15
  end
19
- else
20
- super
21
16
  end
22
17
  end
23
18
 
24
19
  private
25
20
 
26
- def self.matches_fuuu?(string)
27
- METHOD_PATTERN =~ string
28
- end
29
- end
30
-
31
- def method_missing(method, *args, &block)
32
- if Fuuu.respond_to?(method)
33
- Fuuu.send(method, *args, &block)
34
- else
35
- super(method)
21
+ def self.fu_call
22
+ begin
23
+ yield if block_given?
24
+ rescue => e
25
+ Launchy.open("http://stackoverflow.com/search?q=[ruby]\"#{e.message}\"")
26
+ end
36
27
  end
37
28
  end
38
29
 
30
+ include Fuuu
@@ -1,3 +1,3 @@
1
1
  module Fuuu
2
- VERSION = "0.1.1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuuu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sophie Deziel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2016-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.11'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.11'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: launchy
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -85,6 +99,7 @@ files:
85
99
  - bin/console
86
100
  - bin/setup
87
101
  - fuuu.gemspec
102
+ - fuuu.jpg
88
103
  - lib/fuuu.rb
89
104
  - lib/fuuu/version.rb
90
105
  homepage: http://github.com/sophiedeziel/fuuu