basics 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/basics +3 -2
- metadata +3 -3
data/bin/basics
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
|
+
require 'uri'
|
3
4
|
require 'open-uri'
|
4
5
|
require 'json'
|
5
6
|
require 'rainbow'
|
@@ -38,9 +39,9 @@ when 1
|
|
38
39
|
elsif ARGV[0] == "-h" || ARGV[0] == "--help"
|
39
40
|
usage
|
40
41
|
end
|
41
|
-
tips = get(URL + "search/#{ARGV[0]}")
|
42
|
+
tips = get(URL + "search/#{URI.escape(ARGV[0])}")
|
42
43
|
when 2
|
43
|
-
tips = get(URL + "category_search/#{ARGV[1]}/#{ARGV[0]}")
|
44
|
+
tips = get(URL + "category_search/#{ARGV[1]}/#{URI.escape(ARGV[0])}")
|
44
45
|
end
|
45
46
|
|
46
47
|
if tips.size == 0
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Aditya Bhargava
|