Comments (4)
On 12/12/2011 06:43 AM, Bohuslav Kabrda wrote:
Hi,
one of ical's test fails for me, here is the test output:
- Failure:
test_property_parameters(TestComponent) [/home/bkabrda/rpmbuild/BUILDROOT/rubygem-icalendar-1.1.6-2.fc16.x86_64/usr/share/gems/gems/icalendar-1.1.6/test/test_parameter.rb:31]:
<{"ALTREP"=>[""http://my.language.net""], "LANGUAGE"=>["SPANISH"]}> expected but was
<{"ALTREP"=>[]}>.ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
Is this one of the tests where hash order matters? That seems to change
in interesting ways between versions of ruby.
Also, what distribution is this on?
-Sean
Sean Dague Learn about the Universe with the
sean at dague dot net Mid-Hudson Astronomical Association
http://dague.net http://midhudsonastro.org
from icalendar.
I'm rebuilding gems with Ruby 1.9.3 for Fedora Rawhide - the new version should land there soon.
I don't think that order matters:
"cals.first.events.first.summary" returns "//my.language.net";LANGUAGE=SPANISH:This is a test summary.", which seems ok, but when you call the ical_params method on it (like "cals.first.events.first.summary.ical_params"), it returns the <{"ALTREP"=>[]}>.
Bohuslav
from icalendar.
The test passes if you either reverse the hash:
{"LANGUAGE"=>["SPANISH"], "ALTREP"=>["\"http://my.language.net\""]}
or add escaped double quotes to SPANISH
:
{"ALTREP"=>["\"http://my.language.net\""], "LANGUAGE"=>["\"SPANISH\""]}
The problem is here: https://github.com/sdague/icalendar/blob/master/lib/icalendar/parser.rb#L199. It does not correctly parse lines like this:
SUMMARY;ALTREP="http://example.com/foo";LANGUAGE=en-US:This is a summary.
The problem is the :
in http:
because it is a control character within a double-quoted string. I think the regular expressions need some rewriting.
I played around with it, but haven't come up with a good solution yet.
from icalendar.
I've got what I think is a workable solution in tree, it seems to support the existing tests. Will be released in 1.2.1
from icalendar.
Related Issues (20)
- Icalendar is feeding something to ActiveSupport with a hash as keyword params HOT 2
- With the calendar, the English single and double quotation marks in the text become Chinese
- Timezone dtstart has offset applied twice HOT 7
- Support for RFC 7986 (Name, Color, Conference, Image, etc.) HOT 3
- Accept invitation button not showing HOT 5
- No method for component Icalendar::Event Appending to custom HOT 1
- DateTime class is considered deprecated
- DTEND is parsed incorrectly HOT 2
- Feature Request: accept props via keyward args or hash HOT 1
- Question: set tzid parameter based on value's `zone` HOT 1
- Ability to "not" receive email based on RSVP status HOT 2
- Handling Time Zone Changes HOT 2
- How to change the timezone on parsing HOT 1
- Wich is the method for divide Icalendar::Values::Text object?
- Specify REFRESH-INTERVAL HOT 3
- Parameter "to_time" doesn't work on dtend HOT 2
- uninitialized constant Icalendar::Parser::StringIO (NameError)
- Question: How can I find the days without event in a year? HOT 1
- UTC Timezone shouldn't use TZID=UTC; HOT 2
- icalendar can't handle timezones coming from Apple's iCloud .ical files HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icalendar.