Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a second parameter to the logic that checks the error that is retu... #28

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/responsys/member.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ def present_in_list?(list)
response = lookup_list_via_key(list, "EMAIL_ADDRESS", @email)
end

!(response[:status] == "failure" && response[:error][:code] == "RECORD_NOT_FOUND")
!(response[:status] == "failure" && (response[:error][:code] == "RECORD_NOT_FOUND" || response[:error][:code] == "LIST_NOT_FOUND"))
end

def list_exists?(list)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't let this method in the code if it's not used.

response = lookup_list_via_key(list, "EMAIL_ADDRESS", @email)
!(response[:status] == "failure" && (response[:error][:code] == "LIST_NOT_FOUND"))
end

def subscribed?(list)
Expand Down
4 changes: 2 additions & 2 deletions responsys-api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |spec|
spec.name = "responsys-api"
spec.version = "0.2.2"
spec.version = "0.2.4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't like odd numbers do you? : ) we didn't release 0.2.3 yet.

spec.authors = ["Dan DeMeyere", "Florian Lorrain", "Morgan Griggs", "Mike Rocco"]
spec.email = ["[email protected]", "[email protected]", "[email protected]", "[email protected]"]
spec.description = "A gem to integrate with the Responsys SOAP API"
Expand All @@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "wasabi", "3.4.0"
spec.add_dependency "i18n", "~> 0.7"
spec.add_dependency "connection_pool", "2.1.3"
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "bundler", "~> 1.9"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why doing this change?

Also it's breaking the bundle:

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (~> 1.9) ruby

  Current Bundler version:
    bundler (1.7.4)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

spec.add_development_dependency "rake", "~> 10.3"
spec.add_development_dependency "rspec", "~> 3.2"
spec.add_development_dependency "vcr", "~> 2.9"
Expand Down