sms-logparser 0.15.5 → 0.16.0

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bc6a6c493db206f9b0e26204b31abd83ab8b9fe
4
- data.tar.gz: 39672cbbd824b8132d253343add492c2c11ae753
3
+ metadata.gz: 7bea26f8fa837033f39519a94d4f9b2b68b349bf
4
+ data.tar.gz: 1114c3f8fa841321e2a5f832cfc49db97f70bc9e
5
5
  SHA512:
6
- metadata.gz: 1f6a85ed18dec43437b4a2a46014150b6101004d7f3f3ec51df8fc00303b5483171acd6d2fbf50c892d6018cbe825a823ae199920441e3f3954628b6951f8a16
7
- data.tar.gz: f2aa9eb052adde2c6af76ef2da369e646cb176d513cf635d2ab4ec3ac335daf9bc415bb51a777081d9fce77608b6a7f012e94561d77e2a17368157d90c34b447
6
+ metadata.gz: 4d02d35532f58503c974ebc3cfaff6ae014c12204db91cb9a70a4e8eb57a71d26d2c35213ba3b6764eeb5141ec3d917d4bb17063326f84d55dcd27ab80dbdc1d
7
+ data.tar.gz: c4c1406cc2a8990cc2112b041f59c954908423f3c336fcda323009164cf5a8e7ab498ea2c059037d658bb277af9d42d8dbdb404027e7f958e8bfed45a23807c9
@@ -36,18 +36,11 @@ module SmsLogparser
36
36
  desc: "Accumulate and cache results and send totals"
37
37
  option :concurrency, type: :numeric, default: 4, aliases: %w(-C),
38
38
  desc: "How many threads to use in parallel when sending cached results"
39
- option :webcast_traffic_correction, type: :numeric, aliases: %w(-W),
40
- desc: "Correction factor for webcast traffic"
41
- option :mobile_traffic_correction, type: :numeric, aliases: %w(-M),
42
- desc: "Correction factor for mobile traffic"
43
- option :podcast_traffic_correction, type: :numeric, aliases: %w(-P),
44
- desc: "Correction factor for podcast traffic"
45
39
  def parse
46
40
  start_message = "Parser started"
47
41
  start_message += options[:simulate] ? " in simulation mode." : "."
48
42
  logger.debug("Parser options: #{options.inspect}")
49
43
  logger.info(start_message)
50
- parser = Parser.new(options)
51
44
  cache = DataCache.new if options[:accumulate]
52
45
  mysql = Mysql.new(options)
53
46
  if !options[:simulate] && mysql.parser_running?
@@ -67,7 +60,7 @@ module SmsLogparser
67
60
  mysql.get_entries(last_id: state[:last_event_id], limit: options[:limit]) do |entries|
68
61
  logger.info { "Getting log messages from database..." }
69
62
  entries.each do |entry|
70
- parser.extract_data_from_msg(entry['Message']) do |data|
63
+ Parser.extract_data_from_msg(entry['Message']) do |data|
71
64
  if data.size > 0
72
65
  data.each do |data_entry|
73
66
  if options[:accumulate]
@@ -1,7 +1,36 @@
1
1
  module SmsLogparser
2
2
  class LogMessage
3
+
4
+ attr_reader :message
5
+
3
6
  def initialize(message)
4
- @message = message
7
+ # reove double slashes from message
8
+ @message = message.squeeze('/')
9
+ end
10
+
11
+ def self.match?(message)
12
+ if match = message.match(/\/content\/\d+\/\d+\/\d+\/(\S*).+(200|206)/)
13
+ # ignore detect.mp4
14
+ return true unless match[1] =~ /detect.mp4/i
15
+ end
16
+ false
17
+ end
18
+
19
+ # see https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent
20
+ # for mobile browser detection
21
+ def self.get_type(user_agent)
22
+ case user_agent
23
+ when /.*(iTunes).*/i
24
+ 'PODCAST'
25
+ when /.*(Mobi|IEMobile|Mobile Safari|iPhone|iPod|iPad|Android|BlackBerry|Opera Mini).*/
26
+ 'MOBILE'
27
+ else
28
+ 'WEBCAST'
29
+ end
30
+ end
31
+
32
+ def type
33
+ LogMessage.get_type(user_agent)
5
34
  end
6
35
 
7
36
  def match
@@ -1,74 +1,50 @@
1
1
  module SmsLogparser
2
- class Parser
2
+ module Parser
3
3
 
4
- def initialize(options = {})
5
- @options = options
6
- @logger = SmsLogparser::Loggster.instance
4
+ module_function
5
+
6
+ def logger
7
+ SmsLogparser::Loggster.instance
7
8
  end
8
9
 
9
10
  def extract_data_from_msg(message)
10
11
  data = []
11
- if Parser.match?(message)
12
- @logger.debug { "Parser MATCH: #{message}" }
12
+ if LogMessage.match?(message)
13
+ logger.debug { "Parser MATCH: #{message}" }
13
14
  log_message = LogMessage.new(message)
14
- unless log_message.match
15
- @logger.warn { "Can't extract data from message: #{message}" }
15
+ if log_message.match
16
+ data << Parser.extract_usage_data(log_message)
17
+ data << Parser.extract_visit(log_message)
18
+ data.compact! # remove nil values
16
19
  else
17
- type = Parser.get_type(log_message.user_agent)
18
- data << log_message.account_info.merge(
19
- type: "TRAFFIC_#{type}",
20
- value: (log_message.bytes * traffic_correction_factor(type)).round(0)
21
- )
22
- if log_message.status == 200 &&
23
- (log_message.file_extname =~ /\.(mp3|mp4|flv|f4v)/ ||
24
- log_message.file == 'index.m3u8')
25
- data << log_message.account_info.merge(
26
- type: "VISITORS_#{type}",
27
- value: 1,
28
- )
29
- end
20
+ logger.warn { "Can't extract data from message: #{message}" }
30
21
  end
31
22
  else
32
- @logger.debug { "Parser IGNORE: #{message}" }
33
- end
34
- return data unless block_given?
35
- yield data
36
- end
37
-
38
- def self.match?(message)
39
- match = message.match(/\/content\/\d+\/\d+\/\d+\/(\S*).+(200|206)/)
40
- # ignore detect.mp4
41
- if match
42
- return true unless match[1] =~ /detect.mp4/i
23
+ logger.debug { "Parser IGNORE: #{message}" }
43
24
  end
44
- false
25
+ yield data if block_given?
26
+ data
45
27
  end
46
28
 
47
- # see https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent
48
- # for mobile browser detection
49
- def self.get_type(user_agent)
50
- case user_agent
51
- when /.*(iTunes).*/i
52
- 'PODCAST'
53
- when /.*(Mobi|IEMobile|Mobile Safari|iPhone|iPod|iPad|Android|BlackBerry|Opera Mini).*/
54
- 'MOBILE'
55
- else
56
- 'WEBCAST'
57
- end
29
+ def extract_usage_data(log_message)
30
+ log_message.account_info.merge(
31
+ type: "TRAFFIC_#{log_message.type}",
32
+ value: log_message.bytes
33
+ )
58
34
  end
59
35
 
60
- def traffic_correction_factor(traffic_type)
61
- factor = case traffic_type
62
- when 'WEBCAST'
63
- @options[:webcast_traffic_correction] || 1.0
64
- when 'MOBILE'
65
- @options[:mobile_traffic_correction] || 1.0
66
- when 'PODCAST'
67
- @options[:podcast_traffic_correction] || 1.0
36
+ def extract_visit(log_message)
37
+ if log_message.status == 200 &&
38
+ (log_message.file_extname =~ /\.(mp3|mp4|flv|f4v)/ || log_message.file == 'index.m3u8')
39
+ visit_data = log_message.account_info.merge(
40
+ type: "VISITORS_#{log_message.type}",
41
+ value: 1
42
+ )
43
+ logger.debug { "Counting visit for message: #{log_message.message}" }
68
44
  else
69
- 1.0
45
+ logger.debug { "Not counting visit for message: #{log_message.message}" }
70
46
  end
71
- factor.to_f
47
+ visit_data || nil
72
48
  end
73
49
 
74
50
  end # class
@@ -1,3 +1,3 @@
1
1
  module SmsLogparser
2
- VERSION = "0.15.5"
2
+ VERSION = "0.16.0"
3
3
  end
@@ -2,6 +2,65 @@ require 'spec_helper'
2
2
 
3
3
  describe SmsLogparser::LogMessage do
4
4
 
5
+ %w(f4v flv mp4 mp3 ts m3u8 jpg js css m4a png sid).each do |extension|
6
+ it "matches #{extension} files" do
7
+ SmsLogparser::LogMessage.match?(
8
+ "GET /content/2/719/54986/file.#{extension} HTTP/1.1\" 200 6741309 "
9
+ ).must_equal true
10
+ end
11
+ end
12
+
13
+ %w(200 206).each do |status|
14
+ it "does match status code #{status}" do
15
+ SmsLogparser::LogMessage.match?(
16
+ "GET /content/2/719/54986/file.mp4 HTTP/1.1\" #{status} 50000 "
17
+ ).must_equal true
18
+ end
19
+ end
20
+
21
+ %w(404 500 304).each do |status|
22
+ it "does not match status code #{status}" do
23
+ SmsLogparser::LogMessage.match?(
24
+ "GET /content/2/719/54986/file.mp4 HTTP/1.1\" #{status} 50000 "
25
+ ).must_equal false
26
+ end
27
+ end
28
+
29
+ %w(contents public index assets).each do |dir|
30
+ it "does not match directories other than /content" do
31
+ SmsLogparser::LogMessage.match?(
32
+ "GET /#{dir}/2/719/54986/file.mp4 HTTP/1.1\" 200 50000 "
33
+ ).must_equal false
34
+ end
35
+ end
36
+
37
+ it "does not match for 'detect.mp4' files" do
38
+ SmsLogparser::LogMessage.match?(
39
+ "GET /content/2/719/54986/detect.mp4 HTTP/1.1\" 200 128 "
40
+ ).must_equal false
41
+ end
42
+
43
+ [
44
+ "Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10",
45
+ "Mozilla/5.0 (Android; Mobile; rv:13.0) Gecko/13.0 Firefox/13.0",
46
+ "Opera/9.80 (Android 2.3.3; Linux; Opera Mobi/ADR-1111101157; U; es-ES) Presto/2.9.201 Version/11.50",
47
+ "Mozilla/5.0 (Linux; Android 4.4.2); Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Mobile Safari/537.36 OPR/20.0.1396.72047",
48
+ "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)",
49
+ "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3"
50
+ ].each do |mobile_agent|
51
+ it "traffic type for mobile user agents is TRAFFIC_MOBILE (#{mobile_agent})" do
52
+ SmsLogparser::LogMessage.get_type(mobile_agent).must_equal "MOBILE"
53
+ end
54
+ end
55
+
56
+ [
57
+ '127.0.0.1 - - [13/Apr/2014:05:33:23 +0200] "GET /content/51/52/42481/simvid_1.mp4 HTTP/1.1" 206 7865189 "-" "iTunes/11.1.5 (Windows; Microsoft Windows 7 Home Premium Edition Service Pack 1 (Build 7601)) AppleWebKit/537.60.11"'
58
+ ].each do |podcast_agent|
59
+ it "traffic type for mobile user agents is TRAFFIC_PODCAST (#{podcast_agent})" do
60
+ SmsLogparser::LogMessage.get_type(podcast_agent).must_equal "PODCAST"
61
+ end
62
+ end
63
+
5
64
  it "can extract the correct values from messages without arg string" do
6
65
  log_message = SmsLogparser::LogMessage.new('127.0.0.1 - - [13/Apr/2014:05:33:23 +0200] "GET /content/51/102/42481/simvid_1.mp4 HTTP/1.1" 206 7865189 "-" "iTunes/11.1.5 (Windows; Microsoft Windows 7 Home Premium Edition Service Pack 1 (Build 7601)) AppleWebKit/537.60.11"')
7
66
  log_message.customer_id.must_equal '51'
@@ -43,21 +102,15 @@ describe SmsLogparser::LogMessage do
43
102
 
44
103
  it "does not fail on double slashes" do
45
104
  log_message = SmsLogparser::LogMessage.new('- - [23/Apr/2014:23:01:24 +0200] "GET /content/244/245/42601//player_logo.jpg?0.19035581778734922 HTTP/1.1" 200 21671 "http://blick.simplex.tv/content/244/245/42601/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36"')
46
- log_message.customer_id.must_equal nil
47
- log_message.author_id.must_equal nil
48
- log_message.project_id.must_equal nil
49
- log_message.status.must_equal nil
50
- log_message.bytes.must_equal nil
51
- log_message.file.must_equal nil
52
- log_message.args.must_equal nil
53
- log_message.file_extname.must_equal nil
54
- log_message.user_agent.must_equal nil
55
- #log_message.status.must_equal 200
56
- #log_message.bytes.must_equal 1181
57
- #log_message.file.must_equal 'player_logo.jpg'
58
- #log_message.args.must_equal '0.19035581778734922'
59
- #log_message.file_extname.must_equal 'jpg'
60
- #log_message.user_agent.must_equal 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36'
105
+ log_message.customer_id.must_equal '244'
106
+ log_message.author_id.must_equal '245'
107
+ log_message.project_id.must_equal '42601'
108
+ log_message.status.must_equal 200
109
+ log_message.bytes.must_equal 21671
110
+ log_message.file.must_equal 'player_logo.jpg'
111
+ log_message.args.must_equal '0.19035581778734922'
112
+ log_message.file_extname.must_equal '.jpg'
113
+ log_message.user_agent.must_equal 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36'
61
114
  end
