lmgtfy 0.0.2 → 0.0.3

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.
@@ -3,11 +3,7 @@ language: ruby
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 1.9.2
6
- - jruby-18mode
7
6
  - jruby-19mode
8
- - rbx-18mode
9
7
  - rbx-19mode
10
8
  - ruby-head
11
9
  - jruby-head
12
- - 1.8.7
13
- - ree
@@ -1,3 +1,3 @@
1
1
  module Lmgtfy
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -3,14 +3,18 @@ require 'lmgtfy/runner'
3
3
 
4
4
  describe Lmgtfy::Runner do
5
5
 
6
+ before do
7
+ @query = URI.encode_www_form([['q', ARGV.join(' ')]])
8
+ end
9
+
6
10
  it "accepts search query from the user" do
7
11
  runner = Lmgtfy::Runner.new
8
- runner.query.should eq ARGV[0]
12
+ runner.query.should eq @query
9
13
  end
10
14
 
11
15
  it "generates correct url" do
12
16
  runner = Lmgtfy::Runner.new
13
- runner.generate_lmgtfy_url.should eq "http://lmgtfy.com/?q=#{ARGV[0]}"
17
+ runner.generate_lmgtfy_url.should eq "http://lmgtfy.com/?#{@query}"
14
18
  end
15
19
 
16
20
  end
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.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: