Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
565 commits
Select commit Hold shift + click to select a range
ef5af78
fix: rate limiters to recover from cluster IO errors
stakach Oct 5, 2020
ecd6f3f
feat(meraki dashboard): include floor dimensions in locations
stakach Oct 6, 2020
ec2eca9
feat(meraki dashboard): include level name in level information
stakach Oct 6, 2020
550979e
fix(bookings): pass empty Array instead of nil (#66)
pkheav Oct 15, 2020
0d5cbf0
feat(place bookings): minor change to booking polling
stakach Oct 15, 2020
8d64f17
chore(shard.lock): bump versions
stakach Oct 16, 2020
417573a
chore(place bookings): simplify polling
stakach Oct 16, 2020
592a135
Revert "chore(place bookings): simplify polling"
stakach Oct 16, 2020
5dfce16
Revert "feat(place bookings): minor change to booking polling"
stakach Oct 16, 2020
9ef314a
fix(place bookings): ensure rate limiter never blocks forever
stakach Oct 16, 2020
221339a
fix(meraki dashboard): ensure serialised access to user mac storage
stakach Oct 16, 2020
6cc5cbe
feat: building area management (#64)
stakach Oct 20, 2020
8b99c03
fix(area management): change key for area usage
stakach Oct 20, 2020
c1e190f
fix(meraki dashboard): s2 cell id generation and ameba
stakach Oct 20, 2020
27851a0
fix(place area management): use @building_id
stakach Oct 20, 2020
b6433b5
fix(place area management): check for division by 0
stakach Oct 20, 2020
987fbc0
fix(place area management): fix building ID
stakach Oct 20, 2020
0adf5f5
feat(meraki dashboard): add additional logging
stakach Oct 20, 2020
1d104da
chore(shard.lock): bump versions
stakach Oct 22, 2020
f74c17e
chore(shard.yml): add qr code rendering lib
stakach Nov 3, 2020
cb464b9
feat(smtp): add email templates and SVG QR generation
stakach Nov 3, 2020
8dd4014
Port Samsung display driver (#19)
pkheav Nov 4, 2020
60099f3
feat(meraki dashboard): allow for manual map height and widths
stakach Nov 5, 2020
d3b686c
chore(samsung display): run crystal tool format
stakach Nov 5, 2020
5b32c57
Placeos desk bookings location service (#75)
stakach Nov 6, 2020
ca08be9
feat(area management): add support for area groups
stakach Nov 9, 2020
1ea86ff
fix(area management): remove redundant schedules
stakach Nov 9, 2020
6a874ed
fix(samsung mdc): ensure status access is guarded
stakach Nov 9, 2020
0f86b3e
fix(place/area/config): allow zone.metadata.area.properties.Hash (#79)
w-le Nov 10, 2020
bcec633
build(test-runner): CI build from acbcebd
MrYuion Nov 11, 2020
17064ed
build(test-runner): CI build from f520d29
MrYuion Nov 11, 2020
1608b23
build(test-runner): CI build from 9d89936
MrYuion Nov 11, 2020
24fb16d
build(test-runner): CI build from df40440
MrYuion Nov 11, 2020
b72375c
chore: update to driver 3.6
stakach Nov 11, 2020
acffb4c
build(test-runner): CI build from 9a53bb8
MrYuion Nov 12, 2020
8843056
chore(shard.yml): bump version
stakach Nov 12, 2020
cb50c75
feat(meraki dashboard): add a debugging option
stakach Nov 12, 2020
38bc698
chore(meraki dashboard): use UTC time for debugging
stakach Nov 12, 2020
e5453b5
feat: add cisco dna spaces driver (#81)
stakach Nov 16, 2020
b77db27
fix(dna spaces user presence): `was_in_active` is a bool
stakach Nov 16, 2020
d5d558a
fix(dna spaces driver presence): `was_in_active` is a bool
stakach Nov 16, 2020
dad42c6
fix(dna spaces device presence): daysSinceLastVisit mapping
stakach Nov 16, 2020
4dacdba
feat(dna spaces): improve debugging
stakach Nov 16, 2020
d6fcbc8
fix(locatable): conform to interface
stakach Nov 16, 2020
a864457
feat(meraki dashboard): add payload debugging flag
stakach Nov 17, 2020
a6aa840
chore(shard.lock): bump version
stakach Nov 17, 2020
95704c3
feat(cisco meraki): treat all times as relative
stakach Nov 17, 2020
cefe363
feat(meraki dashboard): add manufacturer, os and ssid
stakach Nov 18, 2020
a31d67c
chore(cisco dna spaces): run crystal tool format
stakach Nov 18, 2020
3872864
feat(meraki dashboard): add client details to state inspection
stakach Nov 18, 2020
14df255
fix(meraki dashboard): don't raise if client details unavailable
stakach Nov 18, 2020
44702f5
feat(cisco dna spaces): add ssid, manufacturer and os to loc data
stakach Nov 18, 2020
5943b0e
feat(meraki dashboard): don't remove locations if client is present
stakach Nov 18, 2020
e55e53b
fix(place/smtp): name argument for attachment IO
w-le Nov 18, 2020
91e9480
feat(meraki dashboard): list the locateable people
stakach Nov 18, 2020
b5e95ab
fix(meraki dashboard): locatable introspection method
stakach Nov 18, 2020
21dea16
fix(place/smtp: rewind attachment IO before forwarding to emailer
w-le Nov 19, 2020
bf7d068
feat(place smtp): add support for generating PNG QR codes
stakach Nov 19, 2020
7f24bf4
fix(place smtp): base64 encode png image
stakach Nov 19, 2020
bbdf97d
fix(place desk bookings): desk name is the mac address
stakach Nov 23, 2020
699c5ba
fix(place desk bookings): should return the mac address as queried
stakach Nov 23, 2020
314a529
feat(place staff api): initial work on a staff API driver
stakach Nov 23, 2020
23a7193
feat(extron/matrix): base driver for signal distrubution
kimburgess Nov 25, 2020
601c649
feat(place area management): add support for live updates
stakach Nov 25, 2020
d35be06
chore(place): fix some ameba linting issues
stakach Nov 25, 2020
7eb09ed
feat(place area management): update available to expect arrays
stakach Nov 25, 2020
4d1946e
feat(xy sense): add location service logic
stakach Nov 25, 2020
0c51d97
feat(place/visitor_mailer): add Mailer for invited Visitors (QR email)
w-le Nov 26, 2020
86cffe8
feat(place desk location services): unify the data models
stakach Nov 30, 2020
13d8122
chore: crystal tool format
stakach Nov 30, 2020
23c874a
fix(place staff api): bookings should return an array
stakach Nov 30, 2020
9fbd018
chore(place staff api): fix spec
stakach Nov 30, 2020
8ada45b
fix(place staff api): change how token is stored
stakach Nov 30, 2020
89d1310
fix(cisco dna spaces): debug_stream setting not working
stakach Nov 30, 2020
8f1d557
feat(cisco dna spaces): add query for location details
stakach Nov 30, 2020
2ba5fc2
feat(cisco dna spaces): add device count event
stakach Nov 30, 2020
0659582
fix(cisco dna spaces): ensure no duplicates in user mac mappings
stakach Nov 30, 2020
889bd97
fix(cisco dna spaces): skips matching floors
stakach Nov 30, 2020
f5d10cc
feat(cisco dna spaces): ignore devices that can't be mapped
stakach Nov 30, 2020
2cfd06f
fix(cisco dna spaces): allow map_id to be set in matching locations
stakach Nov 30, 2020
fd95b1e
feat(cisco dna spaces): output location id where map id is missing
stakach Nov 30, 2020
3545de2
fix(mdc): calculate correct checksums (#88)
pkheav Nov 30, 2020
c49e8e8
fix(cisco dna spaces): improve map id discovery when missing
stakach Nov 30, 2020
8b34eab
fix(cisco dna spaces): improve logging when map id missing
stakach Nov 30, 2020
7ef4dd7
fix(cisco dna spaces): simplfy found flag when map_id missing
stakach Nov 30, 2020
a27b4ed
fix(cisco dna spaces): update coordinate system and map dimensions
stakach Dec 1, 2020
98df7f3
fix(cisco dna spaces): only cache map dimensions
stakach Dec 1, 2020
28914a9
fix(cisco dna spaces): adjust map dimensions
stakach Dec 1, 2020
417f3cf
fix: Extron matrix driver (#89)
kimburgess Dec 1, 2020
fb589fe
feat(staff api): add support for booking approval and rejection
stakach Dec 4, 2020
5cea0d6
feat(staff api): add support for obtaining metadata
stakach Dec 4, 2020
7daeaae
fix(cisco dna spaces): move last_seen into seconds
stakach Dec 8, 2020
437c174
feat(place desk booking webhook): init commit
stakach Dec 10, 2020
a0cdcd0
docs(floorsense/desks): add new api guide url
w-le Dec 11, 2020
e9e98d1
fix(place area config): allow more complicated options
stakach Dec 14, 2020
4a62866
feat(area management): to use staff API driver for data
stakach Dec 14, 2020
a463e4f
feat(cisco dna spaces): add support for adjusting coordinates
stakach Dec 15, 2020
d81f518
feat(microsoft findme): initial commit
stakach Dec 15, 2020
eaffc5c
feat(microsoft findme): initial commit
stakach Dec 15, 2020
f758785
fix(microsoft findme): support empty responses
stakach Dec 15, 2020
bd0b87b
feat(microsoft findme): add location_id field
stakach Dec 15, 2020
0bf0310
fix(microsoft findme): extended data can be nil
stakach Dec 15, 2020
f3ed497
Mulesoft driver (#93)
tob1k Dec 16, 2020
b74d2fa
Hitachi projector (#73)
pkheav Dec 16, 2020
7a45aaf
feat(place calendar): add group list and membership methods
stakach Dec 17, 2020
17de835
chore(shard.lock): bump versions
stakach Dec 17, 2020
66d5d04
feat(place calendar): add access token method
stakach Dec 17, 2020
6337c28
fix(place calendar): access token method argument is optional
stakach Dec 17, 2020
287b04a
chore(shard.lock): bump versions
stakach Dec 17, 2020
8b8d7fc
chore(shard.lock): bump versions
stakach Dec 17, 2020
5886da6
feat(place user group mappings): inital commit
stakach Dec 17, 2020
cca2453
chore(shards.lock): update crystal client
stakach Dec 17, 2020
611678e
chore(shards.lock): update crystal client
stakach Dec 17, 2020
5d2cf85
feat(place group mappings): make mappings more descriptive
stakach Dec 17, 2020
c37dcb1
Vergesense Driver (#90)
websymphony Jan 3, 2021
ecd995b
feat(message media): add URI base hint
stakach Jan 4, 2021
17b1e36
feat(microsoft findme): add location services support
stakach Jan 6, 2021
d2d0c5e
fix(microsoft findme): improve the datetime parsing
stakach Jan 6, 2021
dcfdfc8
chore(shard.lock): bump dependency versions
stakach Jan 7, 2021
999ce41
feat(ms findme location service): simplify how results are returned
stakach Jan 8, 2021
0732a06
feat(xy sense location service): simplify how results are returned
stakach Jan 8, 2021
86cd00c
feat(place desk bookings): modify result format
stakach Jan 8, 2021
b6f8c46
feat(vergesense): add compatible location service
stakach Jan 8, 2021
2b462aa
chore(place desk booking location service): crystal tool format
stakach Jan 8, 2021
fb14d43
feat(floorsense location service): inital commit
stakach Jan 11, 2021
9c9cd13
chore(vergesense location spec): remove redundant code
stakach Jan 11, 2021
e2627c3
feat(vergesense API): add support for polling
stakach Jan 11, 2021
fe0fde2
feat(steinel hpd2): initial work on sensor API
stakach Jan 12, 2021
0e5df26
feat(place user group mappings): improve settings clarity
stakach Jan 12, 2021
d56e6b3
feat(place location services): add IP to Username mappings webhook
stakach Jan 12, 2021
5c89e23
feat(place calendar): inital work on adding email support
stakach Jan 13, 2021
8135279
feat(mailers): migrate to fat interface
stakach Jan 13, 2021
6d14e09
chore(shard.lock): bump driver version
stakach Jan 14, 2021
bfb145c
chore(shard.lock): bump driver version
stakach Jan 15, 2021
7695a29
feat(calendar): use standard interface for sending emails
stakach Jan 15, 2021
f61752e
feat(calendar): add debug message to send_mail
stakach Jan 15, 2021
c06036b
feat(calendar): add helper for looking up office365 group ids
stakach Jan 15, 2021
a647071
chore(shard.lock): bump office365 version
stakach Jan 15, 2021
d5d2e39
feat(place calendar): add a group lookup helper for graphAPI
stakach Jan 17, 2021
2852318
feat(place staff api): add support for updating booking state
stakach Jan 18, 2021
d8aa61f
feat(mulesoft/bookings): include error body
w-le Jan 19, 2021
1d80614
style(mulesoft/bookings): indentation
w-le Jan 19, 2021
e026904
feat(place calendar): add get users manager
stakach Jan 19, 2021
45d67de
feat(mulesoft/bookings): allow query by epoch
w-le Jan 19, 2021
9691315
fix(mulesoft/bookings): epoch is Int32
w-le Jan 19, 2021
fc66f31
fix(mulesoft/bookings): usage of Time class
w-le Jan 19, 2021
6581c02
feat(place staff api): add support for additional booking filters
stakach Jan 19, 2021
fb7fa81
feat(place staff api): add filters for approved and rejected
stakach Jan 19, 2021
de69a11
chore(place staff api): add debugging output
stakach Jan 20, 2021
567a688
feat(place location services): add support for emergency contacts
stakach Jan 20, 2021
ca9e699
chore(shard.lock): bump versions
stakach Jan 20, 2021
c9641d9
feat(NEC/display): initial driver implementation (#50)
pkheav Jan 20, 2021
de2ed1a
fix(mulesoft/bookings): Module name to "Bookings"
w-le Jan 25, 2021
dd74a42
chore(shard.lock): bump versions
stakach Jan 27, 2021
bf25b99
feat(desk booking webhook): add debug
w-le Jan 27, 2021
1a0d82b
fix(desk booking webhook): Array of Zones
w-le Jan 27, 2021
2c43a30
feat(desk booking webhook): debug shows Headers
w-le Jan 27, 2021
081ff1c
feat(place staff api): add resource token fetching helper
stakach Jan 27, 2021
db982db
fix(mulesoft/bookings): .bookings[Hash] not .bookings[String]
w-le Jan 28, 2021
2145edd
feat: add 0.36 compat
stakach Jan 29, 2021
7327e18
chore(shard.yml): bump dependency versions
stakach Jan 29, 2021
390d24d
fix: ensure correct version of crystal client
stakach Jan 29, 2021
fd70059
fix(meraki captive portal spec): use final instead of hexdigest
stakach Jan 29, 2021
8c84bd1
fix(shard.lock): bump openssl ext
stakach Jan 29, 2021
6f41e9d
chore(place staff api): add additional debugging output
stakach Jan 30, 2021
4522c0c
chore: update drivers to latest interface definition
stakach Feb 1, 2021
65a545b
chore(shards.lock): bump driver version
stakach Feb 2, 2021
9fbb68a
feat(place location services): add emergency contact list locator
stakach Feb 2, 2021
00c458d
feat: update to latest compiler version
stakach Feb 3, 2021
01fa1d1
fix(Dockerfile): add required static libs
stakach Feb 3, 2021
cdd2be5
chore(Dockerfile): use crystal 0.36.1
stakach Feb 3, 2021
d1856b0
feat(placeos calendar): use get_user_by_email for additional flexibility
stakach Feb 3, 2021
e2c533c
feat(place visitor mailer): move to using staff api driver
stakach Feb 3, 2021
2638a38
chore: crystal tool format
stakach Feb 3, 2021
c88954e
fix(place visitor mailer): remove deprecated settings
stakach Feb 3, 2021
fda385a
fix(meraki dashboard): IP cache
stakach Feb 3, 2021
01a0a12
fix(spec): update to latest compiler
stakach Feb 3, 2021
369ea45
feat(travis): use docker container to run spec
stakach Feb 3, 2021
569de12
fix(travis): use docker container to run spec
stakach Feb 3, 2021
13657bb
Xovis sensor (#101)
stakach Feb 4, 2021
6f0e90c
feat(cisco dna spaces): add support for activation keys
stakach Feb 5, 2021
203cb89
fix(cisco dna spaces): activation response object format
stakach Feb 5, 2021
ebc4465
fix(cisco dna spaces): start streams once keys obtained
stakach Feb 5, 2021
589bb65
chore(shard.lock): bump versions
stakach Feb 5, 2021
f8fba63
feat(mulesoft/bookings): query the current MONTH instead of DAY, as i…
w-le Feb 7, 2021
20fe9c6
fix(cisco dna spaces): api_key use before setting
stakach Feb 8, 2021
4fa3d00
chore(shards.lock): bump versions
stakach Feb 8, 2021
52f0934
feat(cisco dna spaces): add monitoring api calls
stakach Feb 9, 2021
d4c52e2
feat: add whispir sms messaging service driver
stakach Feb 10, 2021
60fb7f6
feat: add support for mapping groups based on a name prefix
stakach Feb 10, 2021
85d46f3
chore(cisco dna spaces): crystal tool format
stakach Feb 10, 2021
9d2b2ef
chore(cisco dna spaces): allow status updates to be pushed manuallly
stakach Feb 10, 2021
6b0d4e2
fix(cisco dna spaces): status updates not exposed to public interface
stakach Feb 10, 2021
97fe007
fix(floorsense desks): parsing wrong model for floors request
stakach Feb 15, 2021
929fc0b
chore: update to latest version of action controller
stakach Feb 16, 2021
896ef4a
fix(mulesoft/bookings): clear schedule when changing polling period
w-le Feb 16, 2021
d7215d3
feat(cisco meraki): add user agent string for reporting
stakach Feb 16, 2021
b8c1b67
feat(location services): add mac address mapping webhook
stakach Feb 21, 2021
37a6feb
fix(place location service): check webhook input
stakach Feb 21, 2021
86dac26
feat(place staff api): add guest details and zones query
stakach Feb 23, 2021
ccaac99
Sharp display (#99)
pkheav Feb 23, 2021
b67a5d7
Lg lcd (#61)
pkheav Feb 23, 2021
5d26af6
Epson projector (#62)
dukenguyenxyz Feb 23, 2021
e5f200b
Panasonic display (#85)
pkheav Feb 23, 2021
7f3919a
Nec projector (#92)
pkheav Feb 23, 2021
788a0c4
feat(mdc): set targets to nil once stable (#74)
pkheav Feb 23, 2021
ce7ee7c
Fixes for place/bookings.cr for o365 (#67)
pkheav Feb 23, 2021
783a719
Global cache (#76)
pkheav Feb 23, 2021
3a346f3
QSC Audio DSP External Control (#96)
pkheav Feb 23, 2021
4bab761
Qsc audio dsp (#98)
pkheav Feb 23, 2021
49a4a9f
chore(mulesoft/bookings/spec): new response format
w-le Feb 24, 2021
a91829d
feat(mulesoft/bookings): shorten query window from current month to 2…
w-le Feb 24, 2021
66008be
fix(cisco dna spaces): monitoring API should use PUT
stakach Feb 25, 2021
f274715
feat(mulesoft/timetable): add unit of study code
w-le Feb 25, 2021
08eadf2
Merge branch 'master' of github.com:PlaceOS/drivers
w-le Feb 25, 2021
967cf94
fix(mulesoft/bookings): unitCode may be Null
w-le Feb 25, 2021
2677fd8
fix(mulesoft/bookings): use event.recurring_master_id instead of unit…
w-le Feb 25, 2021
bf705fd
feat(mulesoft/bookings): event.title is now UnitName not activityName
w-le Feb 26, 2021
e8b5a32
fix(mulesoft/bookings): model var assignemtn
w-le Feb 26, 2021
4de8beb
fic(mulesoft/bookings): event.title may be Null
w-le Feb 26, 2021
136d1e4
feat(floorsense): don't return unoccupied desk data
stakach Mar 1, 2021
be748ab
feat(vergesense): only return data where people at the location
stakach Mar 1, 2021
83ad218
feat(place desk bookings): include the booking type
stakach Mar 1, 2021
da3dcfa
feat(xy sense loc service): don't return desk unless occupied
stakach Mar 1, 2021
60eaa47
feat(guest scrape): initial commit
pkheav Mar 10, 2021
dc6de24
feat(guest scrape spec): add StaffAPI to spec
pkheav Mar 10, 2021
ed2c2df
feat(guest scrape): try to get systems from zones
pkheav Mar 11, 2021
768237d
feat(guest scrape): use System model
pkheav Mar 11, 2021
bca1d21
fix(guest scrape): add System properly
pkheav Mar 11, 2021
769d5fc
chore(guest scrape): add comment re. array union
pkheav Mar 11, 2021
b0f0368
feat(staff api): add module query methods
pkheav Mar 11, 2021
5d19cf2
feat(guest scrape): don't convert to json
pkheav Mar 11, 2021
53caff4
fix(guest scrape): only get system ids with Booking modules
pkheav Mar 11, 2021
b079401
chore(guest scrape): add comments
pkheav Mar 11, 2021
76a4df1
feat(staff api): add get_module_state method
pkheav Mar 11, 2021
0c1edfd
feat(staff api): add lookup param for get_module_state
pkheav Mar 11, 2021
81caaa6
feat(guest scrape): get bookings from modules
pkheav Mar 11, 2021
db9bf63
fix(guest scrape): get module bookings properly
pkheav Mar 11, 2021
6bb3ee3
feat(guest scrape): basic spec for get_bookings
pkheav Mar 11, 2021
b66bec2
fix(guest scrape): cast module bookings correctly
pkheav Mar 11, 2021
638f928
fix(guest_scrape): deal with no bookings case
pkheav Mar 12, 2021
b79cdff
fix(guest scrape): cast json booking resp
pkheav Mar 12, 2021
e71f7dc
feat(guest scrape): use event model
pkheav Mar 12, 2021
c9013a9
fix(guest_scrape): use correct params for mailer
pkheav Mar 12, 2021
f30877d
fix(guest scrape): convert event_start to Int
pkheav Mar 12, 2021
1e62bea
feat(guest scrape): don't send to email to host
pkheav Mar 12, 2021
0333683
chore(event scrape): rename from Guest to Event
pkheav Mar 15, 2021
335b07c
feat(event scrape): update response structure
pkheav Mar 15, 2021
18bf488
feat(event scrape): add filtering of events by time
pkheav Mar 15, 2021
0cc576c
fix(event scrape): simplify bookings parsing
pkheav Mar 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This configuration file was generated by `ameba --gen-config`
# on 2019-10-15 23:45:35 UTC using Ameba version 0.10.1.
# The point is for the user to remove these configuration records
# one by one as the reported problems are removed from the code base.

# Run `ameba --only Metrics/CyclomaticComplexity` for details
Metrics/CyclomaticComplexity:
Description: Disallows methods with a cyclomatic complexity higher than `MaxComplexity`
MaxComplexity: 12
Enabled: true
Severity: Convention

# Run `ameba --only Lint/ShadowingOuterLocalVar` for details
Lint/ShadowingOuterLocalVar:
Description: Disallows the usage of the same name as outer local variables for block
or proc arguments.
Enabled: true
Severity: Warning

# Run `ameba --only Style/ConstantNames` for details
Style/ConstantNames:
Description: Enforces constant names to be in screaming case
Enabled: False
Severity: Convention

# Run `ameba --only Style/UnlessElse` for details
Style/UnlessElse:
Description: Disallows the use of an `else` block with the `unless`
Enabled: true
Severity: Convention

# Run `ameba --only Lint/UnusedArgument` for details
Lint/UnusedArgument:
Description: Disallows unused arguments
IgnoreDefs: true
IgnoreBlocks: false
IgnoreProcs: false
Enabled: true
Severity: Warning

# Run `ameba --only Lint/UselessAssign` for details
Lint/UselessAssign:
Description: Disallows useless variable assignments
Enabled: true
Severity: Warning
Excluded:
- repositories/private_drivers/lib/redis/spec/redis_spec.cr
- repositories/private_drivers/lib/pool/test/pool_test.cr
- repositories/private_drivers/lib/pool/test/connection_pool_test.cr

# Run `ameba --only Lint/UnreachableCode` for details
Lint/UnreachableCode:
Description: Reports unreachable code
Enabled: true
Severity: Warning
Excluded:
- repositories/private_drivers/lib/driver/src/driver/protocol/management.cr

# Run `ameba --only Style/VariableNames` for details
Style/VariableNames:
Description: Enforces variable names to be in underscored case
Enabled: true
Severity: Convention
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: 'Bug: A concise description of the behaviour'
labels: bug
assignees: ''

---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behaviour or a minimal code snippet that demonstrates the behaviour.

**Expected behaviour**

A clear and concise description of what you expected to happen.

**Screenshots or a paste of terminal output**

If applicable, add screenshots to help explain your problem.

**Versions (please complete the following information):**

- Output of `$ crystal version`
- Driver version [e.g. 3.x]

**Additional context**

Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/driver_migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Driver Migration
about: Migrate existing Ruby Engine Driver to Crystal
title: 'Driver Migration: Migrate existing Ruby driver'
labels: driver
assignees: ''

---

**Driver to be Migrated**

Information about the driver to be migrated.

**Link to Existing Driver**

Link to existing Driver on Ruby Drivers Repo.

**Additional context**

Add any other context about the problem here.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/driver_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Driver Request
about: Request a new driver to be created
title: 'Driver Request: Information required to create a new driver'
labels: driver
assignees: ''

---

**Driver Type**

Logic/Device/SSH/Websocket

**Manufacturer**

Manufacturer of device, software or service

**Model/Service**

Model or Service

**Link to or Attach Device API or Protocol**

If applicable, add screenshots to help explain your problem.

**Describe any desired functionality**

- Control all aspects of device

**Additional context**

Add any other context about the driver request here.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'RFC: Concise description of desired feature'
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Describe alternatives you've considered**

A clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context or screenshots about the feature request here.
21 changes: 21 additions & 0 deletions .github/workflows/crystal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Crystal CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
style:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v2
- name: Format
run: crystal tool format
- name: Lint
uses: crystal-ameba/github-action@v0.2.6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ lib
.shards
app
*.dwarf
repositories/*
bin
.DS_Store
*.rdb
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
dist: xenial
sudo: required

language: crystal
install:
- docker-compose up -d
- sleep 10
script:
- docker exec -it drivers crystal spec
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "gdb",
"request": "launch",
"target": "./bin/test-harness",
"cwd": "${workspaceRoot}",
"preLaunchTask": "Compile",
"setupCommands": [
{ "text": "-gdb-set follow-fork-mode child" }
]
}
]
}
10 changes: 10 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile",
"command": "shards build --debug drivers",
"type": "shell"
}
]
}
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM crystallang/crystal:0.36.1-alpine
COPY . /src
WORKDIR /src

# Install the latest version of LibSSH2 and the GDB debugger
RUN apk update
RUN apk add --no-cache libssh2 libssh2-dev libssh2-static iputils gdb

# Add trusted CAs for communicating with external services
RUN apk update && apk add --no-cache ca-certificates tzdata && update-ca-certificates

# Build App
RUN rm -rf lib bin
RUN mkdir -p /src/bin/drivers
RUN shards build --error-trace --production

# Run the app binding on port 8080
EXPOSE 8080
ENTRYPOINT ["/src/bin/test-harness"]
CMD ["/src/bin/test-harness", "-b", "0.0.0.0", "-p", "8080"]
44 changes: 9 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,15 @@
# Spider-Gazelle Application Template
# PlaceOS Drivers

[![Build Status](https://travis-ci.org/spider-gazelle/spider-gazelle.svg?branch=master)](https://travis-ci.org/spider-gazelle/spider-gazelle)
[![Build Status](https://travis-ci.org/placeos/drivers.svg?branch=master)](https://travis-ci.org/placeos/drivers)

Clone this repository to start building your own spider-gazelle based application
Manage and test [PlaceOS](https://place.technology) drivers.

## Documentation
## Development

* [Action Controller](https://github.com/spider-gazelle/action-controller) base class for building [Controllers](http://guides.rubyonrails.org/action_controller_overview.html)
* [Active Model](https://github.com/spider-gazelle/active-model) base class for building [ORMs](https://en.wikipedia.org/wiki/Object-relational_mapping)
* [Habitat](https://github.com/luckyframework/habitat) configuration and settings for Crystal projects
* [router.cr](https://github.com/tbrand/router.cr) base request handling
* [Radix](https://github.com/luislavena/radix) Radix Tree implementation for request routing
* [HTTP::Server](https://crystal-lang.org/api/latest/HTTP/Server.html) built-in Crystal Lang HTTP server
* Request
* Response
* Cookies
* Headers
* Params etc
To spin up the test harness, clone the repository and run...

```bash
$ docker-compose up -d
```

Spider-Gazelle builds on the amazing performance of **router.cr** [here](https://github.com/tbrand/which_is_the_fastest).:rocket:


## Testing

`crystal spec`

* to run in development mode `crystal ./src/app.cr`

## Compiling

`crystal build ./src/app.cr`

### Deploying

Once compiled you are left with a binary `./app`

* for help `./app --help`
* viewing routes `./app --routes`
* run on a different port or host `./app -h 0.0.0.0 -p 80`
Point a browser to [localhost:8085](http://localhost:8085), and you're good to go.
30 changes: 30 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: "3.7"
services:
redis:
image: eqalpha/keydb
restart: always
container_name: redis
hostname: redis
environment:
- TZ=$TZ

drivers:
build: .
image: placeos/drivers
restart: always
container_name: drivers
hostname: drivers
environment:
- CRYSTAL_PATH=lib:/lib/local-shards
depends_on:
- redis
ports:
- 127.0.0.1:8085:8080
- 127.0.0.1:4444:4444
volumes:
- ./drivers/:/src/drivers/
- ./repositories/:/src/repositories/
- ./lib/:/lib/local-shards/
environment:
- REDIS_URL=redis://redis:6379
- TZ=$TZ
20 changes: 20 additions & 0 deletions docs/directory_structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Directory Structures

PlaceOS core / drivers makes the assumption that the working directory one level
up from the scratch directory. An example deployment structure:

* Working dir: `/home/placeos/core`
* Executable: `/home/placeos/core/bin/core`
* Driver repositories: `/home/placeos/repositories`
* PlaceOS Drivers: `/home/placeos/repositories/drivers`
* Driver executables: `/home/placeos/core/bin/drivers`
* Samsung driver: `/home/placeos/core/bin/drivers/353b53_samsung_display_md_series_cr`

However when developing the structure will look more like:

* Working dir: `/home/steve/drivers`
* Driver repository: `/home/steve/drivers`
* Driver executables: `/home/steve/drivers/bin/drivers`
* Samsung driver: `/home/placeos/core/bin/drivers/353b53_samsung_display_md_series_cr`

The primary difference between production and development is PlaceOS core, in production, will be cloning repositories and installing shards as required.
10 changes: 10 additions & 0 deletions docs/gdb-entitlement.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>
</pre>

Loading