vglist 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a39933ce796c1838a2f73c3d02bde3e80261727
4
- data.tar.gz: 2b3968fd9b97eed0ae6fb9ff0ff2cd375467732c
3
+ metadata.gz: e672b5544517a9a33e2d5112cadad6f903e2d947
4
+ data.tar.gz: c36f99b921e802ab361f50c27bb615bcfcadf0a6
5
5
  SHA512:
6
- metadata.gz: cc4707a5a524bb49ad674c85e44216eebc97c99daa4056f3c193ce4ae969d6fab4b994f35cfde68b503f99a11baa9f533b9fc7ff5435ce7bf26f0acda81e887a
7
- data.tar.gz: d8f2b721b650ee5f579d100d2a5b436bdcd1a2432e7c8ec04741435b4e1b17b72bd55e5c746f802b15d9c202471b942492b78ed8a60887583c7c95a57d823164
6
+ metadata.gz: 19c60b6218fe73ffdbdf9331bd675f1ecd521d126a7e6fa7dbe69d116f771c13526df1cf3598fd4bfaf72a0695c4745df7ed839ac23dcaee9a977a6de6b80650
7
+ data.tar.gz: cdbf3b022f7753939f3d545b942c3834590c4178b238328c369fb18d3e6f2641787b7425f32534b8142fa96d925c8fa355ec61c3b5cb796409e00d10a55eb5c2
data/README.md CHANGED
@@ -2,12 +2,16 @@
2
2
 
3
3
  Easy to use video-games browser.
4
4
 
5
- *Example* :
5
+ ~~~
6
+ gem install vglist
7
+ ~~~
6
8
 
7
9
 
8
10
 
11
+ *Example* :
12
+
9
13
  ~~~
10
- $ bin/main.rb Eclipse
14
+ $ vglist Eclipse
11
15
 
12
16
  3do => Total Eclipse
13
17
  Amiga => Total Eclipse
@@ -20,7 +24,7 @@ Saturn => Solar Eclipse
20
24
  ~~~
21
25
 
22
26
  ~~~
23
- $ bin/main.rb "Duke nukem"
27
+ $ vglist "Duke nukem"
24
28
 
25
29
  Dos => Duke Nukem II
26
30
  Game boy advance => Duke Nukem Advance
@@ -38,7 +42,7 @@ Xbox 360 => Duke Nukem Forever
38
42
  ~~~
39
43
 
40
44
  ~~~
41
- $ bin/main.rb "Final fantasy XV"
45
+ $ vglist "Final fantasy XV"
42
46
 
43
47
  Playstation 4 => Final Fantasy XV
44
48
  ~~~
data/bin/vglist CHANGED
@@ -1,21 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "json"
3
+ PATH = File.expand_path("../..", __FILE__)
4
+ require "#{PATH}/lib/vglist.rb"
4
5
 
5
- path = File.expand_path("../..", __FILE__)
6
- GAMES = JSON.parse(File.open("#{path}/data/allgames.json").read)
7
6
 
8
- def find_game(keyword)
9
- results = []
10
- GAMES.map do |platform,games|
11
- games.map do |game|
12
- if game.downcase.include?(keyword.downcase)
13
- results << [platform,game]
14
- end
15
- end
16
- end
17
- puts results.map { |console,game| "#{console} => #{game}"}
18
- end
19
-
20
- find_game(ARGV[0])
7
+ puts find_game(ARGV[0]).map { |console,game| "#{console} => #{game}"}
21
8
 
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "json"
4
+
5
+ PATH = File.expand_path("../..", __FILE__)
6
+ GAMES = JSON.parse(File.open("#{PATH}/data/allgames.json").read)
7
+
8
+ def find_game(keyword)
9
+ results = {}
10
+ GAMES.map do |platform,games|
11
+ games.map do |game|
12
+ if game.downcase.include?(keyword.downcase)
13
+ results[platform] ? results[platform] << game : results[platform] = [game]
14
+ end
15
+ end
16
+ end
17
+ return results
18
+ end
19
+
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "json"
4
+
5
+ path = File.expand_path("../..", __FILE__)
6
+ GAMES = JSON.parse(File.open("#{path}/data/allgames.json").read)
7
+
8
+ def find_game(keyword)
9
+ results = {}
10
+ GAMES.map do |platform,games|
11
+ games.map do |game|
12
+ if game.downcase.include?(keyword.downcase)
13
+ results[platform] ? results[platform] << game : results[platform] = [game]
14
+ end
15
+ end
16
+ end
17
+ return results
18
+ end
19
+
@@ -0,0 +1,16 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'vglist'
3
+ s.version = '0.2.0'
4
+ s.date = '2013-08-21'
5
+ s.summary = "VideoGamesList"
6
+ s.description = "Easy-to-use videogames browser"
7
+ s.authors = ["Galaad Gauthier"]
8
+ s.email = 'coontail7@gmail.com'
9
+ s.files = Dir['**/*']
10
+ s.executables = ["vglist"]
11
+ s.require_path = 'lib'
12
+ s.add_dependency "json"
13
+ s.homepage =
14
+ 'https://github.com/Galaad-Gauthier/VGList'
15
+ s.license = 'MIT'
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vglist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Galaad Gauthier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-10 00:00:00.000000000 Z
11
+ date: 2013-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -32,10 +32,13 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - Gemfile
35
- - Gemfile.lock
36
- - README.md
35
+ - lib/vglist.rb~
36
+ - lib/vglist.rb
37
+ - vglist.gemspec
37
38
  - data/allgames.json
38
39
  - bin/vglist
40
+ - Gemfile.lock
41
+ - README.md
39
42
  homepage: https://github.com/Galaad-Gauthier/VGList
40
43
  licenses:
41
44
  - MIT