hominid 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +0 -4
- data/VERSION +1 -1
- data/hominid.gemspec +2 -2
- data/lib/hominid/base.rb +1 -0
- data/test/hominid_test.rb +5 -0
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -6,10 +6,6 @@ Hominid is a Ruby gem that provides a wrapper for interacting with the Mailchimp
|
|
6
6
|
|
7
7
|
sudo gem install hominid
|
8
8
|
|
9
|
-
Hominid is hosted at Gemcutter[http://gemcutter.org]. Be sure that you have the Gemcutter gem installed if you are having trouble installing Hominid:
|
10
|
-
|
11
|
-
sudo gem install gemcutter
|
12
|
-
|
13
9
|
== Requirements
|
14
10
|
|
15
11
|
You will need a Mailchimp[http://eepurl.com/ew8J] account. Once you have your Mailchimp account set up, you will need to {generate an API key}[http://admin.mailchimp.com/account/api/] in order to get started using Hominid.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.6
|
data/hominid.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{hominid}
|
8
|
-
s.version = "2.1.
|
8
|
+
s.version = "2.1.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian Getting", "Michael Str\303\274der"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-18}
|
13
13
|
s.description = %q{Hominid is a Ruby gem that provides a wrapper for interacting with the Mailchimp email marketing service API.}
|
14
14
|
s.email = %q{brian@terra-firma-design.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/hominid/base.rb
CHANGED
@@ -10,6 +10,7 @@ module Hominid
|
|
10
10
|
|
11
11
|
def initialize(config = {})
|
12
12
|
raise StandardError.new('Please provide your Mailchimp API key.') unless config[:api_key]
|
13
|
+
raise ArgumentError.new('Your Mailchimp API key is malformatted.') unless config[:api_key].include?('-')
|
13
14
|
dc = config[:api_key].split('-').last
|
14
15
|
defaults = {
|
15
16
|
:double_opt_in => false,
|
data/test/hominid_test.rb
CHANGED
@@ -4,4 +4,9 @@ class HominidTest < Test::Unit::TestCase
|
|
4
4
|
should "probably rename this file and start testing for real" do
|
5
5
|
flunk "hey buddy, you should probably rename this file and start testing for real"
|
6
6
|
end
|
7
|
+
should "raise an error when accepting an API key without the datacenter prefix (-)" do
|
8
|
+
assert_raise(ArgumentError) do
|
9
|
+
Hominid::Base.new({ :api_key => 'this_is_wrong' })
|
10
|
+
end
|
11
|
+
end
|
7
12
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hominid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 2.1.
|
9
|
+
- 6
|
10
|
+
version: 2.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Getting
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-08-18 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|