dpickett-monkey_party 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 1
4
+ :patch: 3
@@ -2,7 +2,7 @@ require "ruby-debug"
2
2
  module MonkeyParty
3
3
  class Base
4
4
  include HTTParty
5
- base_uri 'http://api.mailchimp.com/1.1/'
5
+ base_uri 'http://api.mailchimp.com/1.2/'
6
6
  default_params :output => "xml"
7
7
 
8
8
  def initialize(attrs = {})
@@ -10,9 +10,11 @@ module MonkeyParty
10
10
  element :member_count, Integer
11
11
 
12
12
  def create_subscribers(array_of_subscribers, options = {})
13
- options[:double_optin] ||= true
14
- options[:update_existing] ||= false
15
- options[:replace_interests] ||= true
13
+ options = {
14
+ :double_optin => true,
15
+ :update_existing => false,
16
+ :replace_interests => true
17
+ }.merge(options)
16
18
 
17
19
  batch_hash = {}
18
20
  index = 0
@@ -36,9 +38,11 @@ module MonkeyParty
36
38
  end
37
39
 
38
40
  def destroy_subscribers(array_of_unsubscribers, options = {})
39
- options[:delete_member] ||= false
40
- options[:send_goodbye] ||= true
41
- options[:send_notify] ||= false
41
+ options = {
42
+ :delete_member => false,
43
+ :send_goodbye => true,
44
+ :send_notify => false
45
+ }.merge(options)
42
46
 
43
47
  batch_hash = {}
44
48
  index = 0
data/test/test_helper.rb CHANGED
@@ -20,7 +20,7 @@ class Test::Unit::TestCase
20
20
  protected
21
21
  def mock_response(path, fixture)
22
22
  FakeWeb.register_uri(
23
- "http://api.mailchimp.com/1.1?#{path}",
23
+ "http://api.mailchimp.com/1.2?#{path}",
24
24
  :response => xml_fixture_path(fixture))
25
25
  end
26
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpickett-monkey_party
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Pickett
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-02 00:00:00 -07:00
12
+ date: 2009-04-03 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency