xkpassword 0.2.3 → 0.3.1

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: f84da1ad0dfef6ea960bb3e03d167ede3b3a45b1
4
- data.tar.gz: 838f02e3b6a4bb534c91bfe5fddee5168bf05d2a
3
+ metadata.gz: 061152ac2dd641996c2df1ca377370413353b013
4
+ data.tar.gz: c9fc70afd3939902c0e8fe2126e732ca883ac621
5
5
  SHA512:
6
- metadata.gz: 2fd8e2109dedce564cc2f5d254b4f9ac55da1b2aa2a385f6a2bfd1e2e349b5e75c191aab48e1f7bfb4da121c304087770d001eb68caf5f5832d30208f385ad25
7
- data.tar.gz: 8976003191ea7e0caa2170bb334e535c91568c275b3d3cfa338d7be1353c52c0229194a2ebefb1bb8dc358c16be640f504ad9dcf40a2a0b897a73dec67ca0fc5
6
+ metadata.gz: f78e99e873150aa39dfc2d7670ca31027c2fc088cf9155960b16b9671c8ea1341c9a79d1b8f821db0d1d53b5d30db3f161cff4aadc8bda7264a5b23cffa73dc3
7
+ data.tar.gz: d96badedc11caa4552814f2afe9523533e799e60512ebef9bc0cef495ed20566e2427c3d91714dc917f2d14111f2bb596ad4b85a0c1635a5a460fa92ddd7e8dd
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
7
+ - 2.3.1
8
+ before_install: gem install bundler
9
+ script: bundle exec rspec
10
+ addons:
11
+ code_climate:
12
+ repo_token: 1a754006a15f983b39ddc25c65543fab4a956a4ff607a636e135415c5350e4e0
data/README.md CHANGED
@@ -1,11 +1,37 @@
1
+ [![Gem Version](https://badge.fury.io/rb/xkpassword.svg)](https://badge.fury.io/rb/xkpassword)
2
+ [![Build Status](https://travis-ci.org/jdeen/xkpassword.svg?branch=master)](https://travis-ci.org/jdeen/xkpassword)
3
+ [![Inline docs](http://inch-ci.org/github/jdeen/xkpassword.svg?branch=master)](http://inch-ci.org/github/jdeen/xkpassword)
4
+ [![Code Climate](https://codeclimate.com/github/jdeen/xkpassword/badges/gpa.svg)](https://codeclimate.com/github/jdeen/xkpassword)
5
+
1
6
  # XKPassword
2
7
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/xkpassword`. To experiment with that code, run `bin/console` for an interactive prompt.
8
+ A password is a key for a lock. The more secure the lock, the more complicated the key would
9
+ be. The idea of locking things up is to keep them safe from unwanted parties accessing it
10
+ while you can still easily access it. But is it the case with most password generators? The
11
+ generated psswords are hard to remember and most of the time you your self are locked out
12
+ in times of need.
13
+
14
+ Bjoern Rennhak, the CTO of ClothesNetwork (now Graylon), Skyped me an interesting cartoon,
15
+ that mentioned about the security of passwords that contain just few words been stronger
16
+ than those strong passwords generated. I didn't believe it, but the math sure does add up.
17
+
18
+ Here is a lib that you can use to generate passwords in your Ruby applications or a
19
+ command line utility which you can use to generate passwords standalone.
20
+
21
+ While there are some more planned updates over the next few months, this is what I need for
22
+ my new blog. Thus I will pause development for a while and go back to make my website/blog.
23
+ If you do have any suggestions, I would be glad to hear. Make an issue and lets talk about
24
+ it.
4
25
 
5
- TODO: Delete this and the text above, and describe your gem
26
+ <p align="center">
27
+ <img src="https://imgs.xkcd.com/comics/password_strength.png"/>
28
+ </p>
6
29
 
7
30
  ## Installation
8
31
 
32
+ Developed in Linux/Ubuntu, this should work fine in a Linux machine. How ever I can't say
33
+ the same is true with Mac or Windows systems.
34
+
9
35
  Add this line to your application's Gemfile:
10
36
 
11
37
  ```ruby
@@ -14,11 +40,15 @@ gem 'xkpassword'
14
40
 
15
41
  And then execute:
16
42
 
17
- $ bundle
43
+ ```bash
44
+ ~# bundle
45
+ ```
18
46
 
19
47
  Or install it yourself as:
20
48
 
21
- $ gem install xkpassword
49
+ ```bash
50
+ ~# gem install xkpassword
51
+ ```
22
52
 
23
53
  ## Usage
24
54
 
@@ -38,7 +68,7 @@ full list of options.
38
68
  ### Ruby Apps
39
69
 
40
70
  ```ruby
41
- require 'xkpassword/generator'
71
+ require 'xkpassword'
42
72
 
43
73
  options = {
44
74
  max_length: 8,
@@ -69,15 +99,42 @@ generator.generate(options)
69
99
  # 10.times { generator.generate(options) }
70
100
  ```
71
101
 
102
+ ## The GEM
103
+
104
+ I run a policy of tagging any improvement done for the code base. For example, I just
105
+ bumped a minor (resulting 0.2.3 ~> 0.3.0) for adding Travis CI which doesn't change any
106
+ functional aspect of the app.
107
+
108
+ I am thinking of releasing gems only on functional updates (real code changes) that
109
+ happen with new features and bug fixes. So for now, there will be no 0.3.0v available
110
+ in Ruby GEMs and the latest would be 0.2.3.
111
+
72
112
  ## Development
73
113
 
74
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
114
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run
115
+ `bin/console` for an interactive prompt that will allow you to experiment.
116
+
117
+ To install this gem onto your local machine, run `bundle exec rake install`. To release
118
+ a new version, update the version number in `version.rb`, and then run `bundle exec rake
119
+ release`, which will create a git tag for the version, push git commits and tags, and push
120
+ the `.gem` file to [rubygems.org](https://rubygems.org).
121
+
122
+ ## TODO
123
+
124
+ Some of the things I am interested in doing in the near future.
75
125
 
76
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
126
+ - More tests, didn't have the time to write it all
127
+ - Local configuration file -> ex: `~/.xkpassword`
128
+ - Check for a better dictionary
129
+ - Ability to provide a dictionary (this should help languages other than English)
130
+ - A black-list - words that will not show up in the generation
77
131
 
78
132
  ## Contributing
79
133
 
80
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/xkpassword. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
134
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/xkpassword.
135
+ This project is intended to be a safe, welcoming space for collaboration, and contributors
136
+ are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
137
+ conduct.
81
138
 
82
139
 
83
140
  ## License
@@ -11,6 +11,6 @@ class XKPassword::Store
11
11
 
12
12
  def load_data
13
13
  path = "#{ File.dirname(__FILE__) }/data/#{ SOURCE }"
14
- @data = IO.readlines(path).map{ |item| item.gsub(/\n/, '') }
14
+ @data = IO.readlines(path).map{ |item| item.delete("\n") }
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module XKPassword
2
- VERSION = '0.2.3'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -43,7 +43,7 @@ class XKPassword::Words
43
43
  #
44
44
  # @return [Array<Integer>] A collection of lengths of words available
45
45
  def lengths
46
- words.keys.map{ |key| gsub(/l/, '').to_i }
46
+ words.keys.map{ |key| key.delete("l").to_i }
47
47
  end
48
48
 
49
49
  # The lenght of the shortest word
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xkpassword
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ziyan Junaideen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: artii
@@ -83,6 +83,7 @@ files:
83
83
  - ".rspec"
84
84
  - ".ruby-gemset"
85
85
  - ".ruby-version"
86
+ - ".travis.yml"
86
87
  - CODE_OF_CONDUCT.md
87
88
  - Gemfile
88
89
  - LICENSE.txt