rubyn 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16ab57a500ce5c84a9b0b365492f000f5abb7e2e7e692b111aea9af8d003a811
4
- data.tar.gz: 623e6e54abcd15c518a51185360dd1dc15aac752d744071590f55dfc8579f103
3
+ metadata.gz: 36a16de7cb6802b6a29f1a5ac6f4b6688cd5761c5ac9d3cf90986842885f3e26
4
+ data.tar.gz: de2d885c2cd2ba5828817b4242de06b5c05296aa264546e017d3fdf06c9e9bac
5
5
  SHA512:
6
- metadata.gz: 12b03663f2ec51a1d750e42fa378ddc544f1e4e0548686921df2e9680aea698313fbe5de8e117fe22f58d3feeb68e0b7a8b2d468c8026bf6477f1a36ee5c2810
7
- data.tar.gz: '00826e6c27136e1d50638008975c9afaf942458885e1587c8b627df0e6b0f04a3e0a9d9185d1de31a6a054d523ffb92847a15c279ac0edbd6a406c6fe092fab0'
6
+ metadata.gz: 0cdc367ce9ff58c530f3c6fcb5ddacddcc0e7af44763258e62c4226f5531fe5b8d5b8608fa305800be01a2397241c9191e83c31f75114589a3d814da68337c3d
7
+ data.tar.gz: 504ae8345f735d6476576f40b16d84cb5959e3732f29c7a145a06f0c5ae7b665abd3a25bd6d13c3513c8eec31d9caad3272510b155b7508ca23be6b530b02019
@@ -297,20 +297,22 @@
297
297
  var fileChanges = codeBlocks.map(function(code, i) {
298
298
  var header = fileHeaders[i];
299
299
  var path = (header && header.path) ? header.path : file;
300
- var isNew = header && header.tag === "new";
300
+ var tag = header ? header.tag : null;
301
301
  return {
302
302
  path: path,
303
- isNew: isNew,
303
+ tag: tag,
304
304
  code: code
305
305
  };
306
306
  });
307
307
 
308
- // Show each code block with its file path and NEW badge if applicable
308
+ // Show each code block with its file path and tag badge
309
309
  fileChanges.forEach(function(change, i) {
310
310
  html += '<div class="rubyn-code-block">';
311
311
  html += '<div class="rubyn-code-block-header">';
312
- if (change.isNew) {
312
+ if (change.tag === "new") {
313
313
  html += '<span class="rubyn-file-tag rubyn-tag-new">NEW</span>';
314
+ } else if (change.tag === "updated" || change.tag === "modified") {
315
+ html += '<span class="rubyn-file-tag rubyn-tag-updated">UPDATED</span>';
314
316
  }
315
317
  html += '<span class="rubyn-tool-filepath">' + escapeHtml(change.path) + '</span>';
316
318
  html += '<div class="rubyn-code-block-actions">';
@@ -735,6 +735,11 @@ body {
735
735
  color: var(--rubyn-success);
736
736
  }
737
737
 
738
+ .rubyn-tag-updated {
739
+ background: var(--rubyn-primary-soft);
740
+ color: var(--rubyn-primary);
741
+ }
742
+
738
743
 
739
744
  .rubyn-code-block .rubyn-tool-output {
740
745
  margin: 0;
data/lib/rubyn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubyn
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - matthewsuttles