google-instant-hangouts 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Changelog.md +4 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +89 -0
- data/Rakefile +5 -0
- data/Readme.md +22 -0
- data/app/.DS_Store +0 -0
- data/app/assets/.DS_Store +0 -0
- data/app/assets/javascripts/.DS_Store +0 -0
- data/app/assets/javascripts/google-instant-hangouts.js +287 -0
- data/google-instant-hangouts.gemspec +25 -0
- data/lib/.DS_Store +0 -0
- data/lib/google-instant-hangouts.rb +5 -0
- data/lib/google-instant-hangouts/.DS_Store +0 -0
- data/lib/google-instant-hangouts/helper.rb +17 -0
- data/lib/google-instant-hangouts/rails.rb +7 -0
- data/lib/google-instant-hangouts/version.rb +3 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
M2EyOWY2ZWE1YzkzZjJlYTU2MjQ0ODViNDMzOGU0ZTg4NGRiZTdlMw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OGJkYWJlODAyNTk0MDdlMjQxMWI0OTY4MGQwZTBiNGIyZjk0NmUwNw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
Njg5ZTU0NjA1OTI3MzJlZDY1NjE5ZjMzZTIwZDAyY2VkMDkzYmZjNmU1OWNi
|
10
|
+
NzU4ZTY0OThhNTI0OGVkY2ZlYjFjY2U2MmNjNjliMTI0MDkxMDc1MzBiZDA3
|
11
|
+
YjlhMDc4ODY1MmMyOGNlMGM1YTdkMjJmNTAyYzAyZTc4MDQwOTY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NjlmMjE0YzkwOGZiODJjNTJmMmVhNTAzMDA0YzBjYmFkN2M2MTA4N2VlOTRk
|
14
|
+
Y2VhMDFjYWVmNTllYWI4ODA0MGVmNDc4YzZmYTg5M2QxODdkMGE3M2M4NTE4
|
15
|
+
MjRjZmY4NDg5NWNjYzhlNWQ4ZGIzNmEzNWM4MTAwYzlkNGQ0ZWI=
|
data/Changelog.md
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
google-instant-hangouts (0.0.1)
|
5
|
+
railties (>= 3.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (4.0.2)
|
11
|
+
actionpack (= 4.0.2)
|
12
|
+
mail (~> 2.5.4)
|
13
|
+
actionpack (4.0.2)
|
14
|
+
activesupport (= 4.0.2)
|
15
|
+
builder (~> 3.1.0)
|
16
|
+
erubis (~> 2.7.0)
|
17
|
+
rack (~> 1.5.2)
|
18
|
+
rack-test (~> 0.6.2)
|
19
|
+
activemodel (4.0.2)
|
20
|
+
activesupport (= 4.0.2)
|
21
|
+
builder (~> 3.1.0)
|
22
|
+
activerecord (4.0.2)
|
23
|
+
activemodel (= 4.0.2)
|
24
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
25
|
+
activesupport (= 4.0.2)
|
26
|
+
arel (~> 4.0.0)
|
27
|
+
activerecord-deprecated_finders (1.0.3)
|
28
|
+
activesupport (4.0.2)
|
29
|
+
i18n (~> 0.6, >= 0.6.4)
|
30
|
+
minitest (~> 4.2)
|
31
|
+
multi_json (~> 1.3)
|
32
|
+
thread_safe (~> 0.1)
|
33
|
+
tzinfo (~> 0.3.37)
|
34
|
+
arel (4.0.1)
|
35
|
+
atomic (1.1.14)
|
36
|
+
builder (3.1.4)
|
37
|
+
erubis (2.7.0)
|
38
|
+
hike (1.2.3)
|
39
|
+
i18n (0.6.9)
|
40
|
+
mail (2.5.4)
|
41
|
+
mime-types (~> 1.16)
|
42
|
+
treetop (~> 1.4.8)
|
43
|
+
mime-types (1.25.1)
|
44
|
+
minitest (4.7.5)
|
45
|
+
multi_json (1.8.4)
|
46
|
+
polyglot (0.3.3)
|
47
|
+
rack (1.5.2)
|
48
|
+
rack-test (0.6.2)
|
49
|
+
rack (>= 1.0)
|
50
|
+
rails (4.0.2)
|
51
|
+
actionmailer (= 4.0.2)
|
52
|
+
actionpack (= 4.0.2)
|
53
|
+
activerecord (= 4.0.2)
|
54
|
+
activesupport (= 4.0.2)
|
55
|
+
bundler (>= 1.3.0, < 2.0)
|
56
|
+
railties (= 4.0.2)
|
57
|
+
sprockets-rails (~> 2.0.0)
|
58
|
+
railties (4.0.2)
|
59
|
+
actionpack (= 4.0.2)
|
60
|
+
activesupport (= 4.0.2)
|
61
|
+
rake (>= 0.8.7)
|
62
|
+
thor (>= 0.18.1, < 2.0)
|
63
|
+
rake (10.1.1)
|
64
|
+
sprockets (2.10.1)
|
65
|
+
hike (~> 1.2)
|
66
|
+
multi_json (~> 1.0)
|
67
|
+
rack (~> 1.0)
|
68
|
+
tilt (~> 1.1, != 1.3.0)
|
69
|
+
sprockets-rails (2.0.1)
|
70
|
+
actionpack (>= 3.0)
|
71
|
+
activesupport (>= 3.0)
|
72
|
+
sprockets (~> 2.8)
|
73
|
+
thor (0.18.1)
|
74
|
+
thread_safe (0.1.3)
|
75
|
+
atomic
|
76
|
+
tilt (1.4.1)
|
77
|
+
treetop (1.4.15)
|
78
|
+
polyglot
|
79
|
+
polyglot (>= 0.3.1)
|
80
|
+
tzinfo (0.3.38)
|
81
|
+
|
82
|
+
PLATFORMS
|
83
|
+
ruby
|
84
|
+
|
85
|
+
DEPENDENCIES
|
86
|
+
bundler (~> 1.0)
|
87
|
+
google-instant-hangouts!
|
88
|
+
rails (>= 3.1)
|
89
|
+
rake
|
data/Rakefile
ADDED
data/Readme.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# Google Instant Hangout
|
2
|
+
|
3
|
+
A Ruby wrapper to integrate Google's [Instant Hangout](https://github.com/google/instant-hangouts) - Instant Hangouts lets you easily add Google+ Hangouts to any web page:
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add the gem to the Gemfile:
|
8
|
+
|
9
|
+
gem "google-instant-hangouts"
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
In your JavaScript manifest (e.g. `application.js`):
|
14
|
+
|
15
|
+
//= require google-instant-hangouts
|
16
|
+
|
17
|
+
|
18
|
+
In your `*.html.erb` or `*.html.haml` you can use this helper
|
19
|
+
|
20
|
+
instant_hangout
|
21
|
+
|
22
|
+
**Note:** Work In Progress
|
data/app/.DS_Store
ADDED
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,287 @@
|
|
1
|
+
(function () {
|
2
|
+
|
3
|
+
// Copyright 2014 Google Inc. All Rights Reserved.
|
4
|
+
//
|
5
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
// you may not use this file except in compliance with the License.
|
7
|
+
// You may obtain a copy of the License at
|
8
|
+
//
|
9
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
//
|
11
|
+
// Unless required by applicable law or agreed to in writing, software
|
12
|
+
// distributed under the License is distributed on an "AS-IS" BASIS,
|
13
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
// See the License for the specific language governing permissions and
|
15
|
+
// limitations under the License.
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Instantly create a Google+ Hangout on any web page.
|
19
|
+
*
|
20
|
+
* This is just an easy-to-use adapter for the Google+ Hangout Button. See
|
21
|
+
* https://developers.google.com/+/hangouts/button.
|
22
|
+
*
|
23
|
+
* We handle details like inserting the script in async mode snd consolidating
|
24
|
+
* all arguments onto one HTML element (in the default API they are scattered
|
25
|
+
* across the render HTML element, the script element, a window global, and the
|
26
|
+
* JS API).
|
27
|
+
*
|
28
|
+
* We do not support the full Hangouts Button API. In particular, we do not
|
29
|
+
* support the initial_apps parameter. This means Instant Hangouts cannot be
|
30
|
+
* used as an entry point if you want to run your own application inside a
|
31
|
+
* Hangout.
|
32
|
+
*
|
33
|
+
* We support two modes.
|
34
|
+
*
|
35
|
+
* The first is widget mode. This mode is the default, and is selected when
|
36
|
+
* the value for render is 'hangout'. This mode is not documented in the public
|
37
|
+
* API. It creates a largish widget on the page that gives the user a control
|
38
|
+
* for creating and joining a Hangout. It also provides a counter of the number
|
39
|
+
* of participants currently in the Hangout.
|
40
|
+
*
|
41
|
+
* This mode supports rooms. A room is a distinct (publisher_id, room_id, topic)
|
42
|
+
* 3-tuple. By default we supply the Instant Hangouts publisher_id, set the
|
43
|
+
* room_id based on the host page URL, and the topic to 'Instant Hangout'. This
|
44
|
+
* means that with zero configuration the room will be unique to the page the
|
45
|
+
* user is on, so any user on that page will join the same Hangout. In this
|
46
|
+
* mode, the only supported hangout type is 'normal', meaning a Hangout limited
|
47
|
+
* to 10 concurrent participants. Width of the widget is set by the 'width'
|
48
|
+
* attribute.
|
49
|
+
*
|
50
|
+
* Sample HTML for widget mode:
|
51
|
+
*
|
52
|
+
* <script type='text/javascript' src='instanthangouts.js'></script>
|
53
|
+
* <div class='instanthangouts'></div>
|
54
|
+
*
|
55
|
+
* The second supported mode is button. In this mode there is no room support,
|
56
|
+
* and every user clicking on the control starts a new Hangout. This mode
|
57
|
+
* supports all Hangout types, like Hangouts on Air. Width is set by the
|
58
|
+
* 'widget_size' attribute.
|
59
|
+
*
|
60
|
+
* Sample HTML for button mode:
|
61
|
+
*
|
62
|
+
* <script type='text/javascript' src='instanthangouts.js'></script>
|
63
|
+
* <div class='instanthangouts' render='createhangout'></div>
|
64
|
+
*
|
65
|
+
* Note the render attribute: this is how all variables are passed.
|
66
|
+
*
|
67
|
+
* In both cases, users may specify multiple <div class='instanthangouts'>
|
68
|
+
* elements, and we will render a separate hangout control into each one. These
|
69
|
+
* may be configured separately, except that the 'lang' and 'parsetags' options,
|
70
|
+
* which apply globally, are only honored on the first
|
71
|
+
* <div class='instanthangouts'> found in the page.
|
72
|
+
*/
|
73
|
+
|
74
|
+
// Default type. See choices at
|
75
|
+
// https://developers.google.com/+/hangouts/button#hangout_button_parameters
|
76
|
+
// All modes are supported if render is 'createhangout', but only normal is
|
77
|
+
// supported if render is 'hangout'. This is not enforced by the API and invalid
|
78
|
+
// values are silently ignored.
|
79
|
+
var DEFAULT_HANGOUT_TYPE = 'normal';
|
80
|
+
// Default widget language code.
|
81
|
+
var DEFAULT_LANG = 'en';
|
82
|
+
// Default value for window.___gcfg.parsetags. explicit because we call render
|
83
|
+
// ourselves and want to avoid time wasted by DOM traversal.
|
84
|
+
var DEFAULT_PARSETAGS = 'explicit';
|
85
|
+
// Default publisher_id. We use the id for the Instant Hangouts Plus Page at
|
86
|
+
// https://plus.google.com/b/112744459749475398119. Users may specify their own
|
87
|
+
// id if they like, but this is not practically necessary since room uniqueness
|
88
|
+
// is enforced by having the room_id contain the containing page's URL.
|
89
|
+
var DEFAULT_PUBLISHER_ID = '112744459749475398119';
|
90
|
+
// Default render mode. Requires publisher_id, room_id, and topic. Choices are
|
91
|
+
// 'hangout' for widget that supports rooms and 'createhangout' for plain
|
92
|
+
// button with no room support.
|
93
|
+
var DEFAULT_RENDER = 'hangout';
|
94
|
+
// Default topic, displayed in the Hangout and in the widget (but not button).
|
95
|
+
var DEFAULT_TOPIC = 'Instant Hangout';
|
96
|
+
// Default width in pixels if render is 'createhangout'. Ignored if render is
|
97
|
+
// 'hangout.'
|
98
|
+
var DEFAULT_WIDGET_SIZE = '136';
|
99
|
+
// Default width in pixels if render is 'hangout'.
|
100
|
+
var DEFAULT_WIDTH = '300';
|
101
|
+
// URL of the script that provides gapi.hangout.
|
102
|
+
var GAPI_URL = 'https://apis.google.com/js/plusone.js';
|
103
|
+
// Class of the DOM element that both configures and receives the Hangouts
|
104
|
+
// render.
|
105
|
+
var PARENT_CLASS_NAME = 'instanthangouts';
|
106
|
+
// Valid values for render option to gapi.hangout.render.
|
107
|
+
var RENDER_CHOICES = ['createhangout', 'hangout'];
|
108
|
+
|
109
|
+
function addOnLoadHook(handler) {
|
110
|
+
// Cross-browser shim.
|
111
|
+
if (window.addEventListener) {
|
112
|
+
window.addEventListener('load', handler, false);
|
113
|
+
} else if (window.attachEvent) {
|
114
|
+
window.attachEvent('onload', handler);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
function configureGlobals(attrs) {
|
119
|
+
// When loading gapi asychronously, these two vars must be set through the
|
120
|
+
// global config, not through the script tag. They are documented at
|
121
|
+
// https://developers.google.com/+/hangouts/button#script_tag_parameters.
|
122
|
+
// We set these globals unconditionally, so we will overwrite any values set
|
123
|
+
// by the host page before our script is loaded.
|
124
|
+
window.___gcfg = {
|
125
|
+
// Widget language. Choices:
|
126
|
+
// https://developers.google.com/+/web/api/supported-languages
|
127
|
+
lang: attrs.lang,
|
128
|
+
// Loading mechanism.
|
129
|
+
parsetags: attrs.parsetags
|
130
|
+
};
|
131
|
+
}
|
132
|
+
|
133
|
+
function filter(elements, predicateFn) {
|
134
|
+
// Returns all elements that match a predicateFn that takes a single element
|
135
|
+
// as its argument.
|
136
|
+
var matches = [];
|
137
|
+
|
138
|
+
for (var i = 0; i < elements.length; i++) {
|
139
|
+
var element = elements[i];
|
140
|
+
|
141
|
+
if (predicateFn(element)) {
|
142
|
+
matches.push(element);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
|
146
|
+
return matches;
|
147
|
+
}
|
148
|
+
|
149
|
+
function getGapiScripts() {
|
150
|
+
// The host page may have any number of <script>s that loaded GAPI_URL.
|
151
|
+
return filter(document.getElementsByTagName('script'), function(script) {
|
152
|
+
return script.src == GAPI_URL;
|
153
|
+
});
|
154
|
+
}
|
155
|
+
|
156
|
+
function getLocalAttributes(element) {
|
157
|
+
// Attributes local to one render target.
|
158
|
+
return {
|
159
|
+
hangout_type: element.getAttribute('hangout_type') ||
|
160
|
+
DEFAULT_HANGOUT_TYPE,
|
161
|
+
publisher_id: element.getAttribute('publisher_id') ||
|
162
|
+
DEFAULT_PUBLISHER_ID,
|
163
|
+
render: element.getAttribute('render') || DEFAULT_RENDER,
|
164
|
+
room_id: element.getAttribute('room_id') || getRoomId(),
|
165
|
+
topic: element.getAttribute('topic') || DEFAULT_TOPIC,
|
166
|
+
widget_size: element.getAttribute('widget_size') || DEFAULT_WIDGET_SIZE,
|
167
|
+
width: element.getAttribute('width') || DEFAULT_WIDTH
|
168
|
+
};
|
169
|
+
}
|
170
|
+
|
171
|
+
function getGlobalAttributes(parents) {
|
172
|
+
// Attributes global to all render targets. Read them from the first render
|
173
|
+
// target in the DOM and ignore the others.
|
174
|
+
return {
|
175
|
+
lang: parents[0].getAttribute('lang') || DEFAULT_LANG,
|
176
|
+
parsetags: parents[0].getAttribute('parsetags') || DEFAULT_PARSETAGS
|
177
|
+
};
|
178
|
+
}
|
179
|
+
|
180
|
+
function getRender(value) {
|
181
|
+
var match = false;
|
182
|
+
var render = value || DEFAULT_RENDER;
|
183
|
+
|
184
|
+
// No Array.indexOf in IE8.
|
185
|
+
for (var i = 0; i < RENDER_CHOICES.length; i++) {
|
186
|
+
if (render === RENDER_CHOICES[i]) {
|
187
|
+
match = true;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
if (!match) {
|
192
|
+
log('Invalid render value "' + render + '". Choices are: ' +
|
193
|
+
RENDER_CHOICES.join(' '));
|
194
|
+
}
|
195
|
+
|
196
|
+
return render;
|
197
|
+
}
|
198
|
+
|
199
|
+
function getRenderTargetId(n) {
|
200
|
+
return PARENT_CLASS_NAME + '-target-' + n;
|
201
|
+
}
|
202
|
+
|
203
|
+
function getRoomId() {
|
204
|
+
// Room names must be unique to the page.
|
205
|
+
return 'room_' + (window.location.href || '/');
|
206
|
+
}
|
207
|
+
|
208
|
+
function insertGapiScript(attrs, callback) {
|
209
|
+
// Insert even if already present, to force callback.
|
210
|
+
var gapiScripts = getGapiScripts();
|
211
|
+
|
212
|
+
if (gapiScripts.length >= 1) {
|
213
|
+
log(GAPI_URL +
|
214
|
+
' script already loaded; did you accidentally include it twice?');
|
215
|
+
}
|
216
|
+
|
217
|
+
var script = document.createElement('script');
|
218
|
+
script.async = true;
|
219
|
+
script.onload = callback;
|
220
|
+
script.type = 'text/javascript';
|
221
|
+
script.src = GAPI_URL;
|
222
|
+
var firstScript = document.getElementsByTagName('script')[0];
|
223
|
+
firstScript.parentNode.insertBefore(script, firstScript);
|
224
|
+
}
|
225
|
+
|
226
|
+
function insertRenderTargets(parents) {
|
227
|
+
// Create render target inside each receiving div exactly once.
|
228
|
+
for (var i = 0; i < parents.length; i++) {
|
229
|
+
var parent = parents[i];
|
230
|
+
var renderTargetId = getRenderTargetId(i);
|
231
|
+
|
232
|
+
if (document.getElementById(renderTargetId)) {
|
233
|
+
return;
|
234
|
+
}
|
235
|
+
|
236
|
+
var target = document.createElement('div');
|
237
|
+
target.id = renderTargetId;
|
238
|
+
parent.appendChild(target);
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
function log(message) {
|
243
|
+
// Cross-browser shim.
|
244
|
+
if (console && console.log) {
|
245
|
+
console.log(message);
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
function main() {
|
250
|
+
// Extracted for tests.
|
251
|
+
var parents = document.getElementsByClassName(PARENT_CLASS_NAME);
|
252
|
+
if (parents.length == 0) {
|
253
|
+
log('No div elements of class ' + PARENT_CLASS_NAME + ' found');
|
254
|
+
return;
|
255
|
+
}
|
256
|
+
var globals = getGlobalAttributes(parents);
|
257
|
+
populateDom(globals, makeRenderFunction(parents));
|
258
|
+
}
|
259
|
+
|
260
|
+
function makeRenderFunction(parents) {
|
261
|
+
// Render all targets.
|
262
|
+
return function() {
|
263
|
+
for (var i = 0; i < parents.length; i++) {
|
264
|
+
var locals = getLocalAttributes(parents[i]);
|
265
|
+
gapi.hangout.render(getRenderTargetId(i), {
|
266
|
+
hangout_type: locals.hangout_type,
|
267
|
+
publisher_id: locals.publisher_id,
|
268
|
+
render: locals.render,
|
269
|
+
room_id: locals.room_id,
|
270
|
+
topic: locals.topic,
|
271
|
+
widget_size: locals.widget_size,
|
272
|
+
width: locals.width
|
273
|
+
});
|
274
|
+
}
|
275
|
+
};
|
276
|
+
}
|
277
|
+
|
278
|
+
function populateDom(globals, callback) {
|
279
|
+
var parents = document.getElementsByClassName(PARENT_CLASS_NAME);
|
280
|
+
configureGlobals(globals);
|
281
|
+
insertRenderTargets(parents);
|
282
|
+
insertGapiScript(globals, callback);
|
283
|
+
}
|
284
|
+
|
285
|
+
addOnLoadHook(main); // For browser execution.
|
286
|
+
|
287
|
+
}());
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "google-instant-hangouts/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "google-instant-hangouts"
|
7
|
+
s.version = GoogleInstantHangouts::VERSION
|
8
|
+
s.authors = ["Ankit Gupta"]
|
9
|
+
s.date = '2014-01-27'
|
10
|
+
s.email = ["ankit.gupta8898@gmail.com"]
|
11
|
+
s.summary = %q{Gem to Easily add Google+ Hangouts to any web page and Rails asset pipeline}
|
12
|
+
s.description = %q{Gem to Easily add Google+ Hangouts to any web page and Rails asset pipeline}
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
s.licenses = ['MIT']
|
19
|
+
s.homepage = 'https://github.com/ankit8898/google-instant-hangouts'
|
20
|
+
s.add_dependency "railties", ">= 3.1"
|
21
|
+
s.add_development_dependency "bundler", "~> 1.0"
|
22
|
+
s.add_development_dependency "rails", ">= 3.1"
|
23
|
+
s.add_development_dependency 'rake'
|
24
|
+
|
25
|
+
end
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module GoogleInstantHangouts
|
2
|
+
module Helper
|
3
|
+
|
4
|
+
def instant_hangout(opts={})
|
5
|
+
defaults = {render: 'createhangout',lang: 'en',room_id: 'my_room',topic: 'my topic',width: 200}
|
6
|
+
defaults.merge!(opts)
|
7
|
+
content_tag(:div,
|
8
|
+
nil,
|
9
|
+
class: "instanthangouts",
|
10
|
+
render: defaults[:render],
|
11
|
+
lang: defaults[:lang],
|
12
|
+
room_id: defaults[:room_id],
|
13
|
+
topic: defaults[:topic],
|
14
|
+
width: defaults[:width])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-instant-hangouts
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ankit Gupta
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: railties
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Gem to Easily add Google+ Hangouts to any web page and Rails asset pipeline
|
70
|
+
email:
|
71
|
+
- ankit.gupta8898@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- Changelog.md
|
77
|
+
- Gemfile
|
78
|
+
- Gemfile.lock
|
79
|
+
- Rakefile
|
80
|
+
- Readme.md
|
81
|
+
- app/.DS_Store
|
82
|
+
- app/assets/.DS_Store
|
83
|
+
- app/assets/javascripts/.DS_Store
|
84
|
+
- app/assets/javascripts/google-instant-hangouts.js
|
85
|
+
- google-instant-hangouts.gemspec
|
86
|
+
- lib/.DS_Store
|
87
|
+
- lib/google-instant-hangouts.rb
|
88
|
+
- lib/google-instant-hangouts/.DS_Store
|
89
|
+
- lib/google-instant-hangouts/helper.rb
|
90
|
+
- lib/google-instant-hangouts/rails.rb
|
91
|
+
- lib/google-instant-hangouts/version.rb
|
92
|
+
homepage: https://github.com/ankit8898/google-instant-hangouts
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata: {}
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.1.10
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: Gem to Easily add Google+ Hangouts to any web page and Rails asset pipeline
|
116
|
+
test_files: []
|