Skip to content

Commit

Permalink
minor bug fixes and implemented custom push_message on PassResource#p…
Browse files Browse the repository at this point in the history
…ush notification method
  • Loading branch information
lmmendes committed Jan 16, 2015
1 parent b708a75 commit 999673b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
This file is a manually maintained list of changes for each release. Feel free to add your
changes here when sending pull requests. Also send corrections if you spot any mistakes.

##
## v0.0.3 (2015-01-16)
* Bug fix: Missing 'event_tickets' namespace for from client
* Bug fix: Passworks::Response#ok? now returning correct information
* Feature: Implemented custom push message in the PassResource#push via :push_message attribute
```ruby
# @pass is a PassResource instance that maps to a pass in the system
Expand Down
8 changes: 6 additions & 2 deletions lib/passworks/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ def previous_page
end

def http_status
@response[:status].to_i
@response.status
end

def response
@response
end

def ok?
(http_status >= 200) && (http_status < 300)
@response.success?
end

def headers
Expand Down
2 changes: 1 addition & 1 deletion lib/passworks/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Passworks
VERSION = "0.0.2"
VERSION = "0.0.3"
end

0 comments on commit 999673b

Please sign in to comment.