boppers 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +14 -2
  3. data/README.md +282 -10
  4. data/Rakefile +1 -0
  5. data/boppers.gemspec +9 -1
  6. data/exe/boppers +1 -0
  7. data/gems.locked +98 -1
  8. data/images/boppers.png +0 -0
  9. data/images/boppers@2x.png +0 -0
  10. data/images/logo.png +0 -0
  11. data/images/logo.svg +10 -0
  12. data/lib/boppers.rb +35 -0
  13. data/lib/boppers/cli.rb +55 -0
  14. data/lib/boppers/configuration.rb +15 -0
  15. data/lib/boppers/generator/app.rb +28 -0
  16. data/lib/boppers/generator/app/Procfile +1 -0
  17. data/lib/boppers/generator/app/app.json +8 -0
  18. data/lib/boppers/generator/app/config/boppers.rb +83 -0
  19. data/lib/boppers/generator/app/gems.rb +7 -0
  20. data/lib/boppers/generator/plugin.rb +64 -0
  21. data/lib/boppers/generator/plugin/.gitignore +8 -0
  22. data/lib/boppers/generator/plugin/.rubocop.yml +116 -0
  23. data/lib/boppers/generator/plugin/.travis.yml +16 -0
  24. data/lib/boppers/generator/plugin/CODE_OF_CONDUCT.md +74 -0
  25. data/lib/boppers/generator/plugin/LICENSE.txt +21 -0
  26. data/lib/boppers/generator/plugin/README.erb +45 -0
  27. data/lib/boppers/generator/plugin/Rakefile +12 -0
  28. data/lib/boppers/generator/plugin/gems.rb +2 -0
  29. data/lib/boppers/generator/plugin/gemspec.erb +29 -0
  30. data/lib/boppers/generator/plugin/lib/entry.erb +4 -0
  31. data/lib/boppers/generator/plugin/lib/main.erb +10 -0
  32. data/lib/boppers/generator/plugin/lib/version.erb +7 -0
  33. data/lib/boppers/generator/plugin/test/test_file.erb +9 -0
  34. data/lib/boppers/generator/plugin/test/test_helper.erb +11 -0
  35. data/lib/boppers/http_client.rb +9 -0
  36. data/lib/boppers/notifier/hipchat.rb +26 -0
  37. data/lib/boppers/notifier/pushover.rb +27 -0
  38. data/lib/boppers/notifier/sendgrid.rb +40 -0
  39. data/lib/boppers/notifier/slack.rb +35 -0
  40. data/lib/boppers/notifier/stdout.rb +21 -0
  41. data/lib/boppers/notifier/telegram.rb +26 -0
  42. data/lib/boppers/notifier/twitter.rb +34 -0
  43. data/lib/boppers/runner.rb +37 -0
  44. data/lib/boppers/testing.rb +6 -0
  45. data/lib/boppers/testing/bopper_linter.rb +19 -0
  46. data/lib/boppers/testing/notifier_linter.rb +33 -0
  47. data/lib/boppers/utils.rb +11 -0
  48. data/lib/boppers/version.rb +1 -1
  49. data/setup/telegram.rb +20 -0
  50. metadata +142 -5
  51. data/Gemfile.lock +0 -24
Binary file
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1251" height="1065" viewBox="0 0 1251 1065">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="1251" height="1065" fill="#FFF"/>
4
+ <path fill="#4A4A4A" d="M126,898.237689 L126,751.818199 L206.558981,751.818199 C226.493218,751.818199 239.029182,756.419955 247.454994,764.995953 C252.592684,770.225221 256.291821,777.755366 256.291821,787.79556 L256.291821,788.213901 C256.291821,805.575069 246.016441,816.242775 230.60337,821.681213 C249.099055,827.119651 261.018496,837.159845 261.018496,857.240232 L261.018496,857.658573 C261.018496,881.085692 242.111796,898.237689 205.73695,898.237689 L126,898.237689 Z M172.855734,809.340142 L193.817509,809.340142 C204.092889,809.340142 209.025072,805.78424 209.025072,799.299948 L209.025072,798.881607 C209.025072,792.397315 203.887382,788.841413 193.612002,788.841413 L172.855734,788.841413 L172.855734,809.340142 Z M172.855734,861.214475 L196.900123,861.214475 C207.381011,861.214475 212.724209,856.82189 212.724209,850.546769 L212.724209,850.128428 C212.724209,843.853307 207.586519,839.460722 197.105631,839.460722 L172.855734,839.460722 L172.855734,861.214475 Z M346.509659,901.37525 C302.120016,901.37525 268.211262,867.907938 268.211262,825.446286 L268.211262,825.027944 C268.211262,782.566292 302.531032,748.680639 346.920674,748.680639 C391.310316,748.680639 425.219071,782.147951 425.219071,824.609603 L425.219071,825.027944 C425.219071,867.489596 390.899301,901.37525 346.509659,901.37525 Z M346.920674,858.076915 C365.210851,858.076915 376.719277,842.598283 376.719277,825.446286 L376.719277,825.027944 C376.719277,807.666776 365.005343,791.978974 346.509659,791.978974 C328.219482,791.978974 316.711056,807.457605 316.711056,824.609603 L316.711056,825.027944 C316.711056,842.389112 328.42499,858.076915 346.920674,858.076915 Z M438.371558,898.237689 L438.371558,751.818199 L503.106453,751.818199 C541.330867,751.818199 567.430333,769.179367 567.430333,803.901703 L567.430333,804.320045 C567.430333,839.669893 540.919852,858.495256 502.078915,858.495256 L486.460337,858.495256 L486.460337,898.237689 L438.371558,898.237689 Z M486.460337,823.563749 L499.407316,823.563749 C511.737772,823.563749 519.958076,817.91614 519.958076,807.457605 L519.958076,807.039264 C519.958076,796.371558 512.354295,790.93312 499.612824,790.93312 L486.460337,790.93312 L486.460337,823.563749 Z M577.705713,898.237689 L577.705713,751.818199 L642.440608,751.818199 C680.665023,751.818199 706.764488,769.179367 706.764488,803.901703 L706.764488,804.320045 C706.764488,839.669893 680.254007,858.495256 641.41307,858.495256 L625.794492,858.495256 L625.794492,898.237689 L577.705713,898.237689 Z M625.794492,823.563749 L638.741471,823.563749 C651.071928,823.563749 659.292232,817.91614 659.292232,807.457605 L659.292232,807.039264 C659.292232,796.371558 651.68845,790.93312 638.946979,790.93312 L625.794492,790.93312 L625.794492,823.563749 Z M717.039868,898.237689 L840.755446,898.237689 L840.755446,858.076915 L764.306617,858.076915 L764.306617,842.179941 L834.590218,842.179941 L834.590218,806.830093 L764.306617,806.830093 L764.306617,791.978974 L839.727908,791.978974 L839.727908,751.818199 L717.039868,751.818199 L717.039868,898.237689 Z M853.702425,898.237689 L853.702425,751.818199 L923.986025,751.818199 C949.468968,751.818199 965.704069,758.302491 975.773942,768.551855 C984.405261,777.337025 988.926428,788.213901 988.926428,803.274191 L988.926428,803.692533 C988.926428,825.027944 978.034525,839.879064 960.566379,848.455062 L994.064118,898.237689 L939.193588,898.237689 L912.066584,856.403549 L901.791204,856.403549 L901.791204,898.237689 L853.702425,898.237689 Z M901.791204,821.472042 L922.547472,821.472042 C934.055898,821.472042 941.043157,816.242775 941.043157,807.248435 L941.043157,806.830093 C941.043157,797.417412 933.85039,792.815656 922.75298,792.815656 L901.791204,792.815656 L901.791204,821.472042 Z M1062.49815,900.956908 C1033.31607,900.956908 1007.0111,892.59008 988.720921,876.274766 L1014.40937,845.108331 C1030.02795,857.240232 1047.90711,862.260329 1064.75873,862.260329 C1073.39005,862.260329 1077.08919,859.959451 1077.08919,855.985208 L1077.08919,855.566866 C1077.08919,851.383452 1072.56802,849.082575 1057.15495,845.945014 C1024.89026,839.251552 996.53021,829.83887 996.53021,798.881607 L996.53021,798.463265 C996.53021,770.643562 1017.903,749.09898 1057.56597,749.09898 C1085.30949,749.09898 1105.86025,755.792443 1122.50637,769.179367 L1099.0785,802.228338 C1085.515,792.188144 1069.2799,787.79556 1055.92191,787.79556 C1048.72914,787.79556 1045.44102,790.305608 1045.44102,793.86151 L1045.44102,794.279851 C1045.44102,798.254095 1049.34566,800.764143 1064.55323,803.692533 C1101.33909,810.595166 1126,821.472042 1126,850.965111 L1126,851.383452 C1126,882.131545 1101.13358,900.956908 1062.49815,900.956908 Z"/>
5
+ <path fill="#9013FE" d="M632.487026,276.79851 C719.032685,283.949387 789.672655,360.702131 789.672655,436.501426 L789.672655,495.615341 L460.331337,495.615341 L460.331337,436.501426 C460.331337,360.702131 530.971307,283.949387 617.516966,276.79851 L617.516966,250.101903 C608.628493,247.241553 602.546906,238.6605 602.546906,228.649273 C602.546906,216.25442 612.371008,205.766467 625.001996,205.766467 C637.16517,205.766467 647.457086,216.25442 647.457086,228.649273 C647.457086,238.6605 641.375499,246.764827 632.487026,250.101903 L632.487026,276.79851 Z M557.636727,449.849729 C578.220559,449.849729 595.061876,432.687625 595.061876,411.711719 C595.061876,390.735814 578.220559,373.57371 557.636727,373.57371 C537.052894,373.57371 520.211577,390.735814 520.211577,411.711719 C520.211577,432.687625 537.052894,449.849729 557.636727,449.849729 Z M692.367265,449.849729 C712.951098,449.849729 729.792415,432.687625 729.792415,411.711719 C729.792415,390.735814 712.951098,373.57371 692.367265,373.57371 C671.783433,373.57371 654.942116,390.735814 654.942116,411.711719 C654.942116,432.687625 671.783433,449.849729 692.367265,449.849729 Z M415.421158,510.870545 L415.421158,632.912176 L834.582834,632.912176 L834.582834,510.870545 L415.421158,510.870545 Z"/>
6
+ <path fill="#4A4A4A" d="M792.791417,89 C742.119324,89 700.850299,130.181031 700.850299,180.745081 C700.850299,225.705384 733.369246,263.107143 776.07485,270.926326 L776.07485,305.85201 C776.07485,314.844071 783.910741,322.532934 792.791417,322.532934 C797.101157,322.532934 801.410897,320.838778 804.675851,317.711105 L851.299401,272.490163 L876.374251,272.490163 C927.046345,272.490163 968.315369,231.309132 968.315369,180.745081 C968.315369,130.181031 927.046345,89 876.374251,89 L792.791417,89 Z"/>
7
+ <path fill="#FFF" d="M764.722555,212.752495 L764.722555,163.850299 L780.266705,163.850299 C785.66353,163.850299 789.70307,164.864325 792.385325,166.925086 C795.067579,168.985848 796.424865,172.093345 796.424865,176.182157 C796.424865,179.289655 795.616957,181.742942 794.033457,183.54202 C792.449957,185.275676 790.123182,186.322412 787.020816,186.616807 C790.801825,186.976622 793.548712,188.285042 795.358426,190.378514 C797.200456,192.504696 798.13763,195.514062 798.13763,199.373901 C798.13763,204.051502 796.748028,207.453394 793.936508,209.579577 C791.124988,211.705759 786.568387,212.752495 780.266705,212.752495 L764.722555,212.752495 Z M773.932706,182.88781 L780.266705,182.88781 C782.85201,182.88781 784.403194,182.462573 785.437316,181.546679 C786.439122,180.663496 786.956183,179.453207 786.956183,177.261604 C786.956183,175.331684 786.536071,173.925133 785.405,172.911108 C784.500143,172.126056 783.078225,171.537267 780.266705,171.537267 L773.932706,171.537267 L773.932706,182.88781 Z M773.932706,205.032817 L780.266705,205.032817 C783.304439,205.032817 785.437316,204.509449 786.665336,203.462713 C787.86104,202.415977 788.47505,200.584189 788.47505,198.00006 C788.47505,195.35051 787.828724,193.453301 786.568387,192.308433 C785.308051,191.163566 783.20749,190.574777 780.266705,190.574777 L773.932706,190.574777 L773.932706,205.032817 Z M805.958179,212.752495 L836.012356,212.752495 L836.012356,204.247765 L815.491493,204.247765 L815.491493,191.45796 L834.073377,191.45796 L834.073377,182.953231 L815.491493,182.953231 L815.491493,172.42045 L836.012356,172.42045 L836.012356,163.91572 L805.958179,163.91572 L805.958179,212.752495 Z M845.804201,212.752495 L875.858378,212.752495 L875.858378,204.247765 L855.337515,204.247765 L855.337515,191.45796 L873.919399,191.45796 L873.919399,182.953231 L855.337515,182.953231 L855.337515,172.42045 L875.858378,172.42045 L875.858378,163.91572 L845.804201,163.91572 L845.804201,212.752495 Z M885.585591,212.752495 L885.585591,163.91572 L898.6737,163.91572 C905.298546,163.91572 910.113677,165.126009 913.054463,167.513875 C915.962931,169.901742 917.417166,173.794291 917.417166,179.191523 C917.417166,184.588756 915.962931,188.481305 913.054463,190.869171 C910.113677,193.257038 905.298546,194.467326 898.6737,194.467326 L895.118905,194.467326 L895.118905,212.752495 L885.585591,212.752495 Z M895.118905,186.355123 L899.02918,186.355123 C902.163863,186.355123 904.361372,185.831755 905.621709,184.752308 C906.882045,183.672862 907.496056,181.841074 907.496056,179.191523 C907.496056,176.541973 906.882045,174.710185 905.621709,173.630739 C904.361372,172.551292 902.163863,172.027924 899.02918,172.027924 L895.118905,172.027924 L895.118905,186.355123 Z"/>
8
+ <path fill="#4A4A4A" d="M152.153207,974.672577 L148.246099,964.00754 L133.447926,964.00754 L129.540817,974.672577 L126,974.672577 L139.186491,939.854369 L142.507533,939.854369 L155.669605,974.672577 L152.153207,974.672577 Z M140.773754,943.932177 L134.449122,961.160313 L147.244902,961.160313 L140.920271,943.932177 L140.773754,943.932177 Z M168.929355,965.213992 C169.295646,971.197995 174.472565,975.227545 181.847232,975.227545 C189.63703,975.227545 194.618593,971.222124 194.618593,965.117476 C194.618593,960.267539 191.639423,957.589215 184.557789,955.827795 L180.748358,954.862633 C175.571439,953.559665 173.373691,951.798245 173.373691,948.806244 C173.373691,944.969726 176.987766,942.291402 181.871651,942.291402 C186.877634,942.291402 190.394032,944.897339 190.711484,948.830373 L194.056946,948.830373 C193.861591,943.304822 188.831188,939.299401 181.969329,939.299401 C175.034212,939.299401 169.906132,943.304822 169.906132,948.926889 C169.906132,953.511407 172.812044,956.237989 179.332031,957.878764 L183.703109,958.9887 C188.928866,960.291668 191.199873,962.221991 191.199873,965.479412 C191.199873,969.388317 187.414862,972.235544 182.140265,972.235544 C176.621474,972.235544 172.641108,969.388317 172.274816,965.213992 L168.929355,965.213992 Z M202.823521,974.672577 L202.823521,939.854369 L199.502479,939.854369 L199.502479,974.672577 L202.823521,974.672577 Z M243.359771,939.854369 L239.501502,939.854369 L226.461527,970.329349 L226.315011,970.329349 L213.250617,939.854369 L209.416766,939.854369 L209.416766,974.672577 L212.542453,974.672577 L212.542453,946.103791 L212.68897,946.103791 L224.923103,974.503674 L227.829015,974.503674 L240.087568,946.103791 L240.234085,946.103791 L240.234085,974.672577 L243.359771,974.672577 L243.359771,939.854369 Z M249.953017,939.854369 L262.455764,939.854369 C269.171107,939.854369 273.761959,944.221726 273.761959,950.688309 C273.761959,957.154892 269.146688,961.546378 262.431345,961.546378 L253.274059,961.546378 L253.274059,974.672577 L249.953017,974.672577 L249.953017,939.854369 Z M253.274059,942.798112 L253.274059,958.602635 L261.674343,958.602635 C267.095456,958.602635 270.343239,955.634763 270.343239,950.688309 C270.343239,945.741855 267.119875,942.798112 261.674343,942.798112 L253.274059,942.798112 Z M299.524456,971.680576 L281.86921,971.680576 L281.86921,939.854369 L278.548167,939.854369 L278.548167,974.672577 L299.524456,974.672577 L299.524456,971.680576 Z M325.506728,971.680576 L307.558448,971.680576 L307.558448,958.313086 L324.603209,958.313086 L324.603209,955.369343 L307.558448,955.369343 L307.558448,942.84637 L325.506728,942.84637 L325.506728,939.854369 L304.237406,939.854369 L304.237406,974.672577 L325.506728,974.672577 L325.506728,971.680576 Z M355.322849,974.672577 L342.282875,974.672577 L342.282875,939.854369 L355.249591,939.854369 C361.305609,939.854369 365.432492,943.304822 365.432492,948.444308 C365.432492,952.304955 362.721936,955.610634 358.985763,956.286247 L358.985763,956.45515 C363.84523,957.034247 367.23953,960.291668 367.23953,965.117476 C367.23953,971.053221 362.770775,974.672577 355.322849,974.672577 Z M345.603917,942.773983 L345.603917,955.321085 L353.56465,955.321085 C358.912505,955.321085 362.062611,952.908181 362.062611,948.806244 C362.062611,945.017984 359.229958,942.773983 354.541428,942.773983 L345.603917,942.773983 Z M345.603917,971.752963 L354.8833,971.752963 C360.621865,971.752963 363.82081,969.267672 363.82081,964.948573 C363.82081,960.605345 360.499768,958.168312 354.41933,958.168312 L345.603917,958.168312 L345.603917,971.752963 Z M386.579717,939.299401 C396.396327,939.299401 402.598862,946.248565 402.598862,957.275538 C402.598862,968.30251 396.420747,975.227545 386.579717,975.227545 C376.763107,975.227545 370.584992,968.30251 370.584992,957.275538 C370.584992,946.248565 376.763107,939.299401 386.579717,939.299401 Z M386.579717,942.36379 C378.863178,942.36379 374.003712,948.130631 374.003712,957.275538 C374.003712,966.396315 378.863178,972.163157 386.579717,972.163157 C394.296257,972.163157 399.180142,966.396315 399.180142,957.275538 C399.180142,948.130631 394.296257,942.36379 386.579717,942.36379 Z M418.202877,974.672577 L418.202877,942.84637 L429.99746,942.84637 L429.99746,939.854369 L403.062831,939.854369 L403.062831,942.84637 L414.857415,942.84637 L414.857415,974.672577 L418.202877,974.672577 Z M448.629484,974.672577 L448.629484,958.868054 L464.795145,958.868054 L464.795145,955.924311 L448.629484,955.924311 L448.629484,942.84637 L466.211472,942.84637 L466.211472,939.854369 L445.308442,939.854369 L445.308442,974.672577 L448.629484,974.672577 Z M474.538497,942.798112 L474.538497,957.492699 L483.549266,957.492699 C488.652927,957.492699 491.656516,954.790246 491.656516,950.133341 C491.656516,945.524694 488.555249,942.798112 483.427169,942.798112 L474.538497,942.798112 Z M474.538497,960.412313 L474.538497,974.672577 L471.217455,974.672577 L471.217455,939.854369 L483.81788,939.854369 C490.704159,939.854369 495.099656,943.835661 495.099656,950.036825 C495.099656,954.95915 492.267002,958.675022 487.554052,959.881474 L496.076433,974.672577 L492.193744,974.672577 L484.086494,960.412313 L474.538497,960.412313 Z M523.914581,974.672577 L520.007472,964.00754 L505.209299,964.00754 L501.30219,974.672577 L497.761373,974.672577 L510.947865,939.854369 L514.268907,939.854369 L527.430978,974.672577 L523.914581,974.672577 Z M512.535127,943.932177 L506.210495,961.160313 L519.006276,961.160313 L512.681644,943.932177 L512.535127,943.932177 Z M565.256673,939.854369 L561.398403,939.854369 L548.358428,970.329349 L548.211912,970.329349 L535.147518,939.854369 L531.313668,939.854369 L531.313668,974.672577 L534.439354,974.672577 L534.439354,946.103791 L534.585871,946.103791 L546.820004,974.503674 L549.725916,974.503674 L561.984469,946.103791 L562.130986,946.103791 L562.130986,974.672577 L565.256673,974.672577 L565.256673,939.854369 Z M593.11924,971.680576 L575.17096,971.680576 L575.17096,958.313086 L592.215721,958.313086 L592.215721,955.369343 L575.17096,955.369343 L575.17096,942.84637 L593.11924,942.84637 L593.11924,939.854369 L571.849918,939.854369 L571.849918,974.672577 L593.11924,974.672577 L593.11924,971.680576 Z M618.051476,945.500565 L618.246832,945.500565 L626.915729,974.672577 L629.992576,974.672577 L639.711509,939.854369 L636.219531,939.854369 L628.478572,969.605478 L628.307636,969.605478 L619.809675,939.854369 L616.488633,939.854369 L607.966252,969.605478 L607.819736,969.605478 L600.054358,939.854369 L596.586799,939.854369 L606.281312,974.672577 L609.382579,974.672577 L618.051476,945.500565 Z M657.440014,939.299401 C667.256624,939.299401 673.459159,946.248565 673.459159,957.275538 C673.459159,968.30251 667.281043,975.227545 657.440014,975.227545 C647.623404,975.227545 641.445288,968.30251 641.445288,957.275538 C641.445288,946.248565 647.623404,939.299401 657.440014,939.299401 Z M657.440014,942.36379 C649.723474,942.36379 644.864008,948.130631 644.864008,957.275538 C644.864008,966.396315 649.723474,972.163157 657.440014,972.163157 C665.156553,972.163157 670.040439,966.396315 670.040439,957.275538 C670.040439,948.130631 665.156553,942.36379 657.440014,942.36379 Z M681.957119,942.798112 L681.957119,957.492699 L690.967888,957.492699 C696.071549,957.492699 699.075139,954.790246 699.075139,950.133341 C699.075139,945.524694 695.973871,942.798112 690.845791,942.798112 L681.957119,942.798112 Z M681.957119,960.412313 L681.957119,974.672577 L678.636077,974.672577 L678.636077,939.854369 L691.236502,939.854369 C698.122781,939.854369 702.518278,943.835661 702.518278,950.036825 C702.518278,954.95915 699.685624,958.675022 694.972675,959.881474 L703.495055,974.672577 L699.612366,974.672577 L691.505116,960.412313 L681.957119,960.412313 Z M711.236014,974.672577 L711.236014,962.24612 L715.582672,957.589215 L729.575004,974.672577 L733.848404,974.672577 L717.926937,955.248698 L732.407658,939.854369 L728.183097,939.854369 L711.431369,957.902893 L711.236014,957.902893 L711.236014,939.854369 L707.914972,939.854369 L707.914972,974.672577 L711.236014,974.672577 Z M751.845523,974.672577 L751.845523,958.868054 L768.011184,958.868054 L768.011184,955.924311 L751.845523,955.924311 L751.845523,942.84637 L769.427511,942.84637 L769.427511,939.854369 L748.52448,939.854369 L748.52448,974.672577 L751.845523,974.672577 Z M789.011892,939.299401 C798.828502,939.299401 805.031037,946.248565 805.031037,957.275538 C805.031037,968.30251 798.852922,975.227545 789.011892,975.227545 C779.195282,975.227545 773.017167,968.30251 773.017167,957.275538 C773.017167,946.248565 779.195282,939.299401 789.011892,939.299401 Z M789.011892,942.36379 C781.295353,942.36379 776.435887,948.130631 776.435887,957.275538 C776.435887,966.396315 781.295353,972.163157 789.011892,972.163157 C796.728432,972.163157 801.612317,966.396315 801.612317,957.275538 C801.612317,948.130631 796.728432,942.36379 789.011892,942.36379 Z M813.528998,942.798112 L813.528998,957.492699 L822.539767,957.492699 C827.643428,957.492699 830.647017,954.790246 830.647017,950.133341 C830.647017,945.524694 827.54575,942.798112 822.41767,942.798112 L813.528998,942.798112 Z M813.528998,960.412313 L813.528998,974.672577 L810.207956,974.672577 L810.207956,939.854369 L822.808381,939.854369 C829.694659,939.854369 834.090157,943.835661 834.090157,950.036825 C834.090157,954.95915 831.257503,958.675022 826.544553,959.881474 L835.066934,974.672577 L831.184245,974.672577 L823.076994,960.412313 L813.528998,960.412313 Z M853.894313,974.672577 L853.894313,939.854369 L850.57327,939.854369 L850.57327,974.672577 L853.894313,974.672577 Z M863.784181,974.672577 L863.784181,945.572952 L863.955117,945.572952 L884.687212,974.672577 L887.910576,974.672577 L887.910576,939.854369 L884.613953,939.854369 L884.613953,968.929865 L884.443017,968.929865 L863.784181,939.854369 L860.487558,939.854369 L860.487558,974.672577 L863.784181,974.672577 Z M894.503822,939.854369 L906.10305,939.854369 C916.652243,939.854369 922.805939,946.248565 922.805939,957.251409 C922.805939,968.278381 916.676662,974.672577 906.10305,974.672577 L894.503822,974.672577 L894.503822,939.854369 Z M897.849283,942.84637 L897.849283,971.680576 L905.907695,971.680576 C914.576592,971.680576 919.411638,966.516961 919.411638,957.275538 C919.411638,948.009985 914.576592,942.84637 905.907695,942.84637 L897.849283,942.84637 Z M931.27948,974.672577 L931.27948,939.854369 L927.958438,939.854369 L927.958438,974.672577 L931.27948,974.672577 Z M951.645283,974.672577 L964.831775,939.854369 L961.315377,939.854369 L950.058021,970.57064 L949.911504,970.57064 L938.678567,939.854369 L935.13775,939.854369 L948.324241,974.672577 L951.645283,974.672577 Z M972.011086,974.672577 L972.011086,939.854369 L968.690044,939.854369 L968.690044,974.672577 L972.011086,974.672577 Z M978.604332,939.854369 L990.20356,939.854369 C1000.75275,939.854369 1006.90645,946.248565 1006.90645,957.251409 C1006.90645,968.278381 1000.77717,974.672577 990.20356,974.672577 L978.604332,974.672577 L978.604332,939.854369 Z M981.949794,942.84637 L981.949794,971.680576 L990.008205,971.680576 C998.677102,971.680576 1003.51215,966.516961 1003.51215,957.275538 C1003.51215,948.009985 998.677102,942.84637 990.008205,942.84637 L981.949794,942.84637 Z M1015.37999,939.854369 L1012.05895,939.854369 L1012.05895,962.51154 C1012.05895,970.015672 1017.21145,975.227545 1025.68499,975.227545 C1034.15853,975.227545 1039.33545,970.015672 1039.33545,962.51154 L1039.33545,939.854369 L1035.98999,939.854369 L1035.98999,962.318507 C1035.98999,968.157736 1032.15614,972.163157 1025.68499,972.163157 C1019.23826,972.163157 1015.37999,968.157736 1015.37999,962.318507 L1015.37999,939.854369 Z M1068.9318,974.672577 L1065.02469,964.00754 L1050.22651,964.00754 L1046.31941,974.672577 L1042.77859,974.672577 L1055.96508,939.854369 L1059.28612,939.854369 L1072.44819,974.672577 L1068.9318,974.672577 Z M1057.55234,943.932177 L1051.22771,961.160313 L1064.02349,961.160313 L1057.69886,943.932177 L1057.55234,943.932177 Z M1097.30717,971.680576 L1079.65193,971.680576 L1079.65193,939.854369 L1076.33088,939.854369 L1076.33088,974.672577 L1097.30717,974.672577 L1097.30717,971.680576 Z M1100.31076,965.213992 C1100.67705,971.197995 1105.85397,975.227545 1113.22864,975.227545 C1121.01844,975.227545 1126,971.222124 1126,965.117476 C1126,960.267539 1123.02083,957.589215 1115.9392,955.827795 L1112.12976,954.862633 C1106.95285,953.559665 1104.7551,951.798245 1104.7551,948.806244 C1104.7551,944.969726 1108.36917,942.291402 1113.25306,942.291402 C1118.25904,942.291402 1121.77544,944.897339 1122.09289,948.830373 L1125.43835,948.830373 C1125.243,943.304822 1120.2126,939.299401 1113.35074,939.299401 C1106.41562,939.299401 1101.28754,943.304822 1101.28754,948.926889 C1101.28754,953.511407 1104.19345,956.237989 1110.71344,957.878764 L1115.08452,958.9887 C1120.31027,960.291668 1122.58128,962.221991 1122.58128,965.479412 C1122.58128,969.388317 1118.79627,972.235544 1113.52167,972.235544 C1108.00288,972.235544 1104.02251,969.388317 1103.65622,965.213992 L1100.31076,965.213992 Z"/>
9
+ </g>
10
+ </svg>
@@ -1,5 +1,40 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Boppers
4
+ require "thor"
5
+ require "aitch"
6
+
4
7
  require "boppers/version"
