content_data 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -181,8 +181,8 @@ module ContentData
|
|
181
181
|
|
182
182
|
@contents.keys.each { |key|
|
183
183
|
if (@contents[key] != other.contents[key])
|
184
|
-
Log.
|
185
|
-
Log.
|
184
|
+
Log.debug1 @contents[key].first_appearance_time.to_i
|
185
|
+
Log.debug1 other.contents[key].first_appearance_time.to_i
|
186
186
|
return false
|
187
187
|
end
|
188
188
|
}
|
@@ -231,9 +231,9 @@ module ContentData
|
|
231
231
|
i += 1
|
232
232
|
number_of_instances.times {
|
233
233
|
if lines[i].nil?
|
234
|
-
Log.
|
234
|
+
Log.debug1 "lines[i] if nil !!!, Backing filename: #{filename} to #{filename}.bad"
|
235
235
|
FileUtils.cp(filename, "#{filename}.bad")
|
236
|
-
Log.
|
236
|
+
Log.debug1 lines[i].join("\n")
|
237
237
|
end
|
238
238
|
parameters = lines[i].split(',')
|
239
239
|
# bugfix: if file name consist a comma then parsing based on comma separating fails
|
@@ -295,7 +295,7 @@ module ContentData
|
|
295
295
|
ret.add_content(content) unless a.content_exists(content.checksum)
|
296
296
|
}
|
297
297
|
|
298
|
-
#Log.
|
298
|
+
#Log.debug1 "kaka"
|
299
299
|
|
300
300
|
b.instances.values.each { |instance|
|
301
301
|
#print "%s - %s\n" % [instance.checksum, a.content_exists(instance.checksum).to_s]
|
@@ -326,10 +326,7 @@ module ContentData
|
|
326
326
|
|
327
327
|
ret = ContentData.new
|
328
328
|
cd.instances.values.each do |instance|
|
329
|
-
Log.debug3("global path to check: #{global_dir_path}")
|
330
|
-
Log.debug3("instance global path: #{instance.global_path}")
|
331
329
|
if instance.global_path.scan(global_dir_path).size == 0
|
332
|
-
Log.debug3("Adding instance.")
|
333
330
|
ret.add_content(cd.contents[instance.checksum])
|
334
331
|
ret.add_instance(instance)
|
335
332
|
end
|
@@ -13,7 +13,7 @@ module ContentData
|
|
13
13
|
ref = ContentData.new(content_data)
|
14
14
|
@last_content_data_available_mutex.synchronize {
|
15
15
|
@last_content_data = ref
|
16
|
-
Log.
|
16
|
+
Log.debug2("updating last content data:#{@last_content_data}\n")
|
17
17
|
}
|
18
18
|
end
|
19
19
|
|
@@ -22,10 +22,6 @@ module ContentData
|
|
22
22
|
@last_content_data_available_mutex.synchronize {
|
23
23
|
ref = @last_content_data
|
24
24
|
}
|
25
|
-
#Log.debug3("@last_content_data is nil? #{@last_content_data.nil?}")
|
26
|
-
#Log.debug3(@last_content_data.to_s) unless @last_content_data.nil?
|
27
|
-
#Log.debug3("Exists?:#{@last_content_data.content_exists(checksum)}") \
|
28
|
-
# unless @last_content_data.nil?
|
29
25
|
return ref.content_exists(checksum) if ref != nil
|
30
26
|
false
|
31
27
|
end
|
data/lib/content_data/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: content_data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: log
|