trecs 0.1.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: 1e93913cf8aa26ce05001353b89af69efb669077
4
- data.tar.gz: fe5e85d7bbb1f7ead37800b144eccc53f45db14c
3
+ metadata.gz: 809876261c49aa7e3438e2aa09c14b3050fa366b
4
+ data.tar.gz: a78011eebe829a75057a1c51e25c1a4a5793662e
5
5
  SHA512:
6
- metadata.gz: 6f8c55f1c7bbec1af949c5f0ba745e941ddb14fa28f687486f2c4cc6935127c1f32c1f514c29e15bd51f35ea0c0664f4c069264ed65288ec339cfb603b07fb5b
7
- data.tar.gz: c65961148fe73d74b266bd3afa60b1e08ab79babbc5b1b430063de859bc6cb54f623b85e17a5349deff08c0203022edd0dba7126df2141cd72f6965d7de64f8d
6
+ metadata.gz: 8cfdc387dd0f709649d26d4090a65d4524337a7a3819bd2132afdd67101c7f922313952b5bcc328bcb9607b540a6ec45fb40b3a7b35947bc88ac71cdf45f892e
7
+ data.tar.gz: 36394bfa8603542a1551bc18f5ec948aa4249eb27c144050741e2bae50a1ca11baab208a573342ebf17e9cbcbcc33cd58095ffd9ed8e697a427e527ac751c824
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trecs (0.1.5)
4
+ trecs (0.1.6)
5
5
  trollop (~> 2.0)
6
6
 
7
7
  GEM
@@ -7,14 +7,12 @@ module TRecs
7
7
  include ShellCommandStrategy
8
8
  attr_reader :message
9
9
  attr_reader :width
10
- attr_reader :command
11
10
 
12
11
  def initialize(options={})
13
12
  @message = options.fetch(:message)
14
13
  @width = options.fetch(:width) { 10 }
15
14
 
16
15
  @width = @message.size if @width < @message.size
17
-
18
16
  @command = options.fetch(:command) { nil }
19
17
  end
20
18
 
@@ -1,13 +1,16 @@
1
1
  require "recording_strategies/strategy"
2
+ require "recording_strategies/shell_command_strategy"
2
3
 
3
4
  module TRecs
4
5
  class IncrementalStrategy
5
6
  include Strategy
7
+ include ShellCommandStrategy
6
8
 
7
9
  attr_reader :message
8
10
 
9
11
  def initialize(options={})
10
12
  @message = options.fetch(:message)
13
+ @command = options.fetch(:command) { nil }
11
14
  end
12
15
 
13
16
  def perform
@@ -1,7 +1,9 @@
1
1
  module TRecs
2
2
  module ShellCommandStrategy
3
+ attr_reader :command
4
+
3
5
  def current_content(str)
4
- if command
6
+ if self.command
5
7
  comm_array = command.split(" ")
6
8
  str = IO.popen([*comm_array, "#{str}"]).read
7
9
  end
data/lib/trecs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TRecs
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti