plataforma_social 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plataforma_social/helpers.rb +13 -9
- data/lib/plataforma_social/version.rb +1 -1
- metadata +67 -83
@@ -80,6 +80,14 @@ module PlataformaSocial
|
|
80
80
|
}
|
81
81
|
end
|
82
82
|
|
83
|
+
def from_facebook?
|
84
|
+
request.referer && request.referer.index('facebook.com')
|
85
|
+
end
|
86
|
+
|
87
|
+
def from_admin?
|
88
|
+
params.present? && params[:controller].present? && params[:controller].index(PlataformaSocial.admin_controller_name) == 0
|
89
|
+
end
|
90
|
+
|
83
91
|
def link_to *args, &block
|
84
92
|
args[2] ||= {}
|
85
93
|
|
@@ -87,23 +95,19 @@ module PlataformaSocial
|
|
87
95
|
super
|
88
96
|
else
|
89
97
|
unless block_given?
|
90
|
-
|
91
|
-
if params[:controller].index(PlataformaSocial.admin_controller_name) == 0 || defined? request
|
92
|
-
super
|
93
|
-
else
|
94
|
-
referer = request.referer
|
95
|
-
facebook_domain = 'apps.facebook.com'
|
96
|
-
|
98
|
+
if from_facebook? && !from_admin?
|
97
99
|
server_domain = request.env['HTTP_HOST']
|
98
|
-
url =
|
100
|
+
url = 'apps.facebook.com/' + PlataformaSocial.facebook_app_namespace
|
99
101
|
|
100
|
-
if args[1].
|
102
|
+
if args[1].include? server_domain
|
101
103
|
args[1].gsub! server_domain, url
|
102
104
|
else
|
103
105
|
args[1] = request.protocol + url + args[1]
|
104
106
|
end
|
105
107
|
|
106
108
|
args[2][:target] = '_top'
|
109
|
+
else
|
110
|
+
super
|
107
111
|
end
|
108
112
|
end
|
109
113
|
|
metadata
CHANGED
@@ -1,94 +1,87 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: plataforma_social
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 10
|
10
|
-
version: 0.0.10
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Marcos Nogueira
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: capistrano
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: rsa
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
25
|
none: false
|
39
|
-
requirements:
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rsa
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
40
35
|
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
hash: 19
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
- 1
|
46
|
-
- 4
|
36
|
+
- !ruby/object:Gem::Version
|
47
37
|
version: 0.1.4
|
48
38
|
type: :runtime
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: koala
|
52
39
|
prerelease: false
|
53
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.1.4
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: koala
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
54
49
|
none: false
|
55
|
-
requirements:
|
50
|
+
requirements:
|
56
51
|
- - ~>
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
hash: 15
|
59
|
-
segments:
|
60
|
-
- 1
|
61
|
-
- 6
|
62
|
-
- 0
|
52
|
+
- !ruby/object:Gem::Version
|
63
53
|
version: 1.6.0
|
64
54
|
type: :runtime
|
65
|
-
version_requirements: *id003
|
66
|
-
- !ruby/object:Gem::Dependency
|
67
|
-
name: httparty
|
68
55
|
prerelease: false
|
69
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.6.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: httparty
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
70
65
|
none: false
|
71
|
-
requirements:
|
66
|
+
requirements:
|
72
67
|
- - ~>
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
hash: 55
|
75
|
-
segments:
|
76
|
-
- 0
|
77
|
-
- 10
|
78
|
-
- 0
|
68
|
+
- !ruby/object:Gem::Version
|
79
69
|
version: 0.10.0
|
80
70
|
type: :runtime
|
81
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 0.10.0
|
82
78
|
description: Plataforma Social's integration gem
|
83
|
-
email:
|
79
|
+
email:
|
84
80
|
- marcos.nogueira@dito.com.br
|
85
81
|
executables: []
|
86
|
-
|
87
82
|
extensions: []
|
88
|
-
|
89
83
|
extra_rdoc_files: []
|
90
|
-
|
91
|
-
files:
|
84
|
+
files:
|
92
85
|
- .gitignore
|
93
86
|
- Capfile
|
94
87
|
- Gemfile
|
@@ -106,36 +99,27 @@ files:
|
|
106
99
|
- plataforma_social.gemspec
|
107
100
|
homepage: http://www.dito.com.br/
|
108
101
|
licenses: []
|
109
|
-
|
110
102
|
post_install_message:
|
111
103
|
rdoc_options: []
|
112
|
-
|
113
|
-
require_paths:
|
104
|
+
require_paths:
|
114
105
|
- lib
|
115
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
107
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
121
|
-
|
122
|
-
- 0
|
123
|
-
version: "0"
|
124
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ! '>='
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
113
|
none: false
|
126
|
-
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
|
130
|
-
segments:
|
131
|
-
- 0
|
132
|
-
version: "0"
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
133
118
|
requirements: []
|
134
|
-
|
135
119
|
rubyforge_project:
|
136
|
-
rubygems_version: 1.8.
|
120
|
+
rubygems_version: 1.8.24
|
137
121
|
signing_key:
|
138
122
|
specification_version: 3
|
139
123
|
summary: Plataforma Social's integration gem
|
140
124
|
test_files: []
|
141
|
-
|
125
|
+
has_rdoc:
|