dre 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/app/controllers/dre/devices_controller.rb +3 -3
- data/app/models/dre/device.rb +1 -1
- data/lib/dre/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 417bd06fed3bd4350d940fb704b06528f9718dc9
|
4
|
+
data.tar.gz: 67ba09cce7e7368dfa801a54da35fcf06b0c8e3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 141f451feb94f305b8c77c43d3f703810a3c8dbace980d0f78da1a0d218e62097c4c15a117fb4a2fe37832fc7a802bda3f6b2f5761b1c81c913c5947dc5728fa
|
7
|
+
data.tar.gz: 5b9ae0cefdf6a16c8b95ce318c794160c895315a00e3a982f8f207ed025b4c443a4b57f70e017f9a924c75ffc521c38faea2eb0b2752e888934c448c6f18eafd
|
data/Rakefile
CHANGED
@@ -11,18 +11,18 @@ module Dre
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def register
|
14
|
-
@device = collection.
|
14
|
+
@device = collection.where(token: params[:token]).first || Device.new(owner: user, token: params[:token])
|
15
15
|
response = @device.persisted? ? 200 : 201
|
16
16
|
|
17
17
|
if @device.save
|
18
|
-
render json: { device: @device }, status: response
|
18
|
+
render json: { device: @device }, root: false, status: response
|
19
19
|
else
|
20
20
|
render json: { errors: @device.errors }, status: :unprocessable_entity
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
def deregister
|
25
|
-
@device = collection.
|
25
|
+
@device = collection.where(token: params[:token]).first
|
26
26
|
|
27
27
|
if @device.nil?
|
28
28
|
render nothing: true, status: :not_found
|
data/app/models/dre/device.rb
CHANGED
data/lib/dre/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Ivanopoulos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: responders
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: appraisal
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: An engine to easily add in a Device model and registration / deregistration
|
98
112
|
system by supplying a token provided mobile applications. Provides easy associations
|
99
113
|
to device owner models.
|