flakey 0.1.3 → 0.1.4

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.
@@ -109,12 +109,20 @@ module Flakey
109
109
  # Generate a link which will open a dialog for following the user with
110
110
  # whe specified user_id or screen_name.
111
111
  def follow_intent_link(text, options = {})
112
- user_id_to_follow = options[:user_id] || ''
113
- screen_name_to_follow = options[:screen_name] || ''
112
+ user_id_to_follow = options[:user_id] || nil
113
+ screen_name_to_follow = options[:screen_name] || nil
114
114
 
115
115
  intent_url = 'https://twitter.com/intent/user?'
116
- intent_url += user_id_to_follow.to_s unless user_id_to_follow == ''
117
- intent_url += screen_name_to_follow.to_s unless screen_name_to_follow == ''
116
+
117
+ if user_id_to_follow
118
+ intent_url += "user_id=#{user_id_to_follow}"
119
+ end
120
+
121
+ intent_url += '&' if user_id_to_follow && screen_name_to_follow
122
+
123
+ if screen_name_to_follow
124
+ intent_url += "screen_name=#{screen_name_to_follow}"
125
+ end
118
126
 
119
127
  link_to text, intent_url, options.except(:user_id, :screen_name)
120
128
  end
@@ -1,3 +1,3 @@
1
1
  module Flakey
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flakey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -101,7 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  segments:
103
103
  - 0
104
- hash: -3395803352666594856
104
+ hash: -1451939396660981137
105
105
  required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  segments:
112
112
  - 0
113
- hash: -3395803352666594856
113
+ hash: -1451939396660981137
114
114
  requirements: []
115
115
  rubyforge_project:
116
116
  rubygems_version: 1.8.25