sharkapps 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -3,7 +3,7 @@ class Subscription < ActiveResource::Base
3
3
 
4
4
 
5
5
  def self.check_account_authorized(account_id)
6
- sub = Subscription.find(:first, :params => {:fb_page_id => account_id, :shark_application_id => SharkApps.app_id})
6
+ sub = Subscription.find(:first, :params => {:id => account_id, :shark_application_id => SharkApps.app_id})
7
7
  #sub.nil? ? false : sub.active
8
8
  return true #hack - remove
9
9
  end
@@ -10,4 +10,5 @@ module SharkApps::ViewHelpers
10
10
  super(name, options, html_options)
11
11
  end
12
12
  end
13
+
13
14
  end
data/lib/sharkapps.rb CHANGED
@@ -79,6 +79,16 @@ module SharkApps
79
79
  temp = fb_load_facebook_params
80
80
  page_id = temp["page"]["id"]
81
81
  @account = Account.find_or_create_by_fbid(page_id)
82
+ @isliked = temp["page"]["liked"]
83
+ end
84
+
85
+ def is_admin
86
+ if fb_load_facebook_params['page']
87
+ fb_load_facebook_params['page']['admin']
88
+ else
89
+ #go by the facebook user ID and make an API call. might need to store it in the session
90
+ true
91
+ end
82
92
  end
83
93
 
84
94
  end
data/sharkapps.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sharkapps}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Eyal Kedem"]
12
- s.date = %q{2011-03-01}
12
+ s.date = %q{2011-04-03}
13
13
  s.description = %q{integration utilities with the shark apps framework}
14
14
  s.email = %q{ekedem@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sharkapps
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eyal Kedem
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-01 00:00:00 +02:00
18
+ date: 2011-04-03 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency