ericcf / icalendar2 Goto Github PK
View Code? Open in Web Editor NEWiCalendar (RFC 5545) object parsing, manipulation and generation
iCalendar (RFC 5545) object parsing, manipulation and generation
Module.const_get does not take a second argument in 1.8.7, but it does under 1.9.
The TRANSP property of icalendar components raises an issue in icalendar2.
For Exemple
BEGIN:VCALENDAR
METHOD:PUBLISH
PRODID:-//education.gouv.fr//NONSGML iCalcreator 2.6//
VERSION:2.0
X-WR-CALNAME:Vacs zA 17-18
X-WR-CALDESC:Calendrier Scolaire - Zone A
X-WR-TIMEZONE:Europe/Paris
BEGIN:VEVENT
UID:1234512345132465
DESCRIPTION:Makes icalendar2 really go bunkers
DTSTART;VALUE=DATE:20170831
SUMMARY:Makes icalendar2 go bunkers
TRANSP:TRANSPARENT
END:VEVENT
The error I get is
/home/taurgal/.gem/ruby/2.4.0/gems/icalendar2-0.1.5/lib/icalendar2/component/base.rb:77:in
block in define_accessor': undefined method
new' for nil:NilClass (NoMethodError)
I tried to create the file transp.rb with the followinf content inside /home/taurgal/.gem/ruby/2.4.0/gems/icalendar2-0.1.5/lib/icalendar2/property:
module Icalendar2
module Property
# See http://tools.ietf.org/html/rfc5545#page-102
class Transp < Base
name "TRANSP"
value :types => [:text]
end
end
end
But it does not seem to suffice.
Maybe my grep-fu is just weak but I can't seem to find any code for creating VTIMEZOME components yet I can create one...
Have I completely lost my mind or is the code simply hiding from me somewhere?
e.g.
calendar.event do
categories 'a, b, c'
end
#<Icalendar2::Event:0x00000104af5c08 @properties={"uid"=>#<Icalendar2::Property::Uid:0x00000104af5898 @value=12345, @parameters={}, @valid=true>, "dtstamp"=>#<Icalendar2::Property::Dtstamp:0x00000104af4f38 @value=20130131T132049, @parameters={}, @valid=true>, "categories"=>[#<Icalendar2::Property::Categories:0x00000104af4b00 @value=[a, b, c], @parameters={}, @valid=true>]}>
Doing calendar.to_ical will throw up an error:
NoMethodError: undefined method `to_ical' for #<Array:0x00000100dbe268>
Any idea on when you'll publish 0.1.5 to Rubygems?
Currently, only Event is present. I need to add To-Do, Journal, Free/Busy, Time Zone and Alarm
When I try to add the created property I get a NoMethodError.
For example:
calendar.event do
created "20130130T150116Z"
end
I get the following:
NoMethodError: undefined method `new' for nil:NilClass
from /Users/jamessmith/.rvm/gems/ruby-1.9.3-p0/gems/icalendar2-0.1.1/lib/icalendar2/component/base.rb:66:in `block in define_accessor'
from (irb):33:in `block in irb_binding'
from /Users/jamessmith/.rvm/gems/ruby-1.9.3-p0/gems/icalendar2-0.1.1/lib/icalendar2/calendar.rb:53:in `instance_eval'
from /Users/jamessmith/.rvm/gems/ruby-1.9.3-p0/gems/icalendar2-0.1.1/lib/icalendar2/calendar.rb:53:in `event'
from (irb):32
from /Users/jamessmith/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands/console.rb:47:in `start'
from /Users/jamessmith/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands/console.rb:8:in `start'
from /Users/jamessmith/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I'm on Mac 10.8.6 and I think most of the other info is in the exception output above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.