constant_contact 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,18 @@ module ConstantContact
3
3
  class Activity < Base
4
4
  self.format = ActiveResource::Formats::HtmlEncodedFormat
5
5
  attr_accessor :contacts, :lists, :activity_type
6
-
6
+
7
+ def self.parse_id(url)
8
+ url.to_s.split('/').last
9
+ end
10
+
11
+ def self.element_path(id, prefix_options = {}, query_options = nil)
12
+ prefix_options, query_options = split_options(prefix_options) if query_options.nil?
13
+ id_val = parse_id(id)
14
+ id_val = id_val.blank? ? nil : "/#{id_val}"
15
+ "#{collection_path}#{id_val}#{query_string(query_options)}"
16
+ end
17
+
7
18
  def encode
8
19
  post_data = "activityType=#{self.activity_type}"
9
20
  post_data += self.encoded_data
@@ -11,7 +11,7 @@ module ConstantContact
11
11
  # Assumes url structure with the id at the end, e.g.:
12
12
  # http://api.constantcontact.com/ws/customers/yourname/contacts/29
13
13
  def parse_id(url)
14
- url.to_s.split(/\//).last.to_i
14
+ url.to_s.split('/').last.to_i
15
15
  end
16
16
 
17
17
  def api_key
@@ -1,3 +1,3 @@
1
1
  module ConstantContact
2
- Version = '1.1.4'.freeze
2
+ Version = '1.1.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: constant_contact
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 4
10
- version: 1.1.4
9
+ - 5
10
+ version: 1.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tim Case
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-09-19 00:00:00 -04:00
21
+ date: 2010-09-23 00:00:00 -04:00
22
22
  default_executable:
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
@@ -55,12 +55,14 @@ dependencies:
55
55
  requirement: &id003 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
- - - ">="
58
+ - - ~>
59
59
  - !ruby/object:Gem::Version
60
- hash: 3
60
+ hash: 15
61
61
  segments:
62
- - 0
63
- version: "0"
62
+ - 2
63
+ - 1
64
+ - 2
65
+ version: 2.1.2
64
66
  type: :runtime
65
67
  version_requirements: *id003
66
68
  - !ruby/object:Gem::Dependency