From 4b9bb638c4dd1198141f6c0d986476b3ba07df3a Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 6 May 2017 20:46:14 +0200 Subject: Fix comment indentation. --- lib/plist/parser.rb | 22 +++++++++++----------- test/test_data_elements.rb | 2 +- test/test_parser.rb | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/plist/parser.rb b/lib/plist/parser.rb index 4835f8b..9be3e23 100755 --- a/lib/plist/parser.rb +++ b/lib/plist/parser.rb @@ -13,25 +13,25 @@ # # r = Plist.parse_xml(filename_or_xml) module Plist -# Note that I don't use these two elements much: -# -# + Date elements are returned as DateTime objects. -# + Data elements are implemented as Tempfiles -# -# Plist.parse_xml will blow up if it encounters a Date element. -# If you encounter such an error, or if you have a Date element which -# can't be parsed into a Time object, please send your plist file to -# plist@hexane.org so that I can implement the proper support. + # Note that I don't use these two elements much: + # + # + Date elements are returned as DateTime objects. + # + Data elements are implemented as Tempfiles + # + # Plist.parse_xml will blow up if it encounters a Date element. + # If you encounter such an error, or if you have a Date element which + # can't be parsed into a Time object, please send your plist file to + # plist@hexane.org so that I can implement the proper support. def self.parse_xml(filename_or_xml) listener = Listener.new - #parser = REXML::Parsers::StreamParser.new(File.new(filename), listener) + # parser = REXML::Parsers::StreamParser.new(File.new(filename), listener) parser = StreamParser.new(filename_or_xml, listener) parser.parse listener.result end class Listener - #include REXML::StreamListener + # include REXML::StreamListener attr_accessor :result, :open diff --git a/test/test_data_elements.rb b/test/test_data_elements.rb index 09af0da..02fcf20 100644 --- a/test/test_data_elements.rb +++ b/test/test_data_elements.rb @@ -105,7 +105,7 @@ END # test writing data elements expected = File.read("test/assets/example_data.plist") result = data.to_plist - #File.open('result.plist', 'w') {|f|f.write(result)} # debug + # File.open('result.plist', 'w') {|f|f.write(result)} # debug assert_equal(expected, result) # Test changing the object in the plist to a StringIO and writing. diff --git a/test/test_parser.rb b/test/test_parser.rb index 0e17765..53e7fa2 100755 --- a/test/test_parser.rb +++ b/test/test_parser.rb @@ -48,9 +48,9 @@ class TestParser < Test::Unit::TestCase end # uncomment this test to work on speed optimization - #def test_load_something_big - # plist = Plist.parse_xml("~/Pictures/iPhoto Library/AlbumData.xml") - #end + # def test_load_something_big + # plist = Plist.parse_xml("~/Pictures/iPhoto Library/AlbumData.xml") + # end # date fields are credited to def test_date_fields -- cgit v1.2.1