oakdex-pokedex 0.1.2 → 0.1.3

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: 328fea67189454b0f0058a4632e234189a5075f4
4
- data.tar.gz: 3398ae9c0d27a3697974bef00fb2a06a0ca08446
3
+ metadata.gz: 985cd73f8503ce893b6275d271b5aaaa2b9e49b1
4
+ data.tar.gz: d35e9445ec6375be820183fb49a279311bd1a102
5
5
  SHA512:
6
- metadata.gz: 9fd13ea8df7f133c8a74aead6d037d8dd4da43879d5e0a25d4afabc798f6e62b212cc6dcca0b7f1c9dff848a498d0da49d4600436bb6c15bf2e52cfff587db39
7
- data.tar.gz: 173bed9653bd45318127a2d5806b59af7fc3e80fa0b627e544c9c98565ab03b9bfe54a3bdca4c608e26c5dc8f7a100210d8be9903a2eef332c2418834f651e71
6
+ metadata.gz: e32ff833c2fc3372603ae3a9bf08597bf4611f4a4c0db0e149df2e7448b22bbef56b28818b6c16b6fa81597157120af59d4f6bedb94dfbb3eab10b8ac2a36f7d
7
+ data.tar.gz: 38a0788d7a0ad87540898c5e81edea521e6019b6f247008a3cc7985460b63657bda89e28567eee4318d0711e26372b5ec7c30dd28a540dd71c0995d666127ec5
@@ -40,7 +40,7 @@ module Oakdex
40
40
  private
41
41
 
42
42
  def map_json_data(type, klass)
43
- Hash[Dir["data/#{type}/*.json"].map do |file_name|
43
+ Hash[Dir["#{Oakdex::Pokedex.data_dir}/#{type}/*.json"].map do |file_name|
44
44
  data = JSON.parse(File.read(file_name))
45
45
  [data['names']['en'], klass.new(data)]
46
46
  end]
@@ -1,5 +1,5 @@
1
1
  module Oakdex
2
2
  module Pokedex
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -10,5 +10,12 @@ require 'oakdex/pokedex/generation'
10
10
  module Oakdex
11
11
  # Class that handles Pokedex Requests
12
12
  module Pokedex
13
+ def self.root
14
+ File.expand_path '../../../', __FILE__
15
+ end
16
+
17
+ def self.data_dir
18
+ File.join root, 'data'
19
+ end
13
20
  end
14
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oakdex-pokedex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jalyna Schroeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-01 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Pokedex for Gen 1-7, in JSON and accessible through Ruby.
14
14
  email: jalyna.schroeder@gmail.com