From 57bf42286dba8b20cfdc02e28b4dc4a0a9291765 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 5 Aug 2021 22:52:21 +0200 Subject: ma pkgs.beef: bump --- makefu/5pkgs/beef/Gemfile | 66 ++- makefu/5pkgs/beef/Gemfile.lock | 333 ++++++++----- makefu/5pkgs/beef/gemset.nix | 1000 +++++++++++++++++++++++++++++++++------- makefu/5pkgs/beef/update.sh | 28 ++ 4 files changed, 1117 insertions(+), 310 deletions(-) create mode 100755 makefu/5pkgs/beef/update.sh diff --git a/makefu/5pkgs/beef/Gemfile b/makefu/5pkgs/beef/Gemfile index da13e1fb8..759ba2d23 100644 --- a/makefu/5pkgs/beef/Gemfile +++ b/makefu/5pkgs/beef/Gemfile @@ -1,53 +1,38 @@ # BeEF's Gemfile # -# Copyright (c) 2006-2018 Wade Alcorn - wade@bindshell.net +# Copyright (c) 2006-2021 Wade Alcorn - wade@bindshell.net # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # - +#gem 'simplecov', require: false, group: :test gem 'eventmachine' gem 'thin' -gem 'sinatra', '~> 2.0' -gem 'rack', '~> 2.0' -gem 'rack-protection', '~> 2.0' +gem 'sinatra', '>= 2.0.2' +gem 'rack', '>= 2.2.3' +gem 'rack-protection', '>= 2.0.0' gem 'em-websocket' # WebSocket support -gem 'uglifier' +gem 'uglifier', '>= 2.7.2' gem 'mime-types' gem 'execjs' gem 'ansi' gem 'term-ansicolor', :require => 'term/ansicolor' -gem 'dm-core' gem 'json' -gem 'data_objects' -gem 'rubyzip', '>= 1.2.1' +gem 'rubyzip', '>= 1.2.2' gem 'espeak-ruby', '>= 1.0.4' # Text-to-Voice -gem 'nokogiri', '>= 1.7' -gem 'rake' - -# SQLite support -group :sqlite do - gem 'dm-sqlite-adapter' -end - -# PostgreSQL support -group :postgres do - #gem dm-postgres-adapter -end - -# MySQL support -group :mysql do - #gem dm-mysql-adapter -end +gem 'nokogiri', '>= 1.11.1' +gem 'rake', '>= 12.3.3' +gem 'otr-activerecord', '>= 1.4.2' +gem 'sqlite3' +gem 'rubocop', '~> 0.92.0', require: false # Geolocation support group :geoip do - gem 'geoip' + gem 'maxmind-db' end gem 'parseconfig' gem 'erubis' -gem 'dm-migrations' # Metasploit Integration extension group :ext_msf do @@ -67,12 +52,7 @@ end # DNS extension group :ext_dns do - gem 'rubydns', '~> 0.7.3' -end - -# network extension -group :ext_network do - gem 'dm-serializer' + gem 'async-dns' end # QRcode extension @@ -82,24 +62,32 @@ end # For running unit tests group :test do - if ENV['BEEF_TEST'] gem 'test-unit' gem 'test-unit-full' gem 'rspec' + gem 'rdoc' # curb gem requires curl libraries # sudo apt-get install libcurl4-openssl-dev gem 'curb' # selenium-webdriver 3.x is incompatible with Firefox version 48 and prior - gem 'selenium' - gem 'selenium-webdriver', '~> 2.53.4' + # gem 'selenium' # Requires old version of selenium which is no longer available + gem 'geckodriver-helper' + gem 'selenium-webdriver' # nokogirl is needed by capybara which may require one of the below commands # sudo apt-get install libxslt-dev libxml2-dev # sudo port install libxml2 libxslt gem 'capybara' # RESTful API tests/generic command module tests gem 'rest-client', '>= 2.0.1' - gem 'byebug' - end + gem 'irb' + gem 'pry-byebug' + gem "websocket-client-simple", "~> 0.3.0" + gem "browserstack-local", "~> 1.3" end source 'https://rubygems.org' + + + + + diff --git a/makefu/5pkgs/beef/Gemfile.lock b/makefu/5pkgs/beef/Gemfile.lock index 8f18bf220..fa6f32335 100644 --- a/makefu/5pkgs/beef/Gemfile.lock +++ b/makefu/5pkgs/beef/Gemfile.lock @@ -1,182 +1,297 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activesupport (6.1.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) ansi (1.5.0) + archive-zip (0.12.0) + io-like (~> 0.3.0) + ast (2.4.2) + async (1.30.1) + console (~> 1.10) + nio4r (~> 2.3) + timers (~> 4.1) + async-dns (1.2.6) + async-io (~> 1.15) + async-io (1.32.2) + async + browserstack-local (1.3.0) buftok (0.2.0) - chunky_png (1.3.10) - daemons (1.2.6) - data_objects (0.10.17) - addressable (~> 2.1) - dm-core (1.2.1) - addressable (~> 2.3) - dm-do-adapter (1.2.0) - data_objects (~> 0.10.6) - dm-core (~> 1.2.0) - dm-migrations (1.2.0) - dm-core (~> 1.2.0) - dm-serializer (1.2.2) - dm-core (~> 1.2.0) - fastercsv (~> 1.5) - json (~> 1.6) - json_pure (~> 1.6) - multi_json (~> 1.0) - dm-sqlite-adapter (1.2.0) - dm-do-adapter (~> 1.2.0) - do_sqlite3 (~> 0.10.6) - do_sqlite3 (0.10.17) - data_objects (= 0.10.17) - domain_name (0.5.20180417) + byebug (11.1.3) + capybara (3.35.3) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + childprocess (3.0.0) + coderay (1.1.3) + concurrent-ruby (1.1.9) + console (1.13.1) + fiber-local + curb (0.9.11) + daemons (1.4.0) + diff-lcs (1.4.4) + domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - em-websocket (0.5.1) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) equalizer (0.0.11) erubis (2.7.0) espeak-ruby (1.0.4) - eventmachine (1.0.9.1) - execjs (2.7.0) - fastercsv (1.5.5) - filesize (0.1.1) - geoip (1.6.4) - http (3.3.0) + event_emitter (0.2.6) + eventmachine (1.2.7) + execjs (2.8.1) + ffi (1.15.3) + ffi-compiler (1.0.1) + ffi (>= 1.0.0) + rake + fiber-local (1.0.0) + geckodriver-helper (0.24.0) + archive-zip (~> 0.7) + hashie (4.1.0) + hashie-forbidden_attributes (0.1.1) + hashie (>= 3.0) + http (4.4.1) addressable (~> 2.3) http-cookie (~> 1.0) - http-form_data (~> 2.0) - http_parser.rb (~> 0.6.0) - http-cookie (1.0.3) + http-form_data (~> 2.2) + http-parser (~> 1.2.0) + http-accept (1.7.0) + http-cookie (1.0.4) domain_name (~> 0.5) - http-form_data (2.1.1) + http-form_data (2.3.0) + http-parser (1.2.3) + ffi-compiler (>= 1.0, < 2.0) http_parser.rb (0.6.0) - jsobfu (0.4.2) - rkelly-remix - json (1.8.6) - json_pure (1.8.6) + i18n (1.8.10) + concurrent-ruby (~> 1.0) + io-console (0.5.9) + io-like (0.3.1) + irb (1.3.6) + reline (>= 0.2.5) + json (2.5.1) + maxmind-db (1.1.1) memoizable (0.4.2) thread_safe (~> 0.3, >= 0.3.1) - metasm (1.0.3) - mime-types (3.2.2) + method_source (1.0.0) + mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2018.0812) - mini_portile2 (2.3.0) - mojo_magick (0.5.6) - msfrpc-client (1.1.1) + mime-types-data (3.2021.0704) + mini_mime (1.1.0) + mini_portile2 (2.6.1) + minitest (5.14.4) + mojo_magick (0.6.6) + msfrpc-client (1.1.2) msgpack (~> 1) - rex (~> 2) - msgpack (1.2.4) - multi_json (1.13.1) - multipart-post (2.0.0) - mustermann (1.0.2) + msgpack (1.4.2) + multipart-post (2.1.1) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) naught (1.1.0) netrc (0.11.0) - nokogiri (1.8.4) - mini_portile2 (~> 2.3.0) - parseconfig (1.0.8) - public_suffix (3.0.3) - qr4r (0.4.1) - mojo_magick - rqrcode - rack (2.0.5) - rack-protection (2.0.3) + nio4r (2.5.8) + nokogiri (1.12.2) + mini_portile2 (~> 2.6.1) + racc (~> 1.4) + otr-activerecord (2.0.1) + activerecord (>= 4.0, < 6.3) + hashie-forbidden_attributes (~> 0.1) + parallel (1.20.1) + parseconfig (1.1.0) + parser (3.0.2.0) + ast (~> 2.4.1) + power_assert (2.0.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) + byebug (~> 11.0) + pry (~> 0.13.0) + public_suffix (4.0.6) + qr4r (0.6.1) + mojo_magick (~> 0.6.5) + rqrcode_core (~> 0.1) + racc (1.5.2) + rack (2.2.3) + rack-protection (2.1.0) rack + rack-test (1.1.0) + rack (>= 1.0, < 3) rainbow (3.0.0) - rake (12.3.1) - rb-readline (0.5.5) - rest-client (2.0.2) + rake (13.0.6) + rdoc (6.3.2) + regexp_parser (2.1.1) + reline (0.2.6) + io-console (~> 0.5) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rex (2.0.11) - filesize - jsobfu (~> 0.4.1) - json - metasm (~> 1.0.2) - nokogiri - rb-readline - robots - rexec (1.6.3) - rainbow - rkelly-remix (0.0.7) - robots (0.10.1) - rqrcode (0.10.1) - chunky_png (~> 1.0) - rubydns (0.7.3) - eventmachine (~> 1.0.0) - rexec (~> 1.6.2) - rubyzip (1.2.1) + rexml (3.2.5) + rqrcode_core (0.2.0) + rr (3.0.5) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.1) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.10.0) + rspec-support (3.10.2) + rubocop (0.92.0) + parallel (~> 1.10) + parser (>= 2.7.1.5) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.7) + rexml + rubocop-ast (>= 0.5.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (1.8.0) + parser (>= 3.0.1.1) + ruby-progressbar (1.11.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) rushover (0.3.0) json rest-client + selenium-webdriver (3.142.7) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) simple_oauth (0.3.1) - sinatra (2.0.3) + sinatra (2.1.0) mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.3) + rack (~> 2.2) + rack-protection (= 2.1.0) tilt (~> 2.0) - slack-notifier (2.3.2) - term-ansicolor (1.6.0) + slack-notifier (2.4.0) + sqlite3 (1.4.2) + sync (0.5.0) + term-ansicolor (1.7.1) tins (~> 1.0) - thin (1.7.2) + test-unit (3.4.4) + power_assert + test-unit-context (0.5.1) + test-unit (>= 2.4.0) + test-unit-full (0.0.5) + test-unit + test-unit-context + test-unit-notify + test-unit-rr + test-unit-runner-tap + test-unit-notify (1.0.4) + test-unit (>= 2.4.9) + test-unit-rr (1.0.5) + rr (>= 1.1.1) + test-unit (>= 2.5.2) + test-unit-runner-tap (1.1.2) + test-unit + thin (1.8.1) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) rack (>= 1, < 3) thread_safe (0.3.6) - tilt (2.0.8) - tins (1.16.3) - twitter (6.2.0) + tilt (2.0.10) + timers (4.3.3) + tins (1.29.1) + sync + twitter (7.0.0) addressable (~> 2.3) buftok (~> 0.2.0) equalizer (~> 0.0.11) - http (~> 3.0) + http (~> 4.0) http-form_data (~> 2.0) http_parser.rb (~> 0.6.0) memoizable (~> 0.4.0) multipart-post (~> 2.0) naught (~> 1.0) simple_oauth (~> 0.3.0) - uglifier (4.1.18) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext - unf_ext (0.0.7.5) - xmlrpc (0.3.0) + unf_ext (0.0.7.7) + unicode-display_width (1.7.0) + webrick (1.7.0) + websocket (1.2.9) + websocket-client-simple (0.3.0) + event_emitter + websocket + xmlrpc (0.3.2) + webrick + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.4.2) PLATFORMS ruby DEPENDENCIES ansi - data_objects - dm-core - dm-migrations - dm-serializer - dm-sqlite-adapter + async-dns + browserstack-local (~> 1.3) + capybara + curb em-websocket erubis espeak-ruby (>= 1.0.4) eventmachine execjs - geoip + geckodriver-helper + irb json + maxmind-db mime-types msfrpc-client - nokogiri (>= 1.7) + nokogiri (>= 1.11.1) + otr-activerecord (>= 1.4.2) parseconfig + pry-byebug qr4r - rack (~> 2.0) - rack-protection (~> 2.0) - rake - rubydns (~> 0.7.3) - rubyzip (>= 1.2.1) + rack (>= 2.2.3) + rack-protection (>= 2.0.0) + rake (>= 12.3.3) + rdoc + rest-client (>= 2.0.1) + rspec + rubocop (~> 0.92.0) + rubyzip (>= 1.2.2) rushover - sinatra (~> 2.0) + selenium-webdriver + sinatra (>= 2.0.2) slack-notifier + sqlite3 term-ansicolor + test-unit + test-unit-full thin twitter (>= 5.0.0) - uglifier + uglifier (>= 2.7.2) + websocket-client-simple (~> 0.3.0) xmlrpc BUNDLED WITH - 1.14.6 + 2.1.4 diff --git a/makefu/5pkgs/beef/gemset.nix b/makefu/5pkgs/beef/gemset.nix index 3ccd7340b..507ef9a27 100644 --- a/makefu/5pkgs/beef/gemset.nix +++ b/makefu/5pkgs/beef/gemset.nix @@ -1,12 +1,47 @@ { + activemodel = { + dependencies = ["activesupport"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0xjy8fg7n5wwv29ngvvdf5r6815s5f0knzyswxh8w6z8f8qj5wr7"; + type = "gem"; + }; + version = "6.1.4"; + }; + activerecord = { + dependencies = ["activemodel" "activesupport"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "18897s9h9kha8vgky1yfq4x91m3p81k6rkrb1fgjlnqnvarh9vg0"; + type = "gem"; + }; + version = "6.1.4"; + }; + activesupport = { + dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo" "zeitwerk"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0kqgywy4cj3h5142dh7pl0xx5nybp25jn0ykk0znziivzks68xdk"; + type = "gem"; + }; + version = "6.1.4"; + }; addressable = { dependencies = ["public_suffix"]; + groups = ["default" "ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0viqszpkggqi8hq87pqp0xykhvz60g99nwmkwsb0v45kc2liwxvk"; + sha256 = "022r3m9wdxljpbya69y2i3h9g3dhhfaqzidf95m6qjzms792jvgp"; type = "gem"; }; - version = "2.5.2"; + version = "2.8.0"; }; ansi = { source = { @@ -16,6 +51,70 @@ }; version = "1.5.0"; }; + archive-zip = { + dependencies = ["io-like"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0ywpxgmhazmqcsjf3qhim3rdnbyjjl9nkj91kqgmrjq5q8j0r386"; + type = "gem"; + }; + version = "0.12.0"; + }; + ast = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "04nc8x27hlzlrr5c2gn7mar4vdr0apw5xg22wp6m8dx3wqr04a0y"; + type = "gem"; + }; + version = "2.4.2"; + }; + async = { + dependencies = ["console" "nio4r" "timers"]; + groups = ["default" "ext_dns"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0mdv66xn5xjyaidyrp66mfnx7d4habkbfmx9y57k75h5q6fd2b65"; + type = "gem"; + }; + version = "1.30.1"; + }; + async-dns = { + dependencies = ["async-io"]; + groups = ["ext_dns"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1jwgzdp0qi31c8wlflhqvjj5w1vfwyai9j2yzxrpsqjzcmwhiv90"; + type = "gem"; + }; + version = "1.2.6"; + }; + async-io = { + dependencies = ["async"]; + groups = ["default" "ext_dns"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "10l9m0x2ffvsaaxc4mfalrljjx13njkyir9w6yfif8wpszc291h8"; + type = "gem"; + }; + version = "1.32.2"; + }; + browserstack-local = { + groups = ["test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0wch4m064szfkk9fyp7f1yvkpbc3ajqdql0k4pjmqj2z38spsz9i"; + type = "gem"; + }; + version = "1.3.0"; + }; buftok = { source = { remotes = ["https://rubygems.org"]; @@ -24,102 +123,119 @@ }; version = "0.2.0"; }; - chunky_png = { + byebug = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "05g2xli9wbjylkmblln3bhvjalziwb92q452q8ibjagmb853424w"; + sha256 = "0nx3yjf4xzdgb8jkmk2344081gqr22pgjqnmjg2q64mj5d6r9194"; type = "gem"; }; - version = "1.3.10"; + version = "11.1.3"; }; - daemons = { + capybara = { + dependencies = ["addressable" "mini_mime" "nokogiri" "rack" "rack-test" "regexp_parser" "xpath"]; + groups = ["test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0lxqq6dgb8xhliywar2lvkwqy2ssraf9dk4b501pb4ixc2mvxbp2"; + sha256 = "1viqcpsngy9fqjd68932m43ad6xj656d1x33nx9565q57chgi29k"; type = "gem"; }; - version = "1.2.6"; + version = "3.35.3"; }; - data_objects = { - dependencies = ["addressable"]; + childprocess = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "19fw1ckqc5f1wc4r72qrymy2k6cmd8azbxpn61ksbsjqhzc2bgqd"; + sha256 = "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"; type = "gem"; }; - version = "0.10.17"; + version = "3.0.0"; }; - dm-core = { - dependencies = ["addressable"]; + coderay = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "09x67ka6f1lxh4iwrg87iama0haq0d0z35gavvnvzpx9kn9pfbnw"; + sha256 = "0jvxqxzply1lwp7ysn94zjhh57vc14mcshw1ygw14ib8lhc00lyw"; type = "gem"; }; - version = "1.2.1"; + version = "1.1.3"; }; - dm-do-adapter = { - dependencies = ["data_objects" "dm-core"]; + concurrent-ruby = { + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1v84lsmsq8kawl8k4qz2h87xqc1sr10c08wwasrxbcgrkvp7qk4q"; + sha256 = "0nwad3211p7yv9sda31jmbyw6sdafzmdi2i2niaz6f0wk5nq9h0f"; type = "gem"; }; - version = "1.2.0"; + version = "1.1.9"; }; - dm-migrations = { - dependencies = ["dm-core"]; + console = { + dependencies = ["fiber-local"]; + groups = ["default" "ext_dns"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "04hr8qgm4j1z5fg0cfpr8r6apvk5xykad0d0xqfg48rjv5rdwc0i"; + sha256 = "04vhg3vnj2ky00fld4v6qywx32z4pjsa7l8i7sl1bl213s8334l9"; type = "gem"; }; - version = "1.2.0"; + version = "1.13.1"; }; - dm-serializer = { - dependencies = ["dm-core" "fastercsv" "json" "json_pure" "multi_json"]; + curb = { + groups = ["test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0mvpb2d4cniysw45d3c9xidjpdb3wmfl7x5lgvnsfm69wq24v5y4"; + sha256 = "1q7kqswm780vx1fannnrprbfbsp166smgyszgip5q7b859mk89wp"; type = "gem"; }; - version = "1.2.2"; + version = "0.9.11"; }; - dm-sqlite-adapter = { - dependencies = ["dm-do-adapter" "do_sqlite3"]; + daemons = { + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0mq9xrw4jwb753sy8902rq9sfv62mzss2n3875g51i9acqy475hc"; + sha256 = "1fki1aipqafqlg8xy25ykk0ql1dciy9kk6lcp5gzgkh9ccmaxzf3"; type = "gem"; }; - version = "1.2.0"; + version = "1.4.0"; }; - do_sqlite3 = { - dependencies = ["data_objects"]; + diff-lcs = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0gxz54qjgwg6a2mkqpai28m0i5swbyxpr4qmh9x1nwf20lysrgcf"; + sha256 = "0m925b8xc6kbpnif9dldna24q1szg4mk0fvszrki837pfn46afmz"; type = "gem"; }; - version = "0.10.17"; + version = "1.4.4"; }; domain_name = { dependencies = ["unf"]; + groups = ["default" "ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0abdlwb64ns7ssmiqhdwgl27ly40x2l27l8hs8hn0z4kb3zd2x3v"; + sha256 = "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"; type = "gem"; }; - version = "0.5.20180417"; + version = "0.5.20190701"; }; em-websocket = { dependencies = ["eventmachine" "http_parser.rb"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"; + sha256 = "1mg1mx735a0k1l8y14ps2mxdwhi5r01ikydf34b0sp60v66nvbkb"; type = "gem"; }; - version = "0.5.1"; + version = "0.5.2"; }; equalizer = { source = { @@ -145,71 +261,151 @@ }; version = "1.0.4"; }; + event_emitter = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "148k9qv8102l3m6klc24dwip79f9y4bjr5z19dckd7ffbjyrf9n7"; + type = "gem"; + }; + version = "0.2.6"; + }; eventmachine = { + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "17jr1caa3ggg696dd02g2zqzdjqj9x9q2nl7va82l36f7c5v6k4z"; + sha256 = "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"; type = "gem"; }; - version = "1.0.9.1"; + version = "1.2.7"; }; execjs = { + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1yz55sf2nd3l666ms6xr18sm2aggcvmb8qr3v53lr4rir32y1yp1"; + sha256 = "121h6af4i6wr3wxvv84y53jcyw2sk71j5wsncm6wq6yqrwcrk4vd"; type = "gem"; }; - version = "2.7.0"; + version = "2.8.1"; }; - fastercsv = { + ffi = { + groups = ["default" "ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1df3vfgw5wg0s405z0pj0rfcvnl9q6wak7ka8gn0xqg4cag1k66h"; + sha256 = "1wgvaclp4h9y8zkrgz8p2hqkrgr4j7kz0366mik0970w532cbmcq"; type = "gem"; }; - version = "1.5.5"; + version = "1.15.3"; }; - filesize = { + ffi-compiler = { + dependencies = ["ffi" "rake"]; + groups = ["default" "ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "061qmg82mm9xnmnq3b7gbi24g28xk62w0b0nw86gybd07m1jn989"; + sha256 = "0c2caqm9wqnbidcb8dj4wd3s902z15qmgxplwyfyqbwa0ydki7q1"; type = "gem"; }; - version = "0.1.1"; + version = "1.0.1"; + }; + fiber-local = { + groups = ["default" "ext_dns"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1vrxxb09fc7aicb9zb0pmn5akggjy21dmxkdl3w949y4q05rldr9"; + type = "gem"; + }; + version = "1.0.0"; }; - geoip = { + geckodriver-helper = { + dependencies = ["archive-zip"]; + groups = ["test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1if16n4pjl2kshc0cqg7i03m55fspmlca6p9f4r66rpzw0v4d6jc"; + sha256 = "14zw0hxsqhz8pirm4rll0wmv2yhsfdjf5pkp3pxg46jsryfpm288"; type = "gem"; }; - version = "1.6.4"; + version = "0.24.0"; + }; + hashie = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "02bsx12ihl78x0vdm37byp78jjw2ff6035y7rrmbd90qxjwxr43q"; + type = "gem"; + }; + version = "4.1.0"; + }; + hashie-forbidden_attributes = { + dependencies = ["hashie"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1chgg5d2iddja6ww02x34g8avg11fzmzcb8yvnqlykii79zx6vis"; + type = "gem"; + }; + version = "0.1.1"; }; http = { - dependencies = ["addressable" "http-cookie" "http-form_data" "http_parser.rb"]; + dependencies = ["addressable" "http-cookie" "http-form_data" "http-parser"]; + groups = ["default" "ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1jlm5prw437wqpfxcigh88lfap3m7g8mnmj5as7qw6dzqnvrxwmc"; + sha256 = "0z8vmvnkrllkpzsxi94284di9r63g9v561a16an35izwak8g245y"; type = "gem"; }; - version = "3.3.0"; + version = "4.4.1"; + }; + http-accept = { + groups = ["default" "ext_notifications" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "09m1facypsdjynfwrcv19xcb1mqg8z6kk31g8r33pfxzh838c9n6"; + type = "gem"; + }; + version = "1.7.0"; }; http-cookie = { dependencies = ["domain_name"]; + groups = ["default" "ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"; + sha256 = "19370bc97gsy2j4hanij246hv1ddc85hw0xjb6sj7n1ykqdlx9l9"; type = "gem"; }; - version = "1.0.3"; + version = "1.0.4"; }; http-form_data = { + groups = ["default" "ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15lpn604byf7cyxnw949xz4rvpcknqp7a48q73nm630gqxsa76f3"; + sha256 = "1wx591jdhy84901pklh1n9sgh74gnvq1qyqxwchni1yrc49ynknc"; type = "gem"; }; - version = "2.1.1"; + version = "2.3.0"; + }; + http-parser = { + dependencies = ["ffi-compiler"]; + groups = ["default" "ext_notifications"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "18qqvckvqjffh88hfib6c8pl9qwk9gp89w89hl3f2s1x8hgyqka1"; + type = "gem"; + }; + version = "1.2.3"; }; "http_parser.rb" = { source = { @@ -219,30 +415,67 @@ }; version = "0.6.0"; }; - jsobfu = { - dependencies = ["rkelly-remix"]; + i18n = { + dependencies = ["concurrent-ruby"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1hchns89cfj0gggm2zbr7ghb630imxm2x2d21ffx2jlasn9xbkyk"; + sha256 = "0g2fnag935zn2ggm5cn6k4s4xvv53v2givj1j90szmvavlpya96a"; type = "gem"; }; - version = "0.4.2"; + version = "1.8.10"; + }; + io-console = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0pmafwxh8z1apnk7bb1ibnbhfrgb1jgilxm4j8d0fcqlc2ggmbja"; + type = "gem"; + }; + version = "0.5.9"; + }; + io-like = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "01l358q8smk99k6c2h5zygyw4flqg93zk4x61amp9slbs4j0gbms"; + type = "gem"; + }; + version = "0.3.1"; + }; + irb = { + dependencies = ["reline"]; + groups = ["test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0s4yjh5p1n05cm3pglh3g4ssrgy67x2bn3bsl0sydbm8mlf3xivr"; + type = "gem"; + }; + version = "1.3.6"; }; json = { + groups = ["default" "ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0qmj7fypgb9vag723w1a49qihxrcf5shzars106ynw2zk352gbv5"; + sha256 = "0lrirj0gw420kw71bjjlqkqhqbrplla61gbv1jzgsz6bv90qr3ci"; type = "gem"; }; - version = "1.8.6"; + version = "2.5.1"; }; - json_pure = { + maxmind-db = { + groups = ["geoip"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1vllrpm2hpsy5w1r7000mna2mhd7yfrmd8hi713lk0n9mv27bmam"; + sha256 = "0n0cazcsjd5cm50qg3iiy3cqvjg1zc40mmcllx88lj9wg0f1j4v9"; type = "gem"; }; - version = "1.8.6"; + version = "1.1.1"; }; memoizable = { dependencies = ["thread_safe"]; @@ -253,87 +486,118 @@ }; version = "0.4.2"; }; - metasm = { + method_source = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0gss57q4lv6l0jkih77zffrpjjzgkdcsy7b9nvvawyzknis9w4s5"; + sha256 = "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"; type = "gem"; }; - version = "1.0.3"; + version = "1.0.0"; }; mime-types = { dependencies = ["mime-types-data"]; + groups = ["default" "ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0fjxy1jm52ixpnv3vg9ld9pr9f35gy0jp66i1njhqjvmnvq0iwwk"; + sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh"; type = "gem"; }; - version = "3.2.2"; + version = "3.3.1"; }; mime-types-data = { + groups = ["default" "ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "07wvp0aw2gjm4njibb70as6rh5hi1zzri5vky1q6jx95h8l56idc"; + sha256 = "0dlxwc75iy0dj23x824cxpvpa7c8aqcpskksrmb32j6m66h5mkcy"; type = "gem"; }; - version = "3.2018.0812"; + version = "3.2021.0704"; + }; + mini_mime = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0kb7jq3wjgckmkzna799y5qmvn6vg52878bkgw35qay6lflcrwih"; + type = "gem"; + }; + version = "1.1.0"; }; mini_portile2 = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "13d32jjadpjj6d2wdhkfpsmy68zjx90p49bgf8f7nkpz86r1fr11"; + sha256 = "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq"; type = "gem"; }; - version = "2.3.0"; + version = "2.6.1"; }; - mojo_magick = { + minitest = { + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1n4hzdyvaggzasxb55iqjd8sg6g84yc2dbaip0zzy7nwr5j5h8sm"; + sha256 = "19z7wkhg59y8abginfrm2wzplz7py3va8fyngiigngqvsws6cwgl"; type = "gem"; }; - version = "0.5.6"; + version = "5.14.4"; }; - msfrpc-client = { - dependencies = ["msgpack" "rex"]; + mojo_magick = { + groups = ["default" "ext_qrcode"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0q1x0xy857qm3sdxynp5p8kk7f6j25qjw1p28jh0y2qivc5ksik8"; + sha256 = "0r5b4jckcylg5q8dm0rzczkfaifjqf9p62hkkgj52k708q00vcpv"; type = "gem"; }; - version = "1.1.1"; + version = "0.6.6"; }; - msgpack = { + msfrpc-client = { + dependencies = ["msgpack"]; + groups = ["ext_msf"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "09xy1wc4wfbd1jdrzgxwmqjzfdfxbz0cqdszq2gv6rmc3gv1c864"; + sha256 = "07hjr9j39n0hxlh26a69bsyhkgflxv8kwv8d10930njw3vgknq22"; type = "gem"; }; - version = "1.2.4"; + version = "1.1.2"; }; - multi_json = { + msgpack = { + groups = ["default" "ext_msf"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1rl0qy4inf1mp8mybfk56dfga0mvx97zwpmq5xmiwl5r770171nv"; + sha256 = "06iajjyhx0rvpn4yr3h1hc4w4w3k59bdmfhxnjzzh76wsrdxxrc6"; type = "gem"; }; - version = "1.13.1"; + version = "1.4.2"; }; multipart-post = { + groups = ["default" "ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"; + sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj"; type = "gem"; }; - version = "2.0.0"; + version = "2.1.1"; }; mustermann = { + dependencies = ["ruby2_keywords"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "07sb7fckrraqh48fjnqf6yl7vxxabfx0qrsrhfdz67pd838g4k8g"; + sha256 = "0ccm54qgshr1lq3pr1dfh7gphkilc19dp63rw6fcx7460pjwy88a"; type = "gem"; }; - version = "1.0.2"; + version = "1.1.1"; }; naught = { source = { @@ -351,56 +615,163 @@ }; version = "0.11.0"; }; + nio4r = { + groups = ["default" "ext_dns"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0xk64wghkscs6bv2n22853k2nh39d131c6rfpnlw12mbjnnv9v1v"; + type = "gem"; + }; + version = "2.5.8"; + }; nokogiri = { - dependencies = ["mini_portile2"]; + dependencies = ["mini_portile2" "racc"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1iav4jrklvm8938bxhby0khs36mdndhvwia4hc85zxcb0yl1k8ll"; + type = "gem"; + }; + version = "1.12.2"; + }; + otr-activerecord = { + dependencies = ["activerecord" "hashie-forbidden_attributes"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1h9nml9h3m0mpvmh8jfnqvblnz5n5y3mmhgfc38avfmfzdrq9bgc"; + sha256 = "1fzid0yyiyq565q1yi312adgfy3ybwkl5bc8ng338zb2szvjd3p3"; type = "gem"; }; - version = "1.8.4"; + version = "2.0.1"; + }; + parallel = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0055br0mibnqz0j8wvy20zry548dhkakws681bhj3ycb972awkzd"; + type = "gem"; + }; + version = "1.20.1"; }; parseconfig = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "09qhqrhcy7jwz4wls2l6z4dx4428csy27nbscxn72rd973k390yi"; + type = "gem"; + }; + version = "1.1.0"; + }; + parser = { + dependencies = ["ast"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "06ma6w87ph8lnc9z4hi40ynmcdnjv0p8x53x0s3fjkz4q2p6sxh5"; + type = "gem"; + }; + version = "3.0.2.0"; + }; + power_assert = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "172qfmzwxdf82bmwgcb13hnz9i3p6i2s2nijxnx6r63kn3drjppr"; + type = "gem"; + }; + version = "2.0.0"; + }; + pry = { + dependencies = ["coderay" "method_source"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"; + type = "gem"; + }; + version = "0.13.1"; + }; + pry-byebug = { + dependencies = ["byebug" "pry"]; + groups = ["test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0br2g9k6zc4ygah52aa8cwvpnnkszia29bnvnr8bhpk3rdzi2vmq"; + sha256 = "096y5vmzpyy4x9h4ky4cs4y7d19vdq9vbwwrqafbh5gagzwhifiv"; type = "gem"; }; - version = "1.0.8"; + version = "3.9.0"; }; public_suffix = { + groups = ["default" "ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "08q64b5br692dd3v0a9wq9q5dvycc6kmiqmjbdxkxbfizggsvx6l"; + sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9"; type = "gem"; }; - version = "3.0.3"; + version = "4.0.6"; }; qr4r = { - dependencies = ["mojo_magick" "rqrcode"]; + dependencies = ["mojo_magick" "rqrcode_core"]; + groups = ["ext_qrcode"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0g534ra5v61lnxwp0qg9apmhk1ra44zax9fg1g7jlhbaf2ni6cpk"; + type = "gem"; + }; + version = "0.6.1"; + }; + racc = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ya71fxhmx2zfsmflmqh6xm9jwgjxamsj9d3h1kjp21w4vca0s30"; + sha256 = "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"; type = "gem"; }; - version = "0.4.1"; + version = "1.5.2"; }; rack = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "158hbn7rlc3czp2vivvam44dv6vmzz16qrh5dbzhfxbfsgiyrqw1"; + sha256 = "0i5vs0dph9i5jn8dfc6aqd6njcafmb20rwqngrf759c9cvmyff16"; type = "gem"; }; - version = "2.0.5"; + version = "2.2.3"; }; rack-protection = { dependencies = ["rack"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "159a4j4kragqh0z0z8vrpilpmaisnlz3n7kgiyf16bxkwlb3qlhz"; + type = "gem"; + }; + version = "2.1.0"; + }; + rack-test = { + dependencies = ["rack"]; + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1z5598qipilmnf45428jnxi63ykrgvnyywa5ckpr52zv2vpd8jdp"; + sha256 = "0rh8h376mx71ci5yklnpqqn118z3bl67nnv5k801qaqn1zs62h8m"; type = "gem"; }; - version = "2.0.3"; + version = "1.1.0"; }; rainbow = { source = { @@ -411,89 +782,192 @@ version = "3.0.0"; }; rake = { + groups = ["default" "ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1idi53jay34ba9j68c3mfr9wwkg3cd9qh0fn9cg42hv72c6q8dyg"; + sha256 = "15whn7p9nrkxangbs9hh75q585yfn66lv0v2mhj6q6dl6x8bzr2w"; type = "gem"; }; - version = "12.3.1"; + version = "13.0.6"; }; - rb-readline = { + rdoc = { + groups = ["test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "14w79a121czmvk1s953qfzww30mqjb2zc0k9qhi0ivxxk3hxg6wy"; + sha256 = "19h5g3g7k7wggy9amfx8b3m09ss7wrakbrva2xnda9sw4chagx6y"; type = "gem"; }; - version = "0.5.5"; + version = "6.3.2"; + }; + regexp_parser = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0vg7imjnfcqjx7kw94ccj5r78j4g190cqzi1i59sh4a0l940b9cr"; + type = "gem"; + }; + version = "2.1.1"; + }; + reline = { + dependencies = ["io-console"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "10sib8k5w0x6s94infm657ys0k52kxql4cnkvfa7bcgy14r3qbza"; + type = "gem"; + }; + version = "0.2.6"; }; rest-client = { - dependencies = ["http-cookie" "mime-types" "netrc"]; + dependencies = ["http-accept" "http-cookie" "mime-types" "netrc"]; + groups = ["ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"; + sha256 = "1qs74yzl58agzx9dgjhcpgmzfn61fqkk33k1js2y5yhlvc5l19im"; type = "gem"; }; - version = "2.0.2"; + version = "2.1.0"; }; - rex = { - dependencies = ["filesize" "jsobfu" "json" "metasm" "nokogiri" "rb-readline" "robots"]; + rexml = { + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0kxacxq4l1gcqbw1izg2qqvdhxl6b5779a2qa2jk24f6x96bpi68"; + sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53"; type = "gem"; }; - version = "2.0.11"; + version = "3.2.5"; }; - rexec = { - dependencies = ["rainbow"]; + rqrcode_core = { + groups = ["default" "ext_qrcode"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ihc0a6gj4i3287fjm86cn2ax4hlznyk5aqxrhjxkf4y9kabc3in"; + sha256 = "00kqasqja8zyzqvlgiwd9r0wndqk01qk5j68a8lhlz4ayrd4qy0y"; type = "gem"; }; - version = "1.6.3"; + version = "0.2.0"; }; - rkelly-remix = { + rr = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1g7hjl9nx7f953y7lncmfgp0xgxfxvgfm367q6da9niik6rp1y3j"; + sha256 = "0ngsigzy06lz40vnvzmkbn6ch6rlk0czfn8228cwvd3lc4qkggna"; type = "gem"; }; - version = "0.0.7"; + version = "3.0.5"; }; - robots = { + rspec = { + dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"]; + groups = ["test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "141gvihcr2c0dpzl3dqyh8kqc9121prfdql2iamaaw0mf9qs3njs"; + sha256 = "1dwai7jnwmdmd7ajbi2q0k0lx1dh88knv5wl7c34wjmf94yv8w5q"; type = "gem"; }; - version = "0.10.1"; + version = "3.10.0"; }; - rqrcode = { - dependencies = ["chunky_png"]; + rspec-core = { + dependencies = ["rspec-support"]; + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0h1pnnydgs032psakvg3l779w3ghbn08ajhhhw19hpmnfhrs8k0a"; + sha256 = "0wwnfhxxvrlxlk1a3yxlb82k2f9lm0yn0598x7lk8fksaz4vv6mc"; type = "gem"; }; - version = "0.10.1"; + version = "3.10.1"; }; - rubydns = { - dependencies = ["eventmachine" "rexec"]; + rspec-expectations = { + dependencies = ["diff-lcs" "rspec-support"]; + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1mav6589kpqh37wlipkh1nww6ipbw4kzja2crz216v25wwjrbpx2"; + sha256 = "1sz9bj4ri28adsklnh257pnbq4r5ayziw02qf67wry0kvzazbb17"; type = "gem"; }; - version = "0.7.3"; + version = "3.10.1"; + }; + rspec-mocks = { + dependencies = ["diff-lcs" "rspec-support"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1d13g6kipqqc9lmwz5b244pdwc97z15vcbnbq6n9rlf32bipdz4k"; + type = "gem"; + }; + version = "3.10.2"; + }; + rspec-support = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "15j52parvb8cgvl6s0pbxi2ywxrv6x0764g222kz5flz0s4mycbl"; + type = "gem"; + }; + version = "3.10.2"; + }; + rubocop = { + dependencies = ["parallel" "parser" "rainbow" "regexp_parser" "rexml" "rubocop-ast" "ruby-progressbar" "unicode-display_width"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0jrfcxs7qm2jamh44djz322c8xpg8zyllg6xyk0r0qnvk71dwlrn"; + type = "gem"; + }; + version = "0.92.0"; + }; + rubocop-ast = { + dependencies = ["parser"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0dbbll8k2xqdfpirzpfl3gi4asplay25mg91510i7qb601xbjpcy"; + type = "gem"; + }; + version = "1.8.0"; + }; + ruby-progressbar = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "02nmaw7yx9kl7rbaan5pl8x5nn0y4j5954mzrkzi9i3dhsrps4nc"; + type = "gem"; + }; + version = "1.11.0"; + }; + ruby2_keywords = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1vz322p8n39hz3b4a9gkmz9y7a5jaz41zrm2ywf31dvkqm03glgz"; + type = "gem"; + }; + version = "0.0.5"; }; rubyzip = { + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"; + sha256 = "0grps9197qyxakbpw02pda59v45lfgbgiyw48i0mq9f2bn9y6mrz"; type = "gem"; }; - version = "1.2.1"; + version = "2.3.2"; }; rushover = { dependencies = ["json" "rest-client"]; @@ -504,6 +978,17 @@ }; version = "0.3.0"; }; + selenium-webdriver = { + dependencies = ["childprocess" "rubyzip"]; + groups = ["test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0adcvp86dinaqq3nhf8p3m0rl2g6q0a4h52k0i7kdnsg1qz9k86y"; + type = "gem"; + }; + version = "3.142.7"; + }; simple_oauth = { source = { remotes = ["https://rubygems.org"]; @@ -514,38 +999,132 @@ }; sinatra = { dependencies = ["mustermann" "rack" "rack-protection" "tilt"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1kyi55q4k4idv31h7l53hw0mnh50dwwrrsfm35j52jy7fc993m9r"; + sha256 = "0dd53rzpkxgs697pycbhhgc9vcnxra4ly4xar8ni6aiydx2f88zk"; type = "gem"; }; - version = "2.0.3"; + version = "2.1.0"; }; slack-notifier = { + groups = ["ext_notifications"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1pkfn99dhy5s526r6k8d87fwwb6j287ga9s7lxqmh60z28xqh3bv"; + sha256 = "001bipchr45sny33nlavqgxca9y1qqxa7xpi7pvjfqiybwzvm6nd"; type = "gem"; }; - version = "2.3.2"; + version = "2.4.0"; + }; + sqlite3 = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"; + type = "gem"; + }; + version = "1.4.2"; + }; + sync = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"; + type = "gem"; + }; + version = "0.5.0"; }; term-ansicolor = { dependencies = ["tins"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"; + type = "gem"; + }; + version = "1.7.1"; + }; + test-unit = { + dependencies = ["power_assert"]; + groups = ["test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "15isy7vhppbfd0032klirj9gxp65ygkzjdwrmm28xpirlcsk6qpd"; + type = "gem"; + }; + version = "3.4.4"; + }; + test-unit-context = { + dependencies = ["test-unit"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0dnvl3nm876nw7fx8m6q5zj0cgqhyj4vr7c18yl0zj36pn0wcmib"; + type = "gem"; + }; + version = "0.5.1"; + }; + test-unit-full = { + dependencies = ["test-unit" "test-unit-context" "test-unit-notify" "test-unit-rr" "test-unit-runner-tap"]; + groups = ["test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1fivczw5d1b5krpjp23yipq8055p1d6wmis13xwl21xxwc1z2dsy"; + type = "gem"; + }; + version = "0.0.5"; + }; + test-unit-notify = { + dependencies = ["test-unit"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1dzv2d82z3rm1vl7qazgg48nlsdh5zp1z6rpijdj03y469yd6cyv"; + type = "gem"; + }; + version = "1.0.4"; + }; + test-unit-rr = { + dependencies = ["rr" "test-unit"]; + groups = ["default" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"; + sha256 = "0l42wxvqqd4g1968syy1wmr4j9z3cad8v5vv22lr7my4wjgz0sil"; type = "gem"; }; - version = "1.6.0"; + version = "1.0.5"; + }; + test-unit-runner-tap = { + dependencies = ["test-unit"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1r3yi3zb9ximl3xpaqi0clm4i013alkqivn4gi6dn7zliqhz5622"; + type = "gem"; + }; + version = "1.1.2"; }; thin = { dependencies = ["daemons" "eventmachine" "rack"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"; + sha256 = "123bh7qlv6shk8bg8cjc84ix8bhlfcilwnn3iy6zq3l57yaplm9l"; type = "gem"; }; - version = "1.7.2"; + version = "1.8.1"; }; thread_safe = { source = { @@ -556,38 +1135,68 @@ version = "0.3.6"; }; tilt = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0rn8z8hda4h41a64l0zhkiwz2vxw9b1nb70gl37h1dg2k874yrlv"; + type = "gem"; + }; + version = "2.0.10"; + }; + timers = { + groups = ["default" "ext_dns"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0020mrgdf11q23hm1ddd6fv691l51vi10af00f137ilcdb2ycfra"; + sha256 = "00xdi97gm01alfqhjgvv5sff9n1n2l6aym69s9jh8l9clg63b0jc"; type = "gem"; }; - version = "2.0.8"; + version = "4.3.3"; }; tins = { + dependencies = ["sync"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0g95xs4nvx5n62hb4fkbkd870l9q3y9adfc4h8j21phj9mxybkb8"; + sha256 = "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"; type = "gem"; }; - version = "1.16.3"; + version = "1.29.1"; }; twitter = { dependencies = ["addressable" "buftok" "equalizer" "http" "http-form_data" "http_parser.rb" "memoizable" "multipart-post" "naught" "simple_oauth"]; + groups = ["ext_notifications"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "13dmkjgsnym1avym9f7y2i2h3mlk8crqvc87drrzr4f0sf9l8g2y"; + type = "gem"; + }; + version = "7.0.0"; + }; + tzinfo = { + dependencies = ["concurrent-ruby"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0fjyz3viabz3xs5d9aad18zgdbhfwm51jsnzigc8kxk77p1x58n5"; + sha256 = "10qp5x7f9hvlc0psv9gsfbxg4a7s0485wsbq1kljkxq94in91l4z"; type = "gem"; }; - version = "6.2.0"; + version = "2.0.4"; }; uglifier = { dependencies = ["execjs"]; + groups = ["default"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "14r283lkhisq2sdccv8ngf10f2f18ly4nc3chz3kliw5nylbgznw"; + sha256 = "0wgh7bzy68vhv9v68061519dd8samcy8sazzz0w3k8kqpy3g4s5f"; type = "gem"; }; - version = "4.1.18"; + version = "4.2.0"; }; unf = { dependencies = ["unf_ext"]; @@ -599,19 +1208,86 @@ version = "0.1.4"; }; unf_ext = { + groups = ["default" "ext_notifications" "test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "06p1i6qhy34bpb8q8ms88y6f2kz86azwm098yvcc0nyqk9y729j1"; + sha256 = "0wc47r23h063l8ysws8sy24gzh74mks81cak3lkzlrw4qkqb3sg4"; type = "gem"; }; - version = "0.0.7.5"; + version = "0.0.7.7"; }; - xmlrpc = { + unicode-display_width = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna"; + type = "gem"; + }; + version = "1.7.0"; + }; + webrick = { + groups = ["default" "ext_msf"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1d4cvgmxhfczxiq5fr534lmizkhigd15bsx5719r5ds7k7ivisc7"; + type = "gem"; + }; + version = "1.7.0"; + }; + websocket = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0dib6p55sl606qb4vpwrvj5wh881kk4aqn2zpfapf8ckx7g14jw8"; + type = "gem"; + }; + version = "1.2.9"; + }; + websocket-client-simple = { + dependencies = ["event_emitter" "websocket"]; + groups = ["test"]; + platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1s744iwblw262gj357pky3d9fcx9hisvla7rnw29ysn5zsb6i683"; + sha256 = "0n7cjfg21lvszgr0w6w0c59qpwzpb7w4b3c7i3nxdpckabk76sx8"; type = "gem"; }; version = "0.3.0"; }; -} \ No newline at end of file + xmlrpc = { + dependencies = ["webrick"]; + groups = ["ext_msf"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1xa79ry3976ylap38cr5g6q3m81plm611flqd3dwgnmgbkycb6jp"; + type = "gem"; + }; + version = "0.3.2"; + }; + xpath = { + dependencies = ["nokogiri"]; + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0bh8lk9hvlpn7vmi6h4hkcwjzvs2y0cmkk3yjjdr8fxvj6fsgzbd"; + type = "gem"; + }; + version = "3.2.0"; + }; + zeitwerk = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1746czsjarixq0x05f7p3hpzi38ldg6wxnxxw74kbjzh1sdjgmpl"; + type = "gem"; + }; + version = "2.4.2"; + }; +} diff --git a/makefu/5pkgs/beef/update.sh b/makefu/5pkgs/beef/update.sh new file mode 100755 index 000000000..cce635f6d --- /dev/null +++ b/makefu/5pkgs/beef/update.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl bundix git libiconv libpcap libxml2 libxslt pkg-config postgresql ruby.devEnv sqlite xmlstarlet nix-update wget + +set -eu -o pipefail +cd "$(dirname "$(readlink -f "$0")")" + + +# TODO find the correct tag +echo Fetching latest Gemfile +wget https://raw.githubusercontent.com/beefproject/beef/master/Gemfile -O Gemfile +rm -f Gemfile.lock +echo Running bundler install +bundler install +echo Running bundix +bundix +exit 0 + +latest=$(curl https://github.com/rapid7/metasploit-framework/releases.atom | xmlstarlet sel -N atom="http://www.w3.org/2005/Atom" -t -m /atom:feed/atom:entry -v atom:title -n | head -n1) +echo "Updating metasploit to $latest" + +sed -i "s#refs/tags/.*#refs/tags/$latest\"#" Gemfile + +bundler install +bundix +sed -i '/[ ]*dependencies =/d' gemset.nix + +cd "../../../../" +nix-update beef --version "$latest" -- cgit v1.2.3 From 2c9923264e318ad83ab9ceb4a13e47112dff0d4f Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 27 Aug 2021 22:45:16 +0200 Subject: ma ham: add keller button logic --- .../2configs/home/ham/automation/fenster_auf.nix | 15 ++++ .../home/ham/automation/keller_buttons.nix | 7 ++ .../2configs/home/ham/automation/light_buttons.nix | 86 ++-------------------- 3 files changed, 29 insertions(+), 79 deletions(-) create mode 100644 makefu/2configs/home/ham/automation/keller_buttons.nix diff --git a/makefu/2configs/home/ham/automation/fenster_auf.nix b/makefu/2configs/home/ham/automation/fenster_auf.nix index b24f6445d..fa2052be8 100644 --- a/makefu/2configs/home/ham/automation/fenster_auf.nix +++ b/makefu/2configs/home/ham/automation/fenster_auf.nix @@ -15,6 +15,12 @@ let for.minutes = min; } ]; + condition = [ + { condition = "state"; + entity_id = "input_boolean.ist_sommer"; + state = "off"; + } + ]; action = [ { @@ -61,10 +67,19 @@ let }; in { services.home-assistant.config = { + sensor = [ + { platform = "season"; type = "meteorological";} + ]; + input_boolean = { badezimmerfenster_lang_offen.name = "Badezimmer lange offen"; duschfenster_lang_offen.name = "Duschfenster lange offen"; + ist_sommer = { + name = "Es ist Sommer"; + initial = true; # TODO + }; }; + automation = [ (fenster_geschlossen_lang "Badezimmerfenster" "binary_sensor.badezimmer_fenster_contact") (fenster_geschlossen_lang "Duschfenster" "binary_sensor.dusche_fenster_contact") diff --git a/makefu/2configs/home/ham/automation/keller_buttons.nix b/makefu/2configs/home/ham/automation/keller_buttons.nix new file mode 100644 index 000000000..598dc7df0 --- /dev/null +++ b/makefu/2configs/home/ham/automation/keller_buttons.nix @@ -0,0 +1,7 @@ +let + inherit (../lib) btn_cycle_light; +in { + services.home-assistant.config.automation = [ + (btn_cycle_light "light.keller_osram" "keller_btn1" 128) + ]; +} diff --git a/makefu/2configs/home/ham/automation/light_buttons.nix b/makefu/2configs/home/ham/automation/light_buttons.nix index 89caf1a41..b3c9ecdb6 100644 --- a/makefu/2configs/home/ham/automation/light_buttons.nix +++ b/makefu/2configs/home/ham/automation/light_buttons.nix @@ -1,80 +1,7 @@ let - btn_state = light: btn: halfbright: - let - maxbright = 255; - transition = 0.2; # seconds - in - # this function implements a simple state machine based on the state and brightness of the light (light must support brightness - { - alias = "Cycle through states of ${light} via button ${btn}"; - trigger = { - platform = "state"; - entity_id = "sensor.${btn}_click"; - to = "single"; - }; - action = { - choose = [ - { - # state 0: off to half - conditions = { - condition = "template"; - value_template = ''{{ states("${light}") == "off" }}''; - }; - sequence = [ - { - service = "light.turn_on"; - data = { - entity_id = light; - brightness = halfbright; - }; - } - ]; - } - { - # state 1: half to full - conditions = { - condition = "template"; - value_template = ''{{ states('${light}') == 'on' and ( ${toString (halfbright - 1)} <= state_attr("${light}","brightness") <= ${toString (halfbright + 1)})}}''; - }; - sequence = [ - { - service = "light.turn_on"; - data = { - entity_id = light; - brightness = maxbright; - }; - } - ]; - } - { - # state 2: full to off - conditions = { - condition = "template"; - # TODO: it seems like the devices respond with brightness-1 , maybe off-by-one somewhere? - value_template = ''{{ states("${light}") == "on" and state_attr("${light}","brightness") >= ${toString (maxbright - 1)}}}''; - }; - sequence = [ - { - service = "light.turn_off"; - data = { - entity_id = light; - }; - } - ]; - } - ]; - # default: on to off - # this works because state 0 checks for "state == off" - default = [{ - service = "light.turn_off"; - data = { - entity_id = light; - }; - }]; - }; - }; - turn_off_all = btn: + inherit (../lib) btn_cycle_light; + turn_off_all = btn: #lights: { alias = "Turn of all lights via ${btn} double click"; trigger = { @@ -84,14 +11,15 @@ let }; action = { service = "light.turn_off"; + #entity_id = lights; entity_id = "all"; }; }; in { services.home-assistant.config.automation = [ - # (btn_state "light.arbeitszimmerbeleuchtung" "arbeitszimmer_btn1") - (btn_state "light.schlafzimmer_komode_osram" "schlafzimmer_btn2" 128) - # (btn_state "light.wohnzimmerbeleuchtung" "wohnzimmer_btn3") - (turn_off_all "schlafzimmer_btn2") + # (btn_cycle_light "light.arbeitszimmerbeleuchtung" "arbeitszimmer_btn1") + (btn_cycle_light "light.schlafzimmer_komode_osram" "schlafzimmer_btn2" 128) + # (btn_cycle_light "light.wohnzimmerbeleuchtung" "wohnzimmer_btn3") + (turn_off_all "schlafzimmer_btn2" ) ]; } -- cgit v1.2.3 From 6fa5b38bed3f8e73d6f86a844ef775735a3cad29 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 31 Aug 2021 15:14:37 +0200 Subject: ma ham: consolidate button management --- .../home/ham/automation/keller_buttons.nix | 7 -- .../home/ham/automation/ladestecker_timer.nix | 24 +++++++ .../2configs/home/ham/automation/light_buttons.nix | 4 +- makefu/2configs/home/ham/default.nix | 2 +- makefu/2configs/home/ham/lib/default.nix | 76 ++++++++++++++++++++++ 5 files changed, 104 insertions(+), 9 deletions(-) delete mode 100644 makefu/2configs/home/ham/automation/keller_buttons.nix create mode 100644 makefu/2configs/home/ham/automation/ladestecker_timer.nix diff --git a/makefu/2configs/home/ham/automation/keller_buttons.nix b/makefu/2configs/home/ham/automation/keller_buttons.nix deleted file mode 100644 index 598dc7df0..000000000 --- a/makefu/2configs/home/ham/automation/keller_buttons.nix +++ /dev/null @@ -1,7 +0,0 @@ -let - inherit (../lib) btn_cycle_light; -in { - services.home-assistant.config.automation = [ - (btn_cycle_light "light.keller_osram" "keller_btn1" 128) - ]; -} diff --git a/makefu/2configs/home/ham/automation/ladestecker_timer.nix b/makefu/2configs/home/ham/automation/ladestecker_timer.nix new file mode 100644 index 000000000..8e877129c --- /dev/null +++ b/makefu/2configs/home/ham/automation/ladestecker_timer.nix @@ -0,0 +1,24 @@ +let + relay = "switch.terrasse_plug_relay"; + timeout = "300"; +in { + services.home-assistant.config.automation = [ + { alias = "Always turn off Charging station after ${toString (timeout)}m"; + trigger = [ + { + platform = "state"; + entity_id = relay; + to = "on"; + for.minutes = timeout; + } + ]; + action = + [ + { + service = "homeassistant.turn_off"; + entity_id = [ relay ]; + } + ]; + } + ]; +} diff --git a/makefu/2configs/home/ham/automation/light_buttons.nix b/makefu/2configs/home/ham/automation/light_buttons.nix index b3c9ecdb6..62fc87bb4 100644 --- a/makefu/2configs/home/ham/automation/light_buttons.nix +++ b/makefu/2configs/home/ham/automation/light_buttons.nix @@ -1,6 +1,6 @@ let - inherit (../lib) btn_cycle_light; + inherit (import ../lib) btn_cycle_light; turn_off_all = btn: #lights: { alias = "Turn of all lights via ${btn} double click"; @@ -19,6 +19,8 @@ in { services.home-assistant.config.automation = [ # (btn_cycle_light "light.arbeitszimmerbeleuchtung" "arbeitszimmer_btn1") (btn_cycle_light "light.schlafzimmer_komode_osram" "schlafzimmer_btn2" 128) + + (btn_cycle_light "light.keller_osram" "keller_btn1" 128) # (btn_cycle_light "light.wohnzimmerbeleuchtung" "wohnzimmer_btn3") (turn_off_all "schlafzimmer_btn2" ) ]; diff --git a/makefu/2configs/home/ham/default.nix b/makefu/2configs/home/ham/default.nix index 79f26a053..cb42f32aa 100644 --- a/makefu/2configs/home/ham/default.nix +++ b/makefu/2configs/home/ham/default.nix @@ -1,5 +1,4 @@ { pkgs, lib, config, ... }: - # Ideas: ## wake-on-lan server ## @@ -33,6 +32,7 @@ in { ./automation/firetv_restart.nix ./automation/light_buttons.nix ./automation/wohnzimmer_rf_fernbedienung.nix + ./automation/ladestecker_timer.nix #./automation/giesskanne.nix ./automation/pflanzen_giessen_erinnerung.nix #./automation/urlaub.nix diff --git a/makefu/2configs/home/ham/lib/default.nix b/makefu/2configs/home/ham/lib/default.nix index 45c86138b..75be52737 100644 --- a/makefu/2configs/home/ham/lib/default.nix +++ b/makefu/2configs/home/ham/lib/default.nix @@ -40,5 +40,81 @@ in entity = "firetv"; }; }; + zigbee.prefix = "/ham/zigbee"; + + btn_cycle_light = light: btn: halfbright: + let + maxbright = 255; + transition = 0.2; # seconds + in + # this function implements a simple state machine based on the state and brightness of the light (light must support brightness + { + alias = "Cycle through states of ${light} via button ${btn}"; + trigger = { + platform = "state"; + entity_id = "sensor.${btn}_click"; + to = "single"; + }; + action = { + choose = [ + { + # state 0: off to half + conditions = { + condition = "template"; + value_template = ''{{ states("${light}") == "off" }}''; + }; + sequence = [ + { + service = "light.turn_on"; + data = { + entity_id = light; + brightness = halfbright; + }; + } + ]; + } + { + # state 1: half to full + conditions = { + condition = "template"; + value_template = ''{{ states('${light}') == 'on' and ( ${toString (halfbright - 1)} <= state_attr("${light}","brightness") <= ${to