Skip to content

Commit

Permalink
Merge pull request #72 from KrauseFx/master
Browse files Browse the repository at this point in the history
Remove rails method 'blank?'
  • Loading branch information
soupmatt committed Mar 10, 2014
2 parents 0cf1025 + 4ec33e0 commit cc35613
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/casclient/responses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def initialize(raw_text, options={})

def parse(raw_text, options)
raise BadResponseException,
"CAS response is empty/blank." if raw_text.blank?
"CAS response is empty/blank." if raw_text.to_s.empty?
@parse_datetime = Time.now
if raw_text =~ /^(yes|no)\n(.*?)\n$/m
@protocol = 1.0
Expand Down Expand Up @@ -89,7 +89,7 @@ def parse(raw_text, options)
end

def parse_extra_attribute_value(value, encode_extra_attributes_as)
attr_value = if value.blank?
attr_value = if value.to_s.empty?
nil
elsif !encode_extra_attributes_as
begin
Expand Down Expand Up @@ -140,7 +140,7 @@ def initialize(raw_text, options={})

def parse(raw_text)
raise BadResponseException,
"CAS response is empty/blank." if raw_text.blank?
"CAS response is empty/blank." if raw_text.to_s.empty?
@parse_datetime = Time.now

@xml = check_and_parse_xml(raw_text)
Expand Down Expand Up @@ -214,7 +214,7 @@ def parse_http_response(http_response)
end

def is_success?
!@failure && !ticket.blank?
!@failure && !ticket.to_s.empty?
end

def is_failure?
Expand Down

0 comments on commit cc35613

Please sign in to comment.