skype-history-import 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.3
1
+ 1.0.4
@@ -6,7 +6,7 @@ def import(text)
6
6
  message = Message.new
7
7
 
8
8
  while text.strip.size > 0
9
- if text =~ /^\[(.*)\] (.*): (.*)/
9
+ if text =~ /^\[(.+)\] (.+?): (.*)/
10
10
 
11
11
  # handle tail of prev multi line message
12
12
  unless $` == nil or message.text == nil or $`.strip == ""
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{skype-history-import}
8
- s.version = "1.0.3"
8
+ s.version = "1.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["SergXIIIth"]
12
- s.date = %q{2011-06-24}
12
+ s.date = %q{2011-06-25}
13
13
  s.description = %q{Manualy user copy chat history to file or string and after gem import(parse) it to class Message}
14
14
  s.email = %q{smkrbr@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -4,7 +4,7 @@ require 'date'
4
4
 
5
5
  class TestSkypeHistoryImport < Test::Unit::TestCase
6
6
  context "a importer" do
7
- should "import two message" do
7
+ should "basic" do
8
8
  messages = <<-message
9
9
  [14/06/2011 09:25:15] Di: a deal? are you trading something?
10
10
  [14/06/2011 09:28:45] sam: not yet, just personal staff
@@ -77,7 +77,7 @@ Exception#to_s was found to be problematic around it. The method can trick safe
77
77
  end
78
78
 
79
79
  should "import real chat" do
80
- #return
80
+ return
81
81
  pattern = "#{Dir.home}/skype_history/*.txt"
82
82
 
83
83
  Dir[pattern].each do |file_path|
@@ -94,6 +94,14 @@ Exception#to_s was found to be problematic around it. The method can trick safe
94
94
  end
95
95
  end
96
96
 
97
+ should "bug too long nick name" do
98
+ messages = <<-message
99
+ [14/06/2011 09:25:15] Di: a deal? are you: trading something?
100
+ message
101
+
102
+ result = import(messages)[0]
103
+ assert_equal("Di", result.nick)
104
+ end
97
105
  =begin
98
106
  file send
99
107
  [08/12/2010 17:01:46] *** sam sent ps.js ***
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skype-history-import
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-24 00:00:00.000000000 -07:00
12
+ date: 2011-06-25 00:00:00.000000000 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: shoulda
17
- requirement: &13539880 !ruby/object:Gem::Requirement
17
+ requirement: &5653440 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *13539880
25
+ version_requirements: *5653440
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
- requirement: &13539240 !ruby/object:Gem::Requirement
28
+ requirement: &5652400 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.0.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *13539240
36
+ version_requirements: *5652400
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: jeweler
39
- requirement: &13538420 !ruby/object:Gem::Requirement
39
+ requirement: &5650920 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 1.6.2
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *13538420
47
+ version_requirements: *5650920
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rcov
50
- requirement: &13537100 !ruby/object:Gem::Requirement
50
+ requirement: &5649420 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *13537100
58
+ version_requirements: *5649420
59
59
  description: Manualy user copy chat history to file or string and after gem import(parse)
60
60
  it to class Message
61
61
  email: smkrbr@gmail.com
@@ -92,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  segments:
94
94
  - 0
95
- hash: 1262013932544102761
95
+ hash: -1625539411613459907
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  none: false
98
98
  requirements: