living_document 1.0.0 → 1.1.1

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: 5333d18700fb6f434f873c15fddd87f2e91fd811efe23125ae017022f84f35dc
4
- data.tar.gz: 8c181f2f67c7dd4b9f08284c87a65d04e371c757362aa366518f1bbcdeec1b70
3
+ metadata.gz: e1575cf0f21419a5e6faec89859bfc797111070732e7991e34f400001b79a0b2
4
+ data.tar.gz: 185a833e86c00407ea837c64ce56ded537f7d585942dc74c1e3b71a027c2f2e4
5
5
  SHA512:
6
- metadata.gz: 7bdd09efd21f2166bbb240ac8a7ac6899279c180e9a23202caea1114ef02f776bfe3a9dece7ecbbd1897e9b07522493bf813b41afa0ec68fc593841613d7a2a3
7
- data.tar.gz: eebf8135e7cab06726572129aa3db97e89a3d7183ac6cf543b10b1ff3e3df685e2159fb404cb5610994d7ebdf1de16953096984d92030c78fbc54af3eb2ee9c4
6
+ metadata.gz: 2d30cd635cd5c44508b8e994989605aa7169f17ee55ee7b9f716bf0fc9d92451ddc410710bb26453f9372190ca178f039b938a94cd3c871ccc5fd0c01d0bf6bd
7
+ data.tar.gz: 2bf116d1dae3ba2bec8b999d2944df8f521eb29fcf49d189fecf797963470129fca86acc21e4f39fe7badfa5dd535da20f392bd0fc1267668b326875b65defeb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v1.1.1 (2025-01-30)
2
+ - Fix exception when evaluating an empty target file. https://github.com/davidrunger/living_document/pull/608
3
+
4
+ ## v1.1.0 (2025-01-29)
5
+ - Support `-h`/`--help` and `-v`/`--version` CLI flags.
6
+
1
7
  ## v1.0.0 (2025-01-29)
2
8
  - **BREAKING:** Remove web server functionality.
3
9
  - **BREAKING:** Freeze time with `timecop` when executing code.
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- living_document (1.0.0)
12
+ living_document (1.1.1)
13
13
  activesupport (>= 6)
14
14
  listen (>= 3.2)
15
15
  memo_wise (>= 1.7)
@@ -128,7 +128,7 @@ GEM
128
128
  rubocop-rake (0.6.0)
129
129
  rubocop (~> 1.0)
130
130
  ruby-progressbar (1.13.0)
131
- runger_release_assistant (0.14.0)
131
+ runger_release_assistant (1.0.0)
132
132
  activesupport (>= 6)
133
133
  memo_wise (>= 1.7)
134
134
  rainbow (>= 3.0)
@@ -217,7 +217,7 @@ CHECKSUMS
217
217
  json (2.9.1) sha256=d2bdef4644052fad91c1785d48263756fe32fcac08b96a20bb15840e96550d11
218
218
  language_server-protocol (3.17.0.4) sha256=c484626478664fd13482d8180947c50a8590484b1258b99b7aedb3b69df89669
219
219
  listen (3.9.0) sha256=db9e4424e0e5834480385197c139cb6b0ae0ef28cc13310cfd1ca78377d59c67
220
- living_document (1.0.0)
220
+ living_document (1.1.1)
221
221
  logger (1.6.5) sha256=c3cfe56d01656490ddd103d38b8993d73d86296adebc5f58cefc9ec03741e56b
222
222
  memo_wise (1.10.0) sha256=ae40ff8e7799697ff5d59d739b8766f76be22eba69c7c8468edb42ab83c94c3f
223
223
  method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
@@ -249,7 +249,7 @@ CHECKSUMS
249
249
  rubocop-performance (1.23.1) sha256=f22f86a795f5e6a6180aac2c6fc172534b173a068d6ed3396d6460523e051b82
250
250
  rubocop-rake (0.6.0) sha256=56b6f22189af4b33d4f4e490a555c09f1281b02f4d48c3a61f6e8fe5f401d8db
251
251
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
252
- runger_release_assistant (0.14.0) sha256=7abc5eb1e0f63d8d611691bc21698d2b3b8f148a5f47cacd8dd32c21d16ee9be
252
+ runger_release_assistant (1.0.0) sha256=03b7a57db1907765a443d321ad1805705067012046f78f87e18260a379565286
253
253
  runger_style (4.2.2) sha256=23bb4c2b8875d79113f72179a7e4ad96bd5ecde8d7a54bd18f4e60c2ab65dd64
254
254
  securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
255
255
  simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
data/exe/livdoc CHANGED
@@ -3,9 +3,17 @@
3
3
  # frozen_string_literal: true
4
4
 
5
5
  require 'listen'
6
+ require 'optparse'
6
7
 
7
8
  require_relative '../lib/living_document.rb'
8
9
 
10
+ parser = OptionParser.new
11
+ parser.on('-v', '--version', 'Print the version') do
12
+ puts(LivingDocument::VERSION)
13
+ exit(0)
14
+ end
15
+ parser.parse!
16
+
9
17
  # rubocop:disable Style/TopLevelMethodDefinition
10
18
  def evaluate_code_and_update_source_file(file_path)
11
19
  puts('Running code...')
@@ -70,7 +70,9 @@ class LivingDocument::CodeEvaluator
70
70
  end
71
71
 
72
72
  def restore_original_stdout
73
- $stdout = @original_stdout
73
+ if @original_stdout.present?
74
+ $stdout = @original_stdout
75
+ end
74
76
  end
75
77
 
76
78
  def code_segments_to_eval(current_index)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LivingDocument
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: living_document
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger