We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f9040c commit fd53d3aCopy full SHA for fd53d3a
crawler/crawler.rb
@@ -34,6 +34,13 @@
34
35
@latest = []
36
@latest_key = lambda { |e| "#{e['id']}" }
37
+ @clean = lambda do |h|
38
+ h.delete('email')
39
+ h.each_value do |v|
40
+ @clean.call(v) if v.is_a? Hash
41
+ v.each {|e| @clean.call(e)} if v.is_a? Array
42
+ end
43
44
45
process = Proc.new do
46
req = HttpRequest.new("https://api.github.com/events?per_page=200", {
@@ -66,7 +73,7 @@
66
73
@file = File.new(archive, "a+")
67
74
end
68
75
69
- @file.puts(Yajl::Encoder.encode(event))
76
+ @file.puts(Yajl::Encoder.encode(@clean.call(event)))
70
77
71
78
72
79
remaining = req.response_header.raw['X-RateLimit-Remaining']
0 commit comments