expresspigeon-ruby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rvmrc +1 -1
- data/Gemfile.lock +15 -1
- data/README.md +2 -0
- data/expresspigeon-ruby-0.0.2.gem +0 -0
- data/expresspigeon-ruby.gemspec +5 -2
- data/lib/express_pigeon/auto_responders.rb +47 -0
- data/lib/expresspigeon-ruby.rb +34 -230
- data/lib/expresspigeon-ruby/campaigns.rb +64 -0
- data/lib/expresspigeon-ruby/contacts.rb +41 -0
- data/lib/expresspigeon-ruby/lists.rb +71 -0
- data/lib/expresspigeon-ruby/messages.rb +53 -0
- data/lib/expresspigeon-ruby/meta_hash.rb +26 -0
- data/lib/expresspigeon-ruby/templates.rb +18 -0
- data/lib/expresspigeon-ruby/version.rb +1 -1
- data/spec/campaigns_spec.rb +25 -1
- data/spec/contacts_spec.rb +44 -28
- data/spec/lists_spec.rb +101 -138
- data/spec/pigeon_helper.rb +7 -6
- data/spec/resources/upload.csv +3 -0
- data/spec/templates_spec.rb +15 -0
- metadata +32 -5
data/spec/pigeon_helper.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
PIGEON = ExpressPigeon::API
|
1
2
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
|
4
|
+
TEMPLATE_ID = ENV['TEMPLATE_ID']
|
5
|
+
LIST_ID = ENV['LIST_ID']
|
6
|
+
API_USER = ENV['API_USER']
|
6
7
|
|
7
8
|
module PigeonSpecHelper
|
8
9
|
def validate_response res, code, status, message
|
@@ -11,6 +12,6 @@ module PigeonSpecHelper
|
|
11
12
|
if message
|
12
13
|
(res.message =~ message).should_not be_nil
|
13
14
|
end
|
14
|
-
|
15
15
|
end
|
16
|
-
end
|
16
|
+
end
|
17
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require './lib/expresspigeon-ruby'
|
2
|
+
require 'pigeon_helper'
|
3
|
+
|
4
|
+
describe 'templates integration test' do
|
5
|
+
|
6
|
+
include PigeonSpecHelper
|
7
|
+
|
8
|
+
it 'should copy template and delete template' do
|
9
|
+
template_response = PIGEON.templates.copy 34830, "new template", :content => "Hello Template World!"
|
10
|
+
template_response.message.should eq 'template copied successfully'
|
11
|
+
template_id = template_response.template_id
|
12
|
+
delete_response = PIGEON.templates.delete template_id
|
13
|
+
delete_response.message.should eq 'template deleted successfully'
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expresspigeon-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ipolevoy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.8.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.8.0
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rspec
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -25,9 +39,9 @@ dependencies:
|
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '2.6'
|
27
41
|
description: ExpressPigeon Ruby API for sending transactional messages, manipulating
|
28
|
-
lists, contacts
|
42
|
+
lists, contacts and more
|
29
43
|
email:
|
30
|
-
-
|
44
|
+
- igor@expresspigeon.com
|
31
45
|
executables: []
|
32
46
|
extensions: []
|
33
47
|
extra_rdoc_files: []
|
@@ -39,14 +53,24 @@ files:
|
|
39
53
|
- LICENSE.txt
|
40
54
|
- README.md
|
41
55
|
- Rakefile
|
56
|
+
- expresspigeon-ruby-0.0.2.gem
|
42
57
|
- expresspigeon-ruby.gemspec
|
58
|
+
- lib/express_pigeon/auto_responders.rb
|
43
59
|
- lib/expresspigeon-ruby.rb
|
60
|
+
- lib/expresspigeon-ruby/campaigns.rb
|
61
|
+
- lib/expresspigeon-ruby/contacts.rb
|
62
|
+
- lib/expresspigeon-ruby/lists.rb
|
63
|
+
- lib/expresspigeon-ruby/messages.rb
|
64
|
+
- lib/expresspigeon-ruby/meta_hash.rb
|
65
|
+
- lib/expresspigeon-ruby/templates.rb
|
44
66
|
- lib/expresspigeon-ruby/version.rb
|
45
67
|
- spec/campaigns_spec.rb
|
46
68
|
- spec/contacts_spec.rb
|
47
69
|
- spec/lists_spec.rb
|
48
70
|
- spec/messages_spec.rb
|
49
71
|
- spec/pigeon_helper.rb
|
72
|
+
- spec/resources/upload.csv
|
73
|
+
- spec/templates_spec.rb
|
50
74
|
homepage: https://github.com/expresspigeon/expresspigeon-ruby
|
51
75
|
licenses: []
|
52
76
|
metadata: {}
|
@@ -66,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
90
|
version: '0'
|
67
91
|
requirements: []
|
68
92
|
rubyforge_project:
|
69
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.2.2
|
70
94
|
signing_key:
|
71
95
|
specification_version: 4
|
72
96
|
summary: ExpressPigeon API Ruby Wrapper
|
@@ -76,3 +100,6 @@ test_files:
|
|
76
100
|
- spec/lists_spec.rb
|
77
101
|
- spec/messages_spec.rb
|
78
102
|
- spec/pigeon_helper.rb
|
103
|
+
- spec/resources/upload.csv
|
104
|
+
- spec/templates_spec.rb
|
105
|
+
has_rdoc:
|