postini 0.0.1

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.
Files changed (43) hide show
  1. data/History.txt +8 -0
  2. data/License.txt +29 -0
  3. data/Manifest.txt +42 -0
  4. data/PostInstall.txt +7 -0
  5. data/README.txt +62 -0
  6. data/Rakefile +4 -0
  7. data/config/hoe.rb +76 -0
  8. data/config/requirements.rb +15 -0
  9. data/lib/postini/api/automatedbatch/AutomatedBatch.rb +1244 -0
  10. data/lib/postini/api/automatedbatch/AutomatedBatchDriver.rb +216 -0
  11. data/lib/postini/api/automatedbatch/AutomatedBatchMappingRegistry.rb +1883 -0
  12. data/lib/postini/api/automatedbatch/AutomatedBatchServiceClient.rb +523 -0
  13. data/lib/postini/api/endpointresolver/EndpointResolver.rb +121 -0
  14. data/lib/postini/api/endpointresolver/EndpointResolverDriver.rb +51 -0
  15. data/lib/postini/api/endpointresolver/EndpointResolverMappingRegistry.rb +268 -0
  16. data/lib/postini/api/endpointresolver/EndpointResolverServiceClient.rb +38 -0
  17. data/lib/postini/api.rb +8 -0
  18. data/lib/postini/domain.rb +65 -0
  19. data/lib/postini/user.rb +125 -0
  20. data/lib/postini/version.rb +9 -0
  21. data/lib/postini.rb +100 -0
  22. data/script/console +10 -0
  23. data/script/destroy +14 -0
  24. data/script/generate +14 -0
  25. data/script/txt2html +82 -0
  26. data/setup.rb +1585 -0
  27. data/spec/domain_spec.rb +36 -0
  28. data/spec/postini_spec.rb +30 -0
  29. data/spec/spec.opts +1 -0
  30. data/spec/spec_helper.rb +10 -0
  31. data/spec/user_spec.rb +12 -0
  32. data/tasks/deployment.rake +34 -0
  33. data/tasks/environment.rake +7 -0
  34. data/tasks/rspec.rake +21 -0
  35. data/tasks/website.rake +17 -0
  36. data/vendor/automatedbatch.wsdl +1721 -0
  37. data/vendor/endpointresolver.wsdl +214 -0
  38. data/website/index.html +88 -0
  39. data/website/index.txt +60 -0
  40. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  41. data/website/stylesheets/screen.css +138 -0
  42. data/website/template.html.erb +55 -0
  43. metadata +117 -0
@@ -0,0 +1,36 @@
1
+ require File.dirname(__FILE__) + '/spec_helper'
2
+
3
+ describe Postini::Domain do
4
+
5
+ describe "a new instance" do
6
+ before(:each) do
7
+ @domain = Postini::Domain.new
8
+ end
9
+
10
+ it "should indicate a new instance" do
11
+ @domain.should be_new
12
+ end
13
+ end
14
+
15
+ describe "a popuated instance" do
16
+
17
+ before(:each) do
18
+ @domain = Postini::Domain.new( :id => 100, :name => 'example.com' )
19
+ end
20
+
21
+ it "should have attibutes passed to #new" do
22
+ @domain.id.should be(100)
23
+ @domain.name.should eql('example.com')
24
+ end
25
+
26
+ it "should not be new" do
27
+ @domain.should_not be_new
28
+ end
29
+
30
+ it "should not be created" do
31
+ @domain.create.should be_false
32
+ end
33
+ end
34
+
35
+ end
36
+
@@ -0,0 +1,30 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ describe "Postini master module" do
4
+
5
+ it "must allow for setting the API Access Key" do
6
+ Postini.api_key = "1234567890"
7
+ Postini.api_key.should eql("1234567890")
8
+ end
9
+
10
+ it "must allow for setting the system number" do
11
+ Postini.system_number = 200
12
+ Postini.system_number.should be(200)
13
+ end
14
+
15
+ it "must allow for setting a username" do
16
+ Postini.username = 'administrator@jumboinc.com'
17
+ Postini.username.should eql('administrator@jumboinc.com')
18
+ end
19
+
20
+ it "must allow for setting a password" do
21
+ Postini.password = 'secret'
22
+ Postini.password.should eql('secret')
23
+ end
24
+
25
+ it "must allow for setting a XAuth string" do
26
+ Postini.xauth = 'format_unknown_to_author'
27
+ Postini.xauth.should eql('format_unknown_to_author')
28
+ end
29
+
30
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --colour
@@ -0,0 +1,10 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ gem 'rspec'
6
+ require 'spec'
7
+ end
8
+
9
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
10
+ require 'postini'
data/spec/user_spec.rb ADDED
@@ -0,0 +1,12 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ describe Postini::User do
4
+ before(:each) do
5
+ @user = Postini::User.new
6
+ end
7
+
8
+ it "should be tested" do
9
+ violated "Test me"
10
+ end
11
+ end
12
+
@@ -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
data/tasks/rspec.rake ADDED
@@ -0,0 +1,21 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ require 'spec'
6
+ end
7
+ begin
8
+ require 'spec/rake/spectask'
9
+ rescue LoadError
10
+ puts <<-EOS
11
+ To use rspec for testing you must install rspec gem:
12
+ gem install rspec
13
+ EOS
14
+ exit(0)
15
+ end
16
+
17
+ desc "Run the specs under spec/models"
18
+ Spec::Rake::SpecTask.new do |t|
19
+ t.spec_opts = ['--options', "spec/spec.opts"]
20
+ t.spec_files = FileList['spec/**/*_spec.rb']
21
+ end
@@ -0,0 +1,17 @@
1
+ desc 'Generate website files'
2
+ task :website_generate => :ruby_env do
3
+ (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt|
4
+ sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} }
5
+ end
6
+ end
7
+
8
+ desc 'Upload website files to rubyforge'
9
+ task :website_upload do
10
+ host = "#{rubyforge_username}@rubyforge.org"
11
+ remote_dir = "/var/www/gforge-projects/#{PATH}/"
12
+ local_dir = 'website'
13
+ sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
14
+ end
15
+
16
+ desc 'Generate and upload website files'
17
+ task :website => [:website_generate, :website_upload, :publish_docs]