googlebase 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ desc 'Release the website and new gem version'
2
+ task :deploy => [:check_version, :website, :release] do
3
+ puts "Remember to create SVN tag:"
4
+ puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
5
+ "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
6
+ puts "Suggested comment:"
7
+ puts "Tagging release #{CHANGES}"
8
+ end
9
+
10
+ desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
11
+ task :local_deploy => [:website_generate, :install_gem]
12
+
13
+ task :check_version do
14
+ unless ENV['VERSION']
15
+ puts 'Must pass a VERSION=x.y.z release version'
16
+ exit
17
+ end
18
+ unless ENV['VERSION'] == VERS
19
+ puts "Please update your version.rb to match the release version, currently #{VERS}"
20
+ exit
21
+ end
22
+ end
23
+
24
+ desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
25
+ task :install_gem_no_doc => [:clean, :package] do
26
+ sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
27
+ end
28
+
29
+ namespace :manifest do
30
+ desc 'Recreate Manifest.txt to include ALL files'
31
+ task :refresh do
32
+ `rake check_manifest | patch -p0 > Manifest.txt`
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ task :ruby_env do
2
+ RUBY_APP = if RUBY_PLATFORM =~ /java/
3
+ "jruby"
4
+ else
5
+ "ruby"
6
+ end unless defined? RUBY_APP
7
+ end
@@ -0,0 +1,14 @@
1
+ desc 'Generate website files'
2
+ task :website_generate => :ruby_env do
3
+ end
4
+
5
+ desc 'Upload website files to rubyforge'
6
+ task :website_upload do
7
+ host = "#{rubyforge_username}@rubyforge.org"
8
+ remote_dir = "/var/www/gforge-projects/#{PATH}/"
9
+ local_dir = 'website'
10
+ sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
11
+ end
12
+
13
+ desc 'Generate and upload website files'
14
+ task :website => [:website_generate, :website_upload, :publish_docs]
@@ -0,0 +1,11 @@
1
+ # require File.dirname(__FILE__) + '/test_helper.rb'
2
+ #
3
+ # class TestGooglebase < Test::Unit::TestCase
4
+ #
5
+ # def setup
6
+ # end
7
+ #
8
+ # def test_truth
9
+ # assert true
10
+ # end
11
+ # end
@@ -0,0 +1,2 @@
1
+ require 'test/unit'
2
+ require File.dirname(__FILE__) + '/../lib/googlebase'
@@ -0,0 +1,47 @@
1
+ @media screen, projection {
2
+ /*
3
+ Copyright (c) 2007, Yahoo! Inc. All rights reserved.
4
+ Code licensed under the BSD License:
5
+ http://developer.yahoo.net/yui/license.txt
6
+ version: 2.2.0
7
+ */
8
+ body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}pre, code {font:115% monospace;*font-size:100%;}body * {line-height:1.22em;}
9
+ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}/*ol,ul {list-style:none;}*/caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;}
10
+ /* end of yahoo reset and fonts */
11
+
12
+ body {color:#333; background:#4b1a1a; line-height:1.3;}
13
+ p {margin:0 0 20px;}
14
+ a {color:#4b1a1a;}
15
+ a:hover {text-decoration:none;}
16
+ strong {font-weight:bold;}
17
+ em {font-style:italics;}
18
+ h1,h2,h3,h4,h5,h6 {font-weight:bold;}
19
+ h1 {font-size:197%; margin:30px 0; color:#4b1a1a;}
20
+ h2 {font-size:174%; margin:20px 0; color:#b8111a;}
21
+ h3 {font-size:152%; margin:10px 0;}
22
+ h4 {font-size:129%; margin:10px 0;}
23
+ pre {background:#eee; padding:20px; border:1px solid #ccc; font-size:100%; overflow:auto;}
24
+ code {font-size:100%; margin:0; padding:0;}
25
+ ul, ol {margin:10px 0 10px 25px;}
26
+ ol li {margin:0 0 10px;}
27
+
28
+
29
+
30
+
31
+
32
+ div#wrapper {background:#fff; width:560px; margin:0 auto; padding:20px; border:10px solid #bc8c46; border-width:0 10px;}
33
+ div#header {position:relative; border-bottom:1px dotted; margin:0 0 10px; padding:0 0 10px;}
34
+ div#header p {margin:0; padding:0;}
35
+ div#header h1 {margin:0; padding:0;}
36
+ ul#nav {position:absolute; top:0; right:0; list-style:none; margin:0; padding:0;}
37
+ ul#nav li {display:inline; padding:0 0 0 5px;}
38
+ ul#nav li a {}
39
+ div#content {}
40
+ div#footer {margin:40px 0 0; border-top:1px dotted; padding:10px 0 0;}
41
+
42
+
43
+
44
+
45
+
46
+
47
+ }
@@ -0,0 +1,68 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5
+ <title>Google Base Class by John Nunemaker</title>
6
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
7
+ </head>
8
+ <body>
9
+
10
+ <div id="wrapper">
11
+ <div id="header">
12
+ <h1>Google Base Class</h1>
13
+ <p>Easy Google Authentication and Requests.</p>
14
+
15
+ <ul id="nav">
16
+ <li><a href="rdoc/">Docs</a></li>
17
+ <li><a href="http://rubyforge.org/projects/googlebase/">Rubyforge Page</a></li>
18
+ </ul>
19
+ </div>
20
+
21
+ <div id="content">
22
+ <p>Google Base Class is a base for authenticating to google and making requests to google services.</p>
23
+
24
+ <h2>Installation</h2>
25
+
26
+ <pre><code>sudo gem install googlebase</code></pre>
27
+
28
+ <h2>Usage</h2>
29
+
30
+ <h3>Establish A Connection</h3>
31
+ <p>The code below shows how to use the gem by itself. It checks if username and password are correct (raising Google::LoginError on FAIL) and stores the session id internally. Then you can make requests and the session id is automatically passed in a cookie.</p>
32
+
33
+ <pre><code class="ruby">require 'google/base'
34
+ Google::Base.establish_connection('username', 'password')
35
+ Google::Base.get('http://google.com/path/to/whatever/')</code></pre>
36
+
37
+ <h3>Inheritance</h3>
38
+
39
+ <p>This example takes things a bit farther and shows how to use this class simply as a base to get some methods for free and then wrap whatever google service you would like.</p>
40
+
41
+ <pre><code>require 'google/base'
42
+ Google::Base.establish_connection('username', 'password')
43
+ module Google
44
+ module Reader
45
+ class Base &lt; Google::Base
46
+ class &lt;&lt; self
47
+ def get_token
48
+ get("http://www.google.com/reader/api/0/token")
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ puts Google::Reader::Base.get_token</code></pre>
56
+ </div>
57
+
58
+ <div id="footer">
59
+ <p>Created by <a href="http://addictedtonew.com/about/">John Nunemaker</a></p>
60
+ </div>
61
+
62
+ </div>
63
+
64
+ <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
65
+ <script type="text/javascript">_uacct = "UA-85301-15"; urchinTracker();</script>
66
+
67
+ </body>
68
+ </html>
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.4
3
+ specification_version: 1
4
+ name: googlebase
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.1.0
7
+ date: 2007-11-19 00:00:00 -05:00
8
+ summary: Base class which handles authentication and requests for google services
9
+ require_paths:
10
+ - lib
11
+ email: nunemaker@gmail.com
12
+ homepage: http://googlebase.rubyforge.org
13
+ rubyforge_project: googlebase
14
+ description: Base class which handles authentication and requests for google services
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - John
31
+ files:
32
+ - History.txt
33
+ - License.txt
34
+ - Manifest.txt
35
+ - README.txt
36
+ - Rakefile
37
+ - config/hoe.rb
38
+ - config/requirements.rb
39
+ - lib/google/base.rb
40
+ - lib/google/version.rb
41
+ - log/debug.log
42
+ - script/destroy
43
+ - script/generate
44
+ - setup.rb
45
+ - tasks/deployment.rake
46
+ - tasks/environment.rake
47
+ - tasks/website.rake
48
+ - test/test_googlebase.rb
49
+ - test/test_helper.rb
50
+ - website/css/common.css
51
+ - website/index.html
52
+ test_files:
53
+ - test/test_googlebase.rb
54
+ - test/test_helper.rb
55
+ rdoc_options:
56
+ - --main
57
+ - README.txt
58
+ extra_rdoc_files:
59
+ - History.txt
60
+ - License.txt
61
+ - Manifest.txt
62
+ - README.txt
63
+ executables: []
64
+
65
+ extensions: []
66
+
67
+ requirements: []
68
+
69
+ dependencies: []
70
+