Permalink
Commits on May 2, 2016
  1. Bump version to 0.5.1

    mrnugget committed May 2, 2016
  2. Merge pull request #7 from mrnugget/fix_feedback_nil_error

    Fix nil-error when APN returns no tokens
    mrnugget committed May 2, 2016
  3. Fix .travis.yml so the tests run again

    mrnugget committed May 2, 2016
  4. Fix nil-error when APN returns no tokens

    This error was caught in the wild and happens when APN doesn't return any data,
    but just "data" that results in `length` being `nil`.
    
    This adds a test case that reproduces the error and fixes it by stopping
    the fetching of data as soon as `nil` is encountered.
    
    Also: an unused local variable is removed by replacing it with the `_`.
    mrnugget committed May 2, 2016
Commits on Nov 10, 2015
  1. Bump version to 0.5.0

    mrnugget committed Nov 10, 2015
  2. Merge pull request #6 from mrnugget/update_rspec

    Update RSpec to 3.3 and get rid of the deprecation warnings
    mrnugget committed Nov 10, 2015
  3. Merge pull request #5 from mrnugget/apn_category

    Make category attribute available for APN messages
    mrnugget committed Nov 10, 2015
  4. Make category attribute available for APN messages

    This extends `Pling::Message` to have a `category` property. When
    setting the `category` it always gets converted to a string. If not set,
    it's `nil`.
    
    `APN::Gateway` then checks whether `category` is set (truthy) and adds
    it to the `aps` hash of the message.
    
    According to the Apple documentation the category has to correspond to a
    custom value defined in the receiving application and should be a
    string.
    
        https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW1
    
    If the category is not set, we do not try to send it to Apple, to keep
    the default behaviour.
    mrnugget committed Nov 10, 2015
Commits on Nov 5, 2015
  1. Merge pull request #4 from mrnugget/apn_content_available

    Make content-available flag available for APN
    mrnugget committed Nov 5, 2015
Commits on Nov 1, 2015
  1. Make content-available flag available for APN

    This extends the `Pling::Message` class so it has a `content_available`
    property in order to send this property as `content-available` to APN.
    
    According to the documentation[1] this value is an integer that's either
    set to `1` or not, depending on whether there is content available or
    not.
    
    Per default the value is `nil` and thus not sent to APN.
    
    [1]: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9
    mrnugget committed Oct 31, 2015
Commits on Oct 13, 2015
  1. Version bump to 0.4.1

    fabrik42 committed Oct 13, 2015
  2. Merge pull request #3 from benedikt/master

    Relaxes the connection pool dependency version requirement
    fabrik42 committed Oct 13, 2015
Commits on Oct 9, 2015
Commits on Sep 24, 2015
  1. Bump version to 0.4.0

    We added the increased payload size, which is a feature. So we bump the
    semantic versioning feature number.
    mrnugget committed Sep 24, 2015
  2. Increase allowed APN payload size

    256 bytes hasn't been the size limit of payloads for some time now. See:
    
        "The maximum size allowed for a notification payload is 2 kilobytes;"
        https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html
    
    So we increase it.
    mrnugget committed Sep 24, 2015
  3. Remove growl from Gemfile

    This pulls in rb-appscript, which doesn't compile on OS X Yosemite. And
    since no one else is maintaining this lib and using growl, I'm throwing
    it out.
    mrnugget committed Sep 24, 2015
Commits on Jul 2, 2014
  1. Merge pull request #2 from mrnugget/connection_pool

    Make pling thread safe by using a connection pool and thread local storage
    fabrik42 committed Jul 2, 2014
Commits on Jun 28, 2014
  1. Do not cache C2DM/GCM gateway connections

    Using Thread.current is basically using a hidden global variable. This
    is simpler and safer.
    mrnugget committed Jun 28, 2014
Commits on Jun 27, 2014
  1. Cache connections in GCM and C2DM gateways per thread

    Instead of caching the connections in the C2DM and GCM gateways in
    instance variables, we use the thread local storage provided by
    `Thread.current`.
    
    The reason for that is thread safety, since gateway objects are
    practically singleton objects that can be used by multiple threads at
    the same time.
    
    With this change each thread that calls `deliver` on a gateway gets a
    fresh connection object and doesn't interfer with the other threads'
    state.
    mrnugget committed Jun 24, 2014
Commits on Jun 24, 2014
  1. Use a pool for APN connections

    The connections to APN are the only connections in pling that are
    steadily held open (Apple requires this).
    
    Without a connection pool there might be race-conditions when using
    pling in a multi-threaded context.
    
    This adds a connection pool so that only one thread at a time can use an
    open connection to APN.
    mrnugget committed Jun 24, 2014
Commits on Jul 5, 2013
  1. updates version to 0.3.1

    fabrik42 committed Jul 5, 2013
  2. Merge pull request #1 from mrnugget/close_feedback_connection

    Close APN::Feedback connection after receiving tokens
    fabrik42 committed Jul 5, 2013
  3. Close APN::Feedback connection after receiving tokens

    After retrieving all invalid device identifiers from Apple via
    `APN::Feedback#get`, Apple closes the connection and the socket stays
    opened in a `CLOSE_WAIT` state and gets not cleaned up and closed.
    
    This commit fixes this closing the connection after receiving all identifiers,
    enabling the socket to be cleaned up, which frees up resources.
    
    Apple advises to open the connection on a regular basis and retrieve new
    tokens since the last connection. Keeping the connection alive would not
    result in getting new identifiers, since Apple closes the connection.
    mrnugget committed Jul 4, 2013
Commits on Sep 10, 2012
  1. Bumps version to v0.3.0

    benedikt committed Sep 10, 2012
Commits on Sep 3, 2012