rpl 0.15.0 → 0.15.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rpl +11 -1
  3. data/lib/rpl.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0a4aed82c8e9030283580a1fde21b69411b276457c6a9ef2a15453e2b44e8bc
4
- data.tar.gz: b7845f45fe45610384d47c0686215e1a6ebd1d93021fbafb2d152828e7fd38b1
3
+ metadata.gz: 936af4447e39381fe59aac32c442db5f16dfeac4aa656fa2f3d60a31f5814b3d
4
+ data.tar.gz: 4adf532c8185dc0083139af76243e63706a62d885fd6619c39667046bb45a53b
5
5
  SHA512:
6
- metadata.gz: 5aaef08241274f7b1118e884e34fefc400247756c026ff28e3e69ad2ed7eef59992448367cd2586d66baa723ccbfd7a8a3a881631da8cbc5801bf0540fa2cac6
7
- data.tar.gz: c597fd8a83e0eac4493cd5738c725b796e86715a89672a7a6db2a77fe149cea915b3c820c50edef551acfdfb1b4748431cdbd6cb35c1c717bfc9b934f4a2943c
6
+ metadata.gz: 44ace87f98a80156f3f7567fe30b48935c550b5481f64930717fb849673d171e4b6612d17ddde8c62564964cd9ba8cc13fc3b5e4e8418b10c2da8bdec4278d9f
7
+ data.tar.gz: 6493f90e472f0ed0b3afc6966b61adfe98f11116c3ecdae0e3a7606e7f27b8075a6f9e1060b9e65278aad368b3f5a6f2eff847129571f2164b45eab0daabc63b
data/bin/rpl CHANGED
@@ -85,7 +85,7 @@ def persistence_filename
85
85
  File.expand_path( "#{persistence_dir}/env.rpl" )
86
86
  end
87
87
 
88
- options = { run_REPL: ARGV.empty?,
88
+ options = { run_REPL: false,
89
89
  persistence: true,
90
90
  live_persistence: true,
91
91
  persistence_filename: persistence_filename,
@@ -128,8 +128,18 @@ OptionParser.new do |opts|
128
128
 
129
129
  options[:run_REPL] = true
130
130
  end
131
+
132
+ opts.on('-V', '--verbose "level"', 'set verbosity level') do |level|
133
+ options[:verbosity] = level.to_sym
134
+
135
+ warn "Setting verbosity to #{level.to_sym}" if options[:verbosity] == :debug
136
+ end
131
137
  end.parse!
132
138
 
139
+ options[:run_REPL] = options[:files].empty? && options[:programs].empty?
140
+
141
+ warn "Loading state #{options[:persistence_filename]}." if options[:verbosity] == :debug && !options[:persistence_filename].nil?
142
+
133
143
  # Instantiate interpreter
134
144
  interpreter = Rpl.new( persistence_filename: options[:persistence_filename],
135
145
  live_persistence: options[:live_persistence] )
data/lib/rpl.rb CHANGED
@@ -5,7 +5,7 @@ require 'rpl/types'
5
5
  require 'rpl/words'
6
6
 
7
7
  class Rpl < Interpreter
8
- VERSION = '0.15.0'
8
+ VERSION = '0.15.2'
9
9
 
10
10
  include Types
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gwenhael Le Moine