maia 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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmQ5OTBlMDZkNmU3NzM0NWFkYTliNDhmNDE3NDg2NWYxZDg2Y2FjYg==
4
+ YmJjNjA4NDhmYTE0YjI2OWY0NTQ5NjNjNmRkNmM4NjkxNmNkYjhiNA==
5
5
  data.tar.gz: !binary |-
6
- YTFlNWU0ZjE1ODFiZWFmMDMyM2E2ODE1NWE0MzZmYjg1NDJiY2NkZQ==
6
+ ZDFiNzMzNmM5MDllOThjMTQ2NmI0Y2Q5OTY3MzNiZDlkMzExOTIzMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MGY0MmM3MzQ5OWM0ODIxZjM3ZTA2ZDcwYWM1YmY0NjA1Y2RhNTg2YmY2ZmZj
10
- MDM0ZTQ5MDZlZjU2ZjE0YmMzNmZlM2JiOTVjZjQ0ZTdlMTYyOWVjMmUwOGIx
11
- ZWNmMjgwYjgwMTU3NmY3ODlmNzE1MmVjZTdiMGRhZTU5ZTY0ZGE=
9
+ NzJlOWYwNzM1MjYwNDAxZjgxMjlkMTYyMjcyNzhiNjk1OGE5Nzk5NmQ2N2U4
10
+ MGIxYzY0OTJiZTJmYjM0YzI5MDViODExOGU4ZjY4MjY5ZmMyMGM0MmQ1N2Q4
11
+ NThhMTYzMzI5YTE0ODkwM2UxNzFkYzUzMDZkMzExNWMwODM0YmQ=
12
12
  data.tar.gz: !binary |-
13
- ODBhOGY2NWVjZTAzODU4ODRhODliN2MzMjZmMmFhZGVkNDE1OTM4ODUzOTM4
14
- ZGUyYjFlYWExZjM5MWE3ZDBiMGRkNGQzOWQ1YTcyYWVlMDA2OWExZWIyZjE4
15
- OGY1NmY5NDNkODdiYWI5YTQzZGZkODM1ZDdkOGYzMTdmZmQzZWE=
13
+ YmFlYjU4OWNhYmU1YjczMTJkZTAxMmE4NWM0NGE3MzMyZDBlMzFmMGQwZjhh
14
+ ODg5MWEzYzI0YTg3OTAxOGFkYzliNTdhZjY2MTIyNTQyYjcwOWUyZGVlMjU2
15
+ NmNiMjBkYzEyN2ZhN2FiZmQ3ZDJiOGIxODRlNmIxY2JhZTZiNzM=
@@ -13,13 +13,19 @@ module Maia
13
13
  respond_with @device
14
14
  end
15
15
 
16
+ def destroy
17
+ @device = find_device params[:id]
18
+ @device.destroy
19
+ respond_with @device
20
+ end
21
+
16
22
  private
17
- def device_exists?
18
- current_user.devices.exists? token: params[:device][:token]
23
+ def device_exists?(token = params[:device][:token])
24
+ current_user.devices.exists? token: token
19
25
  end
20
26
 
21
- def find_device
22
- current_user.devices.find_by token: params[:device][:token]
27
+ def find_device(token = params[:device][:token])
28
+ current_user.devices.find_by token: token
23
29
  end
24
30
 
25
31
  def update_token_expiration(device)
@@ -1,3 +1,3 @@
1
1
  module Maia
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Serman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-06 00:00:00.000000000 Z
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails