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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWZjNDQ1MTc4NmM3MmQ4M2Q2YTU3YzkyZGVmYTQ5YjU1MTE3OTcyZA==
4
+ YTIzN2IxMmE5NzM5OTJkMTc1N2E4MmUwNzY0ZmNkOWUxYmFmNTNjMQ==
5
5
  data.tar.gz: !binary |-
6
- MzhmMDM3ODMwMGViYWYwMmRlNjdjMjY0ZGQ4YjFkYjMyMmViODgwYg==
6
+ ZDAzZDE4NGE0YTc2NjExOGJiZjMzMGIzZDRlY2U1YWI4ZTkwYWM1MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDI4NjIxOTA2NmI0NGNiMmI5MzRlZDg1Mzk4YzNlZGQzN2VhOTIzMDFjYTcz
10
- ODVlY2Y5MzhiY2M3ZDNjMWYwNzg1ZDY1Mzc2NjRmZGZmMDNjMGJlNTA3MTEx
11
- Y2VkNjE1MzU5YzMzMTBmNGVkZGM3YzNlNTkyNTJjNDVlNDAzMDc=
9
+ NmYwYTU4ODgyOTgxNGEyZjZlM2Y5YTFiYjNhNzgwOTcxNWJmYmJhMWFmNzY5
10
+ NGU0MGQwMzc1NWEzY2YxYjNhNTViMjI1ZTExZWIyYzk3ZDM0NGU5NzU1Yjhk
11
+ YWE4M2ZiM2U1MjdlMWRmZjMwMjIwMjBlYTFmYzk0YWZmNzgxNmM=
12
12
  data.tar.gz: !binary |-
13
- OWE3MGExNzY1NjMzMmM2OTBiODRmNTQ2YmNkOGYxMzI0OGJhNDg0ODBhYTFl
14
- MzAzNDY5ZDJmMTVlOTVkYmJkZjI0MGZiMjA2OGRjNjE1ODBjNzgzYjZmMjBl
15
- YTE4ZGM3ZmE3NDYwMGRjNWFiMDlmMzg5ODE0N2U0N2EyNjgwZTc=
13
+ ZTJkOThlMTQ3MzJiOWEyNTQ0NTczYjM5MjI2MWUzODk4ZTY5NTBlMzg3NTFk
14
+ NmJhYTU5Mjg3ZTQwYWJiMzg4YzU5ZGYwMDgzM2Y2MmE2NDhjZTk0M2JmMTky
15
+ YzY1MDE2MjVmZWI4NzM3MzQ5YmI3NDA0MGZlZDI4MjI5YTY5MWI=
@@ -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
- # @log.error "Failed to import file #{file}: #{e.message}"
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
- cached_uri = get_cached_uri(type, key)
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
- return nil if key.nil?
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 = @cache[type]
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
- type_cache = @cache[type]
71
- if type_cache.nil?
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
@@ -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.M2'
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.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seiso-import_master
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.M2
4
+ version: 3.0.0.M3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willie Wheeler