seiso-import_master 3.0.0.M2 → 3.0.0.M3
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 +8 -8
- data/lib/seiso/import_master.rb +2 -2
- data/lib/seiso/import_master/util/item_resolver.rb +8 -9
- data/seiso-import_master.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTIzN2IxMmE5NzM5OTJkMTc1N2E4MmUwNzY0ZmNkOWUxYmFmNTNjMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDAzZDE4NGE0YTc2NjExOGJiZjMzMGIzZDRlY2U1YWI4ZTkwYWM1MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmYwYTU4ODgyOTgxNGEyZjZlM2Y5YTFiYjNhNzgwOTcxNWJmYmJhMWFmNzY5
|
10
|
+
NGU0MGQwMzc1NWEzY2YxYjNhNTViMjI1ZTExZWIyYzk3ZDM0NGU5NzU1Yjhk
|
11
|
+
YWE4M2ZiM2U1MjdlMWRmZjMwMjIwMjBlYTFmYzk0YWZmNzgxNmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTJkOThlMTQ3MzJiOWEyNTQ0NTczYjM5MjI2MWUzODk4ZTY5NTBlMzg3NTFk
|
14
|
+
NmJhYTU5Mjg3ZTQwYWJiMzg4YzU5ZGYwMDgzM2Y2MmE2NDhjZTk0M2JmMTky
|
15
|
+
YzY1MDE2MjVmZWI4NzM3MzQ5YmI3NDA0MGZlZDI4MjI5YTY5MWI=
|
data/lib/seiso/import_master.rb
CHANGED
@@ -86,8 +86,8 @@ module Seiso
|
|
86
86
|
|
87
87
|
# IMPORTANT: Don't display the message, because Faraday includes the request headers, which include the base64
|
88
88
|
# encoded password.
|
89
|
-
|
90
|
-
@log.error "Failed to import file #{file}"
|
89
|
+
@log.error "Failed to import file #{file}: #{e.message}"
|
90
|
+
# @log.error "Failed to import file #{file}"
|
91
91
|
|
92
92
|
# FIXME For now, just re-raise the exception, as we want to see where the bugs are.
|
93
93
|
return false
|
@@ -27,11 +27,12 @@ class Seiso::ImportMaster
|
|
27
27
|
|
28
28
|
# Returns the item URI, or nil if either key is nil or the item doesn't exist.
|
29
29
|
def item_uri(type, key)
|
30
|
-
|
31
|
-
return cached_uri unless cached_uri.nil?
|
30
|
+
return nil if key.nil?
|
32
31
|
|
33
32
|
@log.info "Getting item URI: type=#{type}, key=#{key}"
|
34
|
-
|
33
|
+
item_uri = get_cached_uri(type, key)
|
34
|
+
return item_uri unless item_uri.nil?
|
35
|
+
|
35
36
|
search = @special_searches[type]
|
36
37
|
|
37
38
|
if search == nil
|
@@ -61,18 +62,16 @@ class Seiso::ImportMaster
|
|
61
62
|
end
|
62
63
|
|
63
64
|
def get_cached_uri(type, key)
|
64
|
-
type_cache = @
|
65
|
+
type_cache = @uri_cache[type]
|
65
66
|
return nil if type_cache.nil?
|
66
67
|
type_cache[key]
|
67
68
|
end
|
68
69
|
|
69
70
|
def put_cached_uri(type, key, uri)
|
70
|
-
|
71
|
-
|
72
|
-
type_cache = {}
|
73
|
-
@cache[type] = type_cache
|
71
|
+
if @uri_cache[type].nil?
|
72
|
+
@uri_cache[type] = {}
|
74
73
|
end
|
75
|
-
type[key] = uri
|
74
|
+
@uri_cache[type][key] = uri
|
76
75
|
end
|
77
76
|
end
|
78
77
|
end
|
data/seiso-import_master.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'seiso-import_master'
|
7
|
-
spec.version = '3.0.0.
|
7
|
+
spec.version = '3.0.0.M3'
|
8
8
|
spec.authors = ['Willie Wheeler']
|
9
9
|
spec.email = ['wwheeler@expedia.com']
|
10
10
|
spec.summary = 'Imports Seiso data master files into Seiso.'
|