Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Remove the where attribute from the Video model #60

Merged
merged 1 commit into from Mar 12, 2012

Conversation

Projects
None yet
3 participants
Contributor

thomsbg commented Mar 1, 2012

In an attempt to cache my YouTube API responses in production, I ran into the issue of YouTubeIt::Model::Video objects not being serializable when they contain geo-rss data.

The where attribute is the problematic one (an instance of REXML::Element). With position, latitude, and longitude available, this property is redundant so I removed it.

@thomsbg thomsbg Remove the where attribute from the Video model
The where attribute of the Video model is not serializable
(i.e. Marshal.dump(video) gives TypeError: cannot dump singleton).

With position, latitude, and longitude available, this property is redundant
52ddfef

@kylejginavan kylejginavan added a commit that referenced this pull request Mar 12, 2012

@kylejginavan kylejginavan Merge pull request #60 from thomsbg/fix_video_model_serialization
Remove the where attribute from the Video model
ea6f362

@kylejginavan kylejginavan merged commit ea6f362 into kylejginavan:master Mar 12, 2012

Contributor

yaauie commented Mar 15, 2012

This breaks the following test:

test/test_video_feed_parser.rb:189

  def test_should_parse_where_geodata_correctly
    with_video_response do |parser|
      video = parser.parse
      assert_equal nil, video.where
    end
  end

should the test also be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment