jquery-oembed-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +54 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/jquery.oembed.js +845 -0
- data/app/assets/stylesheets/jquery.oembed.css +422 -0
- data/jquery-oembed-rails.gemspec +25 -0
- data/lib/jquery/oembed/rails/version.rb +7 -0
- data/lib/jquery/oembed/rails.rb +10 -0
- metadata +96 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f468c6d365e2be534c8d4c641a38678c4900bec6
|
4
|
+
data.tar.gz: 4d22d5a60040bb2a2e246766ffd2737dac615578
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a42604dbab574cfb674db3fe6a60260880de04d83f29d57600add510c454e94c445a5e434cb22d25579eb081b2000571c3117530bd0826cd0db8b9364853796d
|
7
|
+
data.tar.gz: f964ce76cac1f2bef4688fcde86d06ac1dbb69df6fb25f854d84ef701d50ec78db59c3e9f602cb0833754ff97b6537fcba4cc46478e5ff6ec807970dd5228ede
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Abdulaziz AlShetwi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# jquery-oembed-rails
|
2
|
+
|
3
|
+
Rails assets gem for the amazing [jquery-oembed-all](https://github.com/starfishmod/jquery-oembed-all) plugin.
|
4
|
+
|
5
|
+
## oEmbed
|
6
|
+
|
7
|
+
oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.
|
8
|
+
|
9
|
+
http://oembed.com/
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
gem 'jquery-oembed-rails'
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install jquery-oembed-rails
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Add this line to application.js
|
28
|
+
|
29
|
+
//= require jquery.oembed
|
30
|
+
|
31
|
+
Also Add this line for application.css
|
32
|
+
|
33
|
+
*= require jquery.oembed
|
34
|
+
|
35
|
+
Then add this to you javascript file.
|
36
|
+
|
37
|
+
````
|
38
|
+
$(function(){
|
39
|
+
$("a.embed").oembed();
|
40
|
+
});
|
41
|
+
````
|
42
|
+
Add `class="embed"` to anchor tag which contains the URL you wish to embed.
|
43
|
+
Ex: `<a href="http://www.youtube.com/watch?v=8mwKq7_JlS8" class="embed"></a>`
|
44
|
+
or use `link_to` helper method `<%= link_to link.url, link.url, class: 'embed' %>`
|
45
|
+
|
46
|
+
for more information about plugin options read [Jquery-Oembed-All readme file] (https://github.com/starfishmod/jquery-oembed-all/blob/master/README.md)
|
47
|
+
|
48
|
+
## Contributing
|
49
|
+
|
50
|
+
1. Fork it ( https://github.com/[my-github-username]/jquery-oembed-rails/fork )
|
51
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
52
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
53
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
54
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED