device-tracker 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/device-tracker +8 -3
- data/lib/device/tracker.rb +3 -3
- data/lib/device/tracker/config-schema.json +60 -2
- data/lib/device/tracker/db/seeds.rb +7 -0
- data/lib/device/tracker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 612e4d0e8f1d36f1f8096e3190df5f7fa46105d7
|
4
|
+
data.tar.gz: 282da092fe8a8c7d8699097a18abd07597371007
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71f60854460879101473fcb0ee3b9bc0385a0c47aa73047d1bf6939510ccacdfbfea65ed0df2b8af917c6d72b349160941da000a3892f4092704043e6c945ef9
|
7
|
+
data.tar.gz: 36140f6db897c69bb894585a51fcdb8f011a19fac847111620e1b0e5d5f2591344269962bc60fd505dfe7f84ab07a0ce59635680c72cd99a8946ed4729884ae4
|
data/exe/device-tracker
CHANGED
@@ -12,7 +12,7 @@ opts = OptionParser.new do |opts|
|
|
12
12
|
|
13
13
|
opts.separator ""
|
14
14
|
|
15
|
-
|
15
|
+
opts.on("-c", "--config" "path to config file") do |path|
|
16
16
|
config_path = path
|
17
17
|
end
|
18
18
|
|
@@ -40,11 +40,16 @@ config = JSON.parse(json)
|
|
40
40
|
set :database, config["database"]
|
41
41
|
Pony.options = config["email"]
|
42
42
|
set :google_maps_api_key, config["google_maps_api_key"]
|
43
|
+
port = config["port"] || "3000"
|
44
|
+
host = config["host"] || "127.0.0.1"
|
45
|
+
name = config["admin"]["name"]
|
46
|
+
password = config["admin"]["password"]
|
47
|
+
email = config["admin"]["email"]
|
43
48
|
|
44
49
|
ActiveRecord::Migrator.migrate(File.expand_path('../../lib/device/tracker/db/migrate', __FILE__))
|
45
50
|
|
46
51
|
require_relative '../lib/device/tracker/dependencies'
|
47
52
|
require_relative '../lib/device/tracker/db/seeds'
|
48
53
|
|
49
|
-
Device::Tracker::Seed.seed(name:
|
50
|
-
Device::Tracker.start
|
54
|
+
Device::Tracker::Seed.seed(name: name, password: password, email: email)
|
55
|
+
Device::Tracker.start(host, port)
|
data/lib/device/tracker.rb
CHANGED
@@ -5,10 +5,10 @@ require "rack"
|
|
5
5
|
|
6
6
|
module Device
|
7
7
|
module Tracker
|
8
|
-
def self.start
|
8
|
+
def self.start(host, port)
|
9
9
|
options = {
|
10
|
-
:Host =>
|
11
|
-
:Port =>
|
10
|
+
:Host => host,
|
11
|
+
:Port => port
|
12
12
|
}
|
13
13
|
|
14
14
|
Rack::Handler::Thin.run(App.new, options) do |server|
|
@@ -36,18 +36,76 @@
|
|
36
36
|
"via_options": {
|
37
37
|
"id": "http://jsonschema.net/email/via_options",
|
38
38
|
"type": "object",
|
39
|
-
"properties": {
|
39
|
+
"properties": {
|
40
|
+
"address": {
|
41
|
+
"id": "http://jsonschema.net/email/via_options/address",
|
42
|
+
"type": "string"
|
43
|
+
},
|
44
|
+
"port": {
|
45
|
+
"id": "http://jsonschema.net/email/via_options/port",
|
46
|
+
"type": "string"
|
47
|
+
},
|
48
|
+
"enable_starttls_auto": {
|
49
|
+
"id": "http://jsonschema.net/email/via_options/enable_starttls_auto",
|
50
|
+
"type": "boolean"
|
51
|
+
},
|
52
|
+
"user_name": {
|
53
|
+
"id": "http://jsonschema.net/email/via_options/user_name",
|
54
|
+
"type": "string"
|
55
|
+
},
|
56
|
+
"password": {
|
57
|
+
"id": "http://jsonschema.net/email/via_options/password",
|
58
|
+
"type": "string"
|
59
|
+
},
|
60
|
+
"authentication": {
|
61
|
+
"id": "http://jsonschema.net/email/via_options/authentication",
|
62
|
+
"type": "string"
|
63
|
+
},
|
64
|
+
"domain": {
|
65
|
+
"id": "http://jsonschema.net/email/via_options/domain",
|
66
|
+
"type": "string"
|
67
|
+
}
|
68
|
+
}
|
40
69
|
}
|
41
70
|
}
|
42
71
|
},
|
43
72
|
"google_maps_api_key": {
|
44
73
|
"id": "http://jsonschema.net/google_maps_api_key",
|
45
74
|
"type": "string"
|
75
|
+
},
|
76
|
+
"host": {
|
77
|
+
"id": "http://jsonschema.net/host",
|
78
|
+
"type": "string"
|
79
|
+
},
|
80
|
+
"port": {
|
81
|
+
"id": "http://jsonschema.net/port",
|
82
|
+
"type": "string"
|
83
|
+
},
|
84
|
+
"admin": {
|
85
|
+
"id": "http://jsonschema.net/admin",
|
86
|
+
"type": "object",
|
87
|
+
"properties": {
|
88
|
+
"name": {
|
89
|
+
"id": "http://jsonschema.net/admin/name",
|
90
|
+
"type": "string"
|
91
|
+
},
|
92
|
+
"email": {
|
93
|
+
"id": "http://jsonschema.net/admin/email",
|
94
|
+
"type": "string"
|
95
|
+
},
|
96
|
+
"password": {
|
97
|
+
"id": "http://jsonschema.net/admin/password",
|
98
|
+
"type": "string"
|
99
|
+
}
|
100
|
+
}
|
46
101
|
}
|
47
102
|
},
|
48
103
|
"required": [
|
49
104
|
"database",
|
50
105
|
"email",
|
51
|
-
"google_maps_api_key"
|
106
|
+
"google_maps_api_key",
|
107
|
+
"host",
|
108
|
+
"port",
|
109
|
+
"admin"
|
52
110
|
]
|
53
111
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: device-tracker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Ruston
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-11-
|
12
|
+
date: 2015-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|