postini 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +12 -26
- data/README.txt +11 -4
- data/Rakefile +27 -4
- data/features/development.feature +13 -0
- data/features/step_definitions/common_steps.rb +172 -0
- data/features/support/common.rb +29 -0
- data/features/support/env.rb +6 -0
- data/features/support/matchers.rb +11 -0
- data/lib/postini/automated_batch_service.rb +464 -0
- data/lib/postini/configuration_check.rb +25 -0
- data/lib/postini/endpoint_resolver_service.rb +41 -0
- data/lib/postini/endpoints.rb +26 -0
- data/lib/postini/exceptions.rb +85 -0
- data/lib/postini.rb +74 -102
- data/script/console +1 -1
- data/script/txt2html +5 -16
- data/spec/exceptions_spec.rb +19 -0
- data/spec/postini_spec.rb +5 -38
- data/spec/rcov.opts +1 -0
- data/spec/spec_helper.rb +1 -1
- data/tasks/rspec.rake +1 -19
- data/vendor/automatedbatch.wsdl +1 -1
- metadata +21 -54
- data/config/hoe.rb +0 -76
- data/config/requirements.rb +0 -15
- data/lib/postini/api/automatedbatch/AutomatedBatch.rb +0 -1244
- data/lib/postini/api/automatedbatch/AutomatedBatchDriver.rb +0 -216
- data/lib/postini/api/automatedbatch/AutomatedBatchMappingRegistry.rb +0 -1883
- data/lib/postini/api/automatedbatch/AutomatedBatchServiceClient.rb +0 -523
- data/lib/postini/api/endpointresolver/EndpointResolver.rb +0 -121
- data/lib/postini/api/endpointresolver/EndpointResolverDriver.rb +0 -51
- data/lib/postini/api/endpointresolver/EndpointResolverMappingRegistry.rb +0 -268
- data/lib/postini/api/endpointresolver/EndpointResolverServiceClient.rb +0 -38
- data/lib/postini/api.rb +0 -8
- data/lib/postini/domain.rb +0 -72
- data/lib/postini/helpers/attributes.rb +0 -94
- data/lib/postini/helpers.rb +0 -13
- data/lib/postini/user.rb +0 -91
- data/lib/postini/users/aliases.rb +0 -55
- data/lib/postini/version.rb +0 -9
- data/spec/attribute_helper_spec.rb +0 -47
- data/spec/domain_spec.rb +0 -36
- data/spec/user_spec.rb +0 -142
- data/website/index.html +0 -89
- data/website/index.txt +0 -60
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/spam_box.png +0 -0
- data/website/stylesheets/screen.css +0 -143
- data/website/template.html.erb +0 -56
data/lib/postini.rb
CHANGED
@@ -3,145 +3,117 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
3
3
|
|
4
4
|
# requirements
|
5
5
|
require 'rubygems'
|
6
|
-
|
7
|
-
unless defined?( ActiveSupport )
|
8
|
-
gem 'activesupport', '>=2.0.2'
|
9
|
-
end
|
10
|
-
require 'postini/helpers'
|
11
|
-
require 'postini/user'
|
12
|
-
require 'postini/domain'
|
6
|
+
require 'handsoap'
|
13
7
|
|
14
|
-
require 'postini/
|
8
|
+
require 'postini/exceptions'
|
15
9
|
|
16
10
|
# = Configuration
|
17
|
-
#
|
18
|
-
#
|
11
|
+
#
|
12
|
+
# This module just provides access to configuration details used by the rest of
|
19
13
|
# the gem.
|
20
|
-
#
|
14
|
+
#
|
21
15
|
# Current configuration values are:
|
22
16
|
# * api_key
|
23
17
|
# * system_number
|
24
18
|
# * username
|
25
19
|
# * password
|
26
|
-
#
|
27
|
-
#
|
20
|
+
#
|
28
21
|
# The +api_key+ is your unique API keys obtained from Postini via their Early
|
29
22
|
# Access program.
|
30
|
-
#
|
23
|
+
#
|
31
24
|
# Postini.api_key = "your48characterkey"
|
32
|
-
#
|
25
|
+
#
|
33
26
|
# The +system_number+ can be any known system number (known to your account).
|
34
|
-
# The gem uses the Postini Endpoint Resolver service, but in some cases needs a
|
35
|
-
# known system to work from. Refer to the "Locating Your System" section of the
|
27
|
+
# The gem uses the Postini Endpoint Resolver service, but in some cases needs a
|
28
|
+
# known system to work from. Refer to the "Locating Your System" section of the
|
36
29
|
# Early Access documentation for more information.
|
37
|
-
#
|
30
|
+
#
|
38
31
|
# Postini.system_number = 8
|
39
|
-
#
|
32
|
+
#
|
40
33
|
# The +username+ parameter is required if:
|
41
34
|
# 1. Your org is using POP authentication, and thus needs the admin user's
|
42
35
|
# authentication details, not the end-user's.
|
43
|
-
# 2. You omit the optional username and password
|
44
|
-
#
|
36
|
+
# 2. You omit the optional username and password string for the request
|
37
|
+
#
|
45
38
|
# Postini.username = 'administrat@jumboinc.com'
|
46
|
-
#
|
47
|
-
# The +password+
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
39
|
+
#
|
40
|
+
# The +password+ parameter is require if:
|
41
|
+
# 1. Your org is using POP authentication, and thus needs the admin
|
42
|
+
# user's authentication details, not the end-users's.
|
43
|
+
# 2. You can omit the optional username and password arguments for a
|
44
|
+
# specific request.
|
45
|
+
#
|
51
46
|
# Postini.password = 'secret'
|
52
|
-
#
|
47
|
+
#
|
48
|
+
# All of the above configurations can either be preloaded from a yaml
|
49
|
+
# file or environment variables. Create a yaml file with the following
|
50
|
+
# structure:
|
51
|
+
#
|
52
|
+
# api_key:
|
53
|
+
# system_number:
|
54
|
+
# username:
|
55
|
+
# password:
|
56
|
+
#
|
57
|
+
# And call +Postini.configure!('/path/to/file.yml')+ to load the
|
58
|
+
# values. Alternatively you can set the following environment variables
|
59
|
+
# and call +Postini.configure!+ without a path.
|
60
|
+
#
|
61
|
+
# POSTINI_API_KEY
|
62
|
+
# POSTINI_SYSTEM_NUMBER
|
63
|
+
# POSTINI_USERNAME
|
64
|
+
# POSTINI_PASSWORD
|
53
65
|
#
|
54
66
|
# = Debugging
|
55
|
-
#
|
67
|
+
#
|
56
68
|
# Lots to debug when an API is classified as "Early access", here are different
|
57
69
|
# controls for setting the debugging verbosity
|
58
|
-
#
|
70
|
+
#
|
59
71
|
# * logger = Ruby-logger compatibe logger
|
60
72
|
# * debug = true/false - Enable more verbose logging
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
# Specify a 'Logger' compatible logging facility in order to use the debug
|
73
|
+
#
|
74
|
+
# Specify a 'Logger' compatible logging facility in order to use the debug
|
65
75
|
# features of the gem. All the other settings increase the verbosity to varying
|
66
76
|
# degrees, and allow you to access some soap4r internals as well.
|
67
77
|
#
|
68
78
|
module Postini
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
end
|
80
|
-
def self.#{config}
|
81
|
-
@@#{config}
|
82
|
-
end
|
83
|
-
EOF
|
84
|
-
end
|
85
|
-
|
79
|
+
VERSION = "0.1.0"
|
80
|
+
|
81
|
+
autoload :ConfigurationCheck, "postini/configuration_check"
|
82
|
+
autoload :Endpoints, "postini/endpoints"
|
83
|
+
autoload :EndpointResolverService, "postini/endpoint_resolver_service"
|
84
|
+
autoload :AutomatedBatchService, "postini/automated_batch_service"
|
85
|
+
|
86
|
+
# Don't debug by default
|
87
|
+
@debug = false
|
88
|
+
|
86
89
|
class << self
|
87
|
-
|
88
|
-
# Return the appropriate endpoint URI for the service calls. If +user+ is
|
89
|
-
# provided, the endpoint is determined using the Endpoint Resolver Service,
|
90
|
-
# otherwise it is contructed from the +system_number+ configuration value.
|
91
|
-
def endpoint_uri( user = nil, service = :automated_batch )
|
92
|
-
raise "System Number not known" if user.nil? && system_number.nil?
|
93
90
|
|
94
|
-
|
95
|
-
service = case service
|
96
|
-
when :automated_batch
|
97
|
-
[ Postini::API::EndpointResolver::Service::V2AutomatedBatch, "automatedbatch" ]
|
98
|
-
end
|
91
|
+
attr_accessor :api_key, :system_number, :username, :password, :debug, :logger
|
99
92
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
request = Postini::API::EndpointResolver::GetServiceEndpoint.new(
|
107
|
-
api_key, user, service[0]
|
108
|
-
)
|
109
|
-
response = remote.getServiceEndpoint( request )
|
110
|
-
response.endpointURI
|
111
|
-
end
|
93
|
+
def configured? #:nodoc:
|
94
|
+
!self.api_key.nil? &&
|
95
|
+
!self.system_number.nil? &&
|
96
|
+
!self.username.nil? &&
|
97
|
+
!self.password.nil?
|
112
98
|
end
|
113
99
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
if
|
118
|
-
|
119
|
-
|
100
|
+
# Configure the library from yaml configuration file or
|
101
|
+
# environment variables
|
102
|
+
def configure!( yaml = nil )
|
103
|
+
data = if yaml
|
104
|
+
YAML.load_file( yaml )
|
105
|
+
else
|
106
|
+
{
|
107
|
+
'api_key' => ENV['POSTINI_API_KEY'],
|
108
|
+
'system_number' => ENV['POSTINI_SYSTEM_NUMBER'],
|
109
|
+
'username' => ENV['POSTINI_USERNAME'],
|
110
|
+
'password' => ENV['POSTINI_PASSWORD']
|
111
|
+
}
|
112
|
+
end
|
120
113
|
|
121
|
-
|
122
|
-
|
123
|
-
API::AutomatedBatch::AuthElem.new(
|
124
|
-
api_key, username, password, xauth
|
125
|
-
)
|
114
|
+
data.each do |k,v|
|
115
|
+
self.send( "#{k}=", v )
|
126
116
|
end
|
127
117
|
end
|
128
|
-
|
129
|
-
def debug?
|
130
|
-
@@debug ||= false
|
131
|
-
end
|
132
|
-
|
133
|
-
def soap4r_wiredump?
|
134
|
-
@@soap4r_wiredump ||= false
|
135
|
-
end
|
136
|
-
|
137
|
-
def logger
|
138
|
-
@@logger ||= Logger.new('/dev/null')
|
139
|
-
end
|
140
|
-
|
141
|
-
def soap4r_wiredump_dev
|
142
|
-
@@soap4r_wiredump_dev ||= logger
|
143
|
-
end
|
144
|
-
|
145
118
|
end
|
146
|
-
|
147
119
|
end
|
data/script/console
CHANGED
@@ -7,4 +7,4 @@ libs = " -r irb/completion"
|
|
7
7
|
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
8
|
libs << " -r #{File.dirname(__FILE__) + '/../lib/postini.rb'}"
|
9
9
|
puts "Loading postini gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/txt2html
CHANGED
@@ -1,27 +1,16 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
require 'rubygems'
|
7
|
-
begin
|
8
|
-
require 'newgem'
|
9
|
-
require 'rubyforge'
|
10
|
-
rescue LoadError
|
11
|
-
puts "\n\nGenerating the website requires the newgem RubyGem"
|
12
|
-
puts "Install: gem install newgem\n\n"
|
13
|
-
exit(1)
|
14
|
-
end
|
3
|
+
load File.dirname(__FILE__) + "/../Rakefile"
|
4
|
+
require 'rubyforge'
|
15
5
|
require 'redcloth'
|
16
6
|
require 'syntax/convertors/html'
|
17
7
|
require 'erb'
|
18
|
-
require File.dirname(__FILE__) + "/../lib/#{GEM_NAME}/version.rb"
|
19
8
|
|
20
|
-
|
21
|
-
|
9
|
+
download = "http://rubyforge.org/projects/#{$hoe.rubyforge_name}"
|
10
|
+
version = $hoe.version
|
22
11
|
|
23
12
|
def rubyforge_project_id
|
24
|
-
RubyForge.new.autoconfig["group_ids"][
|
13
|
+
RubyForge.new.configure.autoconfig["group_ids"][$hoe.rubyforge_name]
|
25
14
|
end
|
26
15
|
|
27
16
|
class Fixnum
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
2
|
+
|
3
|
+
describe "Remote exception handling" do
|
4
|
+
it "should parse the reason" do
|
5
|
+
reason = "StatusException: You specified 'false' to the test operation - we have raised an exception as you have requested. () (Request ID B7BBF9D8-56D3-11DE-A949-FAAF5903FD3E)"
|
6
|
+
|
7
|
+
exception = Postini::RemoteException.new( reason )
|
8
|
+
exception.type.should == "StatusException"
|
9
|
+
exception.message.should == "You specified 'false' to the test operation - we have raised an exception as you have requested. ()"
|
10
|
+
exception.request_id.should == "B7BBF9D8-56D3-11DE-A949-FAAF5903FD3E"
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should delegate the exception correctly" do
|
14
|
+
reason = "StatusException: You specified 'false' to the test operation - we have raised an exception as you have requested. () (Request ID B7BBF9D8-56D3-11DE-A949-FAAF5903FD3E)"
|
15
|
+
|
16
|
+
exception = Postini::RemoteException.delegate( reason )
|
17
|
+
exception.should be_a_kind_of( Postini::StatusException )
|
18
|
+
end
|
19
|
+
end
|
data/spec/postini_spec.rb
CHANGED
@@ -1,58 +1,25 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/spec_helper.rb'
|
2
2
|
|
3
3
|
describe "Postini master module" do
|
4
|
-
|
4
|
+
|
5
5
|
it "must allow for setting the API Access Key" do
|
6
6
|
Postini.api_key = "1234567890"
|
7
7
|
Postini.api_key.should eql("1234567890")
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
it "must allow for setting the system number" do
|
11
11
|
Postini.system_number = 200
|
12
12
|
Postini.system_number.should be(200)
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
it "must allow for setting a username" do
|
16
16
|
Postini.username = 'administrator@jumboinc.com'
|
17
17
|
Postini.username.should eql('administrator@jumboinc.com')
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
it "must allow for setting a password" do
|
21
21
|
Postini.password = 'secret'
|
22
22
|
Postini.password.should eql('secret')
|
23
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
|
-
it "should return a pre-built URI if no user is provided" do
|
31
|
-
Postini.system_number = 0
|
32
|
-
Postini.endpoint_uri.should eql('https://api-s0.postini.com/api2/automatedbatch')
|
33
|
-
end
|
34
|
-
|
35
|
-
it "should use the Endpoint Resolver service if a user is provided" do
|
36
|
-
mock_remote = Postini::API::EndpointResolver::EndpointResolverPort.new
|
37
|
-
mock_remote.expects( :getServiceEndpoint ).with(anything).returns(
|
38
|
-
OpenStruct.new( :endpointURI => 'https://api-s0.postini.com/api2/automatedbatch' )
|
39
|
-
)
|
40
|
-
Postini::API::EndpointResolver::EndpointResolverPort.expects(:new).returns(mock_remote)
|
41
|
-
|
42
|
-
Postini.endpoint_uri( 'support@jumboinc.com' ).should eql('https://api-s0.postini.com/api2/automatedbatch')
|
43
|
-
|
44
|
-
pending "IMPROVE"
|
45
|
-
end
|
46
|
-
|
47
|
-
it "should generate auth elements without user details" do
|
48
|
-
pending
|
49
|
-
end
|
50
|
-
|
51
|
-
it "should generate auth elements with username and passwords" do
|
52
|
-
pending
|
53
|
-
end
|
54
|
-
|
55
|
-
it "should generate auth elements with usernames and xauth strings" do
|
56
|
-
pending
|
57
|
-
end
|
24
|
+
|
58
25
|
end
|
data/spec/rcov.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--exclude "spec/*,gems/*"
|
data/spec/spec_helper.rb
CHANGED
data/tasks/rspec.rake
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
2
|
require 'spec'
|
3
3
|
rescue LoadError
|
4
|
-
require 'rubygems'
|
4
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
5
5
|
require 'spec'
|
6
6
|
end
|
7
7
|
begin
|
@@ -19,21 +19,3 @@ Spec::Rake::SpecTask.new do |t|
|
|
19
19
|
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
20
|
t.spec_files = FileList['spec/**/*_spec.rb']
|
21
21
|
end
|
22
|
-
|
23
|
-
namespace :spec do
|
24
|
-
desc "Print Specdoc for all specs (excluding plugin specs)"
|
25
|
-
Spec::Rake::SpecTask.new(:doc) do |t|
|
26
|
-
t.spec_opts = ["--format", "specdoc", "--dry-run"]
|
27
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
28
|
-
end
|
29
|
-
|
30
|
-
desc "Run all specs in spec directory with RCov (excluding plugin specs)"
|
31
|
-
Spec::Rake::SpecTask.new(:rcov) do |t|
|
32
|
-
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/../spec/spec.opts\""]
|
33
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
34
|
-
t.rcov = true
|
35
|
-
t.rcov_opts = lambda do
|
36
|
-
IO.readlines("#{File.dirname(__FILE__)}/../spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
data/vendor/automatedbatch.wsdl
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postini
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenneth Kalmer
|
@@ -9,28 +9,18 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-12 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
-
type: :
|
16
|
+
name: newgem
|
17
|
+
type: :development
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
24
|
-
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: soap4r
|
27
|
-
type: :runtime
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.5.8
|
23
|
+
version: 1.4.1
|
34
24
|
version:
|
35
25
|
- !ruby/object:Gem::Dependency
|
36
26
|
name: hoe
|
@@ -42,7 +32,7 @@ dependencies:
|
|
42
32
|
- !ruby/object:Gem::Version
|
43
33
|
version: 1.8.0
|
44
34
|
version:
|
45
|
-
description: Ruby wrapper
|
35
|
+
description: A Ruby wrapper library to make the Postini SOAP API more palatable. Postini is the world leader in email message scanning, filtering and archiving. This library provides users of Postini with a convenient Ruby library that exposes the Postini SOAP API (Early Access Program) through more familiar Rubyisms.
|
46
36
|
email:
|
47
37
|
- kenneth.kalmer@gmail.com
|
48
38
|
executables: []
|
@@ -55,7 +45,6 @@ extra_rdoc_files:
|
|
55
45
|
- Manifest.txt
|
56
46
|
- PostInstall.txt
|
57
47
|
- README.txt
|
58
|
-
- website/index.txt
|
59
48
|
files:
|
60
49
|
- History.txt
|
61
50
|
- License.txt
|
@@ -64,58 +53,36 @@ files:
|
|
64
53
|
- README.txt
|
65
54
|
- Rakefile
|
66
55
|
- TODO
|
67
|
-
-
|
68
|
-
-
|
56
|
+
- features/development.feature
|
57
|
+
- features/step_definitions/common_steps.rb
|
58
|
+
- features/support/common.rb
|
59
|
+
- features/support/env.rb
|
60
|
+
- features/support/matchers.rb
|
69
61
|
- lib/postini.rb
|
70
|
-
- lib/postini/
|
71
|
-
- lib/postini/
|
72
|
-
- lib/postini/
|
73
|
-
- lib/postini/
|
74
|
-
- lib/postini/
|
75
|
-
- lib/postini/api/endpointresolver/EndpointResolver.rb
|
76
|
-
- lib/postini/api/endpointresolver/EndpointResolverDriver.rb
|
77
|
-
- lib/postini/api/endpointresolver/EndpointResolverMappingRegistry.rb
|
78
|
-
- lib/postini/api/endpointresolver/EndpointResolverServiceClient.rb
|
79
|
-
- lib/postini/domain.rb
|
80
|
-
- lib/postini/helpers.rb
|
81
|
-
- lib/postini/helpers/attributes.rb
|
82
|
-
- lib/postini/user.rb
|
83
|
-
- lib/postini/users/aliases.rb
|
84
|
-
- lib/postini/version.rb
|
62
|
+
- lib/postini/automated_batch_service.rb
|
63
|
+
- lib/postini/configuration_check.rb
|
64
|
+
- lib/postini/endpoint_resolver_service.rb
|
65
|
+
- lib/postini/endpoints.rb
|
66
|
+
- lib/postini/exceptions.rb
|
85
67
|
- script/console
|
86
68
|
- script/destroy
|
87
69
|
- script/generate
|
88
70
|
- script/txt2html
|
89
71
|
- setup.rb
|
90
|
-
- spec/
|
91
|
-
- spec/domain_spec.rb
|
72
|
+
- spec/exceptions_spec.rb
|
92
73
|
- spec/postini_spec.rb
|
74
|
+
- spec/rcov.opts
|
93
75
|
- spec/spec.opts
|
94
76
|
- spec/spec_helper.rb
|
95
|
-
- spec/user_spec.rb
|
96
77
|
- tasks/deployment.rake
|
97
78
|
- tasks/environment.rake
|
98
79
|
- tasks/rspec.rake
|
99
80
|
- tasks/website.rake
|
100
81
|
- vendor/automatedbatch.wsdl
|
101
82
|
- vendor/endpointresolver.wsdl
|
102
|
-
- website/index.html
|
103
|
-
- website/index.txt
|
104
|
-
- website/javascripts/rounded_corners_lite.inc.js
|
105
|
-
- website/spam_box.png
|
106
|
-
- website/stylesheets/screen.css
|
107
|
-
- website/template.html.erb
|
108
83
|
has_rdoc: true
|
109
|
-
homepage: http://postini4r.rubyforge.org
|
110
|
-
post_install_message:
|
111
|
-
|
112
|
-
For more information on postini4r's postini gem, see
|
113
|
-
http://postini4r.rubyforge.org/postini
|
114
|
-
|
115
|
-
Remember to contact your Postini provider, or Postini directly, to gain access
|
116
|
-
to the Postini Early Access Program. You'll need a unique API key to make use
|
117
|
-
of this gem.
|
118
|
-
|
84
|
+
homepage: http://postini4r.rubyforge.org/
|
85
|
+
post_install_message: PostInstall.txt
|
119
86
|
rdoc_options:
|
120
87
|
- --main
|
121
88
|
- README.txt
|
@@ -139,6 +106,6 @@ rubyforge_project: postini4r
|
|
139
106
|
rubygems_version: 1.3.1
|
140
107
|
signing_key:
|
141
108
|
specification_version: 2
|
142
|
-
summary: Ruby wrapper
|
109
|
+
summary: A Ruby wrapper library to make the Postini SOAP API more palatable
|
143
110
|
test_files: []
|
144
111
|
|
data/config/hoe.rb
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
require 'postini/version'
|
2
|
-
|
3
|
-
AUTHOR = 'Kenneth Kalmer' # can also be an array of Authors
|
4
|
-
EMAIL = "kenneth.kalmer@gmail.com"
|
5
|
-
DESCRIPTION = "Ruby wrapper around the Postini SOAP API (Early Access Program)"
|
6
|
-
GEM_NAME = 'postini' # what ppl will type to install your gem
|
7
|
-
RUBYFORGE_PROJECT = 'postini4r' # The unix name for your project
|
8
|
-
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
|
9
|
-
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
|
10
|
-
EXTRA_DEPENDENCIES = [
|
11
|
-
['activesupport', '>=2.0.2'],
|
12
|
-
['soap4r', '=1.5.8']
|
13
|
-
] # An array of rubygem dependencies [name, version]
|
14
|
-
|
15
|
-
@config_file = "~/.rubyforge/user-config.yml"
|
16
|
-
@config = nil
|
17
|
-
RUBYFORGE_USERNAME = "kennethkalmer"
|
18
|
-
def rubyforge_username
|
19
|
-
unless @config
|
20
|
-
begin
|
21
|
-
@config = YAML.load(File.read(File.expand_path(@config_file)))
|
22
|
-
rescue
|
23
|
-
puts <<-EOS
|
24
|
-
ERROR: No rubyforge config file found: #{@config_file}
|
25
|
-
Run 'rubyforge setup' to prepare your env for access to Rubyforge
|
26
|
-
- See http://newgem.rubyforge.org/rubyforge.html for more details
|
27
|
-
EOS
|
28
|
-
exit
|
29
|
-
end
|
30
|
-
end
|
31
|
-
RUBYFORGE_USERNAME.replace @config["username"]
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
|
-
REV = nil
|
36
|
-
# UNCOMMENT IF REQUIRED:
|
37
|
-
# REV = YAML.load(`svn info`)['Revision']
|
38
|
-
VERS = Postini::VERSION::STRING + (REV ? ".#{REV}" : "")
|
39
|
-
RDOC_OPTS = ['--quiet', '--title', 'postini documentation',
|
40
|
-
"--opname", "index.html",
|
41
|
-
"--line-numbers",
|
42
|
-
"--main", "README",
|
43
|
-
"--inline-source",
|
44
|
-
"--exclude", "*.wsdl"
|
45
|
-
]
|
46
|
-
|
47
|
-
class Hoe
|
48
|
-
def extra_deps
|
49
|
-
@extra_deps.reject! { |x| Array(x).first == 'hoe' }
|
50
|
-
@extra_deps
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
# Generate all the Rake tasks
|
55
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
56
|
-
$hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
57
|
-
p.developer(AUTHOR, EMAIL)
|
58
|
-
p.description = DESCRIPTION
|
59
|
-
p.summary = DESCRIPTION
|
60
|
-
p.url = HOMEPATH
|
61
|
-
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
|
62
|
-
p.test_globs = ["test/**/test_*.rb"]
|
63
|
-
p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
|
64
|
-
|
65
|
-
# == Optional
|
66
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
67
|
-
p.extra_deps = EXTRA_DEPENDENCIES
|
68
|
-
|
69
|
-
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
70
|
-
end
|
71
|
-
|
72
|
-
CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
73
|
-
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
74
|
-
$hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
75
|
-
$hoe.rsync_args = '-av --delete --ignore-errors'
|
76
|
-
$hoe.spec.post_install_message = File.open(File.dirname(__FILE__) + "/../PostInstall.txt").read rescue ""
|
data/config/requirements.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
include FileUtils
|
3
|
-
|
4
|
-
require 'rubygems'
|
5
|
-
%w[rake hoe newgem rubigen].each do |req_gem|
|
6
|
-
begin
|
7
|
-
require req_gem
|
8
|
-
rescue LoadError
|
9
|
-
puts "This Rakefile requires the '#{req_gem}' RubyGem."
|
10
|
-
puts "Installation: gem install #{req_gem} -y"
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
|