grocer 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +25 -5
  2. data/lib/grocer/version.rb +1 -1
  3. data/lib/grocer.rb +1 -1
  4. metadata +19 -13
data/README.md CHANGED
@@ -3,11 +3,11 @@
3
3
  [![Build Status](https://secure.travis-ci.org/highgroove/grocer.png)](http://travis-ci.org/highgroove/grocer)
4
4
  [![Dependency Status](https://gemnasium.com/highgroove/grocer.png)](https://gemnasium.com/highgroove/grocer)
5
5
 
6
- *grocer* interfaces with the [Apple Push Notification
6
+ **grocer** interfaces with the [Apple Push Notification
7
7
  Service](http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html)
8
8
  to send push notifications to iOS devices.
9
9
 
10
- There are other gems out there to do this, but *grocer* plans to be the
10
+ There are other gems out there to do this, but **grocer** plans to be the
11
11
  cleanest, most extensible, and friendliest.
12
12
 
13
13
  ## Installation
@@ -28,7 +28,7 @@ gem 'grocer'
28
28
  #
29
29
  # Information on obtaining a `.pem` file for use with `certificate` is shown
30
30
  # later.
31
- pusher = Grocer.pusher.new(
31
+ pusher = Grocer.pusher(
32
32
  certificate: "/path/to/cert.pem", # required
33
33
  passphrase: "", # optional
34
34
  gateway: "gateway.push.apple.com", # optional; See note below.
@@ -75,7 +75,7 @@ end
75
75
  ```ruby
76
76
  # `certificate` is the only required option; the rest will default to the values
77
77
  # shown here.
78
- feedback = Grocer.feedback.new(
78
+ feedback = Grocer.feedback(
79
79
  certificate: "/path/to/cert.pem", # required
80
80
  passphrase: "", # optional
81
81
  gateway: "feedback.push.apple.com", # optional; See note below.
@@ -121,4 +121,24 @@ The key code for this purpose is:
121
121
 
122
122
  ### Certificate File
123
123
 
124
- TODO: Describe how to get a .pem
124
+ Login to the [iOS Provisioning Portal (App IDs)](https://developer.apple.com/ios/manage/bundles/index.action).
125
+
126
+ Configure the appropriate certificate for push notifications and download the certificate:
127
+
128
+ ![Downloading the Push Notification Certificate](https://img.skitch.com/20120402-gtj3bkqi1kq92kgw2pbr5puk5d.png)
129
+
130
+ Open the file in Keychain Access, then expand the certificate to show both the certificate *and* the private key. Command select so both are highlighted:
131
+
132
+ ![Selecting both the certificate and private key](https://img.skitch.com/20120402-e8deartr2uhimaiatgccttkggi.png)
133
+
134
+ Control click and select to export the 2 items:
135
+
136
+ ![Exporting the certificate and private key](https://img.skitch.com/20120402-mbmgjrybyym846cy58a9kpyxp5.png)
137
+
138
+ Save the items as a `.p12` file. Open a terminal window and run the following command:
139
+
140
+ ```bash
141
+ openssl pkcs12 -in exported_certificate.p12 -out certificate.pem -nodes -clcerts
142
+ ```
143
+
144
+ The `certificate.pem` file that is generated can be used with **grocer**.
@@ -1,3 +1,3 @@
1
1
  module Grocer
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/grocer.rb CHANGED
@@ -13,7 +13,7 @@ module Grocer
13
13
 
14
14
  def self.feedback(options)
15
15
  connection = FeedbackConnection.new(options)
16
- Feedback.new(options)
16
+ Feedback.new(connection)
17
17
  end
18
18
 
19
19
  def self.pusher(options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grocer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-03-31 00:00:00.000000000 Z
14
+ date: 2012-04-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec
18
- requirement: &70197978198360 !ruby/object:Gem::Requirement
18
+ requirement: &70358032520280 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 2.9.0
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *70197978198360
26
+ version_requirements: *70358032520280
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pry
29
- requirement: &70197978197120 !ruby/object:Gem::Requirement
29
+ requirement: &70358032519500 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ~>
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 0.9.8
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *70197978197120
37
+ version_requirements: *70358032519500
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: mocha
40
- requirement: &70197978196740 !ruby/object:Gem::Requirement
40
+ requirement: &70358032518920 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *70197978196740
48
+ version_requirements: *70358032518920
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: bourne
51
- requirement: &70197978196160 !ruby/object:Gem::Requirement
51
+ requirement: &70358032518260 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0'
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *70197978196160
59
+ version_requirements: *70358032518260
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: rake
62
- requirement: &70197978195740 !ruby/object:Gem::Requirement
62
+ requirement: &70358032533920 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,7 +67,7 @@ dependencies:
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *70197978195740
70
+ version_requirements: *70358032533920
71
71
  description: ! " Grocer interfaces with the Apple Push\n
72
72
  \ Notification Service to send push\n notifications
73
73
  to iOS devices and collect\n notification feedback via
@@ -130,15 +130,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
130
130
  - - ! '>='
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
+ segments:
134
+ - 0
135
+ hash: 2039363373187503925
133
136
  required_rubygems_version: !ruby/object:Gem::Requirement
134
137
  none: false
135
138
  requirements:
136
139
  - - ! '>='
137
140
  - !ruby/object:Gem::Version
138
141
  version: '0'
142
+ segments:
143
+ - 0
144
+ hash: 2039363373187503925
139
145
  requirements: []
140
146
  rubyforge_project:
141
- rubygems_version: 1.8.17
147
+ rubygems_version: 1.8.15
142
148
  signing_key:
143
149
  specification_version: 3
144
150
  summary: Pushing Apple notifications since 2012.