plataforma_social 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,16 +22,16 @@ module PlataformaSocial
22
22
  :code => params[:code] || nil
23
23
  }
24
24
 
25
- p default_params
26
-
27
25
  %Q{
28
26
  <script type="text/javascript" charset="utf-8">
29
27
  $(function(){
30
28
  $('body').bind('ajaxSend', function(elm, xhr, s){
29
+ var method = s.type;
31
30
  var defaultParams = #{default_params.to_json};
32
31
  var params = {};
32
+ var query = '';
33
33
 
34
- var data = s.type == "POST" ? s.data : s.url.split('?')[1];
34
+ var data = method == "POST" ? s.data : s.url.split('?')[1];
35
35
 
36
36
  if(data){
37
37
  var splittedData = data.split('&');
@@ -45,9 +45,18 @@ module PlataformaSocial
45
45
  for(var i in defaultParams){
46
46
  if(!params[i]) params[i] = defaultParams[i];
47
47
  }
48
-
49
- s.data = $.param(params);
50
- })
48
+
49
+ for(var i in params){
50
+ query += decodeURIComponent(i) + '=' + decodeURIComponent(params[i]) + '&'
51
+ }
52
+
53
+ if(method == "POST"){
54
+ s.data = query;
55
+ }
56
+ else {
57
+ s.url = s.url.split('?')[0] + '?' + query;
58
+ }
59
+ });
51
60
  });
52
61
  </script>
53
62
  }.html_safe
@@ -1,3 +1,3 @@
1
1
  module PlataformaSocial
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,87 +1,94 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: plataforma_social
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.5
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 6
10
+ version: 0.0.6
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Marcos Nogueira
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-02-04 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-02-05 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: capistrano
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
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:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: 0.1.4
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
38
32
  type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: rsa
39
36
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
37
+ requirement: &id002 !ruby/object:Gem::Requirement
41
38
  none: false
42
- requirements:
39
+ requirements:
43
40
  - - ~>
44
- - !ruby/object:Gem::Version
41
+ - !ruby/object:Gem::Version
42
+ hash: 19
43
+ segments:
44
+ - 0
45
+ - 1
46
+ - 4
45
47
  version: 0.1.4
46
- - !ruby/object:Gem::Dependency
47
- name: koala
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 1.6.0
54
48
  type: :runtime
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: koala
55
52
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
53
+ requirement: &id003 !ruby/object:Gem::Requirement
57
54
  none: false
58
- requirements:
55
+ requirements:
59
56
  - - ~>
60
- - !ruby/object:Gem::Version
57
+ - !ruby/object:Gem::Version
58
+ hash: 15
59
+ segments:
60
+ - 1
61
+ - 6
62
+ - 0
61
63
  version: 1.6.0
62
- - !ruby/object:Gem::Dependency
63
- name: httparty
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: 0.10.0
70
64
  type: :runtime
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: httparty
71
68
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
69
+ requirement: &id004 !ruby/object:Gem::Requirement
73
70
  none: false
74
- requirements:
71
+ requirements:
75
72
  - - ~>
76
- - !ruby/object:Gem::Version
73
+ - !ruby/object:Gem::Version
74
+ hash: 55
75
+ segments:
76
+ - 0
77
+ - 10
78
+ - 0
77
79
  version: 0.10.0
80
+ type: :runtime
81
+ version_requirements: *id004
78
82
  description: Plataforma Social's integration gem
79
- email:
83
+ email:
80
84
  - marcos.nogueira@dito.com.br
81
85
  executables: []
86
+
82
87
  extensions: []
88
+
83
89
  extra_rdoc_files: []
84
- files:
90
+
91
+ files:
85
92
  - .gitignore
86
93
  - Capfile
87
94
  - Gemfile
@@ -99,26 +106,36 @@ files:
99
106
  - plataforma_social.gemspec
100
107
  homepage: http://www.dito.com.br/
101
108
  licenses: []
109
+
102
110
  post_install_message:
103
111
  rdoc_options: []
104
- require_paths:
112
+
113
+ require_paths:
105
114
  - lib
106
- required_ruby_version: !ruby/object:Gem::Requirement
115
+ required_ruby_version: !ruby/object:Gem::Requirement
107
116
  none: false
108
- requirements:
109
- - - ! '>='
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
125
  none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ hash: 3
130
+ segments:
131
+ - 0
132
+ version: "0"
118
133
  requirements: []
134
+
119
135
  rubyforge_project:
120
- rubygems_version: 1.8.24
136
+ rubygems_version: 1.8.10
121
137
  signing_key:
122
138
  specification_version: 3
123
139
  summary: Plataforma Social's integration gem
124
140
  test_files: []
141
+