streamsend 0.2.3 → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -5
- data/.rspec +1 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +25 -17
- data/README.md +76 -0
- data/Rakefile +1 -2
- data/lib/streamsend/api/account.rb +6 -48
- data/lib/streamsend/api/audience.rb +14 -0
- data/lib/streamsend/api/base/base_call.rb +60 -0
- data/lib/streamsend/api/base/create.rb +41 -0
- data/lib/streamsend/api/base/destroy.rb +43 -0
- data/lib/streamsend/api/base/index.rb +51 -0
- data/lib/streamsend/api/base/show.rb +42 -0
- data/lib/streamsend/api/base/update.rb +43 -0
- data/lib/streamsend/api/blast.rb +51 -0
- data/lib/streamsend/api/bounce.rb +20 -0
- data/lib/streamsend/api/click.rb +18 -0
- data/lib/streamsend/api/configuration.rb +26 -0
- data/lib/streamsend/api/email.rb +20 -0
- data/lib/streamsend/api/exception.rb +4 -4
- data/lib/streamsend/api/field.rb +20 -0
- data/lib/streamsend/api/field_option.rb +60 -0
- data/lib/streamsend/api/filter.rb +20 -0
- data/lib/streamsend/api/from_email_address.rb +24 -0
- data/lib/streamsend/api/import.rb +11 -0
- data/lib/streamsend/api/link.rb +11 -0
- data/lib/streamsend/api/list.rb +13 -39
- data/lib/streamsend/api/membership.rb +28 -0
- data/lib/streamsend/api/person.rb +66 -0
- data/lib/streamsend/api/result.rb +13 -0
- data/lib/streamsend/api/session.rb +73 -0
- data/lib/streamsend/api/unsubscribe.rb +20 -0
- data/lib/streamsend/api/upload.rb +13 -0
- data/lib/streamsend/api/user.rb +67 -38
- data/lib/streamsend/api/view.rb +8 -0
- data/lib/streamsend/version.rb +3 -0
- data/lib/streamsend.rb +35 -16
- data/spec/lib/streamsend/api/integration/account_spec.rb +50 -0
- data/spec/lib/streamsend/api/integration/audience_spec.rb +56 -0
- data/spec/lib/streamsend/api/integration/blast_spec.rb +110 -0
- data/spec/lib/streamsend/api/integration/bounce_spec.rb +43 -0
- data/spec/lib/streamsend/api/integration/click_spec.rb +37 -0
- data/spec/lib/streamsend/api/integration/email_spec.rb +76 -0
- data/spec/lib/streamsend/api/integration/field_option_spec.rb +87 -0
- data/spec/lib/streamsend/api/integration/field_spec.rb +75 -0
- data/spec/lib/streamsend/api/integration/filter_spec.rb +101 -0
- data/spec/lib/streamsend/api/integration/from_email_address_spec.rb +46 -0
- data/spec/lib/streamsend/api/integration/helpers.rb +16 -0
- data/spec/lib/streamsend/api/integration/import_spec.rb +35 -0
- data/spec/lib/streamsend/api/integration/link_spec.rb +39 -0
- data/spec/lib/streamsend/api/integration/list_spec.rb +83 -0
- data/spec/lib/streamsend/api/integration/membership_spec.rb +69 -0
- data/spec/lib/streamsend/api/integration/person_spec.rb +119 -0
- data/spec/lib/streamsend/api/integration/unsubscribe_spec.rb +47 -0
- data/spec/lib/streamsend/api/integration/upload_spec.rb +29 -0
- data/spec/lib/streamsend/api/integration/user_spec.rb +99 -0
- data/spec/lib/streamsend/api/integration/view_spec.rb +27 -0
- data/spec/lib/streamsend/api/unit/base/base_call_spec.rb +66 -0
- data/spec/lib/streamsend/api/unit/base/create_spec.rb +67 -0
- data/spec/lib/streamsend/api/unit/base/destroy_spec.rb +59 -0
- data/spec/lib/streamsend/api/unit/base/index_spec.rb +85 -0
- data/spec/lib/streamsend/api/unit/base/show_spec.rb +68 -0
- data/spec/lib/streamsend/api/unit/base/update_spec.rb +76 -0
- data/spec/lib/streamsend/api/unit/blast_spec.rb +79 -0
- data/spec/lib/streamsend/api/unit/bounce_spec.rb +36 -0
- data/spec/lib/streamsend/api/unit/click_spec.rb +34 -0
- data/spec/lib/streamsend/api/unit/field_option_spec.rb +71 -0
- data/spec/lib/streamsend/api/unit/from_email_address_spec.rb +20 -0
- data/spec/lib/streamsend/api/unit/link_spec.rb +33 -0
- data/spec/lib/streamsend/api/unit/list_spec.rb +33 -0
- data/spec/lib/streamsend/api/unit/membership_spec.rb +46 -0
- data/spec/lib/streamsend/api/unit/person_spec.rb +102 -0
- data/spec/lib/streamsend/api/unit/result_spec.rb +13 -0
- data/spec/lib/streamsend/api/unit/session_spec.rb +62 -0
- data/spec/lib/streamsend/api/unit/unsubscribe_spec.rb +33 -0
- data/spec/lib/streamsend/api/unit/user_spec.rb +102 -0
- data/spec/spec_helper.rb +8 -11
- data/streamsend.gemspec +22 -23
- metadata +250 -178
- checksums.yaml +0 -7
- data/.pair +0 -10
- data/README.rdoc +0 -1
- data/lib/streamsend/api/resource.rb +0 -41
- data/lib/streamsend/api/subscriber.rb +0 -113
- data/spec/integration/account_spec.rb +0 -69
- data/spec/integration/fixtures/vcr_cassettes/streamsend.yml +0 -6831
- data/spec/integration/integration.yml +0 -5
- data/spec/integration/list_spec.rb +0 -68
- data/spec/integration/spec_helper.rb +0 -16
- data/spec/integration/subscriber_spec.rb +0 -24
- data/spec/integration/user_spec.rb +0 -58
- data/spec/lib/streamsend/api/list_spec.rb +0 -179
- data/spec/lib/streamsend/api/resource_spec.rb +0 -24
- data/spec/lib/streamsend/api/subscriber_spec.rb +0 -345
- data/spec/lib/streamsend/api/user_spec.rb +0 -149
- data/spec/lib/streamsend/api_spec.rb +0 -31
- data/watcher_config.rb +0 -2
@@ -1,69 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
require File.join(Dir.pwd, "lib/streamsend")
|
4
|
-
require "integration/spec_helper"
|
5
|
-
require File.expand_path(__FILE__, "../../exception")
|
6
|
-
|
7
|
-
describe "user via api" do
|
8
|
-
before do
|
9
|
-
@account = StreamSend::Api::IntegrationConfiguration.root_account
|
10
|
-
StreamSend::Api.configure(@account.api_username, @account.api_password, @account.app_host)
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:create_account) do
|
14
|
-
pending "TODO -> Broken 2013-04-05"
|
15
|
-
create_result = StreamSend::Api::Account.create(
|
16
|
-
:name => "account2",
|
17
|
-
:automated_email_address => "admin@localhost.com",
|
18
|
-
:quota => 100,
|
19
|
-
:quota_cap => 100,
|
20
|
-
:plan_id => 1,
|
21
|
-
:owner => {
|
22
|
-
"password" => "password2",
|
23
|
-
"password_confirmation" => "password2",
|
24
|
-
"email_address" => "joe+#{Time.now.to_i}@gmail.com",
|
25
|
-
"first_name" => "Joe",
|
26
|
-
"last_name" => "user",
|
27
|
-
"may_export" => true,
|
28
|
-
"administrator" => true
|
29
|
-
})
|
30
|
-
end
|
31
|
-
|
32
|
-
describe ".all" do
|
33
|
-
it "lists all accounts" do
|
34
|
-
VCR.use_cassette('streamsend') do
|
35
|
-
accounts = StreamSend::Api::Account.all
|
36
|
-
accounts.count.should > 0
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe ".show" do
|
42
|
-
it "finds the root account" do
|
43
|
-
VCR.use_cassette('streamsend') do
|
44
|
-
root_account = StreamSend::Api::Account.show(1)
|
45
|
-
root_account.name.should == "EZ Publishing"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
describe ".create" do
|
51
|
-
it "creates a new account" do
|
52
|
-
VCR.use_cassette('streamsend') do
|
53
|
-
id = create_account
|
54
|
-
StreamSend::Api::Account.destroy(id)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
|
-
describe ".destroy" do
|
60
|
-
it "deletes an account" do
|
61
|
-
VCR.use_cassette('streamsend') do
|
62
|
-
id = create_account
|
63
|
-
response = StreamSend::Api::Account.destroy(id)
|
64
|
-
response.should == true
|
65
|
-
expect { StreamSend::Api::Account.show(id) }.to raise_exception(StreamSend::Api::Exception, /could not find/i)
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|