go-picasa-go 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/README.rdoc +135 -0
  2. data/Rakefile +16 -0
  3. data/TODO +10 -0
  4. data/VERSION +1 -0
  5. data/bin/go-picasa-go +64 -0
  6. data/examples/rails-example/README +243 -0
  7. data/examples/rails-example/Rakefile +10 -0
  8. data/examples/rails-example/app/controllers/albums_controller.rb +62 -0
  9. data/examples/rails-example/app/controllers/application_controller.rb +10 -0
  10. data/examples/rails-example/app/controllers/photos_controller.rb +77 -0
  11. data/examples/rails-example/app/helpers/albums_helper.rb +9 -0
  12. data/examples/rails-example/app/helpers/application_helper.rb +3 -0
  13. data/examples/rails-example/app/models/my_user.rb +9 -0
  14. data/examples/rails-example/app/views/albums/_form.html.erb +15 -0
  15. data/examples/rails-example/app/views/albums/edit.html.erb +10 -0
  16. data/examples/rails-example/app/views/albums/index.html.erb +50 -0
  17. data/examples/rails-example/app/views/albums/new.html.erb +10 -0
  18. data/examples/rails-example/app/views/photos/index.html.erb +30 -0
  19. data/examples/rails-example/app/views/photos/new.html.erb +8 -0
  20. data/examples/rails-example/app/views/photos/show.html.erb +19 -0
  21. data/examples/rails-example/config/boot.rb +110 -0
  22. data/examples/rails-example/config/database.yml +22 -0
  23. data/examples/rails-example/config/environment.rb +42 -0
  24. data/examples/rails-example/config/environments/development.rb +17 -0
  25. data/examples/rails-example/config/environments/production.rb +28 -0
  26. data/examples/rails-example/config/environments/test.rb +28 -0
  27. data/examples/rails-example/config/initializers/backtrace_silencers.rb +7 -0
  28. data/examples/rails-example/config/initializers/inflections.rb +10 -0
  29. data/examples/rails-example/config/initializers/mime_types.rb +5 -0
  30. data/examples/rails-example/config/initializers/new_rails_defaults.rb +21 -0
  31. data/examples/rails-example/config/initializers/session_store.rb +15 -0
  32. data/examples/rails-example/config/locales/en.yml +5 -0
  33. data/examples/rails-example/config/routes.rb +49 -0
  34. data/examples/rails-example/db/seeds.rb +7 -0
  35. data/examples/rails-example/doc/README_FOR_APP +2 -0
  36. data/examples/rails-example/log/development.log +6923 -0
  37. data/examples/rails-example/log/production.log +0 -0
  38. data/examples/rails-example/log/server.log +0 -0
  39. data/examples/rails-example/log/test.log +0 -0
  40. data/examples/rails-example/public/404.html +30 -0
  41. data/examples/rails-example/public/422.html +30 -0
  42. data/examples/rails-example/public/500.html +30 -0
  43. data/examples/rails-example/public/favicon.ico +0 -0
  44. data/examples/rails-example/public/images/rails.png +0 -0
  45. data/examples/rails-example/public/index.html +275 -0
  46. data/examples/rails-example/public/javascripts/application.js +2 -0
  47. data/examples/rails-example/public/javascripts/controls.js +963 -0
  48. data/examples/rails-example/public/javascripts/dragdrop.js +973 -0
  49. data/examples/rails-example/public/javascripts/effects.js +1128 -0
  50. data/examples/rails-example/public/javascripts/prototype.js +4320 -0
  51. data/examples/rails-example/public/robots.txt +5 -0
  52. data/examples/rails-example/script/about +4 -0
  53. data/examples/rails-example/script/console +3 -0
  54. data/examples/rails-example/script/dbconsole +3 -0
  55. data/examples/rails-example/script/destroy +3 -0
  56. data/examples/rails-example/script/generate +3 -0
  57. data/examples/rails-example/script/performance/benchmarker +3 -0
  58. data/examples/rails-example/script/performance/profiler +3 -0
  59. data/examples/rails-example/script/plugin +3 -0
  60. data/examples/rails-example/script/runner +3 -0
  61. data/examples/rails-example/script/server +3 -0
  62. data/examples/rails-example/test/functional/albums_controller_test.rb +8 -0
  63. data/examples/rails-example/test/performance/browsing_test.rb +9 -0
  64. data/examples/rails-example/test/test_helper.rb +38 -0
  65. data/examples/rails-example/test/unit/helpers/albums_helper_test.rb +4 -0
  66. data/go_picasa_go.gemspec +184 -0
  67. data/init.rb +1 -0
  68. data/lib/generators/authentication_token_generator.rb +12 -0
  69. data/lib/generators/template/user_class.erb +9 -0
  70. data/lib/generators/user_class_generator.rb +50 -0
  71. data/lib/go_picasa_go.rb +26 -0
  72. data/lib/patchs/object.rb +21 -0
  73. data/lib/patchs/ssl.rb +9 -0
  74. data/lib/picasa/album.rb +267 -0
  75. data/lib/picasa/authentication.rb +19 -0
  76. data/lib/picasa/default_album.rb +9 -0
  77. data/lib/picasa/default_photo.rb +6 -0
  78. data/lib/picasa/default_user.rb +6 -0
  79. data/lib/picasa/http/album.rb +113 -0
  80. data/lib/picasa/http/authentication.rb +40 -0
  81. data/lib/picasa/http/photo.rb +117 -0
  82. data/lib/picasa/missing.rb +22 -0
  83. data/lib/picasa/photo.rb +190 -0
  84. data/lib/picasa/template/album.xml.erb +20 -0
  85. data/lib/picasa/template/photo.erb +15 -0
  86. data/lib/picasa/user.rb +57 -0
  87. data/lib/picasa/util.rb +33 -0
  88. data/script.rb +46 -0
  89. data/spec/album_spec.rb +245 -0
  90. data/spec/authentication_spec.rb +19 -0
  91. data/spec/default_classes_spec.rb +50 -0
  92. data/spec/fixture/photo.jpg +0 -0
  93. data/spec/fixture/photo2.jpg +0 -0
  94. data/spec/generators/user_class_generator_spec.rb +40 -0
  95. data/spec/http/album_spec.rb +129 -0
  96. data/spec/http/authentication_spec.rb +15 -0
  97. data/spec/http/photo_spec.rb +78 -0
  98. data/spec/http_response_helper.rb +23 -0
  99. data/spec/mock_helper.rb +113 -0
  100. data/spec/photo_spec.rb +201 -0
  101. data/spec/spec_helper.rb +151 -0
  102. data/spec/suites/all.rb +14 -0
  103. data/spec/suites/all_mocked.rb +5 -0
  104. data/spec/user_spec.rb +74 -0
  105. metadata +222 -0
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ $LOAD_PATH.unshift "#{RAILTIES_PATH}/builtin/rails_info"
4
+ require 'commands/about'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/console'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/dbconsole'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/destroy'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/generate'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../../config/boot', __FILE__)
3
+ require 'commands/performance/benchmarker'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../../config/boot', __FILE__)
3
+ require 'commands/performance/profiler'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/plugin'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/runner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.expand_path('../../config/boot', __FILE__)
3
+ require 'commands/server'
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+
3
+ class AlbumsControllerTest < ActionController::TestCase
4
+ # Replace this with your real tests.
5
+ test "the truth" do
6
+ assert true
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ require 'test_helper'
2
+ require 'performance_test_help'
3
+
4
+ # Profiling results for each test method are written to tmp/performance.
5
+ class BrowsingTest < ActionController::PerformanceTest
6
+ def test_homepage
7
+ get '/'
8
+ end
9
+ end
@@ -0,0 +1,38 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3
+ require 'test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Transactional fixtures accelerate your tests by wrapping each test method
7
+ # in a transaction that's rolled back on completion. This ensures that the
8
+ # test database remains unchanged so your fixtures don't have to be reloaded
9
+ # between every test method. Fewer database queries means faster tests.
10
+ #
11
+ # Read Mike Clark's excellent walkthrough at
12
+ # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13
+ #
14
+ # Every Active Record database supports transactions except MyISAM tables
15
+ # in MySQL. Turn off transactional fixtures in this case; however, if you
16
+ # don't care one way or the other, switching from MyISAM to InnoDB tables
17
+ # is recommended.
18
+ #
19
+ # The only drawback to using transactional fixtures is when you actually
20
+ # need to test transactions. Since your test is bracketed by a transaction,
21
+ # any transactions started in your code will be automatically rolled back.
22
+ self.use_transactional_fixtures = true
23
+
24
+ # Instantiated fixtures are slow, but give you @david where otherwise you
25
+ # would need people(:david). If you don't want to migrate your existing
26
+ # test cases which use the @david style and don't mind the speed hit (each
27
+ # instantiated fixtures translates to a database query per test method),
28
+ # then set this back to true.
29
+ self.use_instantiated_fixtures = false
30
+
31
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
32
+ #
33
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
34
+ # -- they do not yet inherit this setting
35
+ fixtures :all
36
+
37
+ # Add more helper methods to be used by all tests here...
38
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class AlbumsHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,184 @@
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{go_picasa_go}
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 = ["Pedro Dias"]
12
+ s.date = %q{2010-10-25}
13
+ s.default_executable = %q{go-picasa-go}
14
+ s.description = %q{Go Picasa go is intended as library written in ruby to manipulate Picasa albums and photos in a easy way. The idea is to provide behaviors to ordinary objects so they can create, retrieve, update and delete albums and photos in a more object oritented way, lefting behind all the HTTP talk that was necessary previouly to interect with this service provided by Google.}
15
+ s.email = %q{pedro.capaca@gmail.com}
16
+ s.executables = ["go-picasa-go"]
17
+ s.extra_rdoc_files = [
18
+ "README.rdoc",
19
+ "TODO"
20
+ ]
21
+ s.files = [
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "TODO",
25
+ "VERSION",
26
+ "bin/go-picasa-go",
27
+ "examples/rails-example/README",
28
+ "examples/rails-example/Rakefile",
29
+ "examples/rails-example/app/controllers/albums_controller.rb",
30
+ "examples/rails-example/app/controllers/application_controller.rb",
31
+ "examples/rails-example/app/controllers/photos_controller.rb",
32
+ "examples/rails-example/app/helpers/albums_helper.rb",
33
+ "examples/rails-example/app/helpers/application_helper.rb",
34
+ "examples/rails-example/app/models/my_user.rb",
35
+ "examples/rails-example/app/views/albums/_form.html.erb",
36
+ "examples/rails-example/app/views/albums/edit.html.erb",
37
+ "examples/rails-example/app/views/albums/index.html.erb",
38
+ "examples/rails-example/app/views/albums/new.html.erb",
39
+ "examples/rails-example/app/views/photos/index.html.erb",
40
+ "examples/rails-example/app/views/photos/new.html.erb",
41
+ "examples/rails-example/app/views/photos/show.html.erb",
42
+ "examples/rails-example/config/boot.rb",
43
+ "examples/rails-example/config/database.yml",
44
+ "examples/rails-example/config/environment.rb",
45
+ "examples/rails-example/config/environments/development.rb",
46
+ "examples/rails-example/config/environments/production.rb",
47
+ "examples/rails-example/config/environments/test.rb",
48
+ "examples/rails-example/config/initializers/backtrace_silencers.rb",
49
+ "examples/rails-example/config/initializers/inflections.rb",
50
+ "examples/rails-example/config/initializers/mime_types.rb",
51
+ "examples/rails-example/config/initializers/new_rails_defaults.rb",
52
+ "examples/rails-example/config/initializers/session_store.rb",
53
+ "examples/rails-example/config/locales/en.yml",
54
+ "examples/rails-example/config/routes.rb",
55
+ "examples/rails-example/db/seeds.rb",
56
+ "examples/rails-example/doc/README_FOR_APP",
57
+ "examples/rails-example/log/development.log",
58
+ "examples/rails-example/log/production.log",
59
+ "examples/rails-example/log/server.log",
60
+ "examples/rails-example/log/test.log",
61
+ "examples/rails-example/public/404.html",
62
+ "examples/rails-example/public/422.html",
63
+ "examples/rails-example/public/500.html",
64
+ "examples/rails-example/public/favicon.ico",
65
+ "examples/rails-example/public/images/rails.png",
66
+ "examples/rails-example/public/index.html",
67
+ "examples/rails-example/public/javascripts/application.js",
68
+ "examples/rails-example/public/javascripts/controls.js",
69
+ "examples/rails-example/public/javascripts/dragdrop.js",
70
+ "examples/rails-example/public/javascripts/effects.js",
71
+ "examples/rails-example/public/javascripts/prototype.js",
72
+ "examples/rails-example/public/robots.txt",
73
+ "examples/rails-example/script/about",
74
+ "examples/rails-example/script/console",
75
+ "examples/rails-example/script/dbconsole",
76
+ "examples/rails-example/script/destroy",
77
+ "examples/rails-example/script/generate",
78
+ "examples/rails-example/script/performance/benchmarker",
79
+ "examples/rails-example/script/performance/profiler",
80
+ "examples/rails-example/script/plugin",
81
+ "examples/rails-example/script/runner",
82
+ "examples/rails-example/script/server",
83
+ "examples/rails-example/test/functional/albums_controller_test.rb",
84
+ "examples/rails-example/test/performance/browsing_test.rb",
85
+ "examples/rails-example/test/test_helper.rb",
86
+ "examples/rails-example/test/unit/helpers/albums_helper_test.rb",
87
+ "go_picasa_go.gemspec",
88
+ "init.rb",
89
+ "lib/generators/authentication_token_generator.rb",
90
+ "lib/generators/template/user_class.erb",
91
+ "lib/generators/user_class_generator.rb",
92
+ "lib/go_picasa_go.rb",
93
+ "lib/patchs/object.rb",
94
+ "lib/patchs/ssl.rb",
95
+ "lib/picasa/album.rb",
96
+ "lib/picasa/authentication.rb",
97
+ "lib/picasa/default_album.rb",
98
+ "lib/picasa/default_photo.rb",
99
+ "lib/picasa/default_user.rb",
100
+ "lib/picasa/http/album.rb",
101
+ "lib/picasa/http/authentication.rb",
102
+ "lib/picasa/http/photo.rb",
103
+ "lib/picasa/missing.rb",
104
+ "lib/picasa/photo.rb",
105
+ "lib/picasa/template/album.xml.erb",
106
+ "lib/picasa/template/photo.erb",
107
+ "lib/picasa/user.rb",
108
+ "lib/picasa/util.rb",
109
+ "script.rb",
110
+ "spec/album_spec.rb",
111
+ "spec/authentication_spec.rb",
112
+ "spec/default_classes_spec.rb",
113
+ "spec/fixture/photo.jpg",
114
+ "spec/fixture/photo2.jpg",
115
+ "spec/generators/user_class_generator_spec.rb",
116
+ "spec/http/album_spec.rb",
117
+ "spec/http/authentication_spec.rb",
118
+ "spec/http/photo_spec.rb",
119
+ "spec/http_response_helper.rb",
120
+ "spec/mock_helper.rb",
121
+ "spec/photo_spec.rb",
122
+ "spec/spec_helper.rb",
123
+ "spec/suites/all.rb",
124
+ "spec/suites/all_mocked.rb",
125
+ "spec/user_spec.rb"
126
+ ]
127
+ s.homepage = %q{http://github.com/capaca/go-picasa-go}
128
+ s.rdoc_options = ["--charset=UTF-8"]
129
+ s.require_paths = ["lib"]
130
+ s.rubygems_version = %q{1.3.7}
131
+ s.summary = %q{API to easly manipulate picasa albums and photos}
132
+ s.test_files = [
133
+ "spec/mock_helper.rb",
134
+ "spec/default_classes_spec.rb",
135
+ "spec/user_spec.rb",
136
+ "spec/http_response_helper.rb",
137
+ "spec/http/photo_spec.rb",
138
+ "spec/http/authentication_spec.rb",
139
+ "spec/http/album_spec.rb",
140
+ "spec/generators/user_class_generator_spec.rb",
141
+ "spec/photo_spec.rb",
142
+ "spec/authentication_spec.rb",
143
+ "spec/spec_helper.rb",
144
+ "spec/album_spec.rb",
145
+ "spec/suites/all_mocked.rb",
146
+ "spec/suites/all.rb",
147
+ "examples/rails-example/db/seeds.rb",
148
+ "examples/rails-example/config/environments/production.rb",
149
+ "examples/rails-example/config/environments/test.rb",
150
+ "examples/rails-example/config/environments/development.rb",
151
+ "examples/rails-example/config/routes.rb",
152
+ "examples/rails-example/config/boot.rb",
153
+ "examples/rails-example/config/initializers/session_store.rb",
154
+ "examples/rails-example/config/initializers/new_rails_defaults.rb",
155
+ "examples/rails-example/config/initializers/backtrace_silencers.rb",
156
+ "examples/rails-example/config/initializers/mime_types.rb",
157
+ "examples/rails-example/config/initializers/inflections.rb",
158
+ "examples/rails-example/config/environment.rb",
159
+ "examples/rails-example/test/performance/browsing_test.rb",
160
+ "examples/rails-example/test/test_helper.rb",
161
+ "examples/rails-example/test/functional/albums_controller_test.rb",
162
+ "examples/rails-example/test/unit/helpers/albums_helper_test.rb",
163
+ "examples/rails-example/app/controllers/photos_controller.rb",
164
+ "examples/rails-example/app/controllers/application_controller.rb",
165
+ "examples/rails-example/app/controllers/albums_controller.rb",
166
+ "examples/rails-example/app/helpers/albums_helper.rb",
167
+ "examples/rails-example/app/helpers/application_helper.rb",
168
+ "examples/rails-example/app/models/my_user.rb"
169
+ ]
170
+
171
+ if s.respond_to? :specification_version then
172
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
173
+ s.specification_version = 3
174
+
175
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
176
+ s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.3.1"])
177
+ else
178
+ s.add_dependency(%q<nokogiri>, [">= 1.4.3.1"])
179
+ end
180
+ else
181
+ s.add_dependency(%q<nokogiri>, [">= 1.4.3.1"])
182
+ end
183
+ end
184
+
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'go_picasa_go'
@@ -0,0 +1,12 @@
1
+ # Class used to generate the authentication token
2
+
3
+ class AuthenticationTokenGenerator
4
+ include Singleton
5
+
6
+ # Generates the authentication token based
7
+ # on the picasa id and the password informed.
8
+
9
+ def generate picasa_id, password
10
+ Picasa::Authentication.authenticate picasa_id, password
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ class <%= class_name %> < Picasa::DefaultUser
2
+ def picasa_id
3
+ "<%= picasa_id %>"
4
+ end
5
+
6
+ def auth_token
7
+ "<%= auth_token %>"
8
+ end
9
+ end
@@ -0,0 +1,50 @@
1
+ # Class used to generate code for a default go-picasa-go user model.
2
+
3
+ class UserClassGenerator
4
+ include Singleton
5
+
6
+ # Generates the file representing the user class.
7
+ # Needs the name of the file, the picasa_id and password to authenticate
8
+ # and generate the authentication token
9
+
10
+ def generate file_name, picasa_id, password
11
+ file_name = underscore file_name
12
+ class_name = camelize file_name
13
+ auth_token = Picasa::Authentication.authenticate picasa_id, password
14
+ create_file file_name, class_name, picasa_id, auth_token
15
+ end
16
+
17
+ def self.generate file_name, picasa_id, password
18
+ UserClassGenerator.instance.generate file_name, picasa_id, password
19
+ end
20
+
21
+ private
22
+
23
+ def underscore(camel_cased_word)
24
+ camel_cased_word.to_s.gsub(/::/, '/').
25
+ gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
26
+ gsub(/([a-z\d])([A-Z])/,'\1_\2').
27
+ tr("-", "_").
28
+ downcase
29
+ end
30
+
31
+ def camelize(str)
32
+ str.split(/[^a-z0-9]/i).map{|w| w.capitalize}.join
33
+ end
34
+
35
+ def create_file file_name, class_name, picasa_id, auth_token
36
+ file = File.new "#{file_name}.rb", 'w'
37
+
38
+ # Render the user_class template
39
+ template_path = File.dirname(__FILE__) + '/template/'
40
+ template = ERB.new File.open(template_path+"user_class.erb").read
41
+
42
+ file_body = template.result(binding)
43
+
44
+ file.write file_body
45
+ file.close
46
+ end
47
+ end
48
+
49
+
50
+
@@ -0,0 +1,26 @@
1
+ require 'net/https'
2
+ require 'erb'
3
+ require 'tmpdir'
4
+ require 'rubygems'
5
+ require 'nokogiri'
6
+ require 'patchs/ssl'
7
+ require 'picasa/http/authentication'
8
+ require 'picasa/http/album'
9
+ require 'picasa/http/photo'
10
+ require 'picasa/util'
11
+ require 'picasa/missing'
12
+ require 'picasa/authentication'
13
+ require 'picasa/user'
14
+ require 'picasa/album'
15
+ require 'picasa/photo'
16
+ require 'patchs/object'
17
+ require 'singleton'
18
+ require 'generators/user_class_generator'
19
+
20
+ include Picasa::Util
21
+
22
+ require 'picasa/default_user'
23
+ require 'picasa/default_photo'
24
+ require 'picasa/default_album'
25
+
26
+
@@ -0,0 +1,21 @@
1
+ class << Object
2
+
3
+ # Class method that includes Picasa::User
4
+
5
+ def acts_as_picasa_user
6
+ include Picasa::User
7
+ end
8
+
9
+ # Class method that includes Picasa::Album
10
+
11
+ def acts_as_picasa_album
12
+ include Picasa::Album
13
+ end
14
+
15
+ # Class method that includes Picasa::Photo
16
+
17
+ def acts_as_picasa_photo
18
+ include Picasa::Photo
19
+ end
20
+
21
+ end
@@ -0,0 +1,9 @@
1
+ class Net::HTTP
2
+ alias_method :old_initialize, :initialize
3
+
4
+ def initialize(*args)
5
+ old_initialize(*args)
6
+ @ssl_context = OpenSSL::SSL::SSLContext.new
7
+ @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
8
+ end
9
+ end