arrg 2.0.1 → 2.1.1

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: 81f04479c5a85ed5f17ac4f4eec11d57586810ef
4
- data.tar.gz: cfd39653d2fba312849907962fd65c25a21aa70a
3
+ metadata.gz: 680eeb5c86d13287673ff3c5d2b3d22804fce83c
4
+ data.tar.gz: 27346ddb20d4d902300dfcef8584e93ab0932bbd
5
5
  SHA512:
6
- metadata.gz: 4d58770cfc54b11365167136c10c7634f74e850443354dcc2bb27e8fda75875642dee6d9d0677452fcb9bc08f0e8ee5f5419a09ca3578243c40fa7e03f995682
7
- data.tar.gz: 07eb89197b51317c2b42fadf88e982370a82f408275afaf4a92972751dc5c57eac2b10a0b7e8b4a54a69e806df5b7ec6c484ad56042bfbf082abbf424d628182
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 pirate search query | `arrg [ "search (in quotes)"] [ category (optional) ] [ -url (optional )]`
20
+ | Make arrg search query | `arrg [search] [category] [options]`
21
21
  | Get current version | `-v`
22
22
  | Help | `-h`
23
23
 
24
- ## examples
24
+ options
25
+ -------
26
+ - `-url`: prints the url to the screen instead of opening it in a web browser
25
27
 
26
- You can simply give a search query
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'
@@ -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
- unless input.nil?
33
- final = input.gsub " ", "%20"
34
- if category.nil? == true
35
- Launchy.open("http://thepiratebay.se/search/" + final + "/0/8/0")
36
- elsif category == "-url"
37
- puts Rainbow("http://thepiratebay.se/search/" + final).green
38
- elsif ARGV[2] == "-url"
39
- puts Rainbow("http://thepiratebay.se/search/" + final + "/0/7/" + category).green
40
- else
41
- Launchy.open("http://thepiratebay.se/search/" + final + "/0/7/" + category)
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
- puts 'Arrg! You need to at least specify a search, matey!'
48
+ url = "http://thepiratebay.se/search/" + final + "/0/7/" + category
49
+ Launchy.open(url)
45
50
  end
46
51
  end
47
52
  end
@@ -1,3 +1,3 @@
1
1
  module Arrg
2
- VERSION = '2.0.1'
2
+ VERSION = '2.1.1'
3
3
  end
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.0.1
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
@@ -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.