wifi_location 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,8 +1,11 @@
1
+ === 0.0.3 2012-08-03
2
+
3
+ * not open map on "whereami --map"
4
+
1
5
  === 0.0.2 2012-08-03
2
6
 
3
7
  * add whereami command
4
8
 
5
-
6
9
  === 0.0.1 2012-08-03
7
10
 
8
11
  * first release
data/README.rdoc CHANGED
@@ -17,6 +17,7 @@ Get your location with WiFi Mac Address and GoogleMap.
17
17
  % which whereami
18
18
  % whereami --help
19
19
  % whereami --dump
20
+ % open `whereami --open`
20
21
 
21
22
 
22
23
  == SYNOPSIS:
data/bin/whereami CHANGED
@@ -24,31 +24,24 @@ if parser.has_option? :version
24
24
  exit
25
25
  end
26
26
 
27
+ towers = WiFiLocation.wifi_towers
28
+
27
29
  if parser.has_option? :towers
28
- puts WiFiLocation.wifi_towers.to_json
30
+ puts towers.to_json
29
31
  exit
30
32
  end
31
33
 
34
+ location = WiFiLocation.location towers
35
+
32
36
  if parser.has_option? :dump
33
- towers = WiFiLocation.wifi_towers
34
- location = WiFiLocation.location towers
35
37
  h = {:towers => towers, :location => location}
36
38
  puts h.to_json
37
39
  exit
38
40
  end
39
41
 
40
42
  if parser.has_option? :map
41
- location = WiFiLocation.location
42
43
  puts url = "https://maps.google.com/?ll=#{location['latitude']},#{location['longitude']}"
43
- ['xdg-open', 'open'].each do |cmd|
44
- cmd = `which #{cmd}`.strip
45
- unless cmd.empty?
46
- system "#{cmd} #{url}"
47
- break
48
- end
49
- end
50
44
  exit
51
45
  end
52
46
 
53
- location = WiFiLocation.location
54
47
  puts "lat=#{location['latitude']},lon=#{location['longitude']}"
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.2'
7
+ VERSION = '0.0.3'
8
8
 
9
9
  def self.wifi_towers
10
10
  case RUBY_PLATFORM
metadata CHANGED
@@ -1,112 +1,107 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: wifi_location
3
- version: !ruby/object:Gem::Version
4
- hash: 27
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 2
10
- version: 0.0.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Sho Hashimoto
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-08-03 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- prerelease: false
22
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2012-08-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: json
16
+ requirement: !ruby/object:Gem::Requirement
23
17
  none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 5
28
- segments:
29
- - 1
30
- - 5
31
- - 3
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
32
21
  version: 1.5.3
33
22
  type: :runtime
34
- name: json
35
- version_requirements: *id001
36
- - !ruby/object:Gem::Dependency
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.3
30
+ - !ruby/object:Gem::Dependency
31
+ name: args_parser
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 27
44
- segments:
45
- - 0
46
- - 0
47
- - 2
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
48
37
  version: 0.0.2
49
38
  type: :runtime
50
- name: args_parser
51
- version_requirements: *id002
52
- - !ruby/object:Gem::Dependency
53
39
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.0.2
46
+ - !ruby/object:Gem::Dependency
47
+ name: rdoc
48
+ requirement: !ruby/object:Gem::Requirement
55
49
  none: false
56
- requirements:
50
+ requirements:
57
51
  - - ~>
58
- - !ruby/object:Gem::Version
59
- hash: 19
60
- segments:
61
- - 3
62
- - 10
63
- version: "3.10"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.10'
64
54
  type: :development
65
- name: rdoc
66
- version_requirements: *id003
67
- - !ruby/object:Gem::Dependency
68
55
  prerelease: false
69
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
70
57
  none: false
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- hash: 5
75
- segments:
76
- - 1
77
- - 5
78
- - 3
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.10'
62
+ - !ruby/object:Gem::Dependency
63
+ name: newgem
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
79
69
  version: 1.5.3
80
70
  type: :development
81
- name: newgem
82
- version_requirements: *id004
83
- - !ruby/object:Gem::Dependency
84
71
  prerelease: false
85
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 1.5.3
78
+ - !ruby/object:Gem::Dependency
79
+ name: hoe
80
+ requirement: !ruby/object:Gem::Requirement
86
81
  none: false
87
- requirements:
82
+ requirements:
88
83
  - - ~>
89
- - !ruby/object:Gem::Version
90
- hash: 7
91
- segments:
92
- - 3
93
- - 0
94
- version: "3.0"
84
+ - !ruby/object:Gem::Version
85
+ version: '3.0'
95
86
  type: :development
96
- name: hoe
97
- version_requirements: *id005
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '3.0'
98
94
  description: Get your location with WiFi Mac Address and GoogleMap.
99
- email:
95
+ email:
100
96
  - hashimoto@shokai.org
101
- executables:
97
+ executables:
102
98
  - whereami
103
99
  extensions: []
104
-
105
- extra_rdoc_files:
100
+ extra_rdoc_files:
106
101
  - History.txt
107
102
  - Manifest.txt
108
103
  - README.rdoc
109
- files:
104
+ files:
110
105
  - History.txt
111
106
  - Manifest.txt
112
107
  - README.rdoc
@@ -122,38 +117,34 @@ files:
122
117
  - .gemtest
123
118
  homepage: http://github.com/shokai/wifi_location
124
119
  licenses: []
125
-
126
- post_install_message: "!! You can get your location with \"whereami\" command. For more information on wifi_location, see https://rubygems.org/gems/wifi_location"
127
- rdoc_options:
120
+ post_install_message: ! '!! You can get your location with "whereami" command. For
121
+ more information on wifi_location, see https://rubygems.org/gems/wifi_location'
122
+ rdoc_options:
128
123
  - --main
129
124
  - README.rdoc
130
- require_paths:
125
+ require_paths:
131
126
  - lib
132
- required_ruby_version: !ruby/object:Gem::Requirement
127
+ required_ruby_version: !ruby/object:Gem::Requirement
133
128
  none: false
134
- requirements:
135
- - - ">="
136
- - !ruby/object:Gem::Version
137
- hash: 3
138
- segments:
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ segments:
139
134
  - 0
140
- version: "0"
141
- required_rubygems_version: !ruby/object:Gem::Requirement
135
+ hash: 1142043331478438304
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
137
  none: false
143
- requirements:
144
- - - ">="
145
- - !ruby/object:Gem::Version
146
- hash: 3
147
- segments:
148
- - 0
149
- version: "0"
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
150
142
  requirements: []
151
-
152
143
  rubyforge_project: wifi_location
153
144
  rubygems_version: 1.8.24
154
145
  signing_key:
155
146
  specification_version: 3
156
147
  summary: Get your location with WiFi Mac Address and GoogleMap.
157
- test_files:
148
+ test_files:
158
149
  - test/test_helper.rb
159
150
  - test/test_wifi_location.rb