phraser 0.1.0 → 0.1.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: 47d3b4f15fe1f6e4a563d9553f24c12d0564b6b5
4
- data.tar.gz: d5e0153471471f551df639155d1b8cf664379b73
3
+ metadata.gz: 522719da67afc029bc104b623515b5662a8d624c
4
+ data.tar.gz: 727b82949406c6dbec53365c234be49b9af86654
5
5
  SHA512:
6
- metadata.gz: ecb6cfe7015a7a3c1ef62bb98a5555988cb4ab206755ef42ee2ddd7a0e10655f6d91aa3ffaea5e0bb95db45dfd9df9138c700c9be65d63f488aa1f288516d69b
7
- data.tar.gz: 2a2ffb52fe8b0a3d59a03bf12661108d8a0c61e1640700af168ad365a64f0d4aa5000014313cf468b470c41cae9ad84ad1a1d53533bc47dcf9fd2bfdf9dbdcb9
6
+ metadata.gz: d32ee2d2595cb777f6fdb1431586ff1c5d593a08ebb7eafc3b13d125ea2960de32e87e7445dc08479b2960ec46970e348b20d6f493cedd07300b980d534ced2a
7
+ data.tar.gz: 693a013093a9b4271235bc254583c9474e603572eca90c433340cd3774d8228832d0db62e138b80f43042a874c2136ee3d87bcb97b072483b15fc74ba88e8376
@@ -1,4 +1,8 @@
1
1
  Metrics/LineLength:
2
2
  Max: 120
3
3
  Metrics/BlockLength:
4
- ExcludedMethods: ['describe', 'context']
4
+ ExcludedMethods: ['describe', 'context']
5
+ Metrics/MethodLength:
6
+ Enabled: false
7
+ Metrics/ModuleLength:
8
+ Enabled: false
data/README.md CHANGED
@@ -20,22 +20,40 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- Generate array of strings:
24
- ``` ruby
25
- TokenPhrase.generate([prefix: proc{}, postfix: proc{}])
26
- > ['red', 'massive', 'elephant']
23
+ Full
24
+ ```ruby
25
+ Phraser.generate(prefix: proc{ Time.now.to_i }, postfix: "the-end")
26
+ Phraser.generate_string(separator: '*', prefix: proc{ Time.now.to_i }, postfix: "the-end")
27
27
  ```
28
28
 
29
- Generate completely string:
30
- ```
31
- TokenPhrase.generate_string([separator: '-', prefix: proc{}, postfix: proc{}])
32
- > "1792123-red-massive-elephant-68912223"
29
+ All parameters are optional (just use named arguments):
30
+
31
+ - `separator` is "-" by default but if you would like a different separator, just pass a string
32
+ - `prefix` String or Proc going to be 1st element in the resulted array or string
33
+ - `postfix` String or Proc will be last element in the resulted array or string
34
+
35
+ ### Examples
36
+
37
+ Generate array:
38
+ ```ruby
39
+ Phraser.generate
40
+ > ["marked", "purple", "joke", "on", "presence"]
33
41
  ```
42
+
43
+ Generate string:
44
+ ```ruby
45
+ Phraser.generate_string
46
+ > 'convinced-brown-hop-at-South"
34
47
  ```
35
- prefix = proc{ 'begin' }
36
- postfix = proc{ 'end' }
37
- TokenPhrase.generate_string(prefix: prefix, postfix: postfix)
38
- > "begin-red-massive-elephant-end"
48
+
49
+ Different separator, prefix is Timestamp and 'the-end' string added to the end of the string
50
+ ```ruby
51
+ separator = '*'
52
+ prefix = proc{ Time.now.to_i }
53
+ postfix = "the-end"
54
+ Phraser.generate_string(separator: separator, prefix: prefix, postfix: postfix)
55
+ > "1496842603*red*massive*elephant*the-end"
56
+
39
57
  ```
40
58
 
41
59
  ## Development
@@ -54,6 +72,6 @@ The gem is available as open source under the terms of the [MIT License](http://
54
72
 
55
73
  ## Code of Conduct
56
74
 
57
- Everyone interacting in the Phraser project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/phraser/blob/master/CODE_OF_CONDUCT.md).
75
+ Everyone interacting in the Phraser project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mpakus/phraser/blob/master/CODE_OF_CONDUCT.md).
58
76
 
59
77
  [![CircleCI](https://circleci.com/gh/mpakus/phraser.svg?style=svg)](https://circleci.com/gh/mpakus/phraser)
@@ -1,3 +1,3 @@
1
1
  module Phraser
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.authors = ['Renat Ibragimov']
11
11
  spec.email = ['mrak69@gmail.com']
12
12
 
13
- spec.summary = 'Generate random phrases'
13
+ spec.summary = 'Generate random phrases and tokens'
14
14
  spec.description = 'Phraser is a gem that generates unique phrases to use in your app as password, url and tokens'
15
15
  spec.homepage = 'https://github.com/mpakus/phraser'
16
16
  spec.license = 'MIT'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phraser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renat Ibragimov
@@ -126,5 +126,5 @@ rubyforge_project:
126
126
  rubygems_version: 2.6.10
127
127
  signing_key:
128
128
  specification_version: 4
129
- summary: Generate random phrases
129
+ summary: Generate random phrases and tokens
130
130
  test_files: []