ciphr 0.0.4 → 0.0.5

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
- SHA1:
3
- metadata.gz: 3739e940ec95b6f2491aeeaa2df9eeaeb10d72b9
4
- data.tar.gz: b0f74a2f82bea484f3c6c046dd998b9480f512fb
2
+ SHA256:
3
+ metadata.gz: 3ad8f17a05b80cd9af32769ffd60aa306fdc60990bda0ebfdae59e2ff603aa3f
4
+ data.tar.gz: 832eb5953d4fdcaee8dc09b930f0cecf98aa1abd4dc8e616edaae338164bec01
5
5
  SHA512:
6
- metadata.gz: cdde2c8bacdeee0102e77212697146da9d6a2d6e1716126524bf0318d3b19a2ec96fea0da5b1c3a5b1f8fac1a77b670d0a509556fa065d559546efddf66ddb8c
7
- data.tar.gz: 87b67823568ba5d67f999c72d753d96ae9dbbabd43b2412e2265f710dee5fb2043eab82c5091cf8dfbee58a1723979a0cb3ec3a97c1929e5a50e2405b859af17
6
+ metadata.gz: f2d980444dcf5e56e2efd25ed27d292340962f797775b5709d2f4adf198b795d86f933efc56e98b39b373c124fe9ed84502377b229ace0cc0fef18f6b891416c
7
+ data.tar.gz: ad142531ff5fc5bcde02833cbafce630bd4346d57d0e3464a6ea527e4fb3912d04d1f79617a229f43538f26ebdcc657cb1e3e3c4950136f7b496bf899e1ede97
data/Gemfile CHANGED
File without changes
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ciphr (0.0.4)
4
+ ciphr (0.0.5)
5
5
  base32 (~> 0.3.2)
6
6
  parslet (~> 1.5.0)
7
7
  slop (~> 3.6.0)
@@ -40,4 +40,4 @@ DEPENDENCIES
40
40
  rspec (~> 3.4.0)
41
41
 
42
42
  BUNDLED WITH
43
- 1.15.4
43
+ 1.16.2
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/TODO CHANGED
File without changes
data/bin/ciphr CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'ciphr'
4
+ require 'readline'
4
5
  require 'slop'
5
6
 
6
7
  Slop.parse do
@@ -8,6 +9,7 @@ Slop.parse do
8
9
  on :h, :help
9
10
  on :v, :verbose
10
11
  on :n, :'no-newline'
12
+ on :r, :'repl'
11
13
  on :N, :'newline'
12
14
  on :x, :'xargs-mode'
13
15
  on :'0', :null
@@ -23,6 +25,23 @@ Slop.parse do
23
25
  puts " #{v[0].map{|v|v.to_s}.join(", ")} (#{c.params.map{|p| p.to_s}.join(", ")})"
24
26
  }
25
27
  end
28
+ elsif opts[:repl] # REPL mode
29
+ begin
30
+ while input = Readline.readline("ciphr> ", true).strip
31
+ if input && !input.empty?
32
+ break if input == "exit"
33
+ parsed = Ciphr::Parser.new.parse(input)
34
+ transformed = Ciphr::Transformer.new($stdin).apply(parsed)
35
+ while (chunk = transformed.read(256)) && ! $stdout.closed?
36
+ $stdout.print(chunk)
37
+ end
38
+ puts
39
+ end
40
+ end
41
+ rescue Errno::EPIPE, Interrupt
42
+ puts
43
+ exit
44
+ end
26
45
  else
27
46
  newline = opts[:newline] || opts[:'xargs-mode'] || STDOUT.tty? && ! opts[:'no-newline']
28
47
  spec = args.join(" ")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
- module Ciphr
2
- VERSION = "0.0.4"
3
- end
1
+ module Ciphr
2
+ VERSION = "0.0.5"
3
+ end
Binary file
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ciphr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Frohoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-01 00:00:00.000000000 Z
11
+ date: 2018-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -134,7 +134,8 @@ files:
134
134
  - lib/ciphr/parser.rb
135
135
  - lib/ciphr/stream.rb
136
136
  - lib/ciphr/version.rb
137
- - pkg/ciphr-0.0.3.gem
137
+ - pkg/ciphr-0.0.4.gem
138
+ - pkg/ciphr-0.0.5.gem
138
139
  - spec/ciphr_spec.rb
139
140
  - spec/functions_spec.rb
140
141
  - spec/randomizer_spec.rb
@@ -170,15 +171,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
171
  version: '0'
171
172
  requirements: []
172
173
  rubyforge_project:
173
- rubygems_version: 2.5.2
174
+ rubygems_version: 2.7.7
174
175
  signing_key:
175
176
  specification_version: 4
176
177
  summary: a CLI tool for performing and composing encoding, decoding, encryption, decryption,
177
178
  hashing, and other various operations on streams of data from the command line;
178
179
  mostly intended for infosec uses.
179
180
  test_files:
180
- - spec/ciphr_spec.rb
181
+ - spec/stream_spec.rb
181
182
  - spec/functions_spec.rb
183
+ - spec/ciphr_spec.rb
182
184
  - spec/randomizer_spec.rb
183
185
  - spec/spec_helper.rb
184
- - spec/stream_spec.rb
Binary file