Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

1.0.0

  • Loading branch information...
commit 60f8dd8afa3761344af3d8addf12fdebb441acee 1 parent f02b8cf
@jpoz authored
View
5 Gemfile
@@ -0,0 +1,5 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in simple.gemspec
+gemspec
+
View
24 Gemfile.lock
@@ -0,0 +1,24 @@
+PATH
+ remote: .
+ specs:
+ apns (0.9.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.3)
+ rspec (2.10.0)
+ rspec-core (~> 2.10.0)
+ rspec-expectations (~> 2.10.0)
+ rspec-mocks (~> 2.10.0)
+ rspec-core (2.10.1)
+ rspec-expectations (2.10.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.10.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ apns!
+ rspec
View
11 apns.gemspec
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{apns}
- s.version = "0.9.0"
+ s.version = "1.0.0"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["James Pozdena"]
@@ -17,13 +17,6 @@ Gem::Specification.new do |s|
s.rubygems_version = %q{1.3.5}
s.summary = %q{Simple Apple push notification service gem}
- if s.respond_to? :specification_version then
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.add_development_dependency 'rspec'
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
end
View
6 spec/apns/notification_spec.rb
@@ -17,7 +17,7 @@
it "should return JSON with notification information" do
n = APNS::Notification.new('device_token', {:alert => 'Hello iPhone', :badge => 3, :sound => 'awesome.caf'})
- n.packaged_message.should == "{\"aps\":{\"badge\":3,\"sound\":\"awesome.caf\",\"alert\":\"Hello iPhone\"}}"
+ n.packaged_message.should == "{\"aps\":{\"alert\":\"Hello iPhone\",\"badge\":3,\"sound\":\"awesome.caf\"}}"
end
it "should not include keys that are empty in the JSON" do
@@ -37,8 +37,8 @@
describe '#packaged_notification' do
it "should package the token" do
n = APNS::Notification.new('device_token', {:alert => 'Hello iPhone', :badge => 3, :sound => 'awesome.caf'})
- Base64.encode64(n.packaged_notification).should == "AAAg3vLO/YTnAEB7ImFwcyI6eyJiYWRnZSI6Mywic291bmQiOiJhd2Vzb21l\nLmNhZiIsImFsZXJ0IjoiSGVsbG8gaVBob25lIn19\n"
+ Base64.encode64(n.packaged_notification).should == "AAAg3vLO/YTnAEB7ImFwcyI6eyJhbGVydCI6IkhlbGxvIGlQaG9uZSIsImJh\nZGdlIjozLCJzb3VuZCI6ImF3ZXNvbWUuY2FmIn19\n"
end
end
-end
+end
View
4 spec/spec_helper.rb
@@ -1,5 +1,5 @@
require 'rubygems'
gem 'rspec', '>= 1.2.8'
-require 'spec'
+require 'rspec'
require File.join(File.dirname(__FILE__), '..', 'lib', 'apns')
-require 'base64'
+require 'base64'
Please sign in to comment.
Something went wrong with that request. Please try again.