Permalink
Browse files

Refactoring project

Removing front end functionality

Bumping version to 0.3.0
  • Loading branch information...
1 parent 4e5375c commit 6d078a32476ba960b4aefaf2e628078e9cb2fc90 @mattt committed Mar 20, 2013
Showing with 45 additions and 17,475 deletions.
  1. +12 −50 Gemfile.lock
  2. +0 −15 README.md
  3. +18 −56 example/Gemfile.lock
  4. +0 −6 example/config.ru
  5. +12 −6 lib/rack/push-notification.rb
  6. +0 −140 lib/rack/push-notification/admin.rb
  7. BIN lib/rack/push-notification/assets/images/wallpaper-clown-fish.jpg
  8. +0 −28 lib/rack/push-notification/assets/javascripts/application.coffee
  9. +0 −29 lib/rack/push-notification/assets/javascripts/collections/devices.coffee
  10. +0 −2 lib/rack/push-notification/assets/javascripts/models/device.coffee
  11. +0 −30 lib/rack/push-notification/assets/javascripts/routers/root.coffee
  12. +0 −14 lib/rack/push-notification/assets/javascripts/rpn.coffee
  13. +0 −23 lib/rack/push-notification/assets/javascripts/templates/_devices.jst.eco
  14. +0 −24 lib/rack/push-notification/assets/javascripts/templates/_preview.jst.eco
  15. +0 −46 lib/rack/push-notification/assets/javascripts/templates/compose.jst.eco
  16. +0 −12 lib/rack/push-notification/assets/javascripts/templates/devices.jst.eco
  17. +0 −12 lib/rack/push-notification/assets/javascripts/templates/pagination.jst.eco
  18. +0 −1,431 lib/rack/push-notification/assets/javascripts/vendor/backbone.js
  19. +0 −833 lib/rack/push-notification/assets/javascripts/vendor/backbone.paginator.js
  20. +0 −411 lib/rack/push-notification/assets/javascripts/vendor/codemirror.javascript.js
  21. +0 −3,047 lib/rack/push-notification/assets/javascripts/vendor/codemirror.js
  22. +0 −104 lib/rack/push-notification/assets/javascripts/vendor/date.js
  23. +0 −9,404 lib/rack/push-notification/assets/javascripts/vendor/jquery.js
  24. +0 −1,059 lib/rack/push-notification/assets/javascripts/vendor/underscore.js
  25. +0 −120 lib/rack/push-notification/assets/javascripts/views/compose.coffee
  26. +0 −23 lib/rack/push-notification/assets/javascripts/views/devices.coffee
  27. +0 −29 lib/rack/push-notification/assets/javascripts/views/pagination.coffee
  28. +0 −219 lib/rack/push-notification/assets/stylesheets/_codemirror.sass
  29. +0 −148 lib/rack/push-notification/assets/stylesheets/_preview.sass
  30. +0 −108 lib/rack/push-notification/assets/stylesheets/screen.sass
  31. +0 −26 lib/rack/push-notification/assets/views/index.haml
  32. +0 −4 lib/rack/push-notification/{ → models}/device.rb
  33. +0 −5 lib/rack/push-notification/version.rb
  34. +3 −11 rack-push-notification.gemspec
View
@@ -1,82 +1,44 @@
PATH
remote: .
specs:
- rack-push-notification (0.2.0)
- bootstrap-sass (~> 2.1.0)
- coffee-script (~> 2.2)
- compass (~> 0.11)
- eco (~> 1.0)
- haml (~> 3.1)
+ rack-push-notification (0.3.0)
houston (~> 0.1.1)
rack (~> 1.4)
rack-contrib (~> 1.1)
- sass (~> 3.2)
sequel (~> 3.37)
- sinatra (~> 1.3.2)
+ sinatra (~> 1.3)
sinatra-param (~> 0.1)
- sprockets (~> 2.8)
- sprockets-sass (~> 0.9)
GEM
- remote: http://rubygems.org/
+ remote: https://rubygems.org/
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)
highline (~> 1.6.11)
- compass (0.12.2)
- 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)
+ highline (1.6.16)
houston (0.1.1)
commander (~> 4.1.2)
json (~> 1.7.3)
json (1.7.7)
- multi_json (1.6.1)
rack (1.5.2)
rack-contrib (1.1.0)
rack (>= 0.9.1)
- rack-protection (1.4.0)
+ rack-protection (1.5.0)
rack
rake (0.9.2.2)
rspec (0.6.4)
- sass (3.2.6)
sequel (3.45.0)
- sinatra (1.3.5)
- rack (~> 1.4)
- rack-protection (~> 1.3)
- tilt (~> 1.3, >= 1.3.3)
+ sinatra (1.4.1)
+ rack (~> 1.5, >= 1.5.2)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
sinatra-param (0.1.2)
sinatra (~> 1.3)
- sprockets (2.9.0)
- 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)
+ tilt (1.3.6)
PLATFORMS
ruby
DEPENDENCIES
rack-push-notification!
- rake (~> 0.9.2)
- rspec (~> 0.6.1)
+ rake (~> 0.9)
+ rspec (~> 0.6)
View
@@ -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.
-## 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
<table>
@@ -45,12 +37,6 @@ Rack::PushNotification can be run as Rack middleware or as a single web applicat
require 'bundler'
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
```
@@ -82,7 +68,6 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
```
$ heroku create
-$ heroku credentials:add ADMIN_CONSOLE_PASSWORD="YourPa55wordG0esH3r3"
$ git push heroku master
```
View
@@ -1,82 +1,44 @@
PATH
remote: /Users/mattt/Code/Ruby/rack-push-notification
specs:
- rack-push-notification (0.1.0)
- bootstrap-sass (~> 2.1.1)
- coffee-script (~> 2.2.0)
- compass (~> 0.11.5)
- eco (~> 1.0.0)
- haml (~> 3.1.7)
+ rack-push-notification (0.3.0)
houston (~> 0.1.1)
rack (~> 1.4)
- rack-contrib (~> 1.1.0)
- sass (~> 3.2.3)
- sequel (~> 3.37.0)
- sinatra (~> 1.3.2)
- sinatra-param (~> 0.1.1)
- sprockets (~> 2.8.1)
- sprockets-sass (~> 0.9.1)
+ rack-contrib (~> 1.1)
+ sequel (~> 3.37)
+ sinatra (~> 1.3)
+ sinatra-param (~> 0.1)
GEM
- remote: http://rubygems.org/
+ remote: https://rubygems.org/
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)
highline (~> 1.6.11)
- compass (0.11.5)
- chunky_png (~> 1.2)
- fssm (>= 0.2.7)
- sass (~> 3.1)
daemons (1.1.9)
- eco (1.0.0)
- coffee-script
- 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)
+ eventmachine (1.0.3)
+ highline (1.6.16)
houston (0.1.1)
commander (~> 4.1.2)
json (~> 1.7.3)
- json (1.7.6)
- multi_json (1.5.0)
+ json (1.7.7)
pg (0.14.1)
- rack (1.4.4)
+ rack (1.5.2)
rack-contrib (1.1.0)
rack (>= 0.9.1)
- rack-protection (1.3.2)
+ rack-protection (1.5.0)
rack
- sass (3.2.5)
- sequel (3.37.0)
- sinatra (1.3.3)
- rack (~> 1.3, >= 1.3.6)
- rack-protection (~> 1.2)
- tilt (~> 1.3, >= 1.3.3)
+ sequel (3.45.0)
+ sinatra (1.4.1)
+ rack (~> 1.5, >= 1.5.2)
+ rack-protection (~> 1.4)
+ tilt (~> 1.3, >= 1.3.4)
sinatra-param (0.1.2)
sinatra (~> 1.3)
- sprockets (2.8.2)
- 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)
+ thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
- tilt (1.3.3)
+ tilt (1.3.6)
PLATFORMS
ruby
View
@@ -1,10 +1,4 @@
require 'bundler'
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
@@ -6,18 +6,26 @@
require 'sequel'
-Sequel.extension(:pg_array, :migration)
-
module Rack
class PushNotification < Sinatra::Base
- autoload :Device, 'rack/push-notification/device'
- autoload :Admin, 'rack/push-notification/admin'
+ VERSION = '0.3.0'
use Rack::PostBodyContentTypeParser
helpers Sinatra::Param
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
content_type :json
end
@@ -52,5 +60,3 @@ class PushNotification < Sinatra::Base
end
end
end
-
-require 'rack/push-notification/version'
Oops, something went wrong.

0 comments on commit 6d078a3

Please sign in to comment.