sloubi 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sloubi.rb +19 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f57d79b942ea0a57d2ff824436498931dbfdb303
|
4
|
+
data.tar.gz: 41b29a40ed945bfda6faabf065d265a23be6d559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35acd0db3be6f048ac829560b5ea797becc009b21306ebe30d620d9374111b07b2283bac4124057f044f326f9846d948fdd38452a9d95be70adb5d097e5dc666
|
7
|
+
data.tar.gz: f8b5984a8ed8d678a99ca16df734a5d679a98511da841cc0ce8148ed6a031a1cc64461c5306909c6591b713784fe4162880b652f3d6ba1dc4509ab9d5c2311ab
|
data/lib/sloubi.rb
CHANGED
@@ -6,15 +6,25 @@ module Sloubi
|
|
6
6
|
def self.count n=42, ninit=1, v=false
|
7
7
|
return 0 if !n.is_a?Integer or n < 1
|
8
8
|
return 0 if ninit > n
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
if ninit == 0
|
10
|
+
n.times do
|
11
|
+
Sloubi.sing(rand(1..n), v)
|
12
|
+
end
|
13
|
+
else
|
14
|
+
(ninit..n).each do |i|
|
15
|
+
sing i
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.sing i, v=false
|
21
|
+
puts "Sloubi #{i}"
|
22
|
+
if v == true
|
23
|
+
if i <= 99999999999999
|
24
|
+
`espeak "Sloubi #{i}" -a 200 -vfr`
|
25
|
+
else
|
26
|
+
`espeak "Je sais pas compter jusque là, moi !" -a 200 -vfr`
|
27
|
+
return false
|
18
28
|
end
|
19
29
|
end
|
20
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sloubi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- poulet_a
|
@@ -10,7 +10,7 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: require 'sloubi' ; Sloubi::Sloubi.count(424242, 4242, false)
|
14
14
|
email:
|
15
15
|
- poulet_a@epitech.eu
|
16
16
|
- - lib/sloubi.rb
|
@@ -39,9 +39,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
39
39
|
version: '0'
|
40
40
|
requirements: []
|
41
41
|
rubyforge_project:
|
42
|
-
rubygems_version: 2.2.
|
42
|
+
rubygems_version: 2.2.2
|
43
43
|
signing_key:
|
44
44
|
specification_version: 4
|
45
|
-
summary:
|
45
|
+
summary: Add the random option when ninit == 0
|
46
46
|
test_files: []
|
47
47
|
has_rdoc:
|