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.
- data/History.txt +8 -0
- data/License.txt +29 -0
- data/Manifest.txt +42 -0
- data/PostInstall.txt +7 -0
- data/README.txt +62 -0
- data/Rakefile +4 -0
- data/config/hoe.rb +76 -0
- data/config/requirements.rb +15 -0
- data/lib/postini/api/automatedbatch/AutomatedBatch.rb +1244 -0
- data/lib/postini/api/automatedbatch/AutomatedBatchDriver.rb +216 -0
- data/lib/postini/api/automatedbatch/AutomatedBatchMappingRegistry.rb +1883 -0
- data/lib/postini/api/automatedbatch/AutomatedBatchServiceClient.rb +523 -0
- data/lib/postini/api/endpointresolver/EndpointResolver.rb +121 -0
- data/lib/postini/api/endpointresolver/EndpointResolverDriver.rb +51 -0
- data/lib/postini/api/endpointresolver/EndpointResolverMappingRegistry.rb +268 -0
- data/lib/postini/api/endpointresolver/EndpointResolverServiceClient.rb +38 -0
- data/lib/postini/api.rb +8 -0
- data/lib/postini/domain.rb +65 -0
- data/lib/postini/user.rb +125 -0
- data/lib/postini/version.rb +9 -0
- data/lib/postini.rb +100 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/script/txt2html +82 -0
- data/setup.rb +1585 -0
- data/spec/domain_spec.rb +36 -0
- data/spec/postini_spec.rb +30 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/user_spec.rb +12 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/rspec.rake +21 -0
- data/tasks/website.rake +17 -0
- data/vendor/automatedbatch.wsdl +1721 -0
- data/vendor/endpointresolver.wsdl +214 -0
- data/website/index.html +88 -0
- data/website/index.txt +60 -0
- data/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/website/stylesheets/screen.css +138 -0
- data/website/template.html.erb +55 -0
- metadata +117 -0
data/spec/domain_spec.rb
ADDED
|
@@ -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
|
data/spec/spec_helper.rb
ADDED
data/spec/user_spec.rb
ADDED
|
@@ -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
|
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
|
data/tasks/website.rake
ADDED
|
@@ -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]
|