Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use tempfiles for storing feed.

  • Loading branch information...
commit 79b6664dbda003a0aca6be1cfd7e182af989dbab 1 parent b03383c
@maxim authored
Showing with 3 additions and 1 deletion.
  1. +1 −0  lib/sogger.rb
  2. +1 −1  lib/sogger/sogger.rb
  3. +1 −0  sogger.gemspec
View
1  lib/sogger.rb
@@ -1,3 +1,4 @@
+require 'tempfile'
require 'open-uri'
require 'nokogiri'
require 'meow'
View
2  lib/sogger/sogger.rb
@@ -4,7 +4,7 @@ class << self; attr_accessor :save_path end
attr_reader :raw_data
SO_FEED_URL = "http://stackoverflow.com/feeds"
- DEFAULT_SAVE_PATH = "tmp/feed.xml"
+ DEFAULT_SAVE_PATH = ::Tempfile.new("sogger_feed.xml").path
self.save_path = DEFAULT_SAVE_PATH
def initialize(questions = [])
View
1  sogger.gemspec
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
"lib/sogger/question.rb",
"lib/sogger/runner.rb",
"lib/sogger/sogger.rb",
+ "sogger.gemspec",
"test/fixtures/so_feed_sample.xml",
"test/helper.rb",
"test/test_question.rb",
Please sign in to comment.
Something went wrong with that request. Please try again.