wifi_location 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/README.rdoc +1 -1
- data/lib/wifi_location.rb +2 -2
- metadata +3 -3
data/History.txt
CHANGED
data/README.rdoc
CHANGED
data/lib/wifi_location.rb
CHANGED
@@ -4,7 +4,7 @@ require 'uri'
|
|
4
4
|
require 'json'
|
5
5
|
|
6
6
|
module WiFiLocation
|
7
|
-
VERSION = '0.0.
|
7
|
+
VERSION = '0.0.4'
|
8
8
|
|
9
9
|
def self.wifi_towers
|
10
10
|
case RUBY_PLATFORM
|
@@ -20,7 +20,7 @@ module WiFiLocation
|
|
20
20
|
addrs = []
|
21
21
|
lines.each do |line|
|
22
22
|
addrs.push({'bssid' => line.split(/\s+/).last, 'signal' => 8}) if line =~ /Address: /
|
23
|
-
addrs.last['signal'] = line.scan(/Signal level
|
23
|
+
addrs.last['signal'] = line.scan(/Signal level[:=](\-?\d+)/)[0][0].to_i rescue next if line =~ /Signal level[:=]/
|
24
24
|
end
|
25
25
|
addrs
|
26
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wifi_location
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
segments:
|
134
134
|
- 0
|
135
|
-
hash:
|
135
|
+
hash: -981455375
|
136
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
137
|
none: false
|
138
138
|
requirements:
|