wpa_cli_web 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/wpa_cli_web.rb +22 -0
- data/wpa_cli_web.gemspec +1 -1
- metadata +7 -1
data/lib/wpa_cli_web.rb
CHANGED
@@ -17,6 +17,23 @@ class WpaCliWeb < Sinatra::Base
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
template :index do
|
21
|
+
<<-eos
|
22
|
+
<html>
|
23
|
+
<head>
|
24
|
+
<title>Network Authentication Required</title>
|
25
|
+
<meta http-equiv="refresh"
|
26
|
+
content="0; url=/access_points">
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<p>You need to <a href="https://login.example.net/">
|
30
|
+
authenticate with the local network</a> in order to gain
|
31
|
+
access.</p>
|
32
|
+
</body>
|
33
|
+
</html>
|
34
|
+
eos
|
35
|
+
end
|
36
|
+
|
20
37
|
template :networks do
|
21
38
|
<<-eos
|
22
39
|
<ul>
|
@@ -46,6 +63,11 @@ class WpaCliWeb < Sinatra::Base
|
|
46
63
|
eos
|
47
64
|
end
|
48
65
|
|
66
|
+
get '/' do
|
67
|
+
status 511
|
68
|
+
erb :index, :layout => false
|
69
|
+
end
|
70
|
+
|
49
71
|
get '/access_points' do
|
50
72
|
access_point_list = AccessPointList.new(wpa_cli_client)
|
51
73
|
@access_points = access_point_list.access_points
|
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.3"
|
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}
|
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.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -124,12 +124,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- - ! '>='
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
|
+
segments:
|
128
|
+
- 0
|
129
|
+
hash: -2222692181566366556
|
127
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
131
|
none: false
|
129
132
|
requirements:
|
130
133
|
- - ! '>='
|
131
134
|
- !ruby/object:Gem::Version
|
132
135
|
version: '0'
|
136
|
+
segments:
|
137
|
+
- 0
|
138
|
+
hash: -2222692181566366556
|
133
139
|
requirements: []
|
134
140
|
rubyforge_project:
|
135
141
|
rubygems_version: 1.8.23
|