My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Earlier this year

  • Aug 23, 2009
    issue 6 (fails if the user doesn’t have rubygems installed) commented on by gothicx   -   diff --git a/test/profiler.rb b/test/profiler.rb index 43fa445..c70fd82 100644 --- a/test/profiler.rb +++ b/test/profiler.rb @@ -1,4 +1,4 @@ -require 'rubygems' +require 'rubygems' if DEVELOPER_MODE require 'ruby-prof' require File.dirname(__FILE__) + '/../lib/weather/service'
    diff --git a/test/profiler.rb b/test/profiler.rb index 43fa445..c70fd82 100644 --- a/test/profiler.rb +++ b/test/profiler.rb @@ -1,4 +1,4 @@ -require 'rubygems' +require 'rubygems' if DEVELOPER_MODE require 'ruby-prof' require File.dirname(__FILE__) + '/../lib/weather/service'
  • Aug 23, 2009
    issue 6 (fails if the user doesn’t have rubygems installed) commented on by gothicx   -   @@ -169,7 +169,7 @@ module Weather begin require 'memcache' rescue LoadError - require 'rubygems' + require 'rubygems' if DEVELOPER_MODE # The rc-tools memcache client is waaaay faster than Ruby-MemCache, # so try to use that if possible. However, I tried it a few months # ago and couldn't get it to work. Version 1.2.1 seems to work though
    @@ -169,7 +169,7 @@ module Weather begin require 'memcache' rescue LoadError - require 'rubygems' + require 'rubygems' if DEVELOPER_MODE # The rc-tools memcache client is waaaay faster than Ruby-MemCache, # so try to use that if possible. However, I tried it a few months # ago and couldn't get it to work. Version 1.2.1 seems to work though
  • Aug 23, 2009
    issue 7 (install.rb is deprecated, use setup.rb instead) reported by gothicx   -   setup.rb is the generic installer for ruby scripts/extentions. You can automate configuration and installation of your program package. http://i.loveruby.net/en/projects/setup/
    setup.rb is the generic installer for ruby scripts/extentions. You can automate configuration and installation of your program package. http://i.loveruby.net/en/projects/setup/
  • Aug 23, 2009
    issue 6 (fails if the user doesn’t have rubygems installed) reported by gothicx   -   diff --git a/lib/weather/service.rb b/lib/weather/service.rb index 392b52e..bd234e9 100644 --- a/lib/weather/service.rb +++ b/lib/weather/service.rb @@ -12,7 +12,7 @@ begin begin require 'xml/libxml' rescue LoadError - require 'rubygems' + require 'rubygems' if DEVELOPER_MODE require 'xml/libxml' end $USE_LIBXML = true
    diff --git a/lib/weather/service.rb b/lib/weather/service.rb index 392b52e..bd234e9 100644 --- a/lib/weather/service.rb +++ b/lib/weather/service.rb @@ -12,7 +12,7 @@ begin begin require 'xml/libxml' rescue LoadError - require 'rubygems' + require 'rubygems' if DEVELOPER_MODE require 'xml/libxml' end $USE_LIBXML = true
  • Aug 21, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   And now check the difference to the Canada XML at <cc> tag. http://xoap.weather.com/weather/local/CAXX0504?cc=*&dayf=5&par=1102805640&key=e3b347cf71fbaa7f
  • Aug 21, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   There is no "tmp" tag for "Viseu, Portugal". http://xoap.weather.com/weather/local/POXX0080?cc=*&dayf=5&par=1102805640&key=e3b347cf71fbaa7f
  • Aug 21, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   $ ruby profiler.rb Loading forecast... 0.008807 seconds! Examining forecast... ./../lib/weather/forecast.rb:191:in `clean_temp': undefined method `text' for nil:NilClass (NoMethodError) from ./../lib/weather/forecast.rb:245:in `temp' from profiler.rb:30
    $ ruby profiler.rb Loading forecast... 0.008807 seconds! Examining forecast... ./../lib/weather/forecast.rb:191:in `clean_temp': undefined method `text' for nil:NilClass (NoMethodError) from ./../lib/weather/forecast.rb:245:in `temp' from profiler.rb:30
  • Aug 21, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   $ ruby forecast_test.rb Loaded suite forecast_test Started .EF.F Finished in 0.068122 seconds. 1) Error: test_current_conditions(ForecastTest): NoMethodError: undefined method `text' for nil:NilClass ./../lib/weather/forecast.rb:191:in `clean_temp' ./../lib/weather/forecast.rb:245:in `temp' forecast_test.rb:38:in `test_current_conditions' 2) Failure: test_future_conditions(ForecastTest) [forecast_test.rb:56]: <14> expected but was <21>. 3) Failure: test_latest_update(ForecastTest) [forecast_test.rb:79]: <Fri Jul 14 14:15:00 +0100 2006> expected but was <Fri Aug 21 14:30:00 +0100 2009>. 5 tests, 11 assertions, 2 failures, 1 errors
    $ ruby forecast_test.rb Loaded suite forecast_test Started .EF.F Finished in 0.068122 seconds. 1) Error: test_current_conditions(ForecastTest): NoMethodError: undefined method `text' for nil:NilClass ./../lib/weather/forecast.rb:191:in `clean_temp' ./../lib/weather/forecast.rb:245:in `temp' forecast_test.rb:38:in `test_current_conditions' 2) Failure: test_future_conditions(ForecastTest) [forecast_test.rb:56]: <14> expected but was <21>. 3) Failure: test_latest_update(ForecastTest) [forecast_test.rb:79]: <Fri Jul 14 14:15:00 +0100 2006> expected but was <Fri Aug 21 14:30:00 +0100 2009>. 5 tests, 11 assertions, 2 failures, 1 errors
  • Aug 21, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   I've done some tests and it shows an error. I'm attaching the test directory with modifications for "Viseu, Portugal".
    I've done some tests and it shows an error. I'm attaching the test directory with modifications for "Viseu, Portugal".
  • Aug 21, 2009
    issue 5 (Deprecated functions in examples_test.rb) commented on by gothicx   -   diff --git a/lib/weather/service.rb b/lib/weather/service.rb index 967464c..392b52e 100644 --- a/lib/weather/service.rb +++ b/lib/weather/service.rb @@ -86,7 +86,7 @@ module Weather cache.set("#{location_id}:#{days}", doc.to_s, cache_expiry) end end - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) Forecast::Forecast.new(doc) end @@ -105,7 +105,7 @@ module Weather url = "/weather/search/search?where=#{CGI.escape(search_string)}" xml = Net::HTTP.get(XOAP_HOST, url); - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) locations = {}
    diff --git a/lib/weather/service.rb b/lib/weather/service.rb index 967464c..392b52e 100644 --- a/lib/weather/service.rb +++ b/lib/weather/service.rb @@ -86,7 +86,7 @@ module Weather cache.set("#{location_id}:#{days}", doc.to_s, cache_expiry) end end - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) Forecast::Forecast.new(doc) end @@ -105,7 +105,7 @@ module Weather url = "/weather/search/search?where=#{CGI.escape(search_string)}" xml = Net::HTTP.get(XOAP_HOST, url); - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) locations = {}
  • Aug 21, 2009
    issue 5 (Deprecated functions in examples_test.rb) commented on by gothicx   -   diff --git a/lib/weather/service.rb b/lib/weather/service.rb index 967464c..392b52e 100644 --- a/lib/weather/service.rb +++ b/lib/weather/service.rb @@ -64,7 +64,7 @@ module Weather # default to metric (degrees fahrenheit are just silly :) unit = imperial ? "s" : "m" - url = "/weather/local/#{location_id}?link=xoap&prod=xoap&cc=*&dayf=#{days}&par=#{partner_id}&key=#{license_key}&unit=#{unit}" + url = "/weather/local/#{location_id}?cc=*&dayf=#{days}&par=#{partner_id}&key=#{license_key}&unit=#{unit}" #puts "Using url: "+url @@ -86,7 +86,7 @@ module Weather cache.set("#{location_id}:#{days}", doc.to_s, cache_expiry) end end - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) Forecast::Forecast.new(doc) end @@ -105,7 +105,7 @@ module Weather url = "/weather/search/search?where=#{CGI.escape(search_string)}" xml = Net::HTTP.get(XOAP_HOST, url); - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) locations = {}
    diff --git a/lib/weather/service.rb b/lib/weather/service.rb index 967464c..392b52e 100644 --- a/lib/weather/service.rb +++ b/lib/weather/service.rb @@ -64,7 +64,7 @@ module Weather # default to metric (degrees fahrenheit are just silly :) unit = imperial ? "s" : "m" - url = "/weather/local/#{location_id}?link=xoap&prod=xoap&cc=*&dayf=#{days}&par=#{partner_id}&key=#{license_key}&unit=#{unit}" + url = "/weather/local/#{location_id}?cc=*&dayf=#{days}&par=#{partner_id}&key=#{license_key}&unit=#{unit}" #puts "Using url: "+url @@ -86,7 +86,7 @@ module Weather cache.set("#{location_id}:#{days}", doc.to_s, cache_expiry) end end - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) Forecast::Forecast.new(doc) end @@ -105,7 +105,7 @@ module Weather url = "/weather/search/search?where=#{CGI.escape(search_string)}" xml = Net::HTTP.get(XOAP_HOST, url); - doc = $USE_LIBXML ? (p = XML::Parser.new; p.string = xml; p.parse) : REXML::Document.new(xml) + doc = $USE_LIBXML ? (p = XML::Parser.string(xml); p.parse) : REXML::Document.new(xml) locations = {}
  • Apr 23, 2009
    r50 (NetBeans project files) committed by matt.zukowski   -   NetBeans project files
    NetBeans project files
  • Apr 23, 2009
    SourceCode (Info on how to access RubyWeather's source code repository.) Wiki page edited by matt.zukowski
  • Apr 23, 2009
    SourceCode (Info on how to access RubyWeather's source code repository.) Wiki page added by matt.zukowski
  • Apr 23, 2009
    r47 (added band-aid fix to allow latest_update to work with Ruby...) committed by matt.zukowski   -   added band-aid fix to allow latest_update to work with Ruby 1.9
    added band-aid fix to allow latest_update to work with Ruby 1.9
  • Mar 17, 2009
    issue 5 (Deprecated functions in examples_test.rb) changed by matt.zukowski   -  
    Status: Accepted
    Owner: matt.zukowski
    Status: Accepted
    Owner: matt.zukowski
  • Mar 17, 2009
    issue 5 (Deprecated functions in examples_test.rb) commented on by gothicx   -   The same for service_test.rb $ ruby service_test.rb Loaded suite service_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer E./../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ../../lib/weather/service.rb:108: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ./../lib/weather/service.rb:108: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ../../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ./../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ./../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead .. Finished in 2.502364 seconds. 1) Error: test_caching(ServiceTest): RuntimeError: Memcache server must be up and running at localhost:11211 for this test to run. service_test.rb:72:in `test_caching' 5 tests, 10 assertions, 0 failures, 1 errors
    The same for service_test.rb $ ruby service_test.rb Loaded suite service_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer E./../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ../../lib/weather/service.rb:108: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ./../lib/weather/service.rb:108: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ../../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ./../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ./../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead .. Finished in 2.502364 seconds. 1) Error: test_caching(ServiceTest): RuntimeError: Memcache server must be up and running at localhost:11211 for this test to run. service_test.rb:72:in `test_caching' 5 tests, 10 assertions, 0 failures, 1 errors
  • Mar 17, 2009
    issue 5 (Deprecated functions in examples_test.rb) reported by gothicx   -   As you can see, there is some deprecated functions. Please fix them in a new version of rubyweather. $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] $ ruby examples_test.rb Loaded suite examples_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer ../../lib/weather/service.rb:108: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ../../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead . Finished in 5.94347 seconds. 3 tests, 3 assertions, 0 failures, 0 errors
    As you can see, there is some deprecated functions. Please fix them in a new version of rubyweather. $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] $ ruby examples_test.rb Loaded suite examples_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer ../../lib/weather/service.rb:108: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead ../../lib/weather/service.rb:89: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead. XML::Parser#string is deprecated. Use XML::Parser.string instead . Finished in 5.94347 seconds. 3 tests, 3 assertions, 0 failures, 0 errors
  • Mar 09, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) Status changed by matt.zukowski   -   Good to hear... I'll have to double-check to see if there's a problem with the library when it uses REXML.
    Status: Accepted
    Good to hear... I'll have to double-check to see if there's a problem with the library when it uses REXML.
    Status: Accepted
  • Mar 09, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] I looked in your code for the line of this error and think about not installed libxml. $ sudo apt-get install libxml-ruby And it's now fixed :-) Thanks
    $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] I looked in your code for the line of this error and think about not installed libxml. $ sudo apt-get install libxml-ruby And it's now fixed :-) Thanks
  • Mar 09, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by matt.zukowski   -   P.S. Try installing libxml-ruby (`gem install libxml-ruby`). This may get around your REXML problems, and anyway RubyWeather is a lot faster with libxml.
    P.S. Try installing libxml-ruby (`gem install libxml-ruby`). This may get around your REXML problems, and anyway RubyWeather is a lot faster with libxml.
  • Mar 09, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by matt.zukowski   -   Yeah sorry... I ran your code and got 15 for the temperature and 30 for the icon without any errors. What version of ruby are you running? Can you run `ruby -v`? I've got: ruby 1.8.6 (2007-06-07 patchlevel 36) [i586-linux]
    Yeah sorry... I ran your code and got 15 for the temperature and 30 for the icon without any errors. What version of ruby are you running? Can you run `ruby -v`? I've got: ruby 1.8.6 (2007-06-07 patchlevel 36) [i586-linux]
  • Mar 09, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   Yes.. I've memcache-client installed, but not configured. I removed the cache features from my code and it has the same error. damn...
    Yes.. I've memcache-client installed, but not configured. I removed the cache features from my code and it has the same error. damn...
  • Mar 09, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) Status changed by matt.zukowski   -   You have caching enabled but it looks like your caching server (memcached) is not actually running? Maybe that's the problem? I ran your code on my end and it works fine here... Which MemCache library/gem do you have installed by the way? the rc-tools memcache-client or Ruby-MemCache?
    Status: CantReproduce
    You have caching enabled but it looks like your caching server (memcached) is not actually running? Maybe that's the problem? I ran your code on my end and it works fine here... Which MemCache library/gem do you have installed by the way? the rc-tools memcache-client or Ruby-MemCache?
    Status: CantReproduce
  • Mar 06, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   $ ruby forecast_test.rb Loaded suite forecast_test Started ..... Finished in 1.292036 seconds. 5 tests, 33 assertions, 0 failures, 0 errors --- $ ruby service_test.rb WARNING: You should set the WEATHER_COM_PARTNER_ID env variable (i.e. export WEATHER_COM_PARTNER_ID=<your weather.com partner id>) before running this test. WARNING: You should set the WEATHER_COM_LICENSE_KEY env variable (i.e. export WEATHER_COM_LICENSE_KEY=<your weather.com license key>) before running this test. Loaded suite service_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer E.... Finished in 34.913634 seconds. 1) Error: test_caching(ServiceTest): RuntimeError: Memcache server must be up and running at localhost:11211 for this test to run. service_test.rb:72:in `test_caching' 5 tests, 10 assertions, 0 failures, 1 errors --- $ ruby examples_test.rb WARNING: You should set the WEATHER_COM_PARTNER_ID env variable (i.e. export WEATHER_COM_PARTNER_ID=<your weather.com partner id>) before running this test. WARNING: You should set the WEATHER_COM_LICENSE_KEY env variable (i.e. export WEATHER_COM_LICENSE_KEY=<your weather.com license key>) before running this test. Loaded suite examples_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer ... Finished in 5.825805 seconds. 3 tests, 3 assertions, 0 failures, 0 errors
    $ ruby forecast_test.rb Loaded suite forecast_test Started ..... Finished in 1.292036 seconds. 5 tests, 33 assertions, 0 failures, 0 errors --- $ ruby service_test.rb WARNING: You should set the WEATHER_COM_PARTNER_ID env variable (i.e. export WEATHER_COM_PARTNER_ID=<your weather.com partner id>) before running this test. WARNING: You should set the WEATHER_COM_LICENSE_KEY env variable (i.e. export WEATHER_COM_LICENSE_KEY=<your weather.com license key>) before running this test. Loaded suite service_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer E.... Finished in 34.913634 seconds. 1) Error: test_caching(ServiceTest): RuntimeError: Memcache server must be up and running at localhost:11211 for this test to run. service_test.rb:72:in `test_caching' 5 tests, 10 assertions, 0 failures, 1 errors --- $ ruby examples_test.rb WARNING: You should set the WEATHER_COM_PARTNER_ID env variable (i.e. export WEATHER_COM_PARTNER_ID=<your weather.com partner id>) before running this test. WARNING: You should set the WEATHER_COM_LICENSE_KEY env variable (i.e. export WEATHER_COM_LICENSE_KEY=<your weather.com license key>) before running this test. Loaded suite examples_test Started [memcache-client] Could not load SystemTimer gem, falling back to Ruby's slower/unsafe timeout library: no such file to load -- system_timer ... Finished in 5.825805 seconds. 3 tests, 3 assertions, 0 failures, 0 errors
  • Mar 06, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   The code: # Weather require 'weather/service' service = Weather::Service.new service.enable_cache service.cache_expiry = 1200 service.cache.servers = ['127.0.0.1:11211'] service.partner_id = "my_id_here" service.license_key = "my_key_here" forecast = service.fetch_forecast("POXX0080") $w_temp = forecast.current.temperature.nil? ? "N/D" : forecast.current.temperature $w_img = forecast.current.icon
    The code: # Weather require 'weather/service' service = Weather::Service.new service.enable_cache service.cache_expiry = 1200 service.cache.servers = ['127.0.0.1:11211'] service.partner_id = "my_id_here" service.license_key = "my_key_here" forecast = service.fetch_forecast("POXX0080") $w_temp = forecast.current.temperature.nil? ? "N/D" : forecast.current.temperature $w_img = forecast.current.icon
  • Mar 05, 2009
    issue 3 (Fetching a forecast with an invalid code returns a valid For...) Labels changed by matt.zukowski   -  
    Labels: Priority-High Priority-Medium
    Labels: Priority-High Priority-Medium
  • Mar 05, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) Status changed by matt.zukowski   -   Can you post some more details on how to reproduce this? The code where you're calling RubyWeather methods would help. Also, can you go into rubyweather's test directory (i.e. there should be a 'test' subdirectory in the directory where rubyweather is installed), and run the following tests: ruby forecast_test.rb ruby service_test.rb ruby examples_test.rb Let me know if those run fine or if you end up with failures.
    Status: Accepted
    Can you post some more details on how to reproduce this? The code where you're calling RubyWeather methods would help. Also, can you go into rubyweather's test directory (i.e. there should be a 'test' subdirectory in the directory where rubyweather is installed), and run the following tests: ruby forecast_test.rb ruby service_test.rb ruby examples_test.rb Let me know if those run fine or if you end up with failures.
    Status: Accepted
  • Mar 05, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   I'm using Rails v2.2.2
    I'm using Rails v2.2.2
  • Mar 01, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) commented on by gothicx   -   Application Trace: vendor/plugins/rubyweather-1.2.1/lib/weather/forecast.rb:227:in `initialize' vendor/plugins/rubyweather-1.2.1/lib/weather/forecast.rb:52:in `new' vendor/plugins/rubyweather-1.2.1/lib/weather/forecast.rb:52:in `current'
    Application Trace: vendor/plugins/rubyweather-1.2.1/lib/weather/forecast.rb:227:in `initialize' vendor/plugins/rubyweather-1.2.1/lib/weather/forecast.rb:52:in `new' vendor/plugins/rubyweather-1.2.1/lib/weather/forecast.rb:52:in `current'
  • Mar 01, 2009
    issue 4 (The xml element given to the Day/Night constructor must be a...) reported by gothicx   -   What steps will reproduce the problem? 1. I'm just using current.temperature and current.icon What is the expected output? What do you see instead? It works. " The xml element given to the Day/Night constructor must be a valid REXML::Element or XML::Node " What version of the product are you using? On what operating system? 1.2.1 Please provide any additional information below. Worked first time and after some time I got that error.
    What steps will reproduce the problem? 1. I'm just using current.temperature and current.icon What is the expected output? What do you see instead? It works. " The xml element given to the Day/Night constructor must be a valid REXML::Element or XML::Node " What version of the product are you using? On what operating system? 1.2.1 Please provide any additional information below. Worked first time and after some time I got that error.

Older

  • Aug 21, 2008
    issue 3 (Fetching a forecast with an invalid code returns a valid For...) changed by matt.zukowski   -   Thanks for spotting this. I'll take a look at fixing it ASAP.
    Status: Accepted
    Owner: matt.zukowski
    Thanks for spotting this. I'll take a look at fixing it ASAP.
    Status: Accepted
    Owner: matt.zukowski
  • Aug 07, 2008
    issue 3 (Fetching a forecast with an invalid code returns a valid For...) reported by rbysamppi   -   What steps will reproduce the problem? 1. Call fetch_forecast on a Weather::Service object with a made-up, invalid location code 2. Call any forecast method on the returned Forecast object, e.g. #location_name, #current What is the expected output? What do you see instead? I expected a runtime error to be raised when fetch_forecast was called explaining that there is no location with the given code. Instead, an apparently valid Weather::Forecast::Forecast object is returned. There is no way to tell that the Forecast object is invalid except calling methods such as #location_name and #current on the object--they raise cryptic XML errors. What version of the product are you using? On what operating system? I am using RubyWeather 1.2.1 with Ruby 1.8.6 on Mac OS X Leopard 10.5.4. Please provide any additional information below. I really am thankful for this library and the time put into it, but this behavior caught me off guard. It would be much more elegant if it were possible to catch invalid location codes when they are submitted, rather than after the fact.
    What steps will reproduce the problem? 1. Call fetch_forecast on a Weather::Service object with a made-up, invalid location code 2. Call any forecast method on the returned Forecast object, e.g. #location_name, #current What is the expected output? What do you see instead? I expected a runtime error to be raised when fetch_forecast was called explaining that there is no location with the given code. Instead, an apparently valid Weather::Forecast::Forecast object is returned. There is no way to tell that the Forecast object is invalid except calling methods such as #location_name and #current on the object--they raise cryptic XML errors. What version of the product are you using? On what operating system? I am using RubyWeather 1.2.1 with Ruby 1.8.6 on Mac OS X Leopard 10.5.4. Please provide any additional information below. I really am thankful for this library and the time put into it, but this behavior caught me off guard. It would be much more elegant if it were possible to catch invalid location codes when they are submitted, rather than after the fact.
 
Hosted by Google Code