geotrigger 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geotrigger/ago/session.rb +16 -0
- data/lib/geotrigger/version.rb +1 -1
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe4ad328bca74f73804d316e720a1b01451cee1c
|
4
|
+
data.tar.gz: ef51466b42acad1dfa93f8d15de8792bcd386ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c143ef9e5fca6aea11ed353f09a826085ef5c9457afa0ad73509830ee40d81b4e634968401bcadd5b636dc5b55f7dc96e90885a9fad810edbbfb22b07e2addc
|
7
|
+
data.tar.gz: bda9abc26c9ec6f8ff1f4f8ce7895751b33570ab8ee786a2906237eefec488133bf85db9df14ba21843f2186bb8828c239b20c9fb50884493a1004c7185dee8d
|
@@ -51,6 +51,7 @@ module Geotrigger
|
|
51
51
|
else
|
52
52
|
raise ArgumentError 'unknown type'
|
53
53
|
end
|
54
|
+
self.access_token = opts[:access_token] if opts[:access_token]
|
54
55
|
end
|
55
56
|
|
56
57
|
# Type of implementation as a symbol.
|
@@ -99,10 +100,24 @@ module Geotrigger
|
|
99
100
|
|
100
101
|
end
|
101
102
|
|
103
|
+
# Mixin for setting a given +access_token+.
|
104
|
+
#
|
105
|
+
module AccessToken
|
106
|
+
|
107
|
+
# Set a given +access_token+ for this session.
|
108
|
+
#
|
109
|
+
def access_token= at
|
110
|
+
@ago_data ||= {}
|
111
|
+
@ago_data['access_token'] = at
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
|
102
116
|
# AGO::Session implementation for Applications
|
103
117
|
#
|
104
118
|
class Application
|
105
119
|
include ExpirySet
|
120
|
+
include AccessToken
|
106
121
|
extend ::Forwardable
|
107
122
|
def_delegator :@session, :hc
|
108
123
|
|
@@ -143,6 +158,7 @@ module Geotrigger
|
|
143
158
|
#
|
144
159
|
class Device
|
145
160
|
include ExpirySet
|
161
|
+
include AccessToken
|
146
162
|
extend Forwardable
|
147
163
|
def_delegator :@session, :hc
|
148
164
|
|
data/lib/geotrigger/version.rb
CHANGED
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geotrigger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenichi Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
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
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: timecop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: A small ruby client for Esri's Geotrigger service
|
@@ -73,7 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
77
77
|
- Gemfile
|
78
78
|
- LICENSE.txt
|
79
79
|
- README.md
|
@@ -105,17 +105,17 @@ require_paths:
|
|
105
105
|
- lib
|
106
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
|
-
- -
|
113
|
+
- - ">="
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
117
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.
|
118
|
+
rubygems_version: 2.2.2
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: A small ruby client for Esri's Geotrigger service
|
@@ -127,4 +127,3 @@ test_files:
|
|
127
127
|
- spec/geotrigger/tag_spec.rb
|
128
128
|
- spec/geotrigger/trigger_spec.rb
|
129
129
|
- spec/helper.rb
|
130
|
-
has_rdoc:
|