pidgin2adium 3.3.0 → 4.0.0.beta1

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.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -3
  3. data/.rspec +1 -0
  4. data/.simplecov +5 -0
  5. data/.travis.yml +12 -0
  6. data/Gemfile +6 -1
  7. data/LICENSE +17 -17
  8. data/NEWS.md +89 -0
  9. data/README.md +60 -0
  10. data/Rakefile +5 -23
  11. data/bin/pidgin2adium +19 -90
  12. data/lib/pidgin2adium.rb +4 -136
  13. data/lib/pidgin2adium/adium_chat_file_creator.rb +64 -0
  14. data/lib/pidgin2adium/file_finder.rb +23 -0
  15. data/lib/pidgin2adium/runner.rb +23 -0
  16. data/lib/pidgin2adium/version.rb +1 -1
  17. data/pidgin2adium.gemspec +25 -21
  18. data/spec/features/parse_pidgin_log_file_spec.rb +50 -0
  19. data/spec/fixtures/input/input.html +3 -0
  20. data/spec/fixtures/output.xml +5 -0
  21. data/spec/pidgin2adium/adium_chat_file_creator_spec.rb +89 -0
  22. data/spec/pidgin2adium/file_finder_spec.rb +63 -0
  23. data/spec/spec_helper.rb +17 -59
  24. metadata +96 -89
  25. data/.autotest +0 -28
  26. data/ChangeLog +0 -79
  27. data/Manifest.txt +0 -18
  28. data/README.rdoc +0 -122
  29. data/config/website.yml +0 -2
  30. data/ext/balance_tags_c/balance_tags_c.c +0 -198
  31. data/ext/balance_tags_c/extconf.rb +0 -4
  32. data/lib/pidgin2adium/log_converter.rb +0 -71
  33. data/lib/pidgin2adium/log_file.rb +0 -100
  34. data/lib/pidgin2adium/log_parser.rb +0 -2
  35. data/lib/pidgin2adium/message.rb +0 -2
  36. data/lib/pidgin2adium/messages/all.rb +0 -5
  37. data/lib/pidgin2adium/messages/auto_reply_message.rb +0 -11
  38. data/lib/pidgin2adium/messages/event.rb +0 -17
  39. data/lib/pidgin2adium/messages/message.rb +0 -39
  40. data/lib/pidgin2adium/messages/status_message.rb +0 -17
  41. data/lib/pidgin2adium/messages/xml_message.rb +0 -40
  42. data/lib/pidgin2adium/parsers/all.rb +0 -3
  43. data/lib/pidgin2adium/parsers/basic_parser.rb +0 -456
  44. data/lib/pidgin2adium/parsers/html_log_parser.rb +0 -125
  45. data/lib/pidgin2adium/parsers/text_log_parser.rb +0 -39
  46. data/spec/balance_tags_c_extn_spec.rb +0 -47
  47. data/spec/basic_parser_spec.rb +0 -219
  48. data/spec/html_log_parser_spec.rb +0 -150
  49. data/spec/log_converter_spec.rb +0 -48
  50. data/spec/log_file_spec.rb +0 -176
  51. data/spec/logfiles/2006-12-21.223606.txt +0 -3
  52. data/spec/logfiles/2008-01-15.071445-0500PST.htm +0 -5
  53. data/spec/logfiles/2008-01-15.071445-0500PST.html +0 -5
  54. data/spec/pidgin2adium_spec.rb +0 -252
  55. data/spec/spec.opts +0 -1
  56. data/spec/test-output/README.md +0 -1
  57. data/spec/test-output/html_log_output.xml +0 -6
  58. data/spec/test-output/text_log_output.xml +0 -4
  59. data/spec/text_log_parser_spec.rb +0 -42
  60. data/tasks/extconf.rake +0 -8
  61. data/tasks/extconf/balance_tags_c.rake +0 -47
data/spec/spec.opts DELETED
@@ -1 +0,0 @@
1
- --color
@@ -1 +0,0 @@
1
- This folder holds already-parsed logs to allow for testing that Pidgin2Adium's output is correct.
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <chat xmlns="http://purl.org/net/ulf/ns/0.4-02" account="jiggerificbug" service="AIM">
3
- <message sender="aolsystemmsg" time="2008-01-15T07:14:45-0500" alias="AOL System Msg"><div><span style="font-family: Helvetica; font-size: 12pt;">Your screen name (jiggerificbug) is now signed into AOL(R) Instant Messenger (TM) in 2 locations. To sign off the other location(s), reply to this message with the number 1. Click <a href="http://www.aim.com/password/routing.adp">here</a> for more information.</span></div></message>
4
- <message sender="jiggerificbug" time="2008-01-15T07:14:48-0500" alias="Gabe B-W"><div><span style="font-family: Helvetica; font-size: 12pt;">1</span></div></message>
5
- <message sender="aolsystemmsg" time="2008-01-15T07:14:48-0500" alias="AOL System Msg"><div><span style="font-family: Helvetica; font-size: 12pt;">Your other AIM sessions have been signed-off. You are now signed-on from 1 location(s).</span></div></message>
6
- </chat>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <chat xmlns="http://purl.org/net/ulf/ns/0.4-02" account="jiggerificbug" service="AIM">
3
- <message sender="jiggerificbug" time="2006-12-21T22:36:11-0700" alias="Gabe B-W"><div><span style="font-family: Helvetica; font-size: 12pt;">what are you doing tomorrow?</span></div></message>
4
- </chat>
@@ -1,42 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "TextLogParser" do
4
- before(:each) do
5
- @time = '(04:20:06)'
6
- @tlp = Pidgin2Adium::TextLogParser.new(@text_logfile_path,
7
- @aliases)
8
- end
9
- it "should cleanup text correctly" do
10
- dirty_text = %Q{\r\n#{@time}&<b>Hello!</b> "Hi!" 'Oh no'\n}
11
- # "\n" not removed if it ends a line or is followed by
12
- # a timestamp
13
- clean_text = %Q{\n#{@time}&amp;&lt;b&gt;Hello!&lt;/b&gt; &quot;Hi!&quot; &apos;Oh no&apos;\n}
14
- @tlp.cleanup(dirty_text).should == clean_text
15
- end
16
-
17
- describe "#parse" do
18
- it "should return a LogFile instance" do
19
- @tlp.parse().should be_instance_of(Pidgin2Adium::LogFile)
20
- end
21
-
22
- it "should return a LogFile with the correct number of chat_lines" do
23
- logfile = @tlp.parse
24
- logfile.chat_lines.size.should == 1
25
- end
26
-
27
- it "should return a LogFile with the correct message type" do
28
- logfile = @tlp.parse
29
- logfile.chat_lines[0].should be_instance_of(Pidgin2Adium::XMLMessage)
30
- end
31
-
32
- it "should return a LogFile with the correct data" do
33
- logfile = @tlp.parse
34
- msg = logfile.chat_lines[0]
35
- msg.sender.should == "awesomesn"
36
- msg.body.should == "what are you doing tomorrow?"
37
- msg.buddy_alias.should == "Gabe B-W"
38
- # Use regex to ignore time zone
39
- msg.time.should =~ /^2006-12-21T22:36:11[-+]\d{2}:00$/
40
- end
41
- end
42
- end
data/tasks/extconf.rake DELETED
@@ -1,8 +0,0 @@
1
- namespace :extconf do
2
- desc "Compiles the Ruby extension"
3
- task :compile
4
- end
5
-
6
- task :compile => "extconf:compile"
7
-
8
- task :rspec => :compile
@@ -1,47 +0,0 @@
1
- require 'rbconfig'
2
-
3
- namespace :extconf do
4
- extension = File.basename(__FILE__, '.rake')
5
-
6
- ext = "ext/#{extension}"
7
- ext_so = "#{ext}/#{extension}.#{Config::CONFIG['DLEXT']}"
8
- ext_files = FileList[
9
- "#{ext}/*.c",
10
- "#{ext}/*.h",
11
- "#{ext}/*.rl",
12
- "#{ext}/extconf.rb",
13
- "#{ext}/Makefile",
14
- # "lib"
15
- ]
16
-
17
- is_windows = Config::CONFIG['host_os'] =~ /mswin|mingw/
18
- make_command = is_windows ? 'nmake' : 'make'
19
-
20
- task :compile => extension do
21
- if Dir.glob("**/#{extension}.{o,so,dll}").length == 0
22
- STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
23
- STDERR.puts "Gem actually failed to build. Your system is"
24
- STDERR.puts "NOT configured properly to build #{GEM_NAME}."
25
- STDERR.puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
26
- exit(1)
27
- end
28
- end
29
-
30
- desc "Builds just the #{extension} extension"
31
- task extension.to_sym => ["#{ext}/Makefile", ext_so ]
32
-
33
- file "#{ext}/Makefile" => ["#{ext}/extconf.rb"] do
34
- Dir.chdir(ext) do ruby "extconf.rb" end
35
- end
36
-
37
- file ext_so => ext_files do
38
- Dir.chdir(ext) do
39
- sh(make_command) do |ok, res|
40
- if !ok
41
- require "fileutils"
42
- FileUtils.rm Dir.glob('*.{so,o,dll,bundle}')
43
- end
44
- end
45
- end
46
- end
47
- end