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 +4 -4
- data/.rubocop.yml +5 -1
- data/README.md +31 -13
- data/lib/phraser/version.rb +1 -1
- data/phraser.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 522719da67afc029bc104b623515b5662a8d624c
|
4
|
+
data.tar.gz: 727b82949406c6dbec53365c234be49b9af86654
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d32ee2d2595cb777f6fdb1431586ff1c5d593a08ebb7eafc3b13d125ea2960de32e87e7445dc08479b2960ec46970e348b20d6f493cedd07300b980d534ced2a
|
7
|
+
data.tar.gz: 693a013093a9b4271235bc254583c9474e603572eca90c433340cd3774d8228832d0db62e138b80f43042a874c2136ee3d87bcb97b072483b15fc74ba88e8376
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -20,22 +20,40 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
24
|
-
```
|
25
|
-
|
26
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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/
|
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)
|
data/lib/phraser/version.rb
CHANGED
data/phraser.gemspec
CHANGED
@@ -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.
|
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: []
|