Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
646 commits
Select commit Hold shift + click to select a range
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
722b0a3
feat(place area management): move level_id to be a tag
stakach Mar 10, 2021
5de29c5
feat(floorsense): add booking requests
stakach Mar 10, 2021
8ec31dd
fix(floorsense models): user doesn't need to have an email
stakach Mar 10, 2021
ce7cfb8
fix(meraki dashboard): no longer treat times as relative
stakach Mar 10, 2021
1137dc5
feat(floorsense): add support for booking information
stakach Mar 15, 2021
3c0cb56
chore: crystal tool format fixes
stakach Mar 15, 2021
81862d9
Freespace driver (#119)
stakach Mar 17, 2021
66152e6
fix(floorsense desk): at_location expects an array
stakach Mar 17, 2021
0dff84c
chore(docs writing a driver): add pre_processor, cross system comms
stakach Mar 17, 2021
f87c586
feat(cisco meraki): return the nearest WAP if there are no observations
stakach Mar 19, 2021
134cad8
chore(freespace sensors): crystal tool format
stakach Mar 19, 2021
da81899
fix(cisco meraki): devices might not be assigned to a floor
stakach Mar 20, 2021
ed12661
feat(cisco meraki): sync_floorplan_sizes to return floor plan info
stakach Mar 20, 2021
cf5b2e2
feat(cisco meraki): add helpers for inspecting state
stakach Mar 23, 2021
4ba2e50
feat(placeos/staff-api): add update_guest()
w-le Mar 23, 2021
6a0f678
fix(cisco meraki): add spec for calculating wap locations
stakach Mar 23, 2021
b162a06
chore(shard.lock): bump versions
stakach Mar 25, 2021
f8e4bb8
chore(shards): bump driver version
stakach Mar 25, 2021
dfaea19
chore(shard.lock): bump driver version
stakach Mar 25, 2021
4a6b976
fix(placeos/staff-api): api endpoint of update guest
w-le Mar 25, 2021
4b240ec
Exterity avedia player (#109)
tob1k Mar 28, 2021
8edc2f3
Denon AV Receiver driver integration (#113)
polonski Mar 28, 2021
1d4a8f4
Biamp drivers (#110)
websymphony Mar 28, 2021
5e57c60
chore: crystal tool format
stakach Mar 28, 2021
d15d388
feat(biamp): used named commands to speed execution
stakach Mar 28, 2021
b4ff5b9
chore(spec-runner): update build to latest (#127)
MrYuion Mar 29, 2021
a360461
fix(cisco meraki): access points y location needs inverting
stakach Mar 29, 2021
a76c834
Revert "fix(cisco meraki): access points y location needs inverting"
stakach Mar 29, 2021
f4691f4
bump to crystal 1.0.0 (#125)
stakach Mar 30, 2021
2db8ff5
feat(mulesoft/bookings): reduce query window to +/- 1d not 1w
w-le Mar 30, 2021
0611a32
fix: LG and NEC driver compilation
stakach Apr 7, 2021
22d1071
feat: Lenel OpenAccess (#24)
kimburgess Apr 7, 2021
17c4cb2
chore(shard.lock): revert shard.lock to pre-v1 state (#133)
stakach Apr 7, 2021
e9c52b2
fix: revert shards to pre-v1
stakach Apr 7, 2021
804d056
feat(floorsense): add booking sync capabilities
stakach Apr 8, 2021
8c1ad81
fix(floorsense booking sync): don't raise if floor not found
stakach Apr 8, 2021
7a58967
build(docker-compose): remove the container_name key for redis (#134)
Apr 8, 2021
506e523
feat(floorsense desks): add user and rfid operations
stakach Apr 9, 2021
35a04f1
feat(floorsense): add support for user syncing
stakach Apr 9, 2021
9e66487
feat(floorsense): add a method for finding the user-id of a CSN
stakach Apr 9, 2021
a232f4e
fix(floorsense desks): expected event log ordering
stakach Apr 9, 2021
06509a8
fix(floorsense desks): sort by time, then id
stakach Apr 9, 2021
a3083fb
fix(floorsense desk): add support for event logs after param
stakach Apr 9, 2021
b34ea56
fix(floorsense sync): improved event log query
stakach Apr 9, 2021
ab0f551
Sony projector (#136)
pkheav Apr 9, 2021
0317441
chore(floorsense sync): add some additional debugging
stakach Apr 9, 2021
2a80a22
fix(floorsense sync): staff api query needs to be sending unix timest…
stakach Apr 9, 2021
65d0bab
fix(floorsense sync): compile error
stakach Apr 9, 2021
382a8e3
Sony LCD (#128)
tassja Apr 9, 2021
8438504
fix(floorsense sync): handle error where user wasn't in placeos
stakach Apr 9, 2021
633d8e4
fix(floorsense bookings sync): id 0 padding on correct side
stakach Apr 11, 2021
e21300d
fix(floorsense desk): booking requires cid
stakach Apr 11, 2021
b26fe9b
fix(floorsense sync): add a mutex around sync operations
stakach Apr 12, 2021
e6bf69a
feat(place staff api): add delete booking to staff API
stakach Apr 12, 2021
c2cea07
fix(place staff api): get booking was using post instead of get
stakach Apr 12, 2021
56b850e
fix(floorsense sync): ignore bookings that are not adhoc
stakach Apr 12, 2021
7040449
fix(floorsense sync): ignore bookings that are not adhoc
stakach Apr 12, 2021
3067ec1
fix(floorsense desks): set desk expiry time to ending time
stakach Apr 12, 2021
7dd7567
fix(place staff api): use patch for booking update
stakach Apr 12, 2021
26e83d3
fix(floorsense booking sync): book for now if start time in the past
stakach Apr 12, 2021
6408136
fix(floorsense sync): fix booking matching during sync
stakach Apr 12, 2021
94cd019
fix(floorsense sync): release bookings that are not in PlaceOS
stakach Apr 12, 2021
7b4010e
fix(floorsense sync): don't sync bookings to foor that ended in the past
stakach Apr 12, 2021
b4327c4
fix(floorsense sync): check ending slightly in the future
stakach Apr 12, 2021
43c3bda
feat(floorsense desks): check for errors in rfid create response
stakach Apr 12, 2021
596632a
fix(floorsense models): return true where there is no response data
stakach Apr 12, 2021
fec08d7
fix: extend NEC Display audio inputs (#137)
Apr 12, 2021
979e43e
feat(floorsense sync): ensure card numbers are always up to date
stakach Apr 13, 2021
2dc0b92
fix(floorsense sync): ensure bookings are started in floorsense
stakach Apr 13, 2021
e1fe4c6
fix(sony/projector): fix bug in rendering bytes (#138)
Apr 13, 2021
71831f0
fix(user group mapping): preference login_name over email
stakach Apr 14, 2021
0d66a75
feat(docs emails): guide to writing a driver that sends emails
stakach Apr 15, 2021
731ef0f
feat(meraki dashboard): split into a service and a logic
stakach Apr 15, 2021
6824aef
chore(shard.lock): bump calendar and office365 (#145)
w-le Apr 21, 2021
7a1ea99
fix(place/calendar): Dont add Teams link to every Event by default
w-le Apr 21, 2021
9e9671e
fix(place/calendar): o365 event timezones
w-le Apr 21, 2021
73ecc97
Revert "feat(mulesoft/bookings): reduce query window to +/- 1d not 1w"
w-le Apr 21, 2021
001bb60
feat(sony projector): add pj talk protocol (#141)
stakach Apr 23, 2021
a525b15
chore(floorsense): add booking sync overview
stakach Apr 23, 2021
df003db
build: bump to placeos-driver 5.0.8 (#135)
Apr 26, 2021
b0494e9
feat: add generic MQTT driver (#148)
stakach Apr 26, 2021
3471a0a
chore(place mqtt): add some additional logging
stakach Apr 26, 2021
dd337eb
feat(place mqtt): add ping to keep session alive
stakach Apr 26, 2021
5804389
chore(place mqt): log when a ping is being sent
stakach Apr 26, 2021
449a12c
chore(shard.lock): bump driver version
stakach Apr 26, 2021
fef0104
chore(shard.lock): bump driver version
stakach Apr 26, 2021
c8ee924
feat(mulesoft/bookings): polling interval is cron not minutes
w-le Apr 27, 2021
1525d25
ci(github/style): update style action
Apr 28, 2021
fb6e8d5
feat(place/calendar): support event.location
w-le Apr 28, 2021
b9d198a
fix(meraki locations): skip and warn about invalid locations
stakach Apr 28, 2021
fb28c54
fix(meraki locations): check for invalid locations
stakach Apr 28, 2021
84abf68
style: define base ameba config and fix lints across drivers (#149)
Apr 29, 2021
8fd3b82
fix(lenel): build regression (#152)
kimburgess Apr 30, 2021
7ca473b
feat(global_cache): conform to electrical relay interface (#154)
May 3, 2021
4bd0df0
feat: add echo360 driver (#155)
stakach May 3, 2021
95f2957
fix(echo360): incorrect path generation in macro
stakach May 3, 2021
76d69c6
feat(echo360): add some debugging output
stakach May 3, 2021
8fa1804
fix(echo360): next can be an empty string
stakach May 3, 2021
7ebfec6
feat(smtp): add setting to ignore cert validation (#161)
pkheav May 18, 2021
577f559
ci: move to github (#153)
May 21, 2021
2eb296c
feat(mulesoft): add Calendar exporter
w-le May 21, 2021
1456e06
fix: clear schedules on connect (#170)
stakach May 24, 2021
53af103
fix(mulesoft/exporter): status vars, perf, style, format
w-le May 24, 2021
0d817df
lint(mulesoft): fix ameba lints (#171)
May 24, 2021
e15e964
Merge branch 'master' into fix/mulesoft_exporter
w-le May 24, 2021
8833718
style(mulesoft/exporter): whitespace
w-le May 24, 2021
a5f35f4
fix(mulesoft/exporter): clone booking before transform; clearer namin…
w-le May 28, 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
57 changes: 57 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Excluded:
- repositories/**/*.cr

# NOTE: These should all be reviewed on an individual basis to see if their
# complexity can be reasonably reduced.
Metrics/CyclomaticComplexity:
Description: Disallows methods with a cyclomatic complexity higher than `MaxComplexity`
MaxComplexity: 10
Excluded:
- drivers/helvar/net.cr
- drivers/mulesoft/booking_api.cr
- drivers/samsung/displays/mdc_protocol.cr
- drivers/cisco/dna_spaces.cr
- drivers/cisco/meraki/dashboard.cr
- drivers/cisco/switch/snooping_catalyst.cr
- drivers/gantner/relaxx/protocol_json.cr
- drivers/place/bookings.cr
- drivers/place/area_management.cr
- drivers/place/smtp.cr
- drivers/hitachi/projector/cp_tw_series_basic.cr
- drivers/panasonic/projector/nt_control.cr
- drivers/lumens/dc193.cr
Enabled: false
Severity: Convention

Lint/UselessAssign:
Description: Disallows useless variable assignments
# NOTE: Not enabled due to the extremely large hit count.
# Discussion with driver authors on whether this pattern is intended.
Enabled: false
Severity: Warning

Style/VerboseBlock:
Description: Identifies usage of collapsible single expression blocks.
ExcludeCallsWithBlock: false
ExcludeMultipleLineBlocks: true
ExcludeOperators: false
ExcludePrefixOperators: false
ExcludeSetters: true
Enabled: false
Severity: Convention

Style/VariableNames:
Description: Enforces variable names to be in underscored case
# NOTE: Not enabled due to the extremely large hit count.
# Discussion with driver authors on whether this pattern is intended.
Enabled: false
Severity: Convention

# NOTE: These appear to be triggered by assignment in case expressions, could be an ameba bug
Lint/ShadowingOuterLocalVar:
Description: Disallows the usage of the same name as outer local variables for block
or proc arguments.
Excluded:
- drivers/cisco/switch/snooping_catalyst.cr
Enabled: true
Severity: Warning
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.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 6 * * 1"

jobs:
style:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v2
- name: Format
run: crystal tool format --check
- name: Lint
uses: crystal-ameba/github-action@v0.2.12
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crystal:
- latest
- nightly
- 1.0.0
steps:
- uses: actions/checkout@v2
- name: Build drivers image
run: docker-compose build drivers
env:
CRYSTAL_VERSION: ${{ matrix.crystal }}
- name: Run docker-compose environment
run: docker-compose up -d
- name: Spec
run: docker exec placeos-drivers crystal spec -v --error-trace
- name: Driver Report
run: docker exec placeos-drivers /src/bin/report
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
1 change: 0 additions & 1 deletion .travis.yml

This file was deleted.

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"
}
]
}
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ARG crystal_version=1.0.0
FROM crystallang/crystal:${crystal_version}-alpine
WORKDIR /src

# Install the latest version of LibSSH2 and the GDB debugger
RUN apk add --no-cache \
ca-certificates \
gdb \
iputils \
libssh2 libssh2-dev libssh2-static \
tzdata \
yaml-static

# Add trusted CAs for communicating with external services
RUN update-ca-certificates

RUN mkdir -p /src/bin/drivers

COPY shard.yml /src/shard.yml
COPY shard.override.yml /src/shard.override.yml
COPY shard.lock /src/shard.lock

RUN shards install --production --ignore-crystal-version

COPY src /src/src
COPY spec /src/spec

# Build App
RUN shards build --error-trace --release --production --ignore-crystal-version

# 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)
[![CI](https://github.com/PlaceOS/drivers/actions/workflows/ci.yml/badge.svg)](https://github.com/PlaceOS/drivers/actions/workflows/ci.yml)

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.
35 changes: 35 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: "3.7"
services:
redis:
image: eqalpha/keydb
restart: always
hostname: redis
environment:
- TZ=$TZ

drivers:
build:
context: .
args:
crystal_version: ${CRYSTAL_VERSION:-1.0.0}
image: placeos/drivers
restart: always
container_name: placeos-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/
- ./src/:/src/src
- ./spec/:/src/spec
- ./.git:/src/.git
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.
Loading