twitterfeed 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -11,6 +11,16 @@ Add this line to your application's Gemfile:
11
11
 
12
12
  ## Usage
13
13
 
14
+ ### Rails 3.1 w/ asset pipeline
15
+
16
+ Just install and go!
17
+
18
+ ### Rails pre-3.1 or no asset piplie
19
+
20
+ rails generate twitterfeed
21
+
22
+ ### In your view
23
+
14
24
  Place helper line anywhere in your project with an array of twitter handles or hashtags:
15
25
 
16
26
  <%= twitterfeed(["mark_cap", "wycats", "ruralocity", "#ruby", "#rails"]) %>
@@ -23,4 +33,3 @@ Twitter API only allows 150 requests per hour, so to help with this, the frequen
23
33
 
24
34
  - Add authentication to boost limit up to 350
25
35
  - Read a file with twitter handles to initialize
26
- - Ability to include searches
@@ -8,8 +8,7 @@
8
8
  }
9
9
 
10
10
  #twitterfeed_header {
11
- font-size: 11px;
12
- font-weight: bold;
11
+ margin-bottom: 5px;
13
12
  }
14
13
 
15
14
  #twitterfeed_content {
@@ -3,7 +3,7 @@
3
3
  #twitterfeed
4
4
 
5
5
  #twitterfeed_header
6
- TwitterFeed
6
+ = link_to image_tag('/assets/twitterfeed-logo.gif'), "https://github.com/markcap/twitterfeed", :target => '_blank'
7
7
  #twitterfeed_content
8
8
  - tweet_array.each do |tweet|
9
9
  #twitterfeed_tweet{:class => cycle('even','odd')}
@@ -1,3 +1,3 @@
1
1
  module Twitterfeed
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -38,7 +38,7 @@ module Twitterfeed
38
38
  def linkify_tweet(tweet)
39
39
  @ats = tweet.scan(/@\w+/)
40
40
  @tags = tweet.scan(/#\S+/)
41
- @links = tweet.scan(/http:\/\/\S+/)
41
+ @links = tweet.scan(/https?:\/\/\S+/)
42
42
 
43
43
  @ats.each do |a|
44
44
  tweet.gsub!(/#{a}/, "<a href='http://twitter.com/#{a[1..(a.length - 1)]}' target='_blank'>#{a}</a>")
@@ -49,6 +49,7 @@ module Twitterfeed
49
49
  end
50
50
 
51
51
  @links.each do |l|
52
+ l.delete! "\""
52
53
  tweet.gsub!(/#{l}/, "<a href='#{l}' target='_blank'>#{l}</a>")
53
54
  end
54
55
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: twitterfeed
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mark Capodagli
@@ -38,6 +38,7 @@ files:
38
38
  - LICENSE
39
39
  - README.md
40
40
  - Rakefile
41
+ - app/assets/images/twitterfeed-logo.gif
41
42
  - app/assets/stylesheets/twitterfeed.css
42
43
  - app/views/twitterfeed/_twitterfeed_box.html.haml
43
44
  - lib/generators/twitterfeed_generator.rb