comufy 0.0.3pre2 → 0.0.3pre3

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.
Files changed (3) hide show
  1. data/lib/comufy/version.rb +1 -1
  2. data/lib/comufy.rb +10 -10
  3. metadata +2 -2
@@ -1,3 +1,3 @@
1
1
  class Comufy
2
- VERSION = "0.0.3pre2"
2
+ VERSION = "0.0.3pre3"
3
3
  end
data/lib/comufy.rb CHANGED
@@ -89,13 +89,13 @@ class Comufy
89
89
  # Comufy.store_users(YOUR_APPLICATION_NAME, USER_FACEBOOK_ID, { 'dob' => '1978-10-01 19:50:48' })
90
90
  def store_user app_name, uid, tags
91
91
  return false unless get_access_token
92
- if app_name.nil? or app_name.empty?
92
+ if app_name.nil? or not app_name.is_a? String or app_name.empty?
93
93
  @logger.warn(progname = 'Comufy.store_user') {
94
94
  'First parameter must be set to your application name.'
95
95
  }
96
96
  return false
97
97
  end
98
- if uid.nil? or uid.empty?
98
+ if uid.nil? or not uid.is_a? String or uid.empty?
99
99
  @logger.warn(progname = 'Comufy.store_user') {
100
100
  'Second parameter must be a valid Facebook user ID.'
101
101
  }
@@ -205,7 +205,7 @@ class Comufy
205
205
  # )
206
206
  def store_users app_name, uid_tags
207
207
  return false unless get_access_token
208
- if app_name.nil? or app_name.empty?
208
+ if app_name.nil? or not app_name.is_a? String or app_name.empty?
209
209
  @logger.warn(progname = 'Comufy.store_users') {
210
210
  'First parameter must be set to your application name.'
211
211
  }
@@ -308,7 +308,7 @@ class Comufy
308
308
  # )
309
309
  def register_tags app_name, tags
310
310
  return false unless get_access_token
311
- if app_name.nil? or app_name.empty?
311
+ if app_name.nil? or not app_name.is_a? String or app_name.empty?
312
312
  @logger.warn(progname = 'Comufy.register_tags') {
313
313
  'First parameter must be set to your application name.'
314
314
  }
@@ -409,13 +409,13 @@ class Comufy
409
409
  # Comufy.unregister_tag(YOUR_APPLICATION_NAME, 'dob')
410
410
  def unregister_tag app_name, tag
411
411
  return false unless get_access_token
412
- if app_name.nil? or app_name.empty?
412
+ if app_name.nil? or not app_name.is_a? String or app_name.empty?
413
413
  @logger.warn(progname = 'Comufy.unregister_tag') {
414
414
  'First parameter must be set to your application name.'
415
415
  }
416
416
  return false
417
417
  end
418
- if tag.nil? or tag.empty?
418
+ if tag.nil? or not tag.is_a? String or tag.empty?
419
419
  @logger.warn(progname = 'Comufy.unregister_tag') {
420
420
  'Second parameter must be set to the tag.'
421
421
  }
@@ -512,25 +512,25 @@ class Comufy
512
512
  # )
513
513
  def send_facebook_message app_name, description, content, uids, opts = {}
514
514
  return false unless get_access_token
515
- if app_name.nil? or app_name.empty? or not content.is_a?(String)
515
+ if app_name.nil? or not app_name.is_a?(String) or app_name.empty?
516
516
  @logger.warn(progname = 'Comufy.send_facebook_message') {
517
517
  'First parameter must be set to your application name, as a String.'
518
518
  }
519
519
  return false
520
520
  end
521
- if description.nil? or description.empty? or not content.is_a?(String)
521
+ if description.nil? or not description.is_a?(String) or description.empty?
522
522
  @logger.warn(progname = 'Comufy.send_facebook_message') {
523
523
  'Second parameter must be set to your facebook description, as a String.'
524
524
  }
525
525
  return false
526
526
  end
527
- if content.nil? or content.empty? or not content.is_a?(String)
527
+ if content.nil? or not content.is_a?(String) or content.empty?
528
528
  @logger.warn(progname = 'Comufy.send_facebook_message') {
529
529
  'Third parameter must be sent to your facebook content, as a String.'
530
530
  }
531
531
  return false
532
532
  end
533
- if uids.nil? or uids.empty? or not uids.is_a?(Array)
533
+ if uids.nil? or not uids.is_a?(Array) or uids.empty?
534
534
  @logger.warn(progname = 'Comufy.send_facebook_message') {
535
535
  'Fourth parameter must be sent to your facebook uids, as an Array of Strings.'
536
536
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comufy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3pre2
4
+ version: 0.0.3pre3
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-18 00:00:00.000000000 Z
12
+ date: 2012-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec