vglist 0.2.0 → 0.2.1

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: e672b5544517a9a33e2d5112cadad6f903e2d947
4
- data.tar.gz: c36f99b921e802ab361f50c27bb615bcfcadf0a6
3
+ metadata.gz: 25ab096628970d0d20ebea7622474bc7e0413b98
4
+ data.tar.gz: 44436e9930a1abb9b13b61ef0b836eae808680b4
5
5
  SHA512:
6
- metadata.gz: 19c60b6218fe73ffdbdf9331bd675f1ecd521d126a7e6fa7dbe69d116f771c13526df1cf3598fd4bfaf72a0695c4745df7ed839ac23dcaee9a977a6de6b80650
7
- data.tar.gz: cdbf3b022f7753939f3d545b942c3834590c4178b238328c369fb18d3e6f2641787b7425f32534b8142fa96d925c8fa355ec61c3b5cb796409e00d10a55eb5c2
6
+ metadata.gz: 0a333564c4f39efb05617d6ecd5c10728a4b5c31795ee130ec7e4bf8cdf9f13d448eab15f1b6cf45951f075de9f088e40bd4359776ff1636123827be78e6295b
7
+ data.tar.gz: 53b8723eebca0b2082c258d2e4b4c89a70c198456001fae90281b83dc38c3c1a814dda5d6339eec6c7126a5eecaa6f407e23a7477a624c2e42f1c168ffad0c4e
data/bin/vglist CHANGED
@@ -1,8 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- PATH = File.expand_path("../..", __FILE__)
4
- require "#{PATH}/lib/vglist.rb"
3
+ root = File.expand_path("../..", __FILE__)
4
+ require "#{root}/lib/vglist.rb"
5
5
 
6
6
 
7
- puts find_game(ARGV[0]).map { |console,game| "#{console} => #{game}"}
7
+ find_game(ARGV[0]).map do |platform,games|
8
+ puts games.map {|game| "#{platform} => #{game}"}
9
+ end
8
10
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  require "json"
4
4
 
5
- PATH = File.expand_path("../..", __FILE__)
6
- GAMES = JSON.parse(File.open("#{PATH}/data/allgames.json").read)
5
+ root = File.expand_path("../..", __FILE__)
6
+ GAMES = JSON.parse(File.open("#{root}/data/allgames.json").read)
7
7
 
8
8
  def find_game(keyword)
9
9
  results = {}
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'vglist'
3
- s.version = '0.2.0'
3
+ s.version = '0.2.1'
4
4
  s.date = '2013-08-21'
5
5
  s.summary = "VideoGamesList"
6
6
  s.description = "Easy-to-use videogames browser"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vglist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Galaad Gauthier
@@ -32,7 +32,6 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - Gemfile
35
- - lib/vglist.rb~
36
35
  - lib/vglist.rb
37
36
  - vglist.gemspec
38
37
  - data/allgames.json
@@ -1,19 +0,0 @@
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
-