wassup 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ba0effd144c52ef2122ea0437d58d6d3cbb784a6f2bbbb8d1e85da6771076e0
4
- data.tar.gz: 50a155898f0edca3b6a9be0bb43df316f0477c69fe002a52b0e2a06b2eebb635
3
+ metadata.gz: be426163a7aa15bbb7b9ce4c02cce9facffa0cc44bc5e50cb1de5ef770eb63e0
4
+ data.tar.gz: d47f33e03030ca9e43c30105ad308a6b48a358603bc0a9681d3b52a49f99d47f
5
5
  SHA512:
6
- metadata.gz: fbd28897624210fa90cb987570b7aaefaeec74abbdcbb75ba42d0ccb984438ba156bb7d5c2d729a0af42b2ddab550e9c567d94ddc5b6676e5071b695ba48a54e
7
- data.tar.gz: d7a714ace610668a6cd6338547a404ef6d9dd5e6ea3bfc68e9d341a87647a8af70330166262e315eb56a4786add5b95569100dbd5bc4a467622f021fd171fb46
6
+ metadata.gz: c963ab844d3d509e092d6d937a032dacb497079f980367c372b1b48de80c37696933190eb2e9f878a9a841ce9ab496645c04eb00e303147ad08331e70a867fd3
7
+ data.tar.gz: 6f0e4dd7432790afb71be30f20b377966185a61a9b079d73acca4a341825677911f435eb02adba390daffd348134807fdf67a4986f0c776bad4d6ed3058fded0
data/Gemfile CHANGED
@@ -3,5 +3,8 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in wassup.gemspec
4
4
  gemspec
5
5
 
6
+ gem "colorize"
7
+ gem "rest-client"
8
+
6
9
  gem "rake", "~> 12.0"
7
10
  gem "rspec", "~> 3.0"
data/Gemfile.lock CHANGED
@@ -1,23 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wassup (0.2.1)
4
+ wassup (0.3.2)
5
5
  curses
6
6
  rest-client
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- curses (1.4.2)
11
+ colorize (0.8.1)
12
+ curses (1.4.4)
12
13
  diff-lcs (1.4.4)
13
14
  domain_name (0.5.20190701)
14
15
  unf (>= 0.0.5, < 1.0.0)
15
16
  http-accept (1.7.0)
16
- http-cookie (1.0.4)
17
+ http-cookie (1.0.5)
17
18
  domain_name (~> 0.5)
18
19
  mime-types (3.4.1)
19
20
  mime-types-data (~> 3.2015)
20
- mime-types-data (3.2021.1115)
21
+ mime-types-data (3.2023.0218.1)
21
22
  netrc (0.11.0)
22
23
  rake (12.3.3)
23
24
  rest-client (2.1.0)
@@ -40,15 +41,17 @@ GEM
40
41
  rspec-support (3.10.3)
41
42
  unf (0.1.4)
42
43
  unf_ext
43
- unf_ext (0.0.8)
44
+ unf_ext (0.0.8.2)
44
45
 
45
46
  PLATFORMS
46
47
  arm64-darwin-21
47
48
 
48
49
  DEPENDENCIES
50
+ colorize
49
51
  rake (~> 12.0)
52
+ rest-client
50
53
  rspec (~> 3.0)
51
54
  wassup!
52
55
 
53
56
  BUNDLED WITH
54
- 2.2.3
57
+ 2.2.33
@@ -53,8 +53,9 @@ const config = {
53
53
  type: 'doc',
54
54
  docId: 'intro',
55
55
  position: 'left',
56
- label: 'Tutorial',
56
+ label: 'Docs',
57
57
  },
58
+ {to: 'showcase', label: 'Showcase', position: 'left'},
58
59
  {to: '/blog', label: 'Blog', position: 'left'},
59
60
  {
60
61
  href: 'https://github.com/joshdholtz/wassup',
@@ -80,7 +81,7 @@ const config = {
80
81
  items: [
81
82
  {
82
83
  label: 'Twitter',
83
- href: 'https://twitter.com/joshdholtz',
84
+ href: 'https://twitter.com/WassupDashboard',
84
85
  },
85
86
  ],
86
87
  },
@@ -5,6 +5,7 @@
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
+ "name": "docs",
8
9
  "version": "0.0.0",
9
10
  "dependencies": {
10
11
  "@docusaurus/core": "2.0.0-beta.10",
@@ -11138,7 +11139,6 @@
11138
11139
  "version": "4.5.3",
11139
11140
  "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.3.tgz",
11140
11141
  "integrity": "sha512-eVYaEHALSt+s9LbvgEv4Ef+Tdq7hBiIZgii12xXJnukryt3pMgJf6aKhoCZ3FWQsu6sydEnkg11fYXLzhLBjeQ==",
11141
- "dev": true,
11142
11142
  "bin": {
11143
11143
  "tsc": "bin/tsc",
11144
11144
  "tsserver": "bin/tsserver"
@@ -14098,7 +14098,8 @@
14098
14098
  "@mdx-js/react": {
14099
14099
  "version": "1.6.22",
14100
14100
  "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz",
14101
- "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg=="
14101
+ "integrity": "sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==",
14102
+ "requires": {}
14102
14103
  },
14103
14104
  "@mdx-js/runtime": {
14104
14105
  "version": "1.6.22",
@@ -14181,42 +14182,50 @@
14181
14182
  "@svgr/babel-plugin-add-jsx-attribute": {
14182
14183
  "version": "6.0.0",
14183
14184
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.0.0.tgz",
14184
- "integrity": "sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA=="
14185
+ "integrity": "sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA==",
14186
+ "requires": {}
14185
14187
  },
14186
14188
  "@svgr/babel-plugin-remove-jsx-attribute": {
14187
14189
  "version": "6.0.0",
14188
14190
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.0.0.tgz",
14189
- "integrity": "sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw=="
14191
+ "integrity": "sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw==",
14192
+ "requires": {}
14190
14193
  },
14191
14194
  "@svgr/babel-plugin-remove-jsx-empty-expression": {
14192
14195
  "version": "6.0.0",
14193
14196
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.0.0.tgz",
14194
- "integrity": "sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA=="
14197
+ "integrity": "sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA==",
14198
+ "requires": {}
14195
14199
  },
14196
14200
  "@svgr/babel-plugin-replace-jsx-attribute-value": {
14197
14201
  "version": "6.0.0",
14198
14202
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.0.0.tgz",
14199
- "integrity": "sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ=="
14203
+ "integrity": "sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ==",
14204
+ "requires": {}
14200
14205
  },
14201
14206
  "@svgr/babel-plugin-svg-dynamic-title": {
14202
14207
  "version": "6.0.0",
14203
14208
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.0.0.tgz",
14204
- "integrity": "sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg=="
14209
+ "integrity": "sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg==",
14210
+ "requires": {}
14205
14211
  },
14206
14212
  "@svgr/babel-plugin-svg-em-dimensions": {
14207
14213
  "version": "6.0.0",
14208
14214
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.0.0.tgz",
14209
- "integrity": "sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA=="
14215
+ "integrity": "sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA==",
14216
+ "requires": {}
14210
14217
  },
14211
14218
  "@svgr/babel-plugin-transform-react-native-svg": {
14212
14219
  "version": "6.0.0",
14213
14220
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.0.0.tgz",
14214
- "integrity": "sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ=="
14221
+ "integrity": "sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ==",
14222
+ "requires": {}
14215
14223
  },
14216
14224
  "@svgr/babel-plugin-transform-svg-component": {
14217
14225
  "version": "6.1.0",
14218
14226
  "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.1.0.tgz",
14219
- "integrity": "sha512-1zacrn08K5RyV2NtXahOZ5Im/+aB1Y0LVh6QpzwgQV05sY7H5Npq+OcW/UqXbfB2Ua/WnHsFossFQqigCjarYg=="
14227
+ "integrity": "sha512-1zacrn08K5RyV2NtXahOZ5Im/+aB1Y0LVh6QpzwgQV05sY7H5Npq+OcW/UqXbfB2Ua/WnHsFossFQqigCjarYg==",
14228
+ "requires": {}
14220
14229
  },
14221
14230
  "@svgr/babel-preset": {
14222
14231
  "version": "6.1.0",
@@ -14666,17 +14675,20 @@
14666
14675
  "acorn-dynamic-import": {
14667
14676
  "version": "4.0.0",
14668
14677
  "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz",
14669
- "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw=="
14678
+ "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==",
14679
+ "requires": {}
14670
14680
  },
14671
14681
  "acorn-import-assertions": {
14672
14682
  "version": "1.8.0",
14673
14683
  "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
14674
- "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw=="
14684
+ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
14685
+ "requires": {}
14675
14686
  },
14676
14687
  "acorn-jsx": {
14677
14688
  "version": "5.3.2",
14678
14689
  "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
14679
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="
14690
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
14691
+ "requires": {}
14680
14692
  },
14681
14693
  "acorn-walk": {
14682
14694
  "version": "8.2.0",
@@ -14737,7 +14749,8 @@
14737
14749
  "ajv-keywords": {
14738
14750
  "version": "3.5.2",
14739
14751
  "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
14740
- "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ=="
14752
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
14753
+ "requires": {}
14741
14754
  },
14742
14755
  "algoliasearch": {
14743
14756
  "version": "4.11.0",
@@ -15845,7 +15858,8 @@
15845
15858
  "cssnano-utils": {
15846
15859
  "version": "2.0.1",
15847
15860
  "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz",
15848
- "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ=="
15861
+ "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==",
15862
+ "requires": {}
15849
15863
  },
15850
15864
  "csso": {
15851
15865
  "version": "4.2.0",
@@ -17171,7 +17185,8 @@
17171
17185
  "icss-utils": {
17172
17186
  "version": "5.1.0",
17173
17187
  "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
17174
- "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA=="
17188
+ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
17189
+ "requires": {}
17175
17190
  },
17176
17191
  "ignore": {
17177
17192
  "version": "5.1.9",
@@ -18427,22 +18442,26 @@
18427
18442
  "postcss-discard-comments": {
18428
18443
  "version": "5.0.1",
18429
18444
  "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz",
18430
- "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg=="
18445
+ "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==",
18446
+ "requires": {}
18431
18447
  },
18432
18448
  "postcss-discard-duplicates": {
18433
18449
  "version": "5.0.1",
18434
18450
  "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz",
18435
- "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA=="
18451
+ "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==",
18452
+ "requires": {}
18436
18453
  },
18437
18454
  "postcss-discard-empty": {
18438
18455
  "version": "5.0.1",
18439
18456
  "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz",
18440
- "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw=="
18457
+ "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==",
18458
+ "requires": {}
18441
18459
  },
18442
18460
  "postcss-discard-overridden": {
18443
18461
  "version": "5.0.1",
18444
18462
  "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz",
18445
- "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q=="
18463
+ "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==",
18464
+ "requires": {}
18446
18465
  },
18447
18466
  "postcss-discard-unused": {
18448
18467
  "version": "5.0.1",
@@ -18532,7 +18551,8 @@
18532
18551
  "postcss-modules-extract-imports": {
18533
18552
  "version": "3.0.0",
18534
18553
  "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
18535
- "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw=="
18554
+ "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
18555
+ "requires": {}
18536
18556
  },
18537
18557
  "postcss-modules-local-by-default": {
18538
18558
  "version": "4.0.0",
@@ -18563,7 +18583,8 @@
18563
18583
  "postcss-normalize-charset": {
18564
18584
  "version": "5.0.1",
18565
18585
  "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz",
18566
- "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg=="
18586
+ "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==",
18587
+ "requires": {}
18567
18588
  },
18568
18589
  "postcss-normalize-display-values": {
18569
18590
  "version": "5.0.1",
@@ -18713,7 +18734,8 @@
18713
18734
  "postcss-zindex": {
18714
18735
  "version": "5.0.1",
18715
18736
  "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-5.0.1.tgz",
18716
- "integrity": "sha512-nwgtJJys+XmmSGoYCcgkf/VczP8Mp/0OfSv3v0+fw0uABY4yxw+eFs0Xp9nAZHIKnS5j+e9ywQ+RD+ONyvl5pA=="
18737
+ "integrity": "sha512-nwgtJJys+XmmSGoYCcgkf/VczP8Mp/0OfSv3v0+fw0uABY4yxw+eFs0Xp9nAZHIKnS5j+e9ywQ+RD+ONyvl5pA==",
18738
+ "requires": {}
18717
18739
  },
18718
18740
  "prepend-http": {
18719
18741
  "version": "2.0.0",
@@ -18737,7 +18759,8 @@
18737
18759
  "prism-react-renderer": {
18738
18760
  "version": "1.2.1",
18739
18761
  "resolved": "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-1.2.1.tgz",
18740
- "integrity": "sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg=="
18762
+ "integrity": "sha512-w23ch4f75V1Tnz8DajsYKvY5lF7H1+WvzvLUcF0paFxkTHSp42RS0H5CttdN2Q8RR3DRGZ9v5xD/h3n8C8kGmg==",
18763
+ "requires": {}
18741
18764
  },
18742
18765
  "prismjs": {
18743
18766
  "version": "1.25.0",
@@ -19116,7 +19139,8 @@
19116
19139
  "react-side-effect": {
19117
19140
  "version": "2.1.1",
19118
19141
  "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.1.tgz",
19119
- "integrity": "sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ=="
19142
+ "integrity": "sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ==",
19143
+ "requires": {}
19120
19144
  },
19121
19145
  "react-textarea-autosize": {
19122
19146
  "version": "8.3.3",
@@ -20435,8 +20459,7 @@
20435
20459
  "typescript": {
20436
20460
  "version": "4.5.3",
20437
20461
  "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.3.tgz",
20438
- "integrity": "sha512-eVYaEHALSt+s9LbvgEv4Ef+Tdq7hBiIZgii12xXJnukryt3pMgJf6aKhoCZ3FWQsu6sydEnkg11fYXLzhLBjeQ==",
20439
- "dev": true
20462
+ "integrity": "sha512-eVYaEHALSt+s9LbvgEv4Ef+Tdq7hBiIZgii12xXJnukryt3pMgJf6aKhoCZ3FWQsu6sydEnkg11fYXLzhLBjeQ=="
20440
20463
  },
20441
20464
  "ua-parser-js": {
20442
20465
  "version": "0.7.31",
@@ -20676,7 +20699,8 @@
20676
20699
  "use-isomorphic-layout-effect": {
20677
20700
  "version": "1.1.1",
20678
20701
  "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.1.tgz",
20679
- "integrity": "sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ=="
20702
+ "integrity": "sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ==",
20703
+ "requires": {}
20680
20704
  },
20681
20705
  "use-latest": {
20682
20706
  "version": "1.2.0",
@@ -21047,7 +21071,8 @@
21047
21071
  "ws": {
21048
21072
  "version": "8.3.0",
21049
21073
  "resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz",
21050
- "integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw=="
21074
+ "integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==",
21075
+ "requires": {}
21051
21076
  }
21052
21077
  }
21053
21078
  },
@@ -21152,7 +21177,8 @@
21152
21177
  "ws": {
21153
21178
  "version": "7.5.6",
21154
21179
  "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz",
21155
- "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA=="
21180
+ "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==",
21181
+ "requires": {}
21156
21182
  },
21157
21183
  "xdg-basedir": {
21158
21184
  "version": "4.0.0",
@@ -3,6 +3,19 @@
3
3
  align-items: center;
4
4
  padding: 2rem 0;
5
5
  width: 100%;
6
+
7
+ background-color: #17191a;
8
+ color: #F6F6F7;
9
+ }
10
+
11
+ .features code {
12
+ background-color: #424447;
13
+ border: 0.1rem solid rgba(0, 0, 0, 0.1);
14
+ border-radius: var(--ifm-code-border-radius);
15
+ font-family: var(--ifm-font-family-monospace);
16
+ font-size: var(--ifm-code-font-size);
17
+ padding: var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal);
18
+ vertical-align: middle;
6
19
  }
7
20
 
8
21
  .featureSvg {
@@ -14,8 +14,8 @@ const FeatureList: FeatureItem[] = [
14
14
  image: '/img/demo-supfile.png',
15
15
  description: (
16
16
  <>
17
- Wassup was designed to be easy to use but with maximum flexibilty. Configure
18
- size, position, content, and selection of the panes in the <code>Supfile</code>.
17
+ Wassup was designed to be easy to setup but give maximum flexibilty. Configure
18
+ size, position, content, and item selection of the panes in the <code>Supfile</code>.
19
19
  </>
20
20
  ),
21
21
  },
@@ -24,7 +24,7 @@ const FeatureList: FeatureItem[] = [
24
24
  image: '/img/wassup-screenshot.png',
25
25
  description: (
26
26
  <>
27
- Run `wassup` in the same directory as your <code>Supfile</code> to show the dashboard. Press the number
27
+ Run <code>wassup</code> in the same directory as your <code>Supfile</code> to show the dashboard. Press the number
28
28
  keys to interact with a specific pane. Highlight rows with <code>j</code> and <code>k</code> and press <code>Enter</code> to select.
29
29
  </>
30
30
  ),
@@ -5,15 +5,32 @@
5
5
  */
6
6
 
7
7
  /* You can override the default Infima variables here. */
8
+ /* #2b3137 */
8
9
  :root {
9
- --ifm-color-primary: #458588;
10
- --ifm-color-primary-dark: rgb(33, 175, 144);
11
- --ifm-color-primary-darker: rgb(31, 165, 136);
12
- --ifm-color-primary-darkest: rgb(26, 136, 112);
13
- --ifm-color-primary-light: rgb(70, 203, 174);
14
- --ifm-color-primary-lighter: rgb(102, 212, 189);
15
- --ifm-color-primary-lightest: rgb(146, 224, 208);
10
+ --ifm-color-primary: #1C1E21;
11
+ --ifm-color-primary-dark: #0F1114;
12
+ --ifm-color-primary-darker: #030508;
13
+ --ifm-color-primary-darkest: #030508;
14
+ --ifm-color-primary-light: #292B2E;
15
+ --ifm-color-primary-lighter: #36383B;
16
+ --ifm-color-primary-lightest: #424447;
16
17
  --ifm-code-font-size: 95%;
18
+
19
+ /* --ifm-menu-color-active: #458588;
20
+ --ifm-navbar-link-hover-color: #458588; */
21
+ /* --ifm-navbar-link-color: #458588; */
22
+ /* --ifm-link-color: #458588; */
23
+ }
24
+
25
+ html[data-theme='dark'] {
26
+ --ifm-color-primary: #F6F6F7;
27
+ --ifm-color-primary-dark: #E9E9EA;
28
+ --ifm-color-primary-darker: #DDDDDE;
29
+ --ifm-color-primary-darkest: #D0D0D1;
30
+ --ifm-color-primary-light: #F6F6F7;
31
+ --ifm-color-primary-lighter: #F6F6F7;
32
+ --ifm-color-primary-lightest: #F6F6F7;
33
+ /* any other colors you wish to overwrite */
17
34
  }
18
35
 
19
36
  .docusaurus-highlight-code-line {
@@ -24,5 +41,5 @@
24
41
  }
25
42
 
26
43
  html[data-theme='dark'] .docusaurus-highlight-code-line {
27
- background-color: rgba(0, 0, 0, 0.3);
44
+ background-color: rgba(109, 102, 102, 0.3);
28
45
  }
@@ -8,6 +8,8 @@
8
8
  text-align: center;
9
9
  position: relative;
10
10
  overflow: hidden;
11
+
12
+ background-color: #2b3137;
11
13
  }
12
14
 
13
15
  .heroTitle {
@@ -18,8 +20,33 @@
18
20
 
19
21
  }
20
22
 
23
+ .calloutAndLogo {
24
+ display: flex;
25
+ justify-content: center;
26
+ align-items: center;
27
+ margin-bottom: 20px;
28
+ }
29
+
30
+ .callout {
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+
35
+ .title {
36
+ font-size: 50px;
37
+ color: #FFFFFF;
38
+ padding-right: 20px;
39
+ text-align: left;
40
+ }
41
+
42
+ .callout {
43
+ color: #FFFFFF;
44
+ padding-right: 20px;
45
+ text-align: left;
46
+ }
47
+
21
48
  .heroLogo {
22
- max-width: 600px;
49
+ max-height: 200px;
23
50
  border-radius: 20px;
24
51
  }
25
52
 
@@ -29,6 +56,18 @@
29
56
  }
30
57
  }
31
58
 
59
+ .moreInfo {
60
+ background-color: rgb(32, 35, 42);
61
+ color: #F6F6F7;
62
+ text-align: center;
63
+ padding: 20px 0px;
64
+ font-size: 30px;
65
+ }
66
+
67
+ .moreInfo strong {
68
+ color: #458588;
69
+ }
70
+
32
71
  .buttons {
33
72
  display: flex;
34
73
  align-items: center;
@@ -11,12 +11,20 @@ function HomepageHeader() {
11
11
  return (
12
12
  <header className={clsx('hero hero--primary', styles.heroBanner)}>
13
13
  <div className="container">
14
- <img className={styles.heroLogo} src="/img/wassup-long.png" alt="Wassup - The scriptable terminal dashboard"/>
14
+ <div className={styles.calloutAndLogo}>
15
+ <div className={styles.callout}>
16
+ <h1 className={styles.title}>Wassup</h1>
17
+ <h2 className={styles.callout}>
18
+ Easily configure and script <br/> a personal terminal dashboard
19
+ </h2>
20
+ </div>
21
+ <img className={styles.heroLogo} src="/img/wassup.png" alt="Wassup logo"/>
22
+ </div>
15
23
  <div className={styles.buttons}>
16
24
  <Link
17
25
  className="button button--secondary button--lg"
18
26
  to="/docs/intro">
19
- Wassup Tutorial - 5min ⏱️
27
+ Getting Started - 5min ⏱️
20
28
  </Link>
21
29
  </div>
22
30
  </div>
@@ -24,6 +32,15 @@ function HomepageHeader() {
24
32
  );
25
33
  }
26
34
 
35
+ function HomepageMoreInfo() {
36
+ const {siteConfig} = useDocusaurusContext();
37
+ return (
38
+ <div className={styles.moreInfo}>
39
+ Script <strong>your own panes</strong> or use Wassup's <strong>built-in panes</strong>!
40
+ </div>
41
+ );
42
+ }
43
+
27
44
  export default function Home(): JSX.Element {
28
45
  const {siteConfig} = useDocusaurusContext();
29
46
  return (
@@ -31,6 +48,7 @@ export default function Home(): JSX.Element {
31
48
  title={`Hello from ${siteConfig.title}`}
32
49
  description="Description will go into a meta tag in <head />">
33
50
  <HomepageHeader />
51
+ <HomepageMoreInfo />
34
52
  <main>
35
53
  <HomepageFeatures />
36
54
  </main>
@@ -0,0 +1 @@
1
+ Stuff here eventually
@@ -10,16 +10,7 @@ add_pane do |pane|
10
10
  pane.interval = 60 * 5
11
11
  pane.show_refresh = true
12
12
 
13
- pane.content do |content|
14
- prs = Helpers::GitHub.pull_requests(org: 'fastlane', repo: 'fastlane')
15
- prs.each do |pr|
16
- display = Helpers::GitHub::Formatter.pr(pr)
17
- content.add_row(display, pr)
18
- end
19
- end
20
- pane.selection('enter', 'Open PR in browser') do |pr|
21
- `open #{pr['html_url']}`
22
- end
13
+ pane.type = Panes::GitHub::PullRequests.new(org: 'fastlane', repo: 'fastlane', show_username: true)
23
14
  end
24
15
 
25
16
  add_pane do |pane|
@@ -34,18 +25,7 @@ add_pane do |pane|
34
25
  pane.interval = 60 * 5
35
26
  pane.show_refresh = true
36
27
 
37
- pane.content do |content|
38
- # Uses GitHub's /search/issues API
39
- # Docs - https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
40
- issues = Helpers::GitHub.issues(org: 'fastlane-community', q: 'is:pr is:open')
41
- issues.each do |issue|
42
- display = Helpers::GitHub::Formatter.pr(issue, show_repo: true)
43
- content.add_row(display, issue)
44
- end
45
- end
46
- pane.selection('enter', 'Open PR in browser') do |pr|
47
- `open #{pr['html_url']}`
48
- end
28
+ pane.type = Panes::GitHub::Search.new(org: 'fastlane-community', query: 'is:pr is:open', show_username: true)
49
29
  end
50
30
 
51
31
  add_pane do |pane|
@@ -57,21 +37,17 @@ add_pane do |pane|
57
37
  pane.highlight = true
58
38
  pane.title = "High Interaction Issues - fastlane/fastlane"
59
39
 
40
+ pane.alert_level = AlertLevel::HIGH
41
+
60
42
  pane.interval = 60 * 5
61
43
  pane.show_refresh = true
62
44
 
63
- pane.content do |content|
64
- # Uses GitHub's /search/issues API
65
- # Doc - https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
66
- issues = Helpers::GitHub.issues(org: 'fastlane', repo: 'fastlane', q: 'is:issue is:open interactions:>10')
67
- issues.each do |issue|
68
- display = Helpers::GitHub::Formatter.issue(issue, show_interactions: true)
69
- content.add_row(display, issue)
70
- end
71
- end
72
- pane.selection('enter', 'Open issue in browser') do |pr|
73
- `open #{pr['html_url']}`
74
- end
45
+ pane.type = Panes::GitHub::Search.new(
46
+ org: 'fastlane',
47
+ repo: 'fastlane',
48
+ query: 'is:issue is:open interactions:>10',
49
+ show_interactions: true
50
+ )
75
51
  end
76
52
 
77
53
  add_pane do |pane|
@@ -86,16 +62,7 @@ add_pane do |pane|
86
62
  pane.interval = 60 * 5
87
63
  pane.show_refresh = true
88
64
 
89
- pane.content do |content|
90
- releases = Helpers::GitHub.releases(org: 'fastlane', repo: 'fastlane')
91
- releases.each do |release|
92
- display = Helpers::GitHub::Formatter.release(release)
93
- content.add_row(display, release)
94
- end
95
- end
96
- pane.selection('enter', 'Open release in browser') do |pr|
97
- `open #{pr['html_url']}`
98
- end
65
+ pane.type = Panes::GitHub::Releases.new(org: 'fastlane', repo: 'fastlane')
99
66
  end
100
67
 
101
68
  add_pane do |pane|
@@ -110,21 +77,7 @@ add_pane do |pane|
110
77
  pane.interval = 60 * 5
111
78
  pane.show_refresh = true
112
79
 
113
- pane.content do |content|
114
- workflows = Helpers::CircleCI.workflows(vcs: 'github', org: 'fastlane', repo: 'fastlane', limit_days: 14)
115
- workflows.each do |workflow|
116
- display = Helpers::CircleCI::Formatter.workflow(workflow)
117
- content.add_row(display, workflow)
118
- end
119
- end
120
- pane.selection('enter', 'Open workflow in browser') do |workflow|
121
- slug = workflow["project_slug"]
122
- pipeline_number = workflow["pipeline_number"]
123
- workflow_id = workflow["id"]
124
-
125
- url = "https://app.circleci.com/pipelines/#{slug}/#{pipeline_number}/workflows/#{workflow_id}"
126
- `open #{url}`
127
- end
80
+ pane.type = Panes::CircleCI::Workflows.new(vcs: 'github', org: 'fastlane', repo: 'fastlane')
128
81
  end
129
82
 
130
83
  add_pane do |pane|
@@ -139,26 +92,7 @@ add_pane do |pane|
139
92
  pane.interval = 60 * 5
140
93
  pane.show_refresh = true
141
94
 
142
- pane.content do |content|
143
- deploys = Helpers::Netlify.deploys(site_id: '91e8af7d-ea1c-4553-afb0-af7539bed063')
144
- deploys.each do |deploy|
145
- display = Helpers::Netlify::Formatter.deploy(deploy)
146
- content.add_row(display, deploy)
147
- end
148
- end
149
- pane.selection('enter', 'Open in Netlify') do |deploy|
150
- url = "#{deploy['admin_url']}/deploys/#{deploy['id']}"
151
- `open #{url}`
152
- end
153
- pane.selection('o', 'Open preview') do |deploy|
154
- if deploy['state'] == 'error'
155
- # show alert that isn't here yet
156
- elsif deploy['review_id'].nil?
157
- `open #{deploy['url']}`
158
- else
159
- `open #{deploy['deploy_ssl_url']}`
160
- end
161
- end
95
+ pane.type = Panes::Netlify::Deploys.new(site_id: '91e8af7d-ea1c-4553-afb0-af7539bed063')
162
96
  end
163
97
 
164
98
  add_pane do |pane|
@@ -173,23 +107,8 @@ add_pane do |pane|
173
107
  pane.interval = 60 * 5
174
108
  pane.show_refresh = true
175
109
 
176
- pane.content do |content|
177
- # Owned stories
178
- stories = Helpers::Shortcut.search_stories(query: "owner:joshholtz")
179
- stories.each do |story|
180
- display = Helpers::Shortcut::Formatter.story(story)
181
- content.add_row(display, story, page: "Owned Stories")
182
- end
183
-
184
- # Ready for review stories
185
- stories = Helpers::Shortcut.search_stories(query: "state:\"Ready For Review\" team:\"The\"")
186
- stories.each do |story|
187
- display = Helpers::Shortcut::Formatter.story(story)
188
- content.add_row(display, story, page: "Ready For Review")
189
- end
190
- end
191
- pane.selection('enter', 'Open in Shortcut') do |story|
192
- url = story['app_url']
193
- `open #{url}`
194
- end
110
+ pane.type = Panes::Shortcut::Stories.new(query_pages: {
111
+ "Owned Stories": "owner:joshholtz",
112
+ "Ready For Review": "state:\"Ready For Review\" team:\"The\""
113
+ })
195
114
  end
@@ -64,7 +64,7 @@ add_pane do |pane|
64
64
 
65
65
  pane.interval = 10
66
66
  pane.content do |content|
67
- raise "An error occured! Oh no!"
67
+ raise "No API Key Found"
68
68
  end
69
69
  end
70
70
 
data/lib/wassup/app.rb CHANGED
@@ -70,6 +70,7 @@ module Wassup
70
70
  pane_builder.left,
71
71
  title: pane_builder.title,
72
72
  description: pane_builder.description,
73
+ alert_level: pane_builder.alert_level,
73
74
  highlight: pane_builder.highlight,
74
75
  focus_number: number,
75
76
  interval: pane_builder.interval,
@@ -86,11 +86,11 @@ module Wassup
86
86
  module Helpers
87
87
  module GitHub
88
88
  module Formatter
89
- def self.issue(issue, show_repo: false, show_interactions: false)
90
- self.pr(issue, show_repo: show_repo, show_interactions: show_interactions)
89
+ def self.issue(issue, show_repo: false, show_username: false, show_interactions: false)
90
+ self.pr(issue, show_repo: show_repo, show_username: show_username, show_interactions: show_interactions)
91
91
  end
92
92
 
93
- def self.pr(pr, show_repo: false, show_interactions: false)
93
+ def self.pr(pr, show_repo: false, show_username: false, show_interactions: false)
94
94
  number = pr["number"]
95
95
  title = pr["title"]
96
96
  created_at = pr["created_at"]
@@ -101,6 +101,11 @@ module Wassup
101
101
  repo_name = "[fg=gray]#{repo_url_parts.last} "
102
102
  end
103
103
 
104
+ username = ""
105
+ if show_username
106
+ username = "[fg=magenta]#{pr["user"]["login"]} "
107
+ end
108
+
104
109
  interactions = ""
105
110
  if show_interactions
106
111
  interaction_count = pr["comments"] + pr["reactions"]["total_count"]
@@ -113,7 +118,7 @@ module Wassup
113
118
  days = (Time.now - date).to_i / (24 * 60 * 60)
114
119
  days_formatted = '%3.3s' % days.to_s
115
120
 
116
- display = "[fg=yellow]#{number_formatted}[fg=cyan] #{days_formatted}d ago #{interactions}#{repo_name}[fg=white]#{title}"
121
+ display = "[fg=yellow]#{number_formatted}[fg=cyan] #{days_formatted}d ago #{interactions}#{repo_name}#{username}[fg=white]#{title}"
117
122
 
118
123
  return display
119
124
  end
@@ -127,7 +132,7 @@ module Wassup
127
132
  days = (Time.now - date).to_i / (24 * 60 * 60)
128
133
  days_formatted = '%3.3s' % days.to_s
129
134
 
130
- display = "[fg=yellow]#{tag_name} [fg=cyan]#{days_formatted} ago [fg=gray]#{name}"
135
+ display = "[fg=yellow]#{tag_name} [fg=cyan]#{days_formatted}d ago [fg=gray]#{name}"
131
136
 
132
137
  return display
133
138
  end
data/lib/wassup/pane.rb CHANGED
@@ -13,6 +13,8 @@ module Wassup
13
13
  attr_accessor :title
14
14
  attr_accessor :description
15
15
 
16
+ attr_accessor :alert_level
17
+
16
18
  attr_accessor :focused
17
19
  attr_accessor :focus_number
18
20
 
@@ -53,9 +55,11 @@ module Wassup
53
55
 
54
56
  attr_accessor :title
55
57
  attr_accessor :data
58
+ attr_accessor :alert_level
56
59
 
57
60
  def initialize(title = nil)
58
61
  @title = title
62
+ @alert_level = nil
59
63
  @data = []
60
64
  end
61
65
 
@@ -64,7 +68,7 @@ module Wassup
64
68
  end
65
69
  end
66
70
 
67
- def initialize(height, width, top, left, title: nil, description: nil, highlight: true, focus_number: nil, interval:, show_refresh:, content_block:, selection_blocks:, selection_blocks_description:, debug: false)
71
+ def initialize(height, width, top, left, title: nil, description: nil, alert_level: nil, highlight: true, focus_number: nil, interval:, show_refresh:, content_block:, selection_blocks:, selection_blocks_description:, debug: false)
68
72
 
69
73
  if !debug
70
74
  self.win_height = Curses.lines * height
@@ -97,6 +101,8 @@ module Wassup
97
101
  self.title = title
98
102
  self.description = description
99
103
 
104
+ self.alert_level = alert_level
105
+
100
106
  self.interval = interval
101
107
  self.content_block = content_block
102
108
  self.selection_blocks = selection_blocks || {}
@@ -207,10 +213,9 @@ module Wassup
207
213
  if rtn.is_a?(Ope)
208
214
  self.caught_error = rtn.error
209
215
  content = Wassup::Pane::Content.new("Overview")
210
- content.add_row("[fg=red]Error during refersh[fg=white]")
211
- content.add_row("[fg=red]at #{Time.now}[fg=while]")
216
+ content.add_row("[fg=red]#{rtn.error.message}[fg=while]")
212
217
  content.add_row("")
213
- content.add_row("[fg=yellow]Will try again next interval[fg=white]")
218
+ content.add_row("[fg=gray]Error at #{Time.now}[fg=while]")
214
219
 
215
220
  content_directions = Wassup::Pane::Content.new("Directions")
216
221
  content_directions.add_row("1. Press 'c' to copy the stacktrace")
@@ -331,9 +336,43 @@ module Wassup
331
336
  else
332
337
  full_title = "#{self.focus_number} - #{title}"
333
338
  end
339
+ full_title += " "
334
340
 
335
341
  self.win.setpos(0, 3)
336
342
  self.win.addstr(full_title)
343
+
344
+ self.win.setpos(0, 3 + full_title.size)
345
+ alert = ""
346
+ alert_count = 0
347
+ if self.contents
348
+ alert_count = self.contents.map { |c| c.data.size }.inject(0, :+)
349
+ end
350
+ case self.alert_level
351
+ when AlertLevel::HIGH
352
+ self.win.attrset(Curses.color_pair(Wassup::Color::Pair::RED))
353
+ if alert_count == 1
354
+ alert += "(#{alert_count} HIGH ALERT)"
355
+ elsif alert_count > 0
356
+ alert += "(#{alert_count} HIGH ALERTS)"
357
+ end
358
+ when AlertLevel::MEDIUM
359
+ self.win.attrset(Curses.color_pair(Wassup::Color::Pair::YELLOW))
360
+ if alert_count == 1
361
+ alert += "(#{alert_count} MEDIUM ALERT)"
362
+ elsif alert_count > 0
363
+ alert += "(#{alert_count} MEDIUM ALERTS)"
364
+ end
365
+ when AlertLevel::LOW
366
+ self.win.attrset(Curses.color_pair(Wassup::Color::Pair::CYAN))
367
+ if alert_count == 1
368
+ alert += "(#{alert_count} LOW ALERT)"
369
+ elsif alert_count > 0
370
+ alert += "(#{alert_count} LOW ALERTS)"
371
+ end
372
+ end
373
+ self.win.addstr(alert)
374
+ self.subwin.attrset(Curses.color_pair(Wassup::Color::Pair::NORMAL))
375
+
337
376
  self.win.refresh
338
377
  end
339
378
 
@@ -1,5 +1,11 @@
1
1
 
2
2
  module Wassup
3
+ module AlertLevel
4
+ HIGH = "high"
5
+ MEDIUM = "medium"
6
+ LOW = "low"
7
+ end
8
+
3
9
  class PaneBuilder
4
10
  attr_accessor :height
5
11
  attr_accessor :width
@@ -11,6 +17,8 @@ module Wassup
11
17
  attr_accessor :title
12
18
  attr_accessor :description
13
19
 
20
+ attr_accessor :alert_level
21
+
14
22
  attr_accessor :show_refresh
15
23
 
16
24
  attr_accessor :interval
@@ -18,6 +26,8 @@ module Wassup
18
26
  attr_accessor :selection_blocks
19
27
  attr_accessor :selection_blocks_description
20
28
 
29
+ attr_accessor :type
30
+
21
31
  class ContentBuilder
22
32
  attr_accessor :contents
23
33
 
@@ -62,7 +72,7 @@ module Wassup
62
72
  end
63
73
  end
64
74
 
65
- def initialize()
75
+ def initialize
66
76
  @height = 1
67
77
  @weight = 1
68
78
  @top = 0
@@ -75,6 +85,10 @@ module Wassup
75
85
  @selection_blocks_description = {}
76
86
  end
77
87
 
88
+ def type=(type)
89
+ type.configure(self)
90
+ end
91
+
78
92
  def content(&block)
79
93
  self.content_block = block
80
94
  end
@@ -0,0 +1,35 @@
1
+ module Wassup
2
+ module Panes
3
+ module CircleCI
4
+ class Workflows
5
+ attr_accessor :vcs
6
+ attr_accessor :org
7
+ attr_accessor :repo
8
+
9
+ def initialize(vcs:, org:, repo:)
10
+ @vcs = vcs
11
+ @org = org
12
+ @repo = repo
13
+ end
14
+
15
+ def configure(pane)
16
+ pane.content do |content|
17
+ workflows = Helpers::CircleCI.workflows(vcs: vcs, org: org, repo: repo, limit_days: 14)
18
+ workflows.each do |workflow|
19
+ display = Helpers::CircleCI::Formatter.workflow(workflow)
20
+ content.add_row(display, workflow)
21
+ end
22
+ end
23
+ pane.selection('enter', 'Open workflow in browser') do |workflow|
24
+ slug = workflow["project_slug"]
25
+ pipeline_number = workflow["pipeline_number"]
26
+ workflow_id = workflow["id"]
27
+
28
+ url = "https://app.circleci.com/pipelines/#{slug}/#{pipeline_number}/workflows/#{workflow_id}"
29
+ `open #{url}`
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,92 @@
1
+ module Wassup
2
+ module Panes
3
+ module GitHub
4
+ class PullRequests
5
+ attr_accessor :org
6
+ attr_accessor :repo
7
+ attr_accessor :show_username
8
+ attr_accessor :show_interactions
9
+
10
+ def initialize(org:, repo:, show_username: false, show_interactions: false)
11
+ @org = org
12
+ @repo = repo
13
+ @show_username = show_username
14
+ @show_interactions = show_interactions
15
+ end
16
+
17
+ def configure(pane)
18
+ pane.content do |content|
19
+ prs = Helpers::GitHub.pull_requests(org: org, repo: repo)
20
+ prs.each do |pr|
21
+ display = Helpers::GitHub::Formatter.pr(pr, show_username: show_username, show_interactions: show_interactions)
22
+ content.add_row(display, pr)
23
+ end
24
+ end
25
+ pane.selection('enter', 'Open PR in browser') do |pr|
26
+ `open #{pr['html_url']}`
27
+ end
28
+ end
29
+ end
30
+
31
+ class Releases
32
+ attr_accessor :org
33
+ attr_accessor :repo
34
+
35
+ def initialize(org:, repo:)
36
+ @org = org
37
+ @repo = repo
38
+ end
39
+
40
+ def configure(pane)
41
+ pane.content do |content|
42
+ releases = Helpers::GitHub.releases(org: org, repo: repo)
43
+ releases.each do |release|
44
+ display = Helpers::GitHub::Formatter.release(release)
45
+ content.add_row(display, release)
46
+ end
47
+ end
48
+ pane.selection('enter', 'Open release in browser') do |pr|
49
+ `open #{pr['html_url']}`
50
+ end
51
+ end
52
+ end
53
+
54
+ class Search
55
+ attr_accessor :org
56
+ attr_accessor :repo
57
+ attr_accessor :query
58
+ attr_accessor :show_repo
59
+ attr_accessor :show_username
60
+ attr_accessor :show_interactions
61
+
62
+ def initialize(org:, repo: nil, query:, show_repo: true, show_username: false, show_interactions: false)
63
+ @org = org
64
+ @repo = repo
65
+ @query = query
66
+ @show_repo = show_repo
67
+ @show_username = show_username
68
+ @show_interactions = show_interactions
69
+ end
70
+
71
+ def configure(pane)
72
+ pane.content do |content|
73
+ # Uses GitHub's /search/issues API
74
+ # Docs - https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
75
+ issues_or_prs = Helpers::GitHub.issues(org: org, repo: repo, q: query)
76
+ issues_or_prs.each do |issue_or_pr|
77
+ display = if issue_or_pr.has_key?('pull_request')
78
+ Helpers::GitHub::Formatter.pr(issue_or_pr, show_repo: show_repo, show_username: show_username, show_interactions: show_interactions)
79
+ else
80
+ Helpers::GitHub::Formatter.issue(issue_or_pr, show_repo: show_repo, show_username: show_username, show_interactions: show_interactions)
81
+ end
82
+ content.add_row(display, issue_or_pr)
83
+ end
84
+ end
85
+ pane.selection('enter', 'Open in browser') do |pr|
86
+ `open #{pr['html_url']}`
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,36 @@
1
+ module Wassup
2
+ module Panes
3
+ module Netlify
4
+ class Deploys
5
+ attr_accessor :site_id
6
+
7
+ def initialize(site_id:)
8
+ @site_id = site_id
9
+ end
10
+
11
+ def configure(pane)
12
+ pane.content do |content|
13
+ deploys = Helpers::Netlify.deploys(site_id: site_id)
14
+ deploys.each do |deploy|
15
+ display = Helpers::Netlify::Formatter.deploy(deploy)
16
+ content.add_row(display, deploy)
17
+ end
18
+ end
19
+ pane.selection('enter', 'Open in Netlify') do |deploy|
20
+ url = "#{deploy['admin_url']}/deploys/#{deploy['id']}"
21
+ `open #{url}`
22
+ end
23
+ pane.selection('o', 'Open preview') do |deploy|
24
+ if deploy['state'] == 'error'
25
+ # show alert that isn't here yet
26
+ elsif deploy['review_id'].nil?
27
+ `open #{deploy['url']}`
28
+ else
29
+ `open #{deploy['deploy_ssl_url']}`
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,30 @@
1
+ module Wassup
2
+ module Panes
3
+ module Shortcut
4
+ class Stories
5
+ attr_accessor :query_pages
6
+
7
+ def initialize(query: nil, query_pages: nil)
8
+ @query_pages = query_pages
9
+ @query_pages ||= { "": query } if query
10
+ end
11
+
12
+ def configure(pane)
13
+ pane.content do |content|
14
+ query_pages.each do |k,v|
15
+ stories = Helpers::Shortcut.search_stories(query: v)
16
+ stories.each do |story|
17
+ display = Helpers::Shortcut::Formatter.story(story)
18
+ content.add_row(display, story, page: k.to_s)
19
+ end
20
+ end
21
+ end
22
+ pane.selection('enter', 'Open in Shortcut') do |story|
23
+ url = story['app_url']
24
+ `open #{url}`
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module Wassup
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/wassup.rb CHANGED
@@ -9,6 +9,11 @@ require "wassup/helpers/github"
9
9
  require "wassup/helpers/netlify"
10
10
  require "wassup/helpers/shortcut"
11
11
 
12
+ require "wassup/panes/circleci"
13
+ require "wassup/panes/github"
14
+ require "wassup/panes/netlify"
15
+ require "wassup/panes/shortcut"
16
+
12
17
  module Wassup
13
18
  class Error < StandardError; end
14
19
  # Your code goes here...
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wassup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Holtz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-28 00:00:00.000000000 Z
11
+ date: 2023-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses
@@ -77,6 +77,7 @@ files:
77
77
  - docs/src/pages/index.module.css
78
78
  - docs/src/pages/index.tsx
79
79
  - docs/src/pages/markdown-page.md
80
+ - docs/src/pages/showcase.md
80
81
  - docs/static/.nojekyll
81
82
  - docs/static/img/demo-supfile.png
82
83
  - docs/static/img/favicon.ico
@@ -108,6 +109,10 @@ files:
108
109
  - lib/wassup/helpers/shortcut.rb
109
110
  - lib/wassup/pane.rb
110
111
  - lib/wassup/pane_builder.rb
112
+ - lib/wassup/panes/circleci.rb
113
+ - lib/wassup/panes/github.rb
114
+ - lib/wassup/panes/netlify.rb
115
+ - lib/wassup/panes/shortcut.rb
111
116
  - lib/wassup/version.rb
112
117
  - wassup.gemspec
113
118
  homepage: https://github.com/joshdholtz/wassup
@@ -131,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
136
  - !ruby/object:Gem::Version
132
137
  version: '0'
133
138
  requirements: []
134
- rubygems_version: 3.2.3
139
+ rubygems_version: 3.2.33
135
140
  signing_key:
136
141
  specification_version: 4
137
142
  summary: A scriptable terminal dashboard