Giter Site home page Giter Site logo

icalendar2's People

Contributors

ericcf avatar james-ai avatar justinlove avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

icalendar2's Issues

TRANSP property raises unclear error

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.

Timezone

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?

to_ical method not working when arrays are in the calendar

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>

Problem with created property

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.