8
+ require "boppers/cli"
9
+ require "boppers/configuration"
10
+ require "boppers/http_client"
11
+ require "boppers/runner"
12
+
13
+ def self.configure
14
+ yield configuration
15
+ end
16
+
17
+ def self.configuration
18
+ @configuration ||= Configuration.new
19
+ end
20
+
21
+ # Send notification.
22
+ # The `name` identifies the message type, which is used to
23
+ # filter out the notifications and their subscribers.
24
+ def self.notify(name, title:, message:, options: {})
25
+ configuration
26
+ .notifiers
27
+ .select {|notifier| subscribed?(notifier, name) }
28
+ .each do |notifier|
29
+ notifier.call(title, message, options)
30
+ end
31
+ end
32
+
33
+ def self.subscribed?(notifier, name)
34
+ subscriptions = [notifier.subscribe] if notifier.respond_to?(:subscribe)
35
+ subscriptions ||= [name]
36
+ subscriptions = subscriptions.flatten.map(&:to_sym)
37
+
38
+ subscriptions.include?(name)
39
+ end
5
40
  end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Boppers
4
+ class CLI < Thor
5
+ check_unknown_options!
6
+
7
+ def self.exit_on_failure?
8
+ true
9
+ end
10
+
11
+ desc "start [OPTIONS]", "Start Boppers' daemon"
12
+
13
+ method_option :require,
14
+ type: :string,
15
+ desc: "File to require",
16
+ required: true
17
+
18
+ def start
19
+ require options[:require]
20
+ Runner.new.call
21
+ end
22
+
23
+ desc "version", "Prints the Boppers version information"
24
+ map %w{-v --version} => :version
25
+
26
+ def version
27
+ say "Boppers v#{VERSION}"
28
+ end
29
+
30
+ desc "plugin NAME", "Create a new plugin for Boppers"
31
+
32
+ def plugin(name)
33
+ require "boppers/generator/plugin"
34
+
35
+ base_path = File.dirname(File.expand_path(name))
36
+ base_name = "boppers-#{File.basename(name)}"
37
+
38
+ generator = Generator::Plugin.new
39
+ generator.destination_root = File.join(base_path, base_name)
40
+ generator.invoke_all
41
+ end
42
+
43
+ desc "app NAME", "Create a new app for Boppers"
44
+
45
+ def app(name)
46
+ require "boppers/generator/app"
47
+
48
+ base_path = File.expand_path(name)
49
+
50
+ generator = Generator::App.new
51
+ generator.destination_root = base_path
52
+ generator.invoke_all
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Boppers
4
+ class Configuration
5
+ attr_accessor :handle_exception
6
+
7
+ def boppers
8
+ @boppers ||= []
9
+ end
10
+
11
+ def notifiers
12
+ @notifiers ||= []
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Boppers
4
+ module Generator
5
+ class App < Thor::Group
6
+ include Thor::Actions
7
+
8
+ desc "Generate a new app structure"
9
+
10
+ def self.source_root
11
+ File.join(__dir__, "app")
12
+ end
13
+
14
+ def copy_files
15
+ copy_file "gems.rb"
16
+ copy_file "Procfile"
17
+ copy_file "config/boppers.rb"
18
+ end
19
+
20
+ def run_commands
21
+ inside destination_root do
22
+ run "git init"
23
+ run "bundle install"
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1 @@
1
+ worker: bundle exec boppers start --require config/boppers.rb
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "Boppers",
3
+ "description": "A simple bot framework for individuals.",
4
+ "repository": "https://github.com/fnando/boppers",
5
+ "logo": "https://dl.dropboxusercontent.com/u/1540890/uptime_checker/icon.svg",
6
+ "keywords": ["ruby", "bots"],
7
+ "addons": []
8
+ }
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/setup"
4
+ Bundler.require
5
+
6
+ # Load the stdout notifier.
7
+ # Check https://github.com/fnando/boppers#notifiers for more
8
+ # information about notifiers.
9
+ require "boppers/notifier/stdout"
10
+
11
+ Config = Env::Vars.new do
12
+ # mandatory :sendgrid_username, string
13
+ # mandatory :sendgrid_password, string
14
+ # mandatory :sendgrid_domain, string
15
+ end
16
+
17
+ Boppers.configure do |config|
18
+ # Configure your notifiers.
19
+ # A notifier is anything that responds to #call(title, message, options),
20
+ # like a lambda. The following example sends the contents to stdout.
21
+ config.notifiers << Boppers::Notifier::Stdout.new
22
+
23
+ # This is how a custom lambda notifier looks like:
24
+ # config.notifiers << lambda |title, message, _options| do
25
+ # puts "=> #{title}"
26
+ # puts "=> #{message}"
27
+ # end
28
+
29
+ # Retrieve configuration from `Config`, which fetches value from
30
+ # environment variables.
31
+ # config.notifiers << Boppers::Notifier::Sendgrid.new(
32
+ # username: Config.sendgrid_username,
33
+ # password: Config.sendgrid_password,
34
+ # domain: Config.sendgrid_domain,
35
+ # email: "your@email.com"
36
+ # )
37
+
38
+ # Handle exceptions. By default, any exception will be re-raised.
39
+ # You can use this configuration to enable some error monitoring
40
+ # service like Sentry.
41
+ config.handle_exception = lambda do |exception|
42
+ raise exception
43
+
44
+ # If you're using an notification error like
45
+ # Sentry, use something like this:
46
+ # Raven.capture_exception(exception)
47
+ end
48
+
49
+ # Configure your boppers.
50
+ # A bopper is anything that responds to #call, like a lambda.
51
+ # The following example returns the current time.
52
+ config.boppers << lambda do
53
+ Boppers.notify("Current time", "Now is #{Time.now}")
54
+ end
55
+
56
+ # A bopper can also configure the polling interval by defining a
57
+ # method `#interval`. If this method is not available, the default
58
+ # value will be used (1-minute). The following example runs every second.
59
+ #
60
+ # class Counter
61
+ # def initialize
62
+ # @count = 0
63
+ # end
64
+ #
65
+ # def interval
66
+ # 1
67
+ # end
68
+ #
69
+ # def call
70
+ # @count += 1
71
+ # Boppers.notify("Counter", "[#{Time.now}] Current count is #{@count}")
72
+ # end
73
+ # end
74
+ #
75
+ # config.boppers << Counter.new
76
+
77
+ # The following example uses https://rubygems.org/gems/boppers-uptime plugin.
78
+ # config.boppers << Boppers::Uptime.new(
79
+ # url: "http://example.com",
80
+ # status: 200,
81
+ # min_failures: 2
82
+ # )
83
+ end
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "boppers"
4
+ gem "env_vars"
5
+
6
+ # Search for plugins:
7
+ # https://rubygems.org/search?query=boppers
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Boppers
4
+ module Generator
5
+ class Plugin < Thor::Group
6
+ include Thor::Actions
7
+
8
+ desc "Generate a new Boopers plugin structure"
9
+
10
+ def self.source_root
11
+ File.join(__dir__, "plugin")
12
+ end
13
+
14
+ def copy_files
15
+ template "gemspec.erb", "#{plugin_name}.gemspec"
16
+ copy_file "gems.rb"
17
+ copy_file ".gitignore"
18
+ copy_file ".rubocop.yml"
19
+ copy_file ".travis.yml"
20
+ copy_file "CODE_OF_CONDUCT.md"
21
+ copy_file "LICENSE.txt"
22
+ copy_file "Rakefile"
23
+ template "README.erb", "README.md"
24
+ end
25
+
26
+ def copy_lib_files
27
+ template "lib/entry.erb", "lib/#{plugin_name}.rb"
28
+ template "lib/main.erb", "lib/boppers/#{name}.rb"
29
+ template "lib/version.erb", "lib/boppers/#{name}/version.rb"
30
+ end
31
+
32
+ def copy_test_files
33
+ template "test/test_helper.erb", "test/test_helper.rb"
34
+
35
+ test_file_name = name.tr("-", "_")
36
+ template "test/test_file.erb", "test/boppers/#{test_file_name}_test.rb"
37
+ end
38
+
39
+ def run_commands
40
+ inside destination_root do
41
+ run "git init"
42
+ run "bundle install"
43
+ end
44
+ end
45
+
46
+ private
47
+
48
+ def plugin_name
49
+ File.basename(destination_root)
50
+ end
51
+
52
+ def name
53
+ plugin_name.gsub(/^boppers-/, "")
54
+ end
55
+
56
+ def plugin_namespace
57
+ name
58
+ .tr("-", "_")
59
+ .gsub(/_(.)/) { $1.upcase }
60
+ .gsub(/^(.)/) { $1.upcase }
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1,116 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+
4
+ Style/Alias:
5
+ EnforcedStyle: prefer_alias_method
6
+
7
+ Style/FrozenStringLiteralComment:
8
+ EnforcedStyle: always
9
+
10
+ Style/ClassCheck:
11
+ EnforcedStyle: kind_of?
12
+
13
+ Metrics/LineLength:
14
+ Max: 80
15
+
16
+ Style/BlockDelimiters:
17
+ Enabled: false
18
+
19
+ Style/RegexpLiteral:
20
+ Enabled: false
21
+
22
+ Metrics/AbcSize:
23
+ Enabled: false
24
+
25
+ Style/PerlBackrefs:
26
+ Enabled: false
27
+
28
+ ClassLength:
29
+ Enabled: false
30
+
31
+ CyclomaticComplexity:
32
+ Enabled: false
33
+
34
+ Documentation:
35
+ Enabled: false
36
+
37
+ Encoding:
38
+ Enabled: false
39
+
40
+ FileName:
41
+ Enabled: false
42
+
43
+ IfUnlessModifier:
44
+ Enabled: false
45
+
46
+ MethodLength:
47
+ Enabled: false
48
+
49
+ ModuleFunction:
50
+ Enabled: false
51
+
52
+ OneLineConditional:
53
+ Enabled: false
54
+
55
+ ParameterLists:
56
+ Enabled: false
57
+
58
+ Proc:
59
+ Enabled: false
60
+
61
+ SingleLineBlockParams:
62
+ Enabled: false
63
+
64
+ VariableInterpolation:
65
+ Enabled: false
66
+
67
+ Style/TrailingCommaInLiteral:
68
+ Enabled: false
69
+
70
+ WhileUntilModifier:
71
+ Enabled: false
72
+
73
+ PredicateName:
74
+ NamePrefixBlacklist:
75
+ - is_
76
+
77
+ StringLiterals:
78
+ EnforcedStyle: double_quotes
79
+
80
+ DotPosition:
81
+ EnforcedStyle: leading
82
+
83
+ SpaceBeforeBlockBraces:
84
+ EnforcedStyle: space
85
+
86
+ SpaceInsideBlockBraces:
87
+ EnforcedStyle: no_space
88
+
89
+ DoubleNegation:
90
+ Enabled: false
91
+
92
+ SpaceInsideBlockBraces:
93
+ SpaceBeforeBlockParameters: false
94
+
95
+ SpaceInsideHashLiteralBraces:
96
+ Enabled: false
97
+
98
+ PercentLiteralDelimiters:
99
+ PreferredDelimiters:
100
+ '%': '{}'
101
+ '%i': '{}'
102
+ '%q': '{}'
103
+ '%Q': '{}'
104
+ '%r': '{}'
105
+ '%s': '{}'
106
+ '%w': '{}'
107
+ '%W': '{}'
108
+ '%x': '{}'
109
+
110
+ Style/CollectionMethods:
111
+ PreferredMethods:
112
+ collect: 'map'
113
+ collect!: 'map!'
114
+ inject: 'reduce'
115
+ detect: 'find'
116
+ find_all: 'select'