twitterfeed 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -13,7 +13,7 @@ Add this line to your application's Gemfile:
13
13
 
14
14
  Place helper line anywhere in your project with an array of twitter handles:
15
15
 
16
- <%= twitterfeed(["mark_cap", "wycats", "ruralocity"]) %>
16
+ <%= twitterfeed(["mark_cap", "wycats", "ruralocity"]) %>
17
17
 
18
18
  Enjoy!
19
19
 
@@ -1,3 +1,3 @@
1
1
  module Twitterfeed
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -4,13 +4,13 @@ module Twitterfeed
4
4
  module ViewHelpers
5
5
  def twitterfeed(name_array)
6
6
 
7
- twitterfeed_data = YAML.load(File.open("twitterfeed.yml"))
7
+ twitterfeed_data = YAML.load(File.open("twitterfeed.yml", 'w+'))
8
8
 
9
9
  #initializing cron type system. This will determine how often data is retrieved from twitter to not go over
10
10
  #Twitter API's 150 request per hour limit. The frequency is determined from how many twitter handles are being
11
11
  #retrieved. 1 handle will be retrieved maximum of 150 times per hour etc.
12
12
 
13
- if twitterfeed_data.first["last_update"] < (Time.now - (60.0 * (60.0/(150.0/name_array.size))))
13
+ if !twitterfeed_data || twitterfeed_data.first["last_update"] < (Time.now - (60.0 * (60.0/(150.0/name_array.size))))
14
14
  Twitterfeed.update_twitterfeed(twitterfeed_data, name_array)
15
15
  end
16
16
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitterfeed
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mark Capodagli