helios 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +93 -71
  3. data/README.md +150 -127
  4. data/helios.gemspec +5 -4
  5. data/lib/helios/backend/push-notification.rb +1 -0
  6. data/lib/helios/commands/link.rb +2 -0
  7. data/lib/helios/commands/new.rb +1 -0
  8. data/lib/helios/frontend/javascripts/vendor/foundation.js +163 -47
  9. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.alerts.js +6 -4
  10. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.clearing.js +70 -32
  11. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.dropdown.js +87 -31
  12. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.forms.js +360 -238
  13. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.interchange.js +271 -0
  14. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.joyride.js +279 -48
  15. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.magellan.js +8 -4
  16. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.orbit.js +59 -24
  17. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.placeholder.js +21 -1
  18. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.reveal.js +100 -42
  19. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.section.js +299 -60
  20. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.tooltips.js +26 -13
  21. data/lib/helios/frontend/javascripts/vendor/foundation/foundation.topbar.js +154 -59
  22. data/lib/helios/frontend/javascripts/vendor/foundation/index.js +17 -0
  23. data/lib/helios/frontend/stylesheets/screen.sass +0 -1
  24. data/lib/helios/frontend/templates/push-notification/devices.jst.tpl +0 -3
  25. data/lib/helios/templates/.gitignore.erb +32 -0
  26. data/lib/helios/version.rb +1 -1
  27. metadata +31 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb508f39436880b9f51516b84b09bf0b205871bd
4
- data.tar.gz: 294a16abea5d1312b99a4148b55168adcf786ea7
3
+ metadata.gz: 542d4bf39d51733c585843526ac03d025fde4e62
4
+ data.tar.gz: 97a855428917028f33235877b5b128508ec14dd3
5
5
  SHA512:
6
- metadata.gz: 11bda259eaba6e64174186bee37ca6a536fedb2fdd83242b4ba3b4731658fd673e007b7b5679a00b3acc88e0d14bd979918acc13c30a41de9d0aef0c4a14f634
7
- data.tar.gz: 64f82a250be27b0f94a39db8783934db90e5a4e201de5a8ece8de34425f96d154d9a3c2e1374e15ad6ccfdd4e3195334b278e40e977f16f9cfe78ec4d2560b57
6
+ metadata.gz: b2351f4ac3eb166c14c5f6573a55510a47c3a799701801990fea73955c05e1c3819f10050451b7a54f1de389c28b81a59a3571d0c7e1fad3210023e437ce5253
7
+ data.tar.gz: d75fe05ef0a3218eb950dbfeb5ef8e2de7257b70de7abeb7455a335c4d86acd0f4eee1c8823b7d3800572e278a299203f5c269a03c26cc20836e6ceb830d6d1f
@@ -1,22 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- helios (0.3.0)
4
+ helios (0.4.0)
5
5
  coffee-script (~> 2.2)
6
6
  commander (~> 4.1)
7
7
  compass (~> 0.12)
8
- core_data
8
+ core_data (~> 0.1)
9
9
  fog (~> 1.10)
10
10
  foreman (~> 0.63)
11
11
  haml (>= 3.1)
12
- houston (~> 0.2)
12
+ houston (~> 2.2)
13
13
  json (~> 1.7)
14
+ pg (~> 0.17)
14
15
  rack-contrib (~> 1.1)
15
16
  rack-in-app-purchase (~> 0.1)
16
17
  rack-newsstand (~> 0.1)
17
18
  rack-passbook (~> 0.1)
18
19
  rack-push-notification (~> 0.4)
19
- rack-scaffold (>= 0.0.3)
20
+ rack-scaffold (~> 0.2)
20
21
  rails-database-url (~> 1.0)
21
22
  sinatra (~> 1.3)
22
23
  sinatra-assetpack (= 0.2.3)
@@ -29,114 +30,135 @@ PATH
29
30
  GEM
30
31
  remote: https://rubygems.org/
31
32
  specs:
32
- activesupport (4.0.0)
33
- i18n (~> 0.6, >= 0.6.4)
34
- minitest (~> 4.2)
35
- multi_json (~> 1.3)
33
+ activesupport (4.1.5)
34
+ i18n (~> 0.6, >= 0.6.9)
35
+ json (~> 1.7, >= 1.7.7)
36
+ minitest (~> 5.1)
36
37
  thread_safe (~> 0.1)
37
- tzinfo (~> 0.3.37)
38
- atomic (1.1.10)
39
- backports (3.3.3)
38
+ tzinfo (~> 1.1)
39
+ backports (3.6.0)
40
40
  builder (3.2.2)
41
- chunky_png (1.2.8)
42
- coffee-script (2.2.0)
41
+ chunky_png (1.3.1)
42
+ coffee-script (2.3.0)
43
43
  coffee-script-source
44
44
  execjs
45
- coffee-script-source (1.6.3)
46
- commander (4.1.3)
45
+ coffee-script-source (1.8.0)
46
+ commander (4.2.0)
47
47
  highline (~> 1.6.11)
48
- compass (0.12.2)
48
+ compass (0.12.7)
49
49
  chunky_png (~> 1.2)
50
50
  fssm (>= 0.2.7)
51
- sass (~> 3.1)
51
+ sass (~> 3.2.19)
52
52
  core_data (0.1.1)
53
53
  nokogiri (~> 1.4)
54
- diff-lcs (1.2.4)
55
- dotenv (0.8.0)
56
- eventmachine (1.0.3)
57
- excon (0.23.0)
58
- execjs (1.4.0)
59
- multi_json (~> 1.0)
60
- fog (1.12.1)
54
+ diff-lcs (1.2.5)
55
+ dotenv (0.11.1)
56
+ dotenv-deployment (~> 0.0.2)
57
+ dotenv-deployment (0.0.2)
58
+ excon (0.39.5)
59
+ execjs (2.2.1)
60
+ fog (1.23.0)
61
+ fog-brightbox
62
+ fog-core (~> 1.23)
63
+ fog-json
64
+ fog-softlayer
65
+ ipaddress (~> 0.5)
66
+ nokogiri (~> 1.5, >= 1.5.11)
67
+ fog-brightbox (0.4.1)
68
+ fog-core (~> 1.22)
69
+ fog-json
70
+ inflecto
71
+ fog-core (1.24.0)
61
72
  builder
62
- excon (~> 0.23.0)
63
- formatador (~> 0.2.0)
73
+ excon (~> 0.38)
74
+ formatador (~> 0.2)
64
75
  mime-types
65
- multi_json (~> 1.0)
66
76
  net-scp (~> 1.1)
67
77
  net-ssh (>= 2.1.3)
68
- nokogiri (~> 1.5.0)
69
- ruby-hmac
70
- foreman (0.63.0)
71
- dotenv (>= 0.7)
72
- thor (>= 0.13.6)
73
- formatador (0.2.4)
78
+ fog-json (1.0.0)
79
+ multi_json (~> 1.0)
80
+ fog-softlayer (0.3.15)
81
+ fog-core
82
+ fog-json
83
+ foreman (0.75.0)
84
+ dotenv (~> 0.11.1)
85
+ thor (~> 0.19.1)
86
+ formatador (0.2.5)
74
87
  fssm (0.2.10)
75
- haml (4.0.3)
88
+ haml (4.0.5)
76
89
  tilt
77
- highline (1.6.19)
78
- houston (0.2.4)
90
+ highline (1.6.21)
91
+ houston (2.2.1)
79
92
  commander (~> 4.1)
80
93
  json
81
- i18n (0.6.4)
94
+ i18n (0.6.11)
95
+ inflecto (0.0.2)
96
+ ipaddress (0.8.0)
82
97
  jsmin (1.0.1)
83
- json (1.8.0)
84
- mime-types (1.23)
85
- minitest (4.7.5)
86
- multi_json (1.7.7)
87
- net-scp (1.1.2)
98
+ json (1.8.1)
99
+ mime-types (2.3)
100
+ mini_portile (0.6.0)
101
+ minitest (5.4.0)
102
+ multi_json (1.10.1)
103
+ net-scp (1.2.1)
88
104
  net-ssh (>= 2.6.5)
89
- net-ssh (2.6.8)
90
- nokogiri (1.5.10)
105
+ net-ssh (2.9.1)
106
+ nokogiri (1.6.3.1)
107
+ mini_portile (= 0.6.0)
108
+ pg (0.17.1)
91
109
  plist (3.1.0)
92
110
  rack (1.5.2)
93
111
  rack-contrib (1.1.0)
94
112
  rack (>= 0.9.1)
95
- rack-in-app-purchase (0.1.0)
113
+ rack-in-app-purchase (0.1.1)
96
114
  rack (~> 1.4)
97
115
  sequel (~> 3.37)
98
116
  sinatra (~> 1.3)
99
117
  venice
100
- rack-newsstand (0.1.1)
118
+ rack-newsstand (0.1.2)
101
119
  builder (>= 3.0)
102
120
  plist (~> 3.1)
103
121
  rack (~> 1.4)
104
122
  sequel (~> 3.37)
105
123
  sinatra (~> 1.3)
106
- rack-passbook (0.1.1)
124
+ rack-passbook (0.2.0)
107
125
  rack (~> 1.4)
108
126
  sequel (~> 3.37)
109
127
  sinatra (~> 1.3)
110
- rack-protection (1.5.0)
128
+ rack-protection (1.5.3)
111
129
  rack
112
- rack-push-notification (0.4.1)
130
+ rack-push-notification (0.5.0)
113
131
  rack (~> 1.4)
114
132
  rack-contrib (~> 1.1)
115
- sequel (~> 3.37)
133
+ sequel (>= 3.0)
116
134
  sinatra (~> 1.3)
117
135
  sinatra-param (~> 0.1)
118
- rack-scaffold (0.0.3)
136
+ rack-scaffold (0.2.0)
119
137
  activesupport (>= 3.0)
120
138
  rack (~> 1.4)
121
139
  rack-contrib (~> 1.1)
122
- sinatra (~> 1.3)
140
+ sinatra (~> 1.4)
141
+ sinatra-contrib (~> 1.4)
123
142
  sinatra-param (~> 0.1)
124
143
  rack-test (0.6.2)
125
144
  rack (>= 1.0)
126
145
  rails-database-url (1.0.0)
127
- rake (10.0.4)
128
- rspec (2.13.0)
129
- rspec-core (~> 2.13.0)
130
- rspec-expectations (~> 2.13.0)
131
- rspec-mocks (~> 2.13.0)
132
- rspec-core (2.13.1)
133
- rspec-expectations (2.13.0)
134
- diff-lcs (>= 1.1.3, < 2.0)
135
- rspec-mocks (2.13.1)
136
- ruby-hmac (0.4.0)
137
- sass (3.2.9)
146
+ rake (10.3.2)
147
+ rspec (3.0.0)
148
+ rspec-core (~> 3.0.0)
149
+ rspec-expectations (~> 3.0.0)
150
+ rspec-mocks (~> 3.0.0)
151
+ rspec-core (3.0.4)
152
+ rspec-support (~> 3.0.0)
153
+ rspec-expectations (3.0.4)
154
+ diff-lcs (>= 1.2.0, < 2.0)
155
+ rspec-support (~> 3.0.0)
156
+ rspec-mocks (3.0.4)
157
+ rspec-support (~> 3.0.0)
158
+ rspec-support (3.0.4)
159
+ sass (3.2.19)
138
160
  sequel (3.48.0)
139
- sinatra (1.4.3)
161
+ sinatra (1.4.5)
140
162
  rack (~> 1.4)
141
163
  rack-protection (~> 1.4)
142
164
  tilt (~> 1.3, >= 1.3.4)
@@ -148,23 +170,23 @@ GEM
148
170
  tilt (>= 1.3.0)
149
171
  sinatra-backbone (0.1.1)
150
172
  sinatra
151
- sinatra-contrib (1.4.0)
173
+ sinatra-contrib (1.4.2)
152
174
  backports (>= 2.0)
153
- eventmachine
175
+ multi_json
154
176
  rack-protection
155
177
  rack-test
156
- sinatra (~> 1.4.2)
178
+ sinatra (~> 1.4.0)
157
179
  tilt (~> 1.3)
158
180
  sinatra-param (0.1.3)
159
181
  sinatra (~> 1.3)
160
182
  sinatra-support (1.2.2)
161
183
  sinatra (>= 1.0)
162
184
  terminal-table (1.4.5)
163
- thor (0.18.1)
164
- thread_safe (0.1.0)
165
- atomic
185
+ thor (0.19.1)
186
+ thread_safe (0.3.4)
166
187
  tilt (1.4.1)
167
- tzinfo (0.3.37)
188
+ tzinfo (1.2.2)
189
+ thread_safe (~> 0.1)
168
190
  venice (0.2.0)
169
191
  commander (~> 4.1)
170
192
  json
data/README.md CHANGED
@@ -14,38 +14,48 @@ Helios also comes with a Web UI. Browse and search through all of your database
14
14
 
15
15
  ## Requirements
16
16
 
17
- - Ruby 1.9
18
- - PostgreSQL 9.1 _([Postgres.app](http://postgresapp.com) is the easiest way to get a Postgres server running on your Mac)_
17
+ - Ruby 2.0+ with [Bundler](http://bundler.io) installed
18
+ - PostgreSQL 9.2+ _([Postgres.app](http://postgresapp.com) is the easiest way to get a Postgres server running on your Mac)_
19
19
 
20
20
  ## Getting Started on OS X
21
21
 
22
22
  1. Verify Ruby Installation:
23
23
 
24
- `$ ruby -v`
25
-
26
- > If you do not see `ruby 1.9.x` printed, we suggest installing [RVM](http://rvm.io) to manage Ruby versions.
24
+ ```
25
+ $ ruby -v
26
+ ```
27
27
 
28
- 2. Install Helios at the command prompt:
28
+ 2. Install Helios, Bundler, and at the command prompt:
29
29
 
30
- `$ gem install helios`
30
+ ```
31
+ $ gem install helios
32
+ ```
31
33
 
32
34
  3. Create a new Helios application:
33
35
 
34
- `$ helios new myapp`
36
+ ```
37
+ $ helios new myapp
38
+ ```
35
39
 
36
40
  3. Create a Postgres database at the command prompt:
37
41
 
38
- `$ createdb -h localhost myapp`
42
+ ```
43
+ $ createdb -h localhost myapp
44
+ ```
39
45
 
40
46
  > Database credentials are read from the `.env` file generated by Helios, as the variable `DATABASE_URL`. By default, this will point to a database with the name of the generated app.
41
47
 
42
48
  4. Change directory to `myapp`
43
49
 
44
- `$ cd myapp`
50
+ ```
51
+ $ cd myapp
52
+ ```
45
53
 
46
54
  5. Start the web server:
47
55
 
48
- `$ helios server`
56
+ ```
57
+ $ helios server
58
+ ```
49
59
 
50
60
  6. Go to [http://localhost:5000/admin](http://localhost:5000/admin) and you’ll see your app's Web UI
51
61
 
@@ -86,14 +96,18 @@ end
86
96
 
87
97
  To create a Rails app that uses Postgres as its database, pass the `-d postgresql` argument to the `rails new` command:
88
98
 
89
- $ rails new APP_PATH -d postgresql
99
+ ```
100
+ $ rails new APP_PATH -d postgresql
101
+ ```
90
102
 
91
103
  If you're adding Helios to an existing Rails project, be sure to specify a PostgreSQL database in `config/database.yml` and check that the `pg` gem is included in your `Gemfile`:
92
104
 
93
105
  #### Gemfile
94
106
 
95
- gem 'helios'
96
- gem 'pg'
107
+ ```ruby
108
+ gem 'helios'
109
+ gem 'pg'
110
+ ```
97
111
 
98
112
  Helios can be run as Rails middleware by adding this to the configuration block in `config/application.rb`
99
113
 
@@ -122,29 +136,13 @@ Each service in Helios can be enabled and configured separately:
122
136
 
123
137
  Each entity in the specified data model will have a `Sequel::Model` subclass created for it under the `Rack::CoreData::Models` namespace.
124
138
 
125
- <table>
126
- <caption>Endpoints</caption>
127
- <tr>
128
- <td><tt>GET /:resources</tt></td>
129
- <td>Get list of all of the specified resources</td>
130
- </tr>
131
- <tr>
132
- <td><tt>POST /:resources</tt></td>
133
- <td>Create a new instance of the specified resource</td>
134
- </tr>
135
- <tr>
136
- <td><tt>GET /:resources/:id</tt></td>
137
- <td>Get the specified resource instance</td>
138
- </tr>
139
- <tr>
140
- <td><tt>PUT /:resources/:id</tt></td>
141
- <td>Update the specified resource instance</td>
142
- </tr>
143
- <tr>
144
- <td><tt>DELETE /:resources/:id</tt></td>
145
- <td>Delete the specified resource instance</td>
146
- </tr>
147
- </table>
139
+ | | |
140
+ |---------------------------|----------------------------------------------------|
141
+ | `GET /:resources` | Get list of all of the specified resources |
142
+ | `POST /:resources` | Create a new instance of the specified resource |
143
+ | `GET /:resources/:id` | Get the specified resource instance |
144
+ | `PUT /:resources/:id` | Update the specified resource instance |
145
+ | `DELETE /:resources/:id` | Delete the specified resource instance |
148
146
 
149
147
  ---
150
148
 
@@ -154,21 +152,11 @@ Each entity in the specified data model will have a `Sequel::Model` subclass cre
154
152
 
155
153
  - `Rack::PushNotification::Device`
156
154
 
157
- <table>
158
- <caption>Endpoints</caption>
159
- <tr>
160
- <td><tt>PUT /devices/:token</tt></td>
161
- <td>Register or update existing device for push notifications</td>
162
- </tr>
163
- <tr>
164
- <td><tt>DELETE /devices/:token</tt></td>
165
- <td>Unregister a device from receiving push notifications</td>
166
- </tr>
167
- <tr>
168
- <td><tt>POST /message</tt></td>
169
- <td>Send out a push notification to some devices</td>
170
- </tr>
171
- </table>
155
+ | | |
156
+ |---------------------------|-----------------------------------------------------------|
157
+ | `PUT /push_notification/devices/:token` | Register or update existing device for push notifications |
158
+ | `DELETE /push_notification/devices/:token` | Unregister a device from receiving push notifications |
159
+ | `POST /push_notification/message` | Send out a push notification to some devices |
172
160
 
173
161
  ---
174
162
 
@@ -179,17 +167,10 @@ Each entity in the specified data model will have a `Sequel::Model` subclass cre
179
167
  - `Rack::InAppPurchase::Receipt`
180
168
  - `Rack::InAppPurchase::Product`
181
169
 
182
- <table>
183
- <caption>Endpoints</caption>
184
- <tr>
185
- <td><tt>POST /receipts/verify</tt></td>
186
- <td>Decode the associated Base64-encoded <tt>receipt-data</tt>, recording the receipt data and verifying the information with Apple</td>
187
- </tr>
188
- <tr>
189
- <td><tt>GET /products/identifiers</tt></td>
190
- <td>Return an array of valid product identifiers</td>
191
- </tr>
192
- </table>
170
+ | | |
171
+ |------------------------------|-----------------------------------------------------------|
172
+ | `POST /in_app_purchase/receipts/verify` | Decode the associated Base64-encoded `receipt-data`, recording the receipt data and verifying the information with Apple |
173
+ | `GET /in_app_purchase/products/identifiers` | Get an array of valid product identifiers |
193
174
 
194
175
  ---
195
176
 
@@ -200,91 +181,141 @@ Each entity in the specified data model will have a `Sequel::Model` subclass cre
200
181
  - `Rack::Passbook::Pass`
201
182
  - `Rack::Passbook::Registration`
202
183
 
203
- <table>
204
- <caption>Endpoints</caption>
205
- <tr>
206
- <td><tt>GET /v1/passes/:passTypeIdentifier/:serialNumber</tt></td>
207
- <td>Get the Latest Version of a Pass</td>
208
- </tr>
209
- <tr>
210
- <td><tt>GET /v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier[?passesUpdatedSince=tag]</tt></td>
211
- <td>Get the Serial Numbers for Passes Associated with a Device</td>
212
- </tr>
213
- <tr>
214
- <td><tt>POST /v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber</tt></td>
215
- <td>Register a Device to Receive Push Notifications for a Pass</td>
216
- </tr>
217
- <tr>
218
- <td><tt>DELETE /v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber</tt></td>
219
- <td>Unregister a Device</td>
220
- </tr>
221
- </table>
184
+ | | |
185
+ |---------------------------|----------------------------------------------------|
186
+ | `GET /passbook/v1/passes/:passTypeIdentifier/:serialNumber` | Get the Latest Version of a Pass |
187
+ | `GET /passbook/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier[?passesUpdatedSince=tag]` | Get the Serial Numbers for Passes Associated with a Device |
188
+ | `POST /passbook/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber` | Register a Device to Receive Push Notifications for a Pass |
189
+ | `DELETE /passbook/v1/devices/:deviceLibraryIdentifier/registrations/:passTypeIdentifier/:serialNumber` | Unregister a Device |
190
+
191
+ ---
192
+
193
+ `newsstand`: Adds endpoints for Newsstand. Offers complete management of issues, covers, and assets, with plist-based web services and Atom feeds.
194
+
195
+ **Associated Classes**
196
+
197
+ - `Rack::Newsstand::Issue`
198
+
199
+ | | |
200
+ |-------------------------------|-------------------------|
201
+ | `GET /newsstand/issues` | Get list of all issues |
202
+ | `GET /newsstand/issues/:name` | Get a specific issue |
203
+ | `POST /newsstand/issues` | Add a new issue |
222
204
 
223
205
  ## Command-Line Interface
224
206
 
225
207
  Helios comes with a CLI to help create and manage your application. After you `$ gem install helios`, you'll have the `helios` binary available.
226
208
 
227
- $ helios --help
228
- helios
209
+ ```
210
+ $ helios --help
211
+ helios
229
212
 
230
- A command-line interface for building mobile infrastructures
213
+ A command-line interface for building mobile infrastructures
231
214
 
232
- Commands:
233
- console Open IRB session with Helios environment
234
- help Display global or [command] help documentation.
235
- link Links a Core Data model
236
- new Creates a new Helios project
237
- server Start running Helios locally
215
+ Commands:
216
+ console Open IRB session with Helios environment
217
+ help Display global or [command] help documentation.
218
+ link Links a Core Data model
219
+ new Creates a new Helios project
220
+ server Start running Helios locally
221
+ ```
238
222
 
239
223
  ### Creating an Application
240
224
 
241
225
  The first step to using Helios is to create a new application. This can be done with the `$ helios new` command, which should be familiar if you've ever used Rails.
242
226
 
243
- $ helios new --help
227
+ ```
228
+ $ helios new --help
244
229
 
245
- Usage: helios new path/to/app
230
+ Usage: helios new path/to/app
246
231
 
247
- The `helios new` command creates a new Helios application with a default
248
- directory structure and configuration at the path you specify.
232
+ The `helios new` command creates a new Helios application with a default
233
+ directory structure and configuration at the path you specify.
249
234
 
250
- Options:
251
- --skip-gemfile Don't create a Gemfile
252
- -B, --skip-bundle Don't run bundle install
253
- -G, --skip-git Don't create a git repository
254
- --edge Setup the application with Gemfile pointing to Helios repository
255
- -f, --force Overwrite files that already exist
256
- -p, --pretend Run but do not make any changes
257
- -s, --skip Skip files that already exist
235
+ Options:
236
+ --skip-gemfile Don't create a Gemfile
237
+ -B, --skip-bundle Don't run bundle install
238
+ -G, --skip-git Don't create a git repository
239
+ --edge Setup the application with Gemfile pointing to Helios repository
240
+ -f, --force Overwrite files that already exist
241
+ -p, --pretend Run but do not make any changes
242
+ -s, --skip Skip files that already exist
243
+ ```
258
244
 
259
245
  ### Linking a Core Data Model
260
246
 
261
247
  In order to keep your data model and REST webservices in sync, you can link it to your helios application:
262
248
 
263
- $ helios link path/to/DataModel.xcdatamodel
249
+ ```
250
+ $ helios link path/to/DataModel.xcdatamodel
251
+ ```
264
252
 
265
253
  This creates a hard link between the data model file in your Xcode and Helios projects—any changes made to either file will affect both. The next time you start the server, Helios will automatically migrate the database to create tables and insert columns to accomodate any new entities or attributes.
266
254
 
255
+ > If you are using OS X, do not attempt to delete your Helios application directory using `rm -r` if you have linked a Core Data model. Doing so will result in the removal of the Xcode data model itself. Instead use the finder to move the Helios application directory to trash.
256
+
267
257
  ### Starting the Application Locally
268
258
 
269
259
  To run Helios in development mode on `localhost`, run the `server` command:
270
260
 
271
- $ helios server
261
+ ```
262
+ $ helios server
263
+ ```
272
264
 
273
265
  ### Testing Push Notifications
274
266
 
275
267
  Once you have registered a device and set up your certificate, try this:
276
268
 
277
- $ curl -X POST -d 'payload={"aps": {"alert":"Blastoff!"}}' http://localhost:5000/message
269
+ ```
270
+ $ curl -X POST -d 'payload={"aps": {"alert":"Blastoff!"}}' http://localhost:5000/push_notification/message
271
+ ```
272
+
273
+ ### Setting Up Storage for Newsstand
274
+
275
+ In order to set up storage for Newsstand, you will need an account with one of the following cloud storage providers:
276
+
277
+ - [Amazon AWS S3](http://aws.amazon.com/s3/)
278
+ - [Google Cloud Storage](https://cloud.google.com/products/cloud-storage/)
279
+ - [Rackspace Cloud Files](http://www.rackspace.com/cloud/files/)
280
+
281
+ In your application directory, edit the `config.ru` with your credentials for the cloud storage provider of your choice. Here is an example configuration using AWS.
282
+
283
+ ```ruby
284
+ require 'bundler'
285
+ Bundler.require
286
+
287
+ app = Helios::Application.new {
288
+ service :data, model: Dir['*.xcdatamodel*'].first if Dir['*.xcdatamodel*'].any?
289
+ service :push_notification
290
+ service :in_app_purchase
291
+ service :passbook
292
+ service :newsstand, {
293
+ storage: {
294
+ provider: 'AWS',
295
+ aws_access_key_id: 'YOUR_ACCESS_KEY_ID',
296
+ aws_secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
297
+ }
298
+ }
299
+ }
300
+
301
+ run app
302
+ ```
303
+
304
+ For other configuration options, see [fog.io](http://fog.io/storage/).
278
305
 
279
306
  ### Running the Helios Console
280
307
 
281
308
  You can start an IRB session with the runtime environment of the Helios application with the `console` command:
282
309
 
283
- $ helios console
310
+ ```
311
+ $ helios console
312
+ ```
284
313
 
285
314
  This command activates the services as configured by your Helios application, including any generated Core Data models. The `rack` module is automatically included on launch, allowing you to access everything more directly:
286
315
 
287
- > Passbook::Passes.all # => [...]
316
+ ```ruby
317
+ > Passbook::Passes.all # => [...]
318
+ ```
288
319
 
289
320
  ## Deploying to Heroku
290
321
 
@@ -292,8 +323,11 @@ This command activates the services as configured by your Helios application, in
292
323
 
293
324
  Once you've installed the [Heroku Toolbelt](https://toolbelt.heroku.com), and have a Heroku account, enter the following commands from the project directory:
294
325
 
295
- $ heroku create
296
- $ git push heroku master
326
+ ```
327
+ $ heroku create
328
+ $ git add .
329
+ $ git push heroku master
330
+ ```
297
331
 
298
332
  ## Integrating with an iOS Application
299
333
 
@@ -328,25 +362,15 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
328
362
  Once you have the certificate from Apple for your application, export your key
329
363
  and the apple certificate as p12 files. Here is a quick walkthrough on how to do this:
330
364
 
331
- 1. Click the disclosure arrow next to your certificate in Keychain Access and select the certificate and the key.
332
- 2. Right click and choose `Export 2 items…`.
365
+ 1. Click the disclosure arrow next to your certificate in Keychain Access and select the certificate and the key.
366
+ 2. Right click and choose `Export 2 items…`.
333
367
  3. Choose the p12 format from the drop down and name it `cert.p12`.
334
368
 
335
369
  Now covert the p12 file to a pem file:
336
370
 
337
- $ openssl pkcs12 -in cert.p12 -out apple_push_notification.pem -nodes -clcerts
338
-
339
- ## Coming Attractions
340
-
341
- There's still a lot to do to make Helios even better. Here are some ideas that are at the top of the list:
342
-
343
- - Test coverage
344
- - More documentation
345
- - More example projects
346
- - Better RubyMotion integration
347
- - Support for multiple schema definitions (not just Core Data)
348
- - Send push notifications from the UI
349
- - Support for additional platforms (Android, WP7)
371
+ ```
372
+ $ openssl pkcs12 -in cert.p12 -out apple_push_notification.pem -nodes -clcerts
373
+ ```
350
374
 
351
375
  ---
352
376
 
@@ -356,8 +380,7 @@ Mattt Thompson
356
380
 
357
381
  - http://github.com/mattt
358
382
  - http://twitter.com/mattt
359
- - <mattt@heroku.com>
360
383
 
361
384
  ## License
362
385
 
363
- Helios is released under the [MIT](http://opensource.org/licenses/MIT) license.
386
+ Helios is released under the [MIT License](http://opensource.org/licenses/MIT).