arrg 2.0.1 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -3
- data/lib/arrg.rb +17 -12
- data/lib/arrg/version.rb +1 -1
- metadata +1 -2
- data/LICENSE.txt +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 680eeb5c86d13287673ff3c5d2b3d22804fce83c
|
4
|
+
data.tar.gz: 27346ddb20d4d902300dfcef8584e93ab0932bbd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43b7d93d0a3fb9b2b94408ce4f3180322f359331596a227a565a7f29048009618e5b52877b84ed59adcd1ab9d8062095ae6159242ca4f8bc8840c34a2fef8965
|
7
|
+
data.tar.gz: ebb42f30245e89e82f68c7e3ff85320f131ddde071c59c9d5c8de83ee8e42fea3020f93d5759ab50ed556109d760d78b2b710006ce40afca4c64737a564a6461
|
data/README.md
CHANGED
@@ -17,13 +17,18 @@ usage
|
|
17
17
|
|
18
18
|
| Information | Argument and Parameters
|
19
19
|
| -----------------------------------------------|:-------------------------:
|
20
|
-
| Make
|
20
|
+
| Make arrg search query | `arrg [search] [category] [options]`
|
21
21
|
| Get current version | `-v`
|
22
22
|
| Help | `-h`
|
23
23
|
|
24
|
-
|
24
|
+
options
|
25
|
+
-------
|
26
|
+
- `-url`: prints the url to the screen instead of opening it in a web browser
|
25
27
|
|
26
|
-
|
28
|
+
examples
|
29
|
+
--------
|
30
|
+
|
31
|
+
You can simply give a search query without a category
|
27
32
|
|
28
33
|
```bash
|
29
34
|
$ arrg 'Freaks and Geeks'
|
data/lib/arrg.rb
CHANGED
@@ -7,6 +7,11 @@ module Arrg
|
|
7
7
|
input = ARGV[0]
|
8
8
|
category = ARGV[1]
|
9
9
|
|
10
|
+
if input.nil?
|
11
|
+
puts Rainbow('Arrg! You need to at least specify a search, matey!').red
|
12
|
+
Process.exit(0)
|
13
|
+
end
|
14
|
+
|
10
15
|
case input
|
11
16
|
when "-h"
|
12
17
|
Launchy.open("http://github.com/trommel/arrg")
|
@@ -29,19 +34,19 @@ module Arrg
|
|
29
34
|
category = "600"
|
30
35
|
end
|
31
36
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
37
|
+
final = input.gsub " ", "%20"
|
38
|
+
if category.nil? == true
|
39
|
+
url = "http://thepiratebay.se/search/" + final + "/0/8/0"
|
40
|
+
Launchy.open(url)
|
41
|
+
elsif category == "-url"
|
42
|
+
url = "http://thepiratebay.se/search/" + final
|
43
|
+
puts Rainbow(url).green
|
44
|
+
elsif ARGV[2] == "-url"
|
45
|
+
url = "http://thepiratebay.se/search/" + final + "/0/7/" + category
|
46
|
+
puts Rainbow(url)
|
43
47
|
else
|
44
|
-
|
48
|
+
url = "http://thepiratebay.se/search/" + final + "/0/7/" + category
|
49
|
+
Launchy.open(url)
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
data/lib/arrg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arrg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh
|
@@ -49,7 +49,6 @@ files:
|
|
49
49
|
- ".gitignore"
|
50
50
|
- Gemfile
|
51
51
|
- LICENSE
|
52
|
-
- LICENSE.txt
|
53
52
|
- README.md
|
54
53
|
- Rakefile
|
55
54
|
- arrg.gemspec
|
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014 Josh
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|