send_notifications method in PRX's did not accept an array of notifications as paramter. It sends all unsent notifications.
Add APN::App. Put cert in database and allow you to send to multiple iOS apps with 1 rails app
Add APN::Group. Allow you to send group notifications. (But it still send one by one to Apple APN server)
If it complains about some migrations have a same name, rename the old migrations and run again, delete the duplicated and rename back.
README says that maigration 002 create_apn_notifications was modified by hand and may cause a problem. See Upgrade Notes if needed.
Create first APN::App and move cert into database
Copy the content of /config/apple_push_notification_development.pem and apple_push_notification_production and save into APN::app#apn_dev_cert and APN::app#apn_prod_cert. See this post. (but you need to reslove the massive-assignment problem before running it on rails 3.2)
Modifiy APN::Notification.send_notifications and let it accept an array of notificaitons
Because that the natescherer:apn_on_rails folk accepts an array of notificaitons to send. But the PRX one are not. So I added it by hand.
Assigning an object to a belongs_to association does not automatically save the object. It does not save the associated object either.
When you assign an object to a has_one association, that object is automatically saved (in order to update its foreign key).
When you assign an object to a has_many association, that object is automatically saved (in order to update its foreign key). If you assign multiple objects in one statement, then they are all saved.
When you assign an object to a has_and_belongs_to_many association, that object is automatically saved (in order to update the join table). If you assign multiple objects in one statement, then they are all saved.
It's not possible to set the order. That is automatically set to ascending on the primary key (“id ASC”) to make the batch ordering work. This also mean that this method only works with integer-based primary keys. ...
If you don't want spring-related code checked into your source repository, it's possible to use spring without adding to your Gemfile. However, using spring binstubs without adding spring to the Gemfile is not supported.
To use spring like this, do a gem install spring and then prefix commands with spring. For example, rather than running bin/rake -T, you'd run spring rake -T.
簡單來說就是你如果不寫進 Gemfile，就必須用 spring rails。
zeus 需要兩個 terminal app tabs，一個開 zeus start 另一個跑 zeus s -p 13001，所以你如果有 5 個主要 projects，就要為了這件事開 10 個 tabs...
另外雖然動到 config 時 zeus 本身會自動重開，卻不會重開 zeus s，所以你還是要手動 ctrl+c 關掉重開。據說以前會自動處理，不曉得這是 bug 還是 feature...
唯一的好處可能是動到 config 的時候，重開 zeus s 還是比 rails s 或 pow 重開快一點。
Start the test reporter. Make sure that you put these lines at top of your spec_helper.rb.
Manually tirgger fist test report (your project token can be found at Settings > Test Coverage)
It should show following message:
Now you should be able to see the report showing in Code Climate. Sometimes it can take a few minutes.
3. Modify run_tests and make it report after each deployment
When you run rspec without CODECLIMATE_REPO_TOKEN, even you have test reporter started, it won't send test report to Code Climate. In other words, you can control when to send report by giving token or not.
Modify the rspec command in lib/capistrano/tasks/run_tests.cap
I assume you always run complete test suit with this technique.
Now, test will be run before every deployment and test report will be sent after that.
Note: you can put your token in run_tests.cap for simplicity. But I rarely commit any key or token into repostory. Instead, I put it in a git-ignored, separated config file. Than read and assign the value in config/deploy.rb.