utility 0.1.3 → 0.1.4
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 +6 -6
- data/lib/utility/version.rb +1 -1
- data/lib/utility.rb +3 -1
- 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: cd033c750a3fd102b4306ea2fbaa5e0262a29bd9
|
|
4
|
+
data.tar.gz: ae85eda6bef6d4b3c73707180e7378793e5d8628
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1de9b13910420c95a48c42dd329e7510710841d125b4b9802059d48e1461a8f1b1c1c2c99601978e3895ca2debc9304f431ee6699ef9cc4ee158e6ca0bf3336c
|
|
7
|
+
data.tar.gz: e891d3865563872dd87a69af03d50d6d3161771b8e8b3466a7273531def9f4e912ccb2aecf3c3c4420c7895ffa298f983f8ea0b5cda627c1b3a676248204da9b
|
data/README.md
CHANGED
|
@@ -56,22 +56,22 @@ Utility.parse_query "http://example.com/?param1=value1¶m2=value2¶m3=valu
|
|
|
56
56
|
Utility.parse_query "param1=value1¶m2=value2¶m3=value3"
|
|
57
57
|
#=> {"param1"=>["value1"], "param2"=>["value2"], "param3"=>["value3"]}
|
|
58
58
|
```
|
|
59
|
-
|
|
59
|
+
#### computer info ####
|
|
60
60
|
```ruby
|
|
61
61
|
# get hostname
|
|
62
|
-
Utility.get_hostname
|
|
62
|
+
Utility.get_hostname #=> "Charles"
|
|
63
63
|
|
|
64
64
|
# get ip address
|
|
65
|
-
Utility.get_ip
|
|
65
|
+
Utility.get_ip #=> "192.168.12.26"
|
|
66
66
|
|
|
67
67
|
#get mac address
|
|
68
|
-
Utility.get_mac
|
|
68
|
+
Utility.get_mac #=> "c8:60:00:10:ec:ee"
|
|
69
69
|
|
|
70
70
|
#get os
|
|
71
|
-
Utility.get_os
|
|
71
|
+
Utility.get_os #=> "linux"
|
|
72
72
|
|
|
73
73
|
#get os arch
|
|
74
|
-
Utility.get_arch
|
|
74
|
+
Utility.get_arch #=> 64
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
### License ###
|
data/lib/utility/version.rb
CHANGED
data/lib/utility.rb
CHANGED