bgg-parser 0.0.1 → 0.0.2
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 +4 -4
- data/lib/bgg-parser.rb +2 -2
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3532c8c446d89aa36e8ff30bc072db043e9f8c25
|
|
4
|
+
data.tar.gz: 6d25a74b7f306d5ff3d99da876a8155595f4250b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da3556311b3b7487cf86b4bbcd1c6311de0be7a311342d68555b53fa8308fbc09983ee2a49cf344eb5105340a0d9fcda9bfa07dd1d45375e260a0841fe25a16d
|
|
7
|
+
data.tar.gz: a8eef56aa267b42041d213e268f07a652a02440ceac7643ee34d73e9baea6dc8809f5ab2f222e6ceaa531e52c4ebac902fef0c63d984cd03ea43541442f6d087
|
data/lib/bgg-parser.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
class BggParser
|
|
2
|
-
def self.parse(raw_json,
|
|
2
|
+
def self.parse(raw_json, library_id)
|
|
3
3
|
raw_json["item"].each do |game_json|
|
|
4
4
|
game = Game.new
|
|
5
5
|
game.bgg_id = game_json["id"]
|
|
@@ -15,7 +15,7 @@ class BggParser
|
|
|
15
15
|
|
|
16
16
|
game.save
|
|
17
17
|
|
|
18
|
-
GamesLibrary.create game: game,
|
|
18
|
+
GamesLibrary.create game: game, library_id: library_id
|
|
19
19
|
|
|
20
20
|
game_json["link"].each do |row|
|
|
21
21
|
if row["type"] == "boardgamecategory"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bgg-parser
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Mueller
|
|
@@ -11,14 +11,16 @@ bindir: bin
|
|
|
11
11
|
cert_chain: []
|
|
12
12
|
date: 2015-04-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
|
-
description:
|
|
15
|
-
email:
|
|
14
|
+
description: Parses JSON from the bgg-api gem, and creates model objects
|
|
15
|
+
email:
|
|
16
|
+
- peter.kh.mueller@gmail.com
|
|
17
|
+
- e.r.blackburn@gmail.com
|
|
16
18
|
executables: []
|
|
17
19
|
extensions: []
|
|
18
20
|
extra_rdoc_files: []
|
|
19
21
|
files:
|
|
20
22
|
- lib/bgg-parser.rb
|
|
21
|
-
homepage:
|
|
23
|
+
homepage: https://github.com/cbus-sea-lions-2015/bgg-parser
|
|
22
24
|
licenses:
|
|
23
25
|
- MIT
|
|
24
26
|
metadata: {}
|
|
@@ -41,5 +43,5 @@ rubyforge_project:
|
|
|
41
43
|
rubygems_version: 2.2.2
|
|
42
44
|
signing_key:
|
|
43
45
|
specification_version: 4
|
|
44
|
-
summary: Parses BoardGameGeek
|
|
46
|
+
summary: Parses BoardGameGeek API
|
|
45
47
|
test_files: []
|