62
115
 
63
116
  end
data/spec/parser_spec.rb CHANGED
@@ -2,68 +2,9 @@ require 'spec_helper'
2
2
 
3
3
  describe SmsLogparser::Parser do
4
4
 
5
- %w(f4v flv mp4 mp3 ts m3u8 jpg js css m4a png sid).each do |extension|
6
- it "matches #{extension} files" do
7
- SmsLogparser::Parser.match?(
8
- "GET /content/2/719/54986/file.#{extension} HTTP/1.1\" 200 6741309 "
9
- ).must_equal true
10
- end
11
- end
12
-
13
- %w(200 206).each do |status|
14
- it "does match status code #{status}" do
15
- SmsLogparser::Parser.match?(
16
- "GET /content/2/719/54986/file.mp4 HTTP/1.1\" #{status} 50000 "
17
- ).must_equal true
18
- end
19
- end
20
-
21
- %w(404 500 304).each do |status|
22
- it "does not match status code #{status}" do
23
- SmsLogparser::Parser.match?(
24
- "GET /content/2/719/54986/file.mp4 HTTP/1.1\" #{status} 50000 "
25
- ).must_equal false
26
- end
27
- end
28
-
29
- %w(contents public index assets).each do |dir|
30
- it "does not match directories other than /content" do
31
- SmsLogparser::Parser.match?(
32
- "GET /#{dir}/2/719/54986/file.mp4 HTTP/1.1\" 200 50000 "
33
- ).must_equal false
34
- end
35
- end
36
-
37
- it "does not match for 'detect.mp4' files" do
38
- SmsLogparser::Parser.match?(
39
- "GET /content/2/719/54986/detect.mp4 HTTP/1.1\" 200 128 "
40
- ).must_equal false
41
- end
42
-
43
- [
44
- "Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10",
45
- "Mozilla/5.0 (Android; Mobile; rv:13.0) Gecko/13.0 Firefox/13.0",
46
- "Opera/9.80 (Android 2.3.3; Linux; Opera Mobi/ADR-1111101157; U; es-ES) Presto/2.9.201 Version/11.50",
47
- "Mozilla/5.0 (Linux; Android 4.4.2); Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Mobile Safari/537.36 OPR/20.0.1396.72047",
48
- "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)",
49
- "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3"
50
- ].each do |mobile_agent|
51
- it "traffic type for mobile user agents is TRAFFIC_MOBILE (#{mobile_agent})" do
52
- SmsLogparser::Parser.get_type(mobile_agent).must_equal "MOBILE"
53
- end
54
- end
55
-
56
- [
57
- '127.0.0.1 - - [13/Apr/2014:05:33:23 +0200] "GET /content/51/52/42481/simvid_1.mp4 HTTP/1.1" 206 7865189 "-" "iTunes/11.1.5 (Windows; Microsoft Windows 7 Home Premium Edition Service Pack 1 (Build 7601)) AppleWebKit/537.60.11"'
58
- ].each do |podcast_agent|
59
- it "traffic type for mobile user agents is TRAFFIC_PODCAST (#{podcast_agent})" do
60
- SmsLogparser::Parser.get_type(podcast_agent).must_equal "PODCAST"
61
- end
62
- end
63
-
64
5
  it "count index.m3u8 with status 200 and user agent iPhone as mobile visit" do
65
6
  message = '- - [22/Apr/2014:17:44:17 +0200] "GET /content/51/52/42701/index.m3u8 HTTP/1.1" 200 319 "-" "AppleCoreMedia/1.0.0.11D167 (iPhone; U; CPU OS 7_1 like Mac OS X; de_de)"'
66
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
7
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
67
8
  data[1][:customer_id].must_equal "51"
68
9
  data[1][:author_id].must_equal "52"
69
10
  data[1][:project_id].must_equal "42701"
@@ -73,7 +14,7 @@ describe SmsLogparser::Parser do
73
14
 
74
15
  it "count *.flv with status 200 and user agent Android as mobile visit" do
75
16
  message = ' - - [22/Apr/2014:17:44:27 +0200] "GET /content/51/52/42709/simvid_1_40.flv HTTP/1.1" 200 96259 "http://blick.simplex.tv/NubesPlayer/index.html?cID=51&aID=52&pID=42709&autostart=false&themeColor=d6081c&embed=1&configUrl=http://f.blick.ch/resources/61786/ver1-0/js/xtendxIframeStatsSmartphone.js?adtechID=3522740&language=de&quality=40&hideHD=true&progressiveDownload=true" "Mozilla/5.0 (Linux; Android 4.4.2; C6903 Build/14.3.A.0.757) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36"'
76
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
17
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
77
18
  data[1][:customer_id].must_equal "51"
78
19
  data[1][:author_id].must_equal "52"
79
20
  data[1][:project_id].must_equal "42709"
@@ -83,7 +24,7 @@ describe SmsLogparser::Parser do
83
24
 
84
25
  it "count *.mp4 with status 200 and user agent Android as mobile visit" do
85
26
  message = '- - [22/Apr/2014:17:44:21 +0200] "GET /content/51/52/42701/simvid_1.mp4 HTTP/1.1" 200 2644715 "-" "Samsung GT-I9505 stagefright/1.2 (Linux;Android 4.4.2)"'
86
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
27
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
87
28
  data[1][:customer_id].must_equal "51"
88
29
  data[1][:author_id].must_equal "52"
89
30
  data[1][:project_id].must_equal "42701"
@@ -93,7 +34,7 @@ describe SmsLogparser::Parser do
93
34
 
94
35
  it "count *.flv with status 200 and user agent Firefox on Windows as webcast visit" do
95
36
  message = '- - [22/Apr/2014:18:00:50 +0200] "GET /content/51/52/42431/simvid_1_40.flv HTTP/1.1" 200 6742274 "http://blick.simplex.tv/NubesPlayer/player.swf" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"'
96
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
37
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
97
38
  data[1][:customer_id].must_equal "51"
98
39
  data[1][:author_id].must_equal "52"
99
40
  data[1][:project_id].must_equal "42431"
@@ -103,7 +44,7 @@ describe SmsLogparser::Parser do
103
44
 
104
45
  it "count traffic with status 206 and a argumenst string and user agent Firefox on Windows as webcast visit" do
105
46
  message = '- - [23/Apr/2014:17:36:33 +0200] "GET /content/51/52/42721/simvid_1_40.flv?position=22 HTTP/1.1" 206 100708 "http://blick.simplex.tv/NubesPlayer/player.swf" "Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0"'
106
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
47
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
107
48
  data.first[:customer_id].must_equal "51"
108
49
  data.first[:author_id].must_equal "52"
109
50
  data.first[:project_id].must_equal "42721"
@@ -113,7 +54,7 @@ describe SmsLogparser::Parser do
113
54
 
114
55
  it "count traffic with status 200 and no file from bot as webcast visit" do
115
56
  message = '- - [23/Apr/2014:17:47:32 +0200] "GET /content/51/52/42624/ HTTP/1.1" 200 1181 "-" "Googlebot-Video/1.0"'
116
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
57
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
117
58
  data.size.must_equal 1
118
59
  data.first[:customer_id].must_equal "51"
119
60
  data.first[:author_id].must_equal "52"
@@ -124,13 +65,13 @@ describe SmsLogparser::Parser do
124
65
 
125
66
  it "do not count *.css with status 200 as visit" do
126
67
  message = '- - [22/Apr/2014:18:00:50 +0200] "GET /content/51/52/42431/application.css HTTP/1.1" 200 192 "http://blick.simplex.tv/NubesPlayer/player.swf" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"'
127
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
68
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
128
69
  data.size.must_equal 1
129
70
  end
130
71
 
131
72
  it "do not count status 206 as visit" do
132
73
  message = '- - [22/Apr/2014:18:00:50 +0200] "GET /content/51/52/42431/simvid_1_40.flv HTTP/1.1" 206 19289 "http://blick.simplex.tv/NubesPlayer/player.swf" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"'
133
- data = SmsLogparser::Parser.new.extract_data_from_msg(message)
74
+ data = SmsLogparser::Parser.extract_data_from_msg(message)
134
75
  data.size.must_equal 1
135
76
  end
136
77
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms-logparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.5
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - niwo