JeiGem 0.0.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 +15 -0
- data/lib/jeigem.rb +62 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
OTBkNGE0OWYwOWZhMTUxMGRkNmZlOTNjN2ZiNzZhZTc0NjFiYTlmZA==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
N2RiZjExYjgyZWFhNDY1Y2M4Zjg4ZjNkOGRkNGMzOTAyMTFlNDllNg==
|
|
7
|
+
SHA512:
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
M2UzMjdhYWRkNTliNjc4MWNkNDI0MzZkM2NhZWFlNTlmYWY2NTU4YWE1MWVh
|
|
10
|
+
OGQzYzBmZDNlZTIxYTc0MmRkYTk3YjY1NzA3Yzg5ZTAxZjgzMzYzN2FlODgy
|
|
11
|
+
Y2M1NThjYThmZjc4YzI2Y2Y5YTk3OGI3OGUzNmEwMDc3NTE0ZDI=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
YjljY2M1MjJhNzdiMGUxMTBjYTQ4NDM0NTFjYTgyZDYxYjhjNzkxODAzZDdi
|
|
14
|
+
Mjk2YjA4ZTYwMGJhMjcwMmE1MmFkMTc4N2I4NWVjMzYxOTM5OGNiYmFlYmRi
|
|
15
|
+
YmJjZWMzZTdhMDk3MWJjZDI3ZGM0ODAzYmI1MTU4OGIwY2M5OWM=
|
data/lib/jeigem.rb
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
class String
|
|
2
|
+
def lowercase()
|
|
3
|
+
return self.downcase()
|
|
4
|
+
end
|
|
5
|
+
def number_of(letter)
|
|
6
|
+
result = 0
|
|
7
|
+
string = self.split(//)
|
|
8
|
+
string.to_a.each do |c|
|
|
9
|
+
result+=1 if c == letter
|
|
10
|
+
end
|
|
11
|
+
return result
|
|
12
|
+
end
|
|
13
|
+
def remove(letter)
|
|
14
|
+
string = self.split(//)
|
|
15
|
+
result = ""
|
|
16
|
+
string.each do |c|
|
|
17
|
+
result << c if c != letter
|
|
18
|
+
end
|
|
19
|
+
return result
|
|
20
|
+
end
|
|
21
|
+
def replace(letter, letter2)
|
|
22
|
+
return self.gsub letter, letter2
|
|
23
|
+
end
|
|
24
|
+
def numbers()
|
|
25
|
+
numbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
|
|
26
|
+
string = self.split(//)
|
|
27
|
+
result = ""
|
|
28
|
+
string.each do |c|
|
|
29
|
+
numbers.each do |n|
|
|
30
|
+
result << n if c == n
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
return result.to_i
|
|
34
|
+
end
|
|
35
|
+
def echo()
|
|
36
|
+
puts self
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
class Display
|
|
40
|
+
def clear()
|
|
41
|
+
100.times do
|
|
42
|
+
puts
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
class OS
|
|
47
|
+
def command(command)
|
|
48
|
+
return `#{command}`
|
|
49
|
+
end
|
|
50
|
+
def up?(ip)
|
|
51
|
+
`ping #{ip}`
|
|
52
|
+
if ($?.exitstatus == 0) then
|
|
53
|
+
return true
|
|
54
|
+
else
|
|
55
|
+
return false
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
def info()
|
|
59
|
+
os = Gem::Platform.local.os
|
|
60
|
+
return "Windows" if os == "mingw32"
|
|
61
|
+
end
|
|
62
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: JeiGem
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.2
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Marvin Johanning
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-05-01 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: This gem includes somes additions that I found useful
|
|
14
|
+
email: marvinjohanning@yahoo.se
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/jeigem.rb
|
|
20
|
+
homepage:
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ! '>='
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ! '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubyforge_project:
|
|
40
|
+
rubygems_version: 2.1.11
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: ''
|
|
44
|
+
test_files: []
|