social_widgets 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+
2
+ gem "rails"
3
+
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 David A. Cuadrado
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,17 @@
1
+ = social_widgets
2
+
3
+ Description goes here.
4
+
5
+ == Note on Patches/Pull Requests
6
+
7
+ * Fork the project.
8
+ * Make your feature addition or bug fix.
9
+ * Add tests for it. This is important so I don't break it in a
10
+ future version unintentionally.
11
+ * Commit, do not mess with rakefile, version, or history.
12
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
13
+ * Send me a pull request. Bonus points for topic branches.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2010 David A. Cuadrado. See LICENSE for details.
@@ -0,0 +1,45 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "social_widgets"
8
+ gem.summary = %Q{display widgets of social networks}
9
+ gem.description = %Q{}
10
+ gem.email = "krawek@gmail.com"
11
+ gem.homepage = "http://github.com/dcu/social_widgets"
12
+ gem.authors = ["David A. Cuadrado"]
13
+ gem.add_development_dependency "rspec", ">= 1.2.9"
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
+ end
16
+ Jeweler::GemcutterTasks.new
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
19
+ end
20
+
21
+ require 'spec/rake/spectask'
22
+ Spec::Rake::SpecTask.new(:spec) do |spec|
23
+ spec.libs << 'lib' << 'spec'
24
+ spec.spec_files = FileList['spec/**/*_spec.rb']
25
+ end
26
+
27
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
28
+ spec.libs << 'lib' << 'spec'
29
+ spec.pattern = 'spec/**/*_spec.rb'
30
+ spec.rcov = true
31
+ end
32
+
33
+ task :spec => :check_dependencies
34
+
35
+ task :default => :spec
36
+
37
+ require 'rake/rdoctask'
38
+ Rake::RDocTask.new do |rdoc|
39
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
40
+
41
+ rdoc.rdoc_dir = 'rdoc'
42
+ rdoc.title = "social_widgets #{version}"
43
+ rdoc.rdoc_files.include('README*')
44
+ rdoc.rdoc_files.include('lib/**/*.rb')
45
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,20 @@
1
+ <!-- Start of Flickr Badge -->
2
+ <style type="text/css">
3
+ #flickr_badge_source_txt {padding:0; font: 11px Arial, Helvetica, Sans serif; color:#666666;}
4
+ #flickr_badge_icon {display:block !important; margin:0 !important; border: 1px solid rgb(0, 0, 0) !important;}
5
+ #flickr_icon_td {padding:0 5px 0 0 !important;}
6
+ .flickr_badge_image {text-align:center !important;}
7
+ .flickr_badge_image img {border: 1px solid black !important;}
8
+ #flickr_www {display:block; padding:0 10px 0 10px !important; font: 11px Arial, Helvetica, Sans serif !important; color:#3993ff !important;}
9
+ #flickr_badge_uber_wrapper a:hover,
10
+ #flickr_badge_uber_wrapper a:link,
11
+ #flickr_badge_uber_wrapper a:active,
12
+ #flickr_badge_uber_wrapper a:visited {text-decoration:none !important; background:inherit !important;color:#3993ff;}
13
+ #flickr_badge_wrapper {background-color:<%= options[:background] || "#ffffff" %>;border: solid 1px #000000}
14
+ #flickr_badge_source {padding:0 !important; font: 11px Arial, Helvetica, Sans serif !important; color:#666666 !important;}
15
+ </style>
16
+ <table id="flickr_badge_uber_wrapper" cellpadding="0" cellspacing="10" border="0"><tr><td><a href="http://www.flickr.com" id="flickr_www">www.<strong style="color:#3993ff">flick<span style="color:#ff1c92">r</span></strong>.com</a><table cellpadding="0" cellspacing="10" border="0" id="flickr_badge_wrapper">
17
+ <script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=<%= options[:photos_number] || 3 %>&display=random&size=t&layout=<%= options[:vertical]?'v':'h' %>&source=user&user=<%= options[:user] %>"></script>
18
+ </table>
19
+ </td></tr></table>
20
+ <!-- End of Flickr Badge -->
@@ -0,0 +1,10 @@
1
+ <div id="github-badge"></div>
2
+ <script type="text/javascript" charset="utf-8">
3
+ GITHUB_USERNAME="<%= options[:user] %>";
4
+ GITHUB_LIST_LENGTH= "<%= options[:list_length] ||10%>" ;
5
+ GITHUB_HEAD="<%= options[:head] || 'div' %>"; // e.g. change to "h2" for wordpress sidebars
6
+ GITHUB_THEME="<%= options[:theme] %>"; // try 'black'
7
+ GITHUB_TITLE = "<%= options[:title] %>"
8
+ GITHUB_SHOW_ALL = "<%= options[:show_all] %> "
9
+ </script>
10
+ <script src="http://drnic.github.com/github-badges/dist/github-badge-launcher.js" type="text/javascript"></script>
@@ -0,0 +1,2 @@
1
+ <script type="text/javascript" src="http://www.linkedin.com/js/public-profile/widget-os.js"></script>
2
+ <a class="linkedin-profileinsider-inline" href="http://www.linkedin.com/in/<%= options[:user] %>"></a>
@@ -0,0 +1,3 @@
1
+ <a href='https://www.ohloh.net/accounts/<%= options[:user] %>?ref=Detailed'>
2
+ <img alt='Ohloh profile for <%= options[:user] %>' height='<%= options[:height] || 35 %>' src='https://www.ohloh.net/accounts/<%= options[:user] %>/widgets/account_detailed.gif' width='<%= options[:width] || 191 %>' />
3
+ </a>
@@ -0,0 +1,31 @@
1
+ <script src="http://widgets.twimg.com/j/2/widget.js"></script>
2
+ <script>
3
+ new TWTR.Widget({
4
+ version: 2,
5
+ type: 'profile',
6
+ rpp: 4,
7
+ interval: '<%= options[:interval] %>' || 6000,
8
+ width: 250,
9
+ height: 300,
10
+ theme: {
11
+ shell: {
12
+ background: '<%= options[:shell_background] %>' || '#8ec1da',
13
+ color: '<%= options[:shell_color] %>' ||'#ffffff'
14
+ },
15
+ tweets: {
16
+ background: '<%= options[:tweets_background] %>' || '#ffffff',
17
+ color: '<%= options[:tweets_color] %>' || '#444444',
18
+ links: '<%= options[:tweets_links] %>' || '#1985b5'
19
+ }
20
+ },
21
+ features: {
22
+ scrollbar: false,
23
+ loop: false,
24
+ live: false,
25
+ hashtags: true,
26
+ timestamp: true,
27
+ avatars: false,
28
+ behavior: 'all'
29
+ }
30
+ }).render().setUser('<%= options[:user] %>').start();
31
+ </script>
@@ -0,0 +1,34 @@
1
+ <script src="http://widgets.twimg.com/j/2/widget.js"></script>
2
+ <script>
3
+ new TWTR.Widget({
4
+ version: 2,
5
+ type: 'search',
6
+ search: '<%= options[:search] %>',
7
+ interval: '<%= options[:interval] %>' || 6000,
8
+ title: '<%= options[:title] %>',
9
+ subject: '<%= options[:subject] %>',
10
+ width: 250,
11
+ height: 300,
12
+ theme: {
13
+ shell: {
14
+ background: '<%= options[:shell_background] %>' || '#8ec1da',
15
+ color: '<%= options[:shell_color] %>' ||'#ffffff'
16
+ },
17
+ tweets: {
18
+ background: '<%= options[:tweets_background] %>' || '#ffffff',
19
+ color: '<%= options[:tweets_color] %>' || '#444444',
20
+ links: '<%= options[:tweets_links] %>' || '#1985b5'
21
+ }
22
+ },
23
+ features: {
24
+ scrollbar: false,
25
+ loop: true,
26
+ live: true,
27
+ hashtags: true,
28
+ timestamp: true,
29
+ avatars: true,
30
+ toptweets: true,
31
+ behavior: 'default'
32
+ }
33
+ }).render().start();
34
+ </script>
@@ -0,0 +1,63 @@
1
+ <!-- ++Begin Video Bar Wizard Generated Code++ -->
2
+ <!--
3
+ // Created with a Google AJAX Search Wizard
4
+ // http://code.google.com/apis/ajaxsearch/wizards.html
5
+ -->
6
+
7
+ <!--
8
+ // The Following div element will end up holding the actual videobar.
9
+ // You can place this anywhere on your page.
10
+ -->
11
+ <div id="videoBar-bar">
12
+ <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span>
13
+ </div>
14
+
15
+ <!-- Ajax Search Api and Stylesheet
16
+ // Note: If you are already using the AJAX Search API, then do not include it
17
+ // or its stylesheet again
18
+ -->
19
+ <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vbw"
20
+ type="text/javascript"></script>
21
+ <style type="text/css">
22
+ @import url("http://www.google.com/uds/css/gsearch.css");
23
+ </style>
24
+
25
+ <!-- Video Bar Code and Stylesheet -->
26
+ <script type="text/javascript">
27
+ window._uds_vbw_donotrepair = true;
28
+ </script>
29
+ <script src="http://www.google.com/uds/solutions/videobar/gsvideobar.js?mode=new"
30
+ type="text/javascript"></script>
31
+ <style type="text/css">
32
+ @import url("http://www.google.com/uds/solutions/videobar/gsvideobar.css");
33
+ </style>
34
+
35
+ <style type="text/css">
36
+ .playerInnerBox_gsvb .player_gsvb {
37
+ width : <%= options[:width] || "320px" %>;
38
+ height : <%= options[:height] || "260px" %>;
39
+ }
40
+ </style>
41
+ <script type="text/javascript">
42
+ function LoadVideoBar() {
43
+
44
+ var videoBar;
45
+ var options = {
46
+ largeResultSet : <%= options[:large] %>,
47
+ horizontal : <%= !options[:vertical] %>,
48
+ autoExecuteList : {
49
+ cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
50
+ cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
51
+ executeList : ["ytchannel:<%= options[:channel] %>" ]
52
+ }
53
+ }
54
+
55
+ videoBar = new GSvideoBar(document.getElementById("videoBar-bar"),
56
+ GSvideoBar.PLAYER_ROOT_FLOATING,
57
+ options);
58
+ }
59
+ // arrange for this function to be called during body.onload
60
+ // event processing
61
+ GSearch.setOnLoadCallback(LoadVideoBar);
62
+ </script>
63
+ <!-- ++End Video Bar Wizard Generated Code++ -->
@@ -0,0 +1,6 @@
1
+ require 'social_widgets/views_helper'
2
+ require 'social_widgets/rails'
3
+
4
+ module SocialWidgets
5
+ end
6
+
@@ -0,0 +1,3 @@
1
+ ::ActionView::Base.send :include, SocialWidgets::ViewsHelper
2
+ ::ActionController::Base.append_view_path File.expand_path("../../../app/views", __FILE__)
3
+
@@ -0,0 +1,15 @@
1
+ module SocialWidgets
2
+ module ViewsHelper
3
+ # <%= widget_for(:twitter_search, {:search => "beauty", :interval => "10000", :title => "Sample title", :subject => "subject sample", :shell_background => "#000000", :shell_color => "#ffffff", :tweets_background=> "#2D2AFF" , :tweets_color=> "#ffffff" ,:tweets_links => "#15FF00", }) %>
4
+ # <%= widget_for(:twitter, {:user => "shapado", :interval => "10000", :shell_background => "#000000", :shell_color => "#ffffff", :tweets_background=> "#2D2AFF" , :tweets_color=> "#ffffff" ,:tweets_links => "#15FF00", }) %>
5
+ # <%= widget_for(:flickr, {:photos_number=>4, :vertical=>true, :user=> '29454428@N08',:background => "#E5DDFF"}) %>
6
+ # <%= widget_for(:github, {:user => "patcito", :theme => "black", :title => "Sample Title", :list_length => 3, :show_all => "Mostrar todos", :head => "h2"}) %>
7
+ # <%= widget_for(:youtube, {:channel => "GeckoMoviesCom", :vertical => false, :large => false, :height => "260px", :width => "320px" }) %>
8
+ # <%= widget_for(:linked_in, {:user => "reidhoffman"}) %>
9
+ # <%= widget_for(:ohloh, {:user => "dacuad"}) %>
10
+ def widget_for(net, opts = {})
11
+ render :partial => "social_widgets/#{net}", :locals => {:options => opts}
12
+ end
13
+ end
14
+ end
15
+
@@ -0,0 +1,65 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{social_widgets}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["David A. Cuadrado"]
12
+ s.date = %q{2010-09-23}
13
+ s.description = %q{}
14
+ s.email = %q{krawek@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "Gemfile",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "app/views/social_widgets/_flickr.html.erb",
28
+ "app/views/social_widgets/_github.html.erb",
29
+ "app/views/social_widgets/_linked_in.html.erb",
30
+ "app/views/social_widgets/_ohloh.html.erb",
31
+ "app/views/social_widgets/_twitter.html.erb",
32
+ "app/views/social_widgets/_twitter_search.html.erb",
33
+ "app/views/social_widgets/_youtube.html.erb",
34
+ "lib/social_widgets.rb",
35
+ "lib/social_widgets/rails.rb",
36
+ "lib/social_widgets/views_helper.rb",
37
+ "social_widgets.gemspec",
38
+ "spec/social_widgets_spec.rb",
39
+ "spec/spec.opts",
40
+ "spec/spec_helper.rb"
41
+ ]
42
+ s.homepage = %q{http://github.com/dcu/social_widgets}
43
+ s.rdoc_options = ["--charset=UTF-8"]
44
+ s.require_paths = ["lib"]
45
+ s.rubygems_version = %q{1.3.7}
46
+ s.summary = %q{display widgets of social networks}
47
+ s.test_files = [
48
+ "spec/social_widgets_spec.rb",
49
+ "spec/spec_helper.rb"
50
+ ]
51
+
52
+ if s.respond_to? :specification_version then
53
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
54
+ s.specification_version = 3
55
+
56
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
57
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
58
+ else
59
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
60
+ end
61
+ else
62
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
63
+ end
64
+ end
65
+
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "SocialWidgets" do
4
+ it "fails" do
5
+ fail "hey buddy, you should probably rename this file and start specing for real"
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,9 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'social_widgets'
4
+ require 'spec'
5
+ require 'spec/autorun'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: social_widgets
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - David A. Cuadrado
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-09-23 00:00:00 -05:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 1
30
+ - 2
31
+ - 9
32
+ version: 1.2.9
33
+ type: :development
34
+ version_requirements: *id001
35
+ description: ""
36
+ email: krawek@gmail.com
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - LICENSE
43
+ - README.rdoc
44
+ files:
45
+ - .document
46
+ - .gitignore
47
+ - Gemfile
48
+ - LICENSE
49
+ - README.rdoc
50
+ - Rakefile
51
+ - VERSION
52
+ - app/views/social_widgets/_flickr.html.erb
53
+ - app/views/social_widgets/_github.html.erb
54
+ - app/views/social_widgets/_linked_in.html.erb
55
+ - app/views/social_widgets/_ohloh.html.erb
56
+ - app/views/social_widgets/_twitter.html.erb
57
+ - app/views/social_widgets/_twitter_search.html.erb
58
+ - app/views/social_widgets/_youtube.html.erb
59
+ - lib/social_widgets.rb
60
+ - lib/social_widgets/rails.rb
61
+ - lib/social_widgets/views_helper.rb
62
+ - social_widgets.gemspec
63
+ - spec/social_widgets_spec.rb
64
+ - spec/spec.opts
65
+ - spec/spec_helper.rb
66
+ has_rdoc: true
67
+ homepage: http://github.com/dcu/social_widgets
68
+ licenses: []
69
+
70
+ post_install_message:
71
+ rdoc_options:
72
+ - --charset=UTF-8
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ segments:
81
+ - 0
82
+ version: "0"
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ requirements: []
92
+
93
+ rubyforge_project:
94
+ rubygems_version: 1.3.7
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: display widgets of social networks
98
+ test_files:
99
+ - spec/social_widgets_spec.rb
100
+ - spec/spec_helper.rb