wpa_cli_web 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/wpa_cli_web.rb +8 -6
- data/wpa_cli_web.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2VlN2JhNzYwNGI1ZTZkY2UxNmYxMzkzY2Q0M2E1MTA3OGQyOGJiOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjcyOTIyNjZmZjRiYmNiYmY4NjM0NTY1ZmQyMGU3ZGNhM2JiMDEwMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWU3YTFkNzJlZWNjOWFmMTNhNWI2OWIzOTYyMGZlZGEwMTZhOTg1NWZkYTZi
|
10
|
+
NGNjOTZmZWY4NjhlYzRjZGRlNWY1ZTZiM2VmMjliMzg5NTBmNGY1MmEyNjZj
|
11
|
+
ZWU5YTNiMzU4ZDg3YzQwYzY2YmY1YTFjNDQ0OTE4YjIxNzk5MGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmFmYmRmODNhOGFjY2I3N2M5ZWJkY2NmNDJiYmM3Yzc5NWYzZTA1ZDU4MGQ3
|
14
|
+
NzczOTllMTA4NjU3MDVlZjQ5MTJjNDBjYzA2NDNhNTJhZTA5ZGY1OTkwODBi
|
15
|
+
NTMyOGVhOWMwZWZlZjVlYTIzMWU5NTY5YjJkYzJmNzQ2NjViNTk=
|
data/lib/wpa_cli_web.rb
CHANGED
@@ -6,10 +6,12 @@ class WpaCliWeb < Sinatra::Base
|
|
6
6
|
include WpaCliRuby
|
7
7
|
|
8
8
|
def self.wpa_cli_client
|
9
|
-
if settings.
|
10
|
-
|
11
|
-
|
9
|
+
raise 'wpa_cli not available' if settings.production? && !WpaCliWrapper.available?
|
10
|
+
|
11
|
+
if WpaCliWrapper.available?
|
12
12
|
WpaCli.new
|
13
|
+
else
|
14
|
+
WpaCli.new(DummyWpaCliWrapper.new)
|
13
15
|
end
|
14
16
|
end
|
15
17
|
|
@@ -69,10 +71,10 @@ class WpaCliWeb < Sinatra::Base
|
|
69
71
|
ssid = params[:ssid]
|
70
72
|
password = params[:password]
|
71
73
|
wpa_cli_client.set_network(id, "ssid", ssid)
|
72
|
-
if password
|
73
|
-
wpa_cli_client.set_network(id, "
|
74
|
+
if password.empty?
|
75
|
+
wpa_cli_client.set_network(id, "key_mgmt", :NONE)
|
74
76
|
else
|
75
|
-
wpa_cli_client.set_network(id, "
|
77
|
+
wpa_cli_client.set_network(id, "psk", password)
|
76
78
|
end
|
77
79
|
wpa_cli_client.set_network(id, "disabled", 0)
|
78
80
|
wpa_cli_client.save_config
|
data/wpa_cli_web.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "wpa_cli_web"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.14"
|
8
8
|
spec.authors = ["Chris Lowis", "Andrew Nicolaou"]
|
9
9
|
spec.email = ["chris.lowis@gmail.com"]
|
10
10
|
spec.description = %q{Web interface for configuring wifi using wpa_cli}
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "sinatra"
|
22
|
-
spec.add_dependency "wpa_cli_ruby"
|
22
|
+
spec.add_dependency "wpa_cli_ruby", ">= 0.0.2"
|
23
23
|
spec.add_dependency "thin"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wpa_cli_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Lowis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 0.0.2
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ! '>='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 0.0.2
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: thin
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|