polypass 1.0.0

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.
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'polypass'
4
+
5
+ describe Polypass::NaturalLanguage do
6
+ before :all do
7
+ @polypass_natural = Polypass::NaturalLanguage.new
8
+ end
9
+
10
+ it 'is a Polypass::NaturalLanguage object' do
11
+ expect(@polypass_natural).to be_kind_of(Polypass::NaturalLanguage)
12
+ end
13
+
14
+ it 'should respond to 2 arguments when initialized' do
15
+ expect(Polypass).to respond_to(:new).with(2).arguments
16
+ end
17
+
18
+ describe '#length' do
19
+ it 'returns the length of the generated password as Integer class object' do
20
+ expect(@polypass_natural.length).to be_kind_of(Integer).and eq(32)
21
+ end
22
+ end
23
+
24
+ describe '#output_type' do
25
+ it 'returns the output type for generated passwords as a String class object' do
26
+ expect(@polypass_natural.output_type).to be_kind_of(String).and eq('stdout')
27
+ end
28
+ end
29
+
30
+ describe '#language_data' do
31
+ it 'returns paths of language data files as an Array' do
32
+ expect(@polypass_natural.language_data).to be_kind_of(Array)
33
+ end
34
+ end
35
+
36
+ describe '.init_language_randomizer' do
37
+ it 'initializes and returns a LiterateRandomizer class object' do
38
+ language_randomizer = @polypass_natural.init_language_randomizer
39
+ expect(language_randomizer).to be_a_kind_of(LiterateRandomizer::Randomizer)
40
+ end
41
+ end
42
+
43
+ describe '.create' do
44
+ context 'stdout output type' do
45
+ it 'returns a secure random natural language password as a String class object' do
46
+ expect(@polypass_natural.create).to be_kind_of(String)
47
+ end
48
+ end
49
+
50
+ context 'json output type' do
51
+ it 'returns a secure random natural language password as a JSON formatted String class object' do
52
+ expect(Polypass::NaturalLanguage.new(32, 'json').create).to be_kind_of(String)
53
+ end
54
+ end
55
+
56
+ context 'yaml output type' do
57
+ it 'returns a secure random natural language password as a YAML formatted String class object' do
58
+ expect(Polypass::NaturalLanguage.new(32, 'yaml').create).to be_kind_of(String)
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'polypass'
4
+
5
+ describe Polypass do
6
+ before :all do
7
+ @polypass = Polypass.new
8
+ end
9
+
10
+ it 'is a Polypass object' do
11
+ expect(@polypass).to be_kind_of(Polypass)
12
+ end
13
+
14
+ it 'should respond to 2 arguments when initialized' do
15
+ expect(Polypass).to respond_to(:new).with(2).arguments
16
+ end
17
+
18
+ describe '#length' do
19
+ it 'returns the length of the generated password as Integer class object' do
20
+ expect(@polypass.length).to be_kind_of(Integer).and eq(32)
21
+ end
22
+ end
23
+
24
+ describe '#output_type' do
25
+ it 'returns the output type for generated passwords as a String class object' do
26
+ expect(@polypass.output_type).to be_kind_of(String).and eq('stdout')
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'polypass/version'
4
+
5
+ describe 'Polypass::Version' do
6
+ it 'returns the RubyGem version of Polypass as a string' do
7
+ expect(Polypass::VERSION).to be_a_kind_of(String)
8
+ end
9
+ end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'simplecov'
4
+
5
+ # This file was generated by the `rspec --init` command. Conventionally, all
6
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
7
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
8
+ # this file to always be loaded, without a need to explicitly require it in any
9
+ # files.
10
+ #
11
+ # Given that it is always loaded, you are encouraged to keep this file as
12
+ # light-weight as possible. Requiring heavyweight dependencies from this file
13
+ # will add to the boot time of your test suite on EVERY test run, even for an
14
+ # individual file that may not need all of that loaded. Instead, consider making
15
+ # a separate helper file that requires the additional dependencies and performs
16
+ # the additional setup, and require it from the spec files that actually need
17
+ # it.
18
+ #
19
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
20
+ RSpec.configure do |config|
21
+ # rspec-expectations config goes here. You can use an alternate
22
+ # assertion/expectation library such as wrong or the stdlib/minitest
23
+ # assertions if you prefer.
24
+ config.expect_with :rspec do |expectations|
25
+ # This option will default to `true` in RSpec 4. It makes the `description`
26
+ # and `failure_message` of custom matchers include text for helper methods
27
+ # defined using `chain`, e.g.:
28
+ # be_bigger_than(2).and_smaller_than(4).description
29
+ # # => "be bigger than 2 and smaller than 4"
30
+ # ...rather than:
31
+ # # => "be bigger than 2"
32
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
33
+ end
34
+
35
+ # rspec-mocks config goes here. You can use an alternate test double
36
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
37
+ config.mock_with :rspec do |mocks|
38
+ # Prevents you from mocking or stubbing a method that does not exist on
39
+ # a real object. This is generally recommended, and will default to
40
+ # `true` in RSpec 4.
41
+ mocks.verify_partial_doubles = true
42
+ end
43
+
44
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
45
+ # have no way to turn it off -- the option exists only for backwards
46
+ # compatibility in RSpec 3). It causes shared context metadata to be
47
+ # inherited by the metadata hash of host groups and examples, rather than
48
+ # triggering implicit auto-inclusion in groups with matching metadata.
49
+ config.shared_context_metadata_behavior = :apply_to_host_groups
50
+
51
+ # Many RSpec users commonly either run the entire suite or an individual
52
+ # file, and it's useful to allow more verbose output when running an
53
+ # individual spec file.
54
+ if config.files_to_run.one?
55
+ # Use the documentation formatter for detailed output,
56
+ # unless a formatter has already been configured
57
+ # (e.g. via a command-line flag).
58
+ config.default_formatter = 'doc'
59
+ end
60
+
61
+ # This setting enables warnings. It's recommended, but in some cases may
62
+ # be too noisy due to issues in dependencies.
63
+ config.warnings = true
64
+
65
+ # Print the 10 slowest examples and example groups at the
66
+ # end of the spec run, to help surface which specs are running
67
+ # particularly slow.
68
+ config.profile_examples = 10
69
+
70
+ # Run specs in random order to surface order dependencies. If you find an
71
+ # order dependency and want to debug it, you can fix the order by providing
72
+ # the seed, which is printed after each run.
73
+ # --seed 1234
74
+ # config.order = :random
75
+
76
+ # Seed global randomization in this process using the `--seed` CLI option.
77
+ # Setting this allows you to use `--seed` to deterministically reproduce
78
+ # test failures related to randomization by passing the same `--seed` value
79
+ # as the one that triggered the failure.
80
+ Kernel.srand config.seed
81
+ end
metadata ADDED
@@ -0,0 +1,184 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: polypass
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Shane R. Sofos
8
+ autorequire:
9
+ bindir:
10
+ - bin
11
+ cert_chain: []
12
+ date: 2018-07-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: literate_randomizer
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: thor
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: bundler
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rake
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rspec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rubocop
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "<="
89
+ - !ruby/object:Gem::Version
90
+ version: 0.56.0
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "<="
96
+ - !ruby/object:Gem::Version
97
+ version: 0.56.0
98
+ - !ruby/object:Gem::Dependency
99
+ name: simplecov
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ description: The polymorphous password generator.
113
+ email:
114
+ - ssofos@gmail.com
115
+ executables:
116
+ - polypass
117
+ extensions: []
118
+ extra_rdoc_files: []
119
+ files:
120
+ - ".gitignore"
121
+ - ".gitlab-ci.yml"
122
+ - ".rspec"
123
+ - ".rubocop.yml"
124
+ - ".simplecov"
125
+ - Gemfile
126
+ - Gemfile.lock
127
+ - LICENSE
128
+ - README.md
129
+ - Rakefile
130
+ - bin/polypass
131
+ - data/dracula_by_bram_stoker.txt
132
+ - data/frankenstein_by_mary_wollstonecraft_godwin_shelley.txt
133
+ - data/the_adventures_of_sherlock_dolmes_by_arthur_conan_doyle.txt
134
+ - data/the_iliad_of_homer_by_homer.txt
135
+ - lib/polypass.rb
136
+ - lib/polypass/alpha_numeric.rb
137
+ - lib/polypass/alpha_symbol.rb
138
+ - lib/polypass/cli.rb
139
+ - lib/polypass/helpers.rb
140
+ - lib/polypass/natural_language.rb
141
+ - lib/polypass/version.rb
142
+ - polypass.gemspec
143
+ - spec/polypass_alpha_numeric_spec.rb
144
+ - spec/polypass_alpha_symbol_spec.rb
145
+ - spec/polypass_helpers_spec.rb
146
+ - spec/polypass_natural_language_spec.rb
147
+ - spec/polypass_spec.rb
148
+ - spec/polypass_version_spec.rb
149
+ - spec/spec_helper.rb
150
+ homepage: https://shanesofos.com/projects/polypass
151
+ licenses:
152
+ - GPL-3.0
153
+ metadata:
154
+ source_code_uri: https://gitlab.com/ssofos/polypass
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: 2.4.0
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 2.6.14
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: A simple multitool that can generate different types of passwords including
175
+ secure random, alphanumeric, natural language, and custom, salt, hash, and output
176
+ them in different formats for personal and application consumption.
177
+ test_files:
178
+ - spec/polypass_alpha_numeric_spec.rb
179
+ - spec/polypass_alpha_symbol_spec.rb
180
+ - spec/polypass_helpers_spec.rb
181
+ - spec/polypass_natural_language_spec.rb
182
+ - spec/polypass_spec.rb
183
+ - spec/polypass_version_spec.rb
184
+ - spec/spec_helper.rb