lmgtfy 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lmgtfy/runner.rb +4 -2
- data/lib/lmgtfy/version.rb +1 -1
- metadata +2 -3
- data/README.md.bkp +0 -29
data/lib/lmgtfy/runner.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
1
3
|
module Lmgtfy
|
2
4
|
|
3
5
|
class Runner
|
@@ -5,11 +7,11 @@ module Lmgtfy
|
|
5
7
|
attr_reader :query
|
6
8
|
|
7
9
|
def initialize
|
8
|
-
@query = ARGV
|
10
|
+
@query = URI.encode_www_form([ ["q", ARGV.join(" ")] ])
|
9
11
|
end
|
10
12
|
|
11
13
|
def generate_lmgtfy_url
|
12
|
-
"http://lmgtfy.com
|
14
|
+
"http://lmgtfy.com/?#{@query}"
|
13
15
|
end
|
14
16
|
|
15
17
|
end
|
data/lib/lmgtfy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lmgtfy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -43,7 +43,6 @@ files:
|
|
43
43
|
- Gemfile.lock
|
44
44
|
- LICENSE.txt
|
45
45
|
- README.md
|
46
|
-
- README.md.bkp
|
47
46
|
- Rakefile
|
48
47
|
- bin/lmgtfy
|
49
48
|
- ci.sh
|
data/README.md.bkp
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Lmgtfy
|
2
|
-
|
3
|
-
TODO: Write a gem description
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'lmgtfy'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install lmgtfy
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
22
|
-
|
23
|
-
## Contributing
|
24
|
-
|
25
|
-
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create new Pull Request
|