rack-push-notification 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/lib/rack/push-notification.rb +2 -2
- data/rack-push-notification-0.5.0.gem +0 -0
- data/rack-push-notification.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e37ea2262361fbc38416172d702e91c8f0ea806
|
4
|
+
data.tar.gz: a05e2df8ab68ed56d7640d9962e90790250c10de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e25dbdccbfc340b2a4510a9104ee50bdeae9eb37ae7e04fba68ec2cf70e9939ebc1c87f04bb94f599cb748da6fc9dca1a8f00194d17183965a1b4b571b9fbc7b
|
7
|
+
data.tar.gz: e7905852954d9ec27363e5c472b2d7f94d3a5f3024d0ff2e46578214e3bc03e75b77676efeb5dafd3a836809a456b80e86e0021cd401eaa9b491ecf596cd9434
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rack-push-notification (0.5.
|
4
|
+
rack-push-notification (0.5.1)
|
5
5
|
rack (~> 1.4)
|
6
6
|
rack-contrib (~> 1.1)
|
7
7
|
sequel (>= 3.0)
|
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
rspec-expectations (2.13.0)
|
27
27
|
diff-lcs (>= 1.1.3, < 2.0)
|
28
28
|
rspec-mocks (2.13.1)
|
29
|
-
sequel (4.
|
29
|
+
sequel (4.13.0)
|
30
30
|
sinatra (1.4.5)
|
31
31
|
rack (~> 1.4)
|
32
32
|
rack-protection (~> 1.4)
|
data/README.md
CHANGED
@@ -27,7 +27,7 @@ A device's `locale` & `language` can be used to localize outgoing communications
|
|
27
27
|
|
28
28
|
## Example Usage
|
29
29
|
|
30
|
-
Rack::PushNotification can be run as Rack middleware or as a single web application. All that is required is a connection to a Postgres database. You must define this with the environment variable `DATABASE_URL`. For rails, use the `rails-database-url` to define this from the `database.yml`.
|
30
|
+
Rack::PushNotification can be run as Rack middleware or as a single web application. All that is required is a connection to a Postgres database. You must define this with the environment variable `DATABASE_URL`. For rails, use the [`rails-database-url`](https://github.com/glenngillen/rails-database-url) gem to define this from the `database.yml`.
|
31
31
|
|
32
32
|
### config.ru
|
33
33
|
|
@@ -17,7 +17,7 @@ module Rack
|
|
17
17
|
|
18
18
|
configure do
|
19
19
|
if ENV['DATABASE_URL']
|
20
|
-
Sequel.extension :pg_array, :migration
|
20
|
+
Sequel.extension :pg_inet, :pg_array, :migration
|
21
21
|
|
22
22
|
DB = Sequel.connect(ENV['DATABASE_URL'])
|
23
23
|
DB.extend Sequel::Postgres::PGArray::DatabaseMethods
|
@@ -34,7 +34,7 @@ module Rack
|
|
34
34
|
param :tags, Array
|
35
35
|
|
36
36
|
record = Device.find(token: params[:token]) || Device.new
|
37
|
-
record.set(params)
|
37
|
+
record.set(params.update({ip_address: request.ip}))
|
38
38
|
|
39
39
|
code = record.new? ? 201 : 200
|
40
40
|
|
Binary file
|
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.authors = ["Mattt Thompson"]
|
7
7
|
s.email = "m@mattt.me"
|
8
8
|
s.homepage = "http://mattt.me"
|
9
|
-
s.version = "0.5.
|
9
|
+
s.version = "0.5.1"
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.summary = "Rack::PushNotification"
|
12
12
|
s.description = "Generate a REST API for registering and querying push notification device tokens."
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-push-notification
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattt Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- ./lib/rack/push-notification/models/device.rb
|
123
123
|
- ./lib/rack/push-notification.rb
|
124
124
|
- ./LICENSE
|
125
|
+
- ./rack-push-notification-0.5.0.gem
|
125
126
|
- ./rack-push-notification.gemspec
|
126
127
|
- ./Rakefile
|
127
128
|
- ./README.md
|