lerolero 8.7.1 → 8.7.2
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.
- checksums.yaml +4 -4
- data/README.md +10 -5
- data/lib/lerolero.rb +27 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bcfab7bad3ff1a069a6ae4a5d26a1b222feaac4
|
4
|
+
data.tar.gz: d638652064ce2bcd936888a0ad5eb78cc0c71ad7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b0f360ffc248e6319799c6897f64943ab3a4b30da1df1f09f3cb875769fd90ac5668ae30a60633c96f25b5f798100cbd872db629bac93b86f46b3ff06b8cbf8
|
7
|
+
data.tar.gz: 12d7af0566806e250c103cc92436e2608f3b6358026cca3b1c7542c8b20df8337ac6f794cee517bcd97fe79035b0ec9a0a08b77d9104ada4b5398e869960c002
|
data/README.md
CHANGED
@@ -2,20 +2,25 @@
|
|
2
2
|
|
3
3
|
## Getting Started
|
4
4
|
|
5
|
-
1.
|
5
|
+
1. Instale o gem assim:
|
6
6
|
|
7
7
|
$ gem install lerolero
|
8
8
|
|
9
|
-
2.
|
9
|
+
2. Abra o arquivo Gem file que fica no root do seu site dessa maneira:
|
10
10
|
|
11
11
|
$ sudo nano Gemfile
|
12
12
|
|
13
|
-
|
13
|
+
e adicione a seguinte linha:
|
14
14
|
|
15
15
|
$ gem 'lerolero'
|
16
16
|
|
17
17
|
|
18
|
-
3.
|
18
|
+
3. Rode o bundle install:
|
19
|
+
|
20
|
+
$ sudo bundle install
|
21
|
+
|
22
|
+
|
23
|
+
4. Use assim dentro do seu c�digo ruby on rails:
|
19
24
|
|
20
25
|
$ puts Lerolero.sentence
|
21
26
|
$ puts Lerolero.sentence(3)
|
@@ -23,7 +28,7 @@
|
|
23
28
|
A glamorous and smart totally random phrase will be generated.
|
24
29
|
Output example:
|
25
30
|
|
26
|
-
$
|
31
|
+
$ Por conseguinte, a necessidade de renova��o processual garante a contribui��o de um grupo importante na determina��o das condi��es financeiras e administrativas exigidas. A n�vel organizacional, a ado��o de pol�ticas descentralizadoras estimula a padroniza��o das dire��es preferenciais no sentido do progresso.
|
27
32
|
|
28
33
|
## Contributing
|
29
34
|
|
data/lib/lerolero.rb
CHANGED
@@ -133,21 +133,35 @@ myarray3=[
|
|
133
133
|
"do investimento em reciclagem técnica.",
|
134
134
|
"do remanejamento dos quadros funcionais."
|
135
135
|
]
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
args[0].times do
|
147
|
-
a+=myarray.sort.sample+" "+myarray1.sort.sample+" "+myarray2.sort.sample+" "+myarray3.sort.sample+" "
|
136
|
+
intcount=0
|
137
|
+
if !File.exist?('countlerolero.txt')
|
138
|
+
File.open("countlerolero.txt", "w+") { |file| file.write("1") }
|
139
|
+
else
|
140
|
+
File.open("countlerolero.txt", "r") do |file|
|
141
|
+
# file.write("1")
|
142
|
+
file.each_line do |line|
|
143
|
+
intcount= line.to_i
|
144
|
+
end
|
145
|
+
end
|
148
146
|
end
|
147
|
+
|
148
|
+
case args.size
|
149
|
+
when 0
|
150
|
+
srand(Time.now.utc.to_i)
|
151
|
+
#myarray=[Time.now.utc.strftime('%s')]
|
152
|
+
myarray.sort.sample+" "+myarray1.sort.sample+" "+myarray2.sort.sample+" "+myarray3.sort.sample+ " "
|
153
|
+
when 1
|
154
|
+
srand(Time.now.utc.to_i+intcount)
|
155
|
+
#myarray=[Time.now.utc.strftime('%s')]
|
156
|
+
#myarray.sort.sample+" "+myarray1.sort.sample+" "+myarray2.sort.sample+" "+myarray3.sort.sample
|
157
|
+
a=""
|
158
|
+
args[0].times do
|
159
|
+
a+=myarray.sort.sample+" "+myarray1.sort.sample+" "+myarray2.sort.sample+" "+myarray3.sort.sample+" "
|
160
|
+
end
|
161
|
+
intcount+=1
|
162
|
+
File.open("countlerolero.txt", "w") { |file| file.write(intcount.to_s) }
|
149
163
|
a
|
150
164
|
end
|
151
165
|
|
152
166
|
end
|
153
|
-
|
167
|
+
end
|