ipynbdiff 0.3.2 → 0.3.3

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: e457c9e3908f4ebdf452ec01428e71ca866730a6e36d4af344cb3e703fe989cc
4
- data.tar.gz: 4d12d8975526ad09c6f890af1283c7586773fbd8b2a43abda7d65772ac472818
3
+ metadata.gz: 80e13b121205b2811ffb5d508e0978284562ced1b359156530b32ec2e10de6d4
4
+ data.tar.gz: 9a64f732b7e2ca0143bab893eb8e7713761f533d79798935d137d88d58f401e6
5
5
  SHA512:
6
- metadata.gz: 3da474c1bad0797b392f51cb33692216d2326822b8654a507849c05d52d4631799c88ccbcd92bc8df1b01f72352b8031e782384f605c9d0abf07dcce9dd4a176
7
- data.tar.gz: ba36b69389d265d8ebd327a66d081688f242614938f51b0c3d644a07502aef1854ebb4804b20572ab9d81c64a7a45c4844b1bba6889ace7988ac85e95130a72d
6
+ metadata.gz: 27f12477595add7a90f8f8d3ebf3b46b32ae24ec5c25a9417b03ff52d0be47ca68db501a2feca3337a0e8cf8ccee257cceccb7b9cbbf6716680641fb00a6a7f7
7
+ data.tar.gz: b1c3cd5e12a5f949be5e14c1dd2b69b93304b4b507787c91f8d7cc383855bcf52dabf2edbfe4a67e4410e20d575686f71dbfe5d2b7b4853678acf978555c4cd4
data/ipynbdiff.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ipynbdiff'
5
- s.version = '0.3.2'
5
+ s.version = '0.3.3'
6
6
  s.summary = 'Human Readable diffs for Jupyter Notebooks'
7
7
  s.description = 'Better diff for Jupyter Notebooks by first preprocessing them and removing clutter'
8
8
  s.authors = ['Eduardo Bonet']
data/lib/transformer.rb CHANGED
@@ -18,7 +18,7 @@ module IpynbDiff
18
18
  end
19
19
 
20
20
  def self.transform_code_cell(cell, notebook)
21
- tags = cell['metadata'].fetch('tags', []).join(' ')
21
+ tags = cell['metadata']&.fetch('tags', [])&.join(' ') || ''
22
22
 
23
23
  [
24
24
  %(<div class="cell code" data-id="#{cell['id']}" data-tags="#{tags}">\n\n),
@@ -76,7 +76,7 @@ module IpynbDiff
76
76
  end
77
77
 
78
78
  def self.transform_text_cell(cell)
79
- tags = cell['metadata'].fetch('tags', []).join(' ')
79
+ tags = cell['metadata']&.fetch('tags', [])&.join(' ') || ''
80
80
  id = cell['id']
81
81
  cell_type = cell['cell_type']
82
82
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ipynbdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Bonet