cryptograms 0.1.2 → 0.3.0

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
  SHA1:
3
- metadata.gz: 1af4eafc9cb579862e3b56f687fad766b44d4851
4
- data.tar.gz: ac46573d22243a28083089cdc84333548692fdfc
3
+ metadata.gz: c50d907c170614385fe71ade3d6f3b15d69568c3
4
+ data.tar.gz: 5047ebbcf6c498f9dbdedd32fa6d9b7846e9f2bd
5
5
  SHA512:
6
- metadata.gz: 9f034a8c1a20742596dfeeca65fc1ce3d000afd688eab0b1a5e6e3e2272ec693d9ec7a6a148bfc5861ddc7f8bd57a381111e34278dce5aba1726584e9b08c859
7
- data.tar.gz: e56d92e08ac044158e6b9b0da033844733b3c261d28b715ab2c3831be8290a1a0cec261a472c64a518c7c5f205a5a762143621de65f0824268ee2fc672338f2c
6
+ metadata.gz: 524b2af48d9081c1e2cd0cbd1a28775cb51f6b16b86a5d210fbc74e64771010d5029e332a7722ac65ad4210cc635c27c5f225d0466ffe958ddf0ee8e33ac9c5c
7
+ data.tar.gz: b11438455f54a7ad9a1944cd901f9e08560c4b6c95d7905fa4f7235151e5f07016c8a946037fd4ea1a9be0a9367c511c14b877c5c96b603b4f195d9287c84bc0
data/AUTHORS CHANGED
@@ -1,6 +1,6 @@
1
1
  cryptograms: generate cryptograms using a pseudo-random letter
2
2
  subtitution cypher
3
- Copyright (C) 2015 Todd A. Jacobs
3
+ Copyright (C) 2015, 2016 Todd A. Jacobs
4
4
 
5
5
  This program is free software: you can redistribute it and/or modify
6
6
  it under the terms of the GNU General Public License as published by
data/bin/cryptogram CHANGED
@@ -4,9 +4,21 @@ require_relative '../lib/cryptograms'
4
4
 
5
5
  notices = [
6
6
  "Cryptograms v#{Cryptograms::VERSION}",
7
- 'Copyright © 2015 Todd A. Jacobs',
7
+ 'Copyright © 2015, 2016 Todd A. Jacobs',
8
8
  'This program is licensed under GPLv3 or later.',
9
9
  ]
10
10
  warn "#{notices.join ?\n}\n\n"
11
11
 
12
- puts Cryptogram.new(ARGV.join ' ').cyphertext
12
+ # Get plaintext from files, standard input, or command-line arguments,
13
+ # in that order.
14
+ case
15
+ when ARGV[0] =~ /-h|--help/
16
+ cmd = File.basename $0
17
+ msg = "Usage:\n\t#{cmd} -h\n\t#{cmd} <file>\n\t#{cmd} <string ...>"
18
+ STDERR.puts msg
19
+ exit 2
20
+ else
21
+ plaintext = ARGF.read
22
+ printf "%s\n", plaintext
23
+ puts Cryptogram.new(plaintext).cyphertext
24
+ end
data/cryptograms.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ['lib']
28
28
 
29
- spec.add_development_dependency 'bundler', '~> 1.9'
30
- spec.add_development_dependency 'rake', '~> 10.4'
31
- spec.add_development_dependency 'rspec', '~> 3.2'
29
+ spec.add_development_dependency 'bundler', '>= 1.10.6'
30
+ spec.add_development_dependency 'rake', '>= 10.4.2'
31
+ spec.add_development_dependency 'rspec', '>= 3.3.2'
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module Cryptograms
2
- VERSION = "0.1.2"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptograms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd A. Jacobs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-13 00:00:00.000000000 Z
11
+ date: 2016-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: 1.10.6
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.9'
26
+ version: 1.10.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.4'
33
+ version: 10.4.2
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.4'
40
+ version: 10.4.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.2'
47
+ version: 3.3.2
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.2'
54
+ version: 3.3.2
55
55
  description: Generate cryptograms using a pseudo-random letter subtitution cypher.
56
56
  email:
57
57
  - codegnome@address-is.invalid
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 2.4.5
90
+ rubygems_version: 2.6.6
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Create cryptogram puzzles.