Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
Refactoring project
Browse files Browse the repository at this point in the history
Removing front end functionality

Bumping version to 0.3.0
  • Loading branch information
mattt committed Mar 20, 2013
1 parent 4e5375c commit 6d078a3
Show file tree
Hide file tree
Showing 34 changed files with 45 additions and 17,475 deletions.
62 changes: 12 additions & 50 deletions Gemfile.lock
@@ -1,82 +1,44 @@
PATH PATH
remote: . remote: .
specs: specs:
rack-push-notification (0.2.0) rack-push-notification (0.3.0)
bootstrap-sass (~> 2.1.0)
coffee-script (~> 2.2)
compass (~> 0.11)
eco (~> 1.0)
haml (~> 3.1)
houston (~> 0.1.1) houston (~> 0.1.1)
rack (~> 1.4) rack (~> 1.4)
rack-contrib (~> 1.1) rack-contrib (~> 1.1)
sass (~> 3.2)
sequel (~> 3.37) sequel (~> 3.37)
sinatra (~> 1.3.2) sinatra (~> 1.3)
sinatra-param (~> 0.1) sinatra-param (~> 0.1)
sprockets (~> 2.8)
sprockets-sass (~> 0.9)


GEM GEM
remote: http://rubygems.org/ remote: https://rubygems.org/
specs: specs:
bootstrap-sass (2.1.1.0)
chunky_png (1.2.7)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.1)
commander (4.1.3) commander (4.1.3)
highline (~> 1.6.11) highline (~> 1.6.11)
compass (0.12.2) highline (1.6.16)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
eco (1.0.0)
coffee-script
eco-source
execjs
eco-source (1.1.0.rc.1)
execjs (1.4.0)
multi_json (~> 1.0)
fssm (0.2.10)
haml (3.1.8)
highline (1.6.15)
hike (1.2.1)
houston (0.1.1) houston (0.1.1)
commander (~> 4.1.2) commander (~> 4.1.2)
json (~> 1.7.3) json (~> 1.7.3)
json (1.7.7) json (1.7.7)
multi_json (1.6.1)
rack (1.5.2) rack (1.5.2)
rack-contrib (1.1.0) rack-contrib (1.1.0)
rack (>= 0.9.1) rack (>= 0.9.1)
rack-protection (1.4.0) rack-protection (1.5.0)
rack rack
rake (0.9.2.2) rake (0.9.2.2)
rspec (0.6.4) rspec (0.6.4)
sass (3.2.6)
sequel (3.45.0) sequel (3.45.0)
sinatra (1.3.5) sinatra (1.4.1)
rack (~> 1.4) rack (~> 1.5, >= 1.5.2)
rack-protection (~> 1.3) rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.3) tilt (~> 1.3, >= 1.3.4)
sinatra-param (0.1.2) sinatra-param (0.1.2)
sinatra (~> 1.3) sinatra (~> 1.3)
sprockets (2.9.0) tilt (1.3.6)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-sass (0.9.1)
sprockets (~> 2.0)
tilt (~> 1.1)
tilt (1.3.4)


PLATFORMS PLATFORMS
ruby ruby


DEPENDENCIES DEPENDENCIES
rack-push-notification! rack-push-notification!
rake (~> 0.9.2) rake (~> 0.9)
rspec (~> 0.6.1) rspec (~> 0.6)
15 changes: 0 additions & 15 deletions README.md
Expand Up @@ -6,14 +6,6 @@ Rack::PushNotification
`Rack::PushNotification` generates API endpoints that can be consumed by iOS apps to register and unregister for push notifications. Along with the registration API, `Rack::PushNotification` spawns an admin console that gives you a convenient interface to manage device tokens and compose targeted push notification messages. `Rack::PushNotification` generates API endpoints that can be consumed by iOS apps to register and unregister for push notifications. Along with the registration API, `Rack::PushNotification` spawns an admin console that gives you a convenient interface to manage device tokens and compose targeted push notification messages.


## Screenshots

![Devices Screenshot](https://raw.github.com/mattt/rack-push-notification/screenshots/rack-push-notifications-screenshot-devices.png)

---

![Compose Screenshot](https://raw.github.com/mattt/rack-push-notification/screenshots/rack-push-notifications-screenshot-compose.png)

## Example Record ## Example Record


<table> <table>
Expand Down Expand Up @@ -45,12 +37,6 @@ Rack::PushNotification can be run as Rack middleware or as a single web applicat
require 'bundler' require 'bundler'
Bundler.require Bundler.require


Rack::PushNotification::Admin.use Rack::Auth::Basic do |username, password|
[username, password] == ['admin', ENV['ADMIN_CONSOLE_PASSWORD'] || ""]
end

use Rack::PushNotification::Admin, certificate: "/path/to/apn_certificate.pem",
environment: :production
run Rack::PushNotification run Rack::PushNotification
``` ```


Expand Down Expand Up @@ -82,7 +68,6 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken


``` ```
$ heroku create $ heroku create
$ heroku credentials:add ADMIN_CONSOLE_PASSWORD="YourPa55wordG0esH3r3"
$ git push heroku master $ git push heroku master
``` ```


Expand Down
74 changes: 18 additions & 56 deletions example/Gemfile.lock
@@ -1,82 +1,44 @@
PATH PATH
remote: /Users/mattt/Code/Ruby/rack-push-notification remote: /Users/mattt/Code/Ruby/rack-push-notification
specs: specs:
rack-push-notification (0.1.0) rack-push-notification (0.3.0)
bootstrap-sass (~> 2.1.1)
coffee-script (~> 2.2.0)
compass (~> 0.11.5)
eco (~> 1.0.0)
haml (~> 3.1.7)
houston (~> 0.1.1) houston (~> 0.1.1)
rack (~> 1.4) rack (~> 1.4)
rack-contrib (~> 1.1.0) rack-contrib (~> 1.1)
sass (~> 3.2.3) sequel (~> 3.37)
sequel (~> 3.37.0) sinatra (~> 1.3)
sinatra (~> 1.3.2) sinatra-param (~> 0.1)
sinatra-param (~> 0.1.1)
sprockets (~> 2.8.1)
sprockets-sass (~> 0.9.1)


GEM GEM
remote: http://rubygems.org/ remote: https://rubygems.org/
specs: specs:
bootstrap-sass (2.1.1.0)
chunky_png (1.2.7)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.4.0)
commander (4.1.3) commander (4.1.3)
highline (~> 1.6.11) highline (~> 1.6.11)
compass (0.11.5)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
daemons (1.1.9) daemons (1.1.9)
eco (1.0.0) eventmachine (1.0.3)
coffee-script highline (1.6.16)
eco-source
execjs
eco-source (1.1.0.rc.1)
eventmachine (1.0.0)
execjs (1.4.0)
multi_json (~> 1.0)
fssm (0.2.9)
haml (3.1.7)
highline (1.6.15)
hike (1.2.1)
houston (0.1.1) houston (0.1.1)
commander (~> 4.1.2) commander (~> 4.1.2)
json (~> 1.7.3) json (~> 1.7.3)
json (1.7.6) json (1.7.7)
multi_json (1.5.0)
pg (0.14.1) pg (0.14.1)
rack (1.4.4) rack (1.5.2)
rack-contrib (1.1.0) rack-contrib (1.1.0)
rack (>= 0.9.1) rack (>= 0.9.1)
rack-protection (1.3.2) rack-protection (1.5.0)
rack rack
sass (3.2.5) sequel (3.45.0)
sequel (3.37.0) sinatra (1.4.1)
sinatra (1.3.3) rack (~> 1.5, >= 1.5.2)
rack (~> 1.3, >= 1.3.6) rack-protection (~> 1.4)
rack-protection (~> 1.2) tilt (~> 1.3, >= 1.3.4)
tilt (~> 1.3, >= 1.3.3)
sinatra-param (0.1.2) sinatra-param (0.1.2)
sinatra (~> 1.3) sinatra (~> 1.3)
sprockets (2.8.2) thin (1.5.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-sass (0.9.1)
sprockets (~> 2.0)
tilt (~> 1.1)
thin (1.5.0)
daemons (>= 1.0.9) daemons (>= 1.0.9)
eventmachine (>= 0.12.6) eventmachine (>= 0.12.6)
rack (>= 1.0.0) rack (>= 1.0.0)
tilt (1.3.3) tilt (1.3.6)


PLATFORMS PLATFORMS
ruby ruby
Expand Down
6 changes: 0 additions & 6 deletions example/config.ru
@@ -1,10 +1,4 @@
require 'bundler' require 'bundler'
Bundler.require Bundler.require


Rack::PushNotification::Admin.use Rack::Auth::Basic do |username, password|
[username, password] == ['admin', ENV['ADMIN_CONSOLE_PASSWORD'] || ""]
end

use Rack::PushNotification::Admin, certificate: "/path/to/apn_certificate.pem",
environment: :production
run Rack::PushNotification run Rack::PushNotification
18 changes: 12 additions & 6 deletions lib/rack/push-notification.rb
Expand Up @@ -6,18 +6,26 @@


require 'sequel' require 'sequel'


Sequel.extension(:pg_array, :migration)

module Rack module Rack
class PushNotification < Sinatra::Base class PushNotification < Sinatra::Base
autoload :Device, 'rack/push-notification/device' VERSION = '0.3.0'
autoload :Admin, 'rack/push-notification/admin'


use Rack::PostBodyContentTypeParser use Rack::PostBodyContentTypeParser
helpers Sinatra::Param helpers Sinatra::Param


disable :raise_errors, :show_exceptions disable :raise_errors, :show_exceptions


autoload :Device, 'rack/push-notification/device'

configure do
if ENV['DATABASE_URL']
Sequel.extension :pg_array, :migration

DB = Sequel.connect(ENV['DATABASE_URL'])
Sequel::Migrator.run(DB, ::File.join(::File.dirname(__FILE__), 'push-notification/migrations'), table: 'push_notification_schema_info')
end
end

before do before do
content_type :json content_type :json
end end
Expand Down Expand Up @@ -52,5 +60,3 @@ class PushNotification < Sinatra::Base
end end
end end
end end

require 'rack/push-notification/version'

0 comments on commit 6d078a3

Please sign in to comment.