madmimi 1.0.16 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +2 -0
  3. data/Gemfile +12 -0
  4. data/Gemfile.lock +93 -0
  5. data/README.rdoc +88 -37
  6. data/Rakefile +2 -30
  7. data/VERSION +1 -1
  8. data/config/paths.yml +23 -0
  9. data/lib/madmimi.rb +210 -123
  10. data/madmimi.gemspec +130 -22
  11. data/spec/cassettes/add_to_list/success.yml +54 -0
  12. data/spec/cassettes/add_to_list/user_does_not_exist.yml +165 -0
  13. data/spec/cassettes/add_to_list/user_existed.yml +54 -0
  14. data/spec/cassettes/add_to_list/user_exists.yml +171 -0
  15. data/spec/cassettes/add_to_list/user_updated.yml +174 -0
  16. data/spec/cassettes/add_user/user_did_not_exist.yml +54 -0
  17. data/spec/cassettes/add_user/user_exist.yml +303 -0
  18. data/spec/cassettes/add_user/user_existed.yml +54 -0
  19. data/spec/cassettes/add_user/user_missing.yml +138 -0
  20. data/spec/cassettes/add_user/user_updated.yml +153 -0
  21. data/spec/cassettes/add_users/users_did_not_exist.yml +54 -0
  22. data/spec/cassettes/add_users/users_exist.yml +326 -0
  23. data/spec/cassettes/add_users/users_existed.yml +54 -0
  24. data/spec/cassettes/add_users/users_missing.yml +305 -0
  25. data/spec/cassettes/add_users/users_updated.yml +327 -0
  26. data/spec/cassettes/add_users_to_list/gained_membership.yml +107 -0
  27. data/spec/cassettes/add_users_to_list/missing_membership.yml +174 -0
  28. data/spec/cassettes/add_users_to_list/users_did_not_exist.yml +54 -0
  29. data/spec/cassettes/add_users_to_list/users_exist.yml +365 -0
  30. data/spec/cassettes/add_users_to_list/users_existed.yml +54 -0
  31. data/spec/cassettes/add_users_to_list/users_missing.yml +341 -0
  32. data/spec/cassettes/add_users_to_list/users_updated.yml +365 -0
  33. data/spec/cassettes/audience_search/does_not_include_suppressed_users.yml +76 -0
  34. data/spec/cassettes/audience_search/includes_suppressed_users.yml +86 -0
  35. data/spec/cassettes/csv_import/success.yml +54 -0
  36. data/spec/cassettes/csv_import/users_exist.yml +273 -0
  37. data/spec/cassettes/csv_import/users_missing.yml +381 -0
  38. data/spec/cassettes/delete_list/exists.yml +57 -0
  39. data/spec/cassettes/delete_list/fail.yml +54 -0
  40. data/spec/cassettes/delete_list/not_exists.yml +56 -0
  41. data/spec/cassettes/delete_list/success.yml +54 -0
  42. data/spec/cassettes/delete_list/users_exist.yml +129 -0
  43. data/spec/cassettes/list_members/multiple.yml +68 -0
  44. data/spec/cassettes/list_members/single.yml +68 -0
  45. data/spec/cassettes/lists/multiple.yml +56 -0
  46. data/spec/cassettes/lists/single.yml +55 -0
  47. data/spec/cassettes/mailing_stats/mailing_does_not_exist.yml +50 -0
  48. data/spec/cassettes/mailing_stats/promotion_and_mailing_exist.yml +57 -0
  49. data/spec/cassettes/mailing_stats/promotion_does_not_exist.yml +50 -0
  50. data/spec/cassettes/members/multiple.yml +174 -0
  51. data/spec/cassettes/members/single.yml +61 -0
  52. data/spec/cassettes/memberships/multiple.yml +56 -0
  53. data/spec/cassettes/memberships/single.yml +108 -0
  54. data/spec/cassettes/new_list/exists.yml +57 -0
  55. data/spec/cassettes/new_list/fail.yml +52 -0
  56. data/spec/cassettes/new_list/not_exists.yml +56 -0
  57. data/spec/cassettes/new_list/success.yml +52 -0
  58. data/spec/cassettes/promotions/multiple.yml +63 -0
  59. data/spec/cassettes/promotions/single.yml +61 -0
  60. data/spec/cassettes/remove_from_all_list/user_does_not_have_memberships.yml +60 -0
  61. data/spec/cassettes/remove_from_all_lists/user_has_memberships.yml +113 -0
  62. data/spec/cassettes/remove_from_all_lists/user_with_memberships.yml +49 -0
  63. data/spec/cassettes/remove_from_list/user_does_not_exist.yml +49 -0
  64. data/spec/cassettes/remove_from_list/user_in_list_does_not_exist.yml +62 -0
  65. data/spec/cassettes/remove_from_list/user_in_list_exists.yml +68 -0
  66. data/spec/cassettes/remove_from_list/user_in_the_list.yml +49 -0
  67. data/spec/cassettes/remove_from_list/user_not_in_the_list.yml +49 -0
  68. data/spec/cassettes/save_promotion/only_plain_text.yml +56 -0
  69. data/spec/cassettes/save_promotion/only_raw_html.yml +56 -0
  70. data/spec/cassettes/save_promotion/promotion_exists.yml +65 -0
  71. data/spec/cassettes/save_promotion/promotion_missing.yml +63 -0
  72. data/spec/cassettes/save_promotion/raw_html_and_plain_text.yml +56 -0
  73. data/spec/cassettes/send_html/promotion_does_not_exist.yml +56 -0
  74. data/spec/cassettes/send_html/send_single.yml +53 -0
  75. data/spec/cassettes/send_html/send_to_all.yml +56 -0
  76. data/spec/cassettes/send_html/send_to_list.yml +56 -0
  77. data/spec/cassettes/send_mail/promotion_does_not_exist.yml +54 -0
  78. data/spec/cassettes/send_mail/send_single.yml +53 -0
  79. data/spec/cassettes/send_mail/send_to_all.yml +56 -0
  80. data/spec/cassettes/send_mail/send_to_list.yml +56 -0
  81. data/spec/cassettes/send_plaintext/promotion_does_not_exist.yml +56 -0
  82. data/spec/cassettes/send_plaintext/send_single.yml +53 -0
  83. data/spec/cassettes/send_plaintext/send_to_all.yml +56 -0
  84. data/spec/cassettes/send_plaintext/send_to_list.yml +56 -0
  85. data/spec/cassettes/send_plaintext/tracking_beacon_missing.yml +56 -0
  86. data/spec/cassettes/status/transactional_mail_does_not_exist.yml +51 -0
  87. data/spec/cassettes/status/transactional_mail_exists.yml +53 -0
  88. data/spec/cassettes/suppress_email/already_suppressed.yml +51 -0
  89. data/spec/cassettes/suppress_email/not_suppressed.yml +102 -0
  90. data/spec/cassettes/suppress_email/user_does_not_exist.yml +100 -0
  91. data/spec/cassettes/suppress_email/user_is_now_suppressed.yml +51 -0
  92. data/spec/cassettes/suppress_email/user_not_suppressed.yml +51 -0
  93. data/spec/cassettes/suppressed/member_does_not_exist.yml +49 -0
  94. data/spec/cassettes/suppressed/member_is_not_suppressed.yml +51 -0
  95. data/spec/cassettes/suppressed/member_is_suppressed.yml +51 -0
  96. data/spec/cassettes/suppressed_since/members_exist.yml +56 -0
  97. data/spec/cassettes/suppressed_since/no_members.yml +56 -0
  98. data/spec/cassettes/unsuppress_email/already_suppressed.yml +100 -0
  99. data/spec/cassettes/unsuppress_email/not_suppressed.yml +99 -0
  100. data/spec/cassettes/unsuppress_email/user_does_not_exist.yml +99 -0
  101. data/spec/cassettes/unsuppress_email/user_is_now_unsuppressed.yml +49 -0
  102. data/spec/cassettes/unsuppress_email/user_suppressed.yml +51 -0
  103. data/spec/cassettes/update_email/user_does_not_have_permission.yml +52 -0
  104. data/spec/cassettes/update_email/user_existed.yml +54 -0
  105. data/spec/cassettes/update_email/user_missing.yml +52 -0
  106. data/spec/cassettes/update_email/user_with_new_email.yml +345 -0
  107. data/spec/cassettes/update_email/user_with_old_email.yml +345 -0
  108. data/spec/madmimi_spec.rb +1166 -0
  109. data/spec/spec_helper.rb +15 -0
  110. metadata +210 -96
  111. data/test/fixtures/lists.xml +0 -7
  112. data/test/fixtures/promotions.xml +0 -10
  113. data/test/fixtures/search.xml +0 -38
  114. data/test/helper.rb +0 -43
  115. data/test/test_madmimi.rb +0 -63
@@ -0,0 +1,15 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require 'madmimi'
5
+ require 'vcr'
6
+
7
+ VCR.configure do |c|
8
+ c.hook_into :webmock
9
+ c.cassette_library_dir = 'spec/cassettes'
10
+ c.configure_rspec_metadata!
11
+ end
12
+
13
+ RSpec.configure do |c|
14
+
15
+ end
metadata CHANGED
@@ -1,139 +1,253 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: madmimi
3
- version: !ruby/object:Gem::Version
4
- hash: 55
5
- prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 16
10
- version: 1.0.16
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Nicholas Young
14
8
  - Marc Heiligers
9
+ - Maxim Gladkov
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2013-01-15 00:00:00 -06:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
13
+ date: 2014-10-15 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">"
20
+ - !ruby/object:Gem::Version
21
+ version: 3.0.0
22
+ type: :runtime
23
23
  prerelease: false
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">"
27
+ - !ruby/object:Gem::Version
28
+ version: 3.0.0
29
+ - !ruby/object:Gem::Dependency
30
+ name: crack
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
27
33
  - - ">"
28
- - !ruby/object:Gem::Version
29
- hash: 21
30
- segments:
31
- - 0
32
- - 1
33
- - 7
34
+ - !ruby/object:Gem::Version
34
35
  version: 0.1.7
35
- requirement: *id001
36
36
  type: :runtime
37
- name: crack
38
- - !ruby/object:Gem::Dependency
39
37
  prerelease: false
40
- version_requirements: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
43
40
  - - ">"
44
- - !ruby/object:Gem::Version
45
- hash: 7
46
- segments:
47
- - 1
48
- - 4
49
- version: "1.4"
50
- requirement: *id002
51
- type: :development
52
- name: jeweler
53
- - !ruby/object:Gem::Dependency
41
+ - !ruby/object:Gem::Version
42
+ version: 0.1.7
43
+ - !ruby/object:Gem::Dependency
44
+ name: httparty
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.13.1
50
+ type: :runtime
54
51
  prerelease: false
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.13.1
57
+ - !ruby/object:Gem::Dependency
58
+ name: jeweler
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
58
61
  - - ">"
59
- - !ruby/object:Gem::Version
60
- hash: 11
61
- segments:
62
- - 1
63
- - 2
64
- version: "1.2"
65
- requirement: *id003
62
+ - !ruby/object:Gem::Version
63
+ version: '1.4'
66
64
  type: :development
67
- name: fakeweb
68
- - !ruby/object:Gem::Dependency
69
65
  prerelease: false
70
- version_requirements: &id004 !ruby/object:Gem::Requirement
71
- none: false
72
- requirements:
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
73
68
  - - ">"
74
- - !ruby/object:Gem::Version
75
- hash: 23
76
- segments:
77
- - 2
78
- - 10
79
- version: "2.10"
80
- requirement: *id004
69
+ - !ruby/object:Gem::Version
70
+ version: '1.4'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: vcr
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
81
92
  type: :development
82
- name: shoulda
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ - !ruby/object:Gem::Dependency
100
+ name: webmock
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
83
113
  description: Send emails, track statistics, and manage your subscriber base with ease.
84
114
  email: nicholas@madmimi.com
85
115
  executables: []
86
-
87
116
  extensions: []
88
-
89
- extra_rdoc_files:
117
+ extra_rdoc_files:
90
118
  - LICENSE
91
119
  - README.rdoc
92
- files:
120
+ files:
121
+ - ".rspec"
122
+ - Gemfile
123
+ - Gemfile.lock
93
124
  - LICENSE
94
125
  - README.rdoc
95
126
  - Rakefile
96
127
  - VERSION
128
+ - config/paths.yml
97
129
  - lib/madmimi.rb
98
130
  - madmimi.gemspec
99
- - test/fixtures/lists.xml
100
- - test/fixtures/promotions.xml
101
- - test/fixtures/search.xml
102
- - test/helper.rb
103
- - test/test_madmimi.rb
104
- has_rdoc: true
131
+ - spec/cassettes/add_to_list/success.yml
132
+ - spec/cassettes/add_to_list/user_does_not_exist.yml
133
+ - spec/cassettes/add_to_list/user_existed.yml
134
+ - spec/cassettes/add_to_list/user_exists.yml
135
+ - spec/cassettes/add_to_list/user_updated.yml
136
+ - spec/cassettes/add_user/user_did_not_exist.yml
137
+ - spec/cassettes/add_user/user_exist.yml
138
+ - spec/cassettes/add_user/user_existed.yml
139
+ - spec/cassettes/add_user/user_missing.yml
140
+ - spec/cassettes/add_user/user_updated.yml
141
+ - spec/cassettes/add_users/users_did_not_exist.yml
142
+ - spec/cassettes/add_users/users_exist.yml
143
+ - spec/cassettes/add_users/users_existed.yml
144
+ - spec/cassettes/add_users/users_missing.yml
145
+ - spec/cassettes/add_users/users_updated.yml
146
+ - spec/cassettes/add_users_to_list/gained_membership.yml
147
+ - spec/cassettes/add_users_to_list/missing_membership.yml
148
+ - spec/cassettes/add_users_to_list/users_did_not_exist.yml
149
+ - spec/cassettes/add_users_to_list/users_exist.yml
150
+ - spec/cassettes/add_users_to_list/users_existed.yml
151
+ - spec/cassettes/add_users_to_list/users_missing.yml
152
+ - spec/cassettes/add_users_to_list/users_updated.yml
153
+ - spec/cassettes/audience_search/does_not_include_suppressed_users.yml
154
+ - spec/cassettes/audience_search/includes_suppressed_users.yml
155
+ - spec/cassettes/csv_import/success.yml
156
+ - spec/cassettes/csv_import/users_exist.yml
157
+ - spec/cassettes/csv_import/users_missing.yml
158
+ - spec/cassettes/delete_list/exists.yml
159
+ - spec/cassettes/delete_list/fail.yml
160
+ - spec/cassettes/delete_list/not_exists.yml
161
+ - spec/cassettes/delete_list/success.yml
162
+ - spec/cassettes/delete_list/users_exist.yml
163
+ - spec/cassettes/list_members/multiple.yml
164
+ - spec/cassettes/list_members/single.yml
165
+ - spec/cassettes/lists/multiple.yml
166
+ - spec/cassettes/lists/single.yml
167
+ - spec/cassettes/mailing_stats/mailing_does_not_exist.yml
168
+ - spec/cassettes/mailing_stats/promotion_and_mailing_exist.yml
169
+ - spec/cassettes/mailing_stats/promotion_does_not_exist.yml
170
+ - spec/cassettes/members/multiple.yml
171
+ - spec/cassettes/members/single.yml
172
+ - spec/cassettes/memberships/multiple.yml
173
+ - spec/cassettes/memberships/single.yml
174
+ - spec/cassettes/new_list/exists.yml
175
+ - spec/cassettes/new_list/fail.yml
176
+ - spec/cassettes/new_list/not_exists.yml
177
+ - spec/cassettes/new_list/success.yml
178
+ - spec/cassettes/promotions/multiple.yml
179
+ - spec/cassettes/promotions/single.yml
180
+ - spec/cassettes/remove_from_all_list/user_does_not_have_memberships.yml
181
+ - spec/cassettes/remove_from_all_lists/user_has_memberships.yml
182
+ - spec/cassettes/remove_from_all_lists/user_with_memberships.yml
183
+ - spec/cassettes/remove_from_list/user_does_not_exist.yml
184
+ - spec/cassettes/remove_from_list/user_in_list_does_not_exist.yml
185
+ - spec/cassettes/remove_from_list/user_in_list_exists.yml
186
+ - spec/cassettes/remove_from_list/user_in_the_list.yml
187
+ - spec/cassettes/remove_from_list/user_not_in_the_list.yml
188
+ - spec/cassettes/save_promotion/only_plain_text.yml
189
+ - spec/cassettes/save_promotion/only_raw_html.yml
190
+ - spec/cassettes/save_promotion/promotion_exists.yml
191
+ - spec/cassettes/save_promotion/promotion_missing.yml
192
+ - spec/cassettes/save_promotion/raw_html_and_plain_text.yml
193
+ - spec/cassettes/send_html/promotion_does_not_exist.yml
194
+ - spec/cassettes/send_html/send_single.yml
195
+ - spec/cassettes/send_html/send_to_all.yml
196
+ - spec/cassettes/send_html/send_to_list.yml
197
+ - spec/cassettes/send_mail/promotion_does_not_exist.yml
198
+ - spec/cassettes/send_mail/send_single.yml
199
+ - spec/cassettes/send_mail/send_to_all.yml
200
+ - spec/cassettes/send_mail/send_to_list.yml
201
+ - spec/cassettes/send_plaintext/promotion_does_not_exist.yml
202
+ - spec/cassettes/send_plaintext/send_single.yml
203
+ - spec/cassettes/send_plaintext/send_to_all.yml
204
+ - spec/cassettes/send_plaintext/send_to_list.yml
205
+ - spec/cassettes/send_plaintext/tracking_beacon_missing.yml
206
+ - spec/cassettes/status/transactional_mail_does_not_exist.yml
207
+ - spec/cassettes/status/transactional_mail_exists.yml
208
+ - spec/cassettes/suppress_email/already_suppressed.yml
209
+ - spec/cassettes/suppress_email/not_suppressed.yml
210
+ - spec/cassettes/suppress_email/user_does_not_exist.yml
211
+ - spec/cassettes/suppress_email/user_is_now_suppressed.yml
212
+ - spec/cassettes/suppress_email/user_not_suppressed.yml
213
+ - spec/cassettes/suppressed/member_does_not_exist.yml
214
+ - spec/cassettes/suppressed/member_is_not_suppressed.yml
215
+ - spec/cassettes/suppressed/member_is_suppressed.yml
216
+ - spec/cassettes/suppressed_since/members_exist.yml
217
+ - spec/cassettes/suppressed_since/no_members.yml
218
+ - spec/cassettes/unsuppress_email/already_suppressed.yml
219
+ - spec/cassettes/unsuppress_email/not_suppressed.yml
220
+ - spec/cassettes/unsuppress_email/user_does_not_exist.yml
221
+ - spec/cassettes/unsuppress_email/user_is_now_unsuppressed.yml
222
+ - spec/cassettes/unsuppress_email/user_suppressed.yml
223
+ - spec/cassettes/update_email/user_does_not_have_permission.yml
224
+ - spec/cassettes/update_email/user_existed.yml
225
+ - spec/cassettes/update_email/user_missing.yml
226
+ - spec/cassettes/update_email/user_with_new_email.yml
227
+ - spec/cassettes/update_email/user_with_old_email.yml
228
+ - spec/madmimi_spec.rb
229
+ - spec/spec_helper.rb
105
230
  homepage: http://github.com/madmimi/madmimi-gem
106
231
  licenses: []
107
-
232
+ metadata: {}
108
233
  post_install_message:
109
234
  rdoc_options: []
110
-
111
- require_paths:
235
+ require_paths:
112
236
  - lib
113
- required_ruby_version: !ruby/object:Gem::Requirement
114
- none: false
115
- requirements:
237
+ required_ruby_version: !ruby/object:Gem::Requirement
238
+ requirements:
116
239
  - - ">="
117
- - !ruby/object:Gem::Version
118
- hash: 3
119
- segments:
120
- - 0
121
- version: "0"
122
- required_rubygems_version: !ruby/object:Gem::Requirement
123
- none: false
124
- requirements:
240
+ - !ruby/object:Gem::Version
241
+ version: '0'
242
+ required_rubygems_version: !ruby/object:Gem::Requirement
243
+ requirements:
125
244
  - - ">="
126
- - !ruby/object:Gem::Version
127
- hash: 3
128
- segments:
129
- - 0
130
- version: "0"
245
+ - !ruby/object:Gem::Version
246
+ version: '0'
131
247
  requirements: []
132
-
133
248
  rubyforge_project:
134
- rubygems_version: 1.4.2
249
+ rubygems_version: 2.2.2
135
250
  signing_key:
136
- specification_version: 3
251
+ specification_version: 4
137
252
  summary: Mad Mimi API wrapper for Ruby
138
253
  test_files: []
139
-
@@ -1,7 +0,0 @@
1
- <lists>
2
- <list subscriber_count="0" name="Funky List" id="90920"/>
3
- <list subscriber_count="0" name="New Test" id="90913"/>
4
- <list subscriber_count="0" name="New Test List" id="93852"/>
5
- <list subscriber_count="0" name="Other test" id="89621"/>
6
- <list subscriber_count="0" name="Test List" id="88803"/>
7
- </lists>
@@ -1,10 +0,0 @@
1
- <promotions>
2
- <promotion updated_at="Mon May 24 19:58:02 -0400 2010" mimio="1bee3" name="HTML Test" id="257713">
3
- </promotion>
4
- <promotion updated_at="Mon May 24 13:20:14 -0400 2010" mimio="69ce3" name="Untitled Promotion" id="257174">
5
- <mailing id="1274713">
6
- <started_send>Mon May 24 13:20:03 -0400 2010</started_send>
7
- <finished_send>Mon May 24 13:20:06 -0400 2010</finished_send>
8
- </mailing>
9
- </promotion>
10
- </promotions>
@@ -1,38 +0,0 @@
1
- <audience>
2
- <member suppressed="false">
3
- <first_name></first_name>
4
- <last_name></last_name>
5
- <email>nicholas@madmimi.com</email>
6
- <created_at>Mon May 24 13:19:59 -0400 2010</created_at>
7
- <city></city>
8
- <phone></phone>
9
- <company></company>
10
- <title></title>
11
- <address></address>
12
- <state></state>
13
- <zip></zip>
14
- <country></country>
15
- <confirmed></confirmed>
16
- <music></music>
17
- <lists>
18
- </lists>
19
- </member>
20
- <member suppressed="false">
21
- <first_name></first_name>
22
- <last_name></last_name>
23
- <email>nicholas@nicholaswyoung.com</email>
24
- <created_at>Mon May 24 20:17:30 -0400 2010</created_at>
25
- <city></city>
26
- <phone></phone>
27
- <company></company>
28
- <title></title>
29
- <address></address>
30
- <state></state>
31
- <zip></zip>
32
- <country></country>
33
- <confirmed></confirmed>
34
- <music></music>
35
- <lists>
36
- </lists>
37
- </member>
38
- </audience>
@@ -1,43 +0,0 @@
1
- require 'rubygems'
2
- require 'test/unit'
3
- require 'shoulda'
4
- require 'fakeweb'
5
-
6
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
7
- $LOAD_PATH.unshift(File.dirname(__FILE__))
8
- require 'madmimi'
9
-
10
- class Test::Unit::TestCase
11
- end
12
-
13
- def fixture_file(filename)
14
- return '' if filename == ''
15
- file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename)
16
- File.read(file_path)
17
- end
18
-
19
- def madmimi_url(url, https = false)
20
- if https
21
- url =~ /^https/ ? url : "https://api.madmimi.com#{url}"
22
- else
23
- url =~ /^http/ ? url : "http://api.madmimi.com#{url}"
24
- end
25
- end
26
-
27
- def stub_get(url, options = {})
28
- https = options.delete(:https)
29
-
30
- filename = options.delete(:filename)
31
- options = { :body => fixture_file(filename) } if filename
32
-
33
- FakeWeb.register_uri(:get, madmimi_url(url, https), options)
34
- end
35
-
36
- def stub_post(url, options)
37
- https = options.delete(:https)
38
-
39
- filename = options.delete(:filename)
40
- options = { :body => fixture_file(filename) } if filename
41
-
42
- FakeWeb.register_uri(:post, madmimi_url(url, https), options)
43
- end