wpa_cli_web 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTRkMWRiODEzY2Y2N2M1M2U2YzFjYmUyMDUwNzlkZTc5YmFkNWNhYg==
5
+ data.tar.gz: !binary |-
6
+ OGE0OWQ3MjlkYzRhMDcwOWQ1NWIwM2FmZjgzYzVkZjdkYWMzODFmZg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZDRkOTk0N2I4YWNhNWJjMTg5NWJlNDk3NTRkZmQ5YWMwY2NhNDUwMjk4ZTAy
10
+ ZGM5ZWJkZmY5MjlhNjhmMmU2ZTBlZTlkMTk2NmU4NmE5NGNiYWNiMzExMGMx
11
+ YWU4NGQ5NGYwZGE3ZGY5MGIzM2FlOWMzYWE2NjA5ODczZDYzYjE=
12
+ data.tar.gz: !binary |-
13
+ OWI0OWM4MDUxYjI3OTY1YTMyYzY5YzI0NDQ0MWM1YmUwYWJkZmU2ZDQ5OGMx
14
+ ZjE0ZmI0YjY1ZmZiYjAzZDI3NDA2N2RhMGYzZDMwODAwZjI4MWE1ZmE2NzI0
15
+ N2I0NjhmY2JhNWFlZDI0ZDllNjMzYTUyYTdlNjU3YTdkMmRmNmM=
data/bin/wpa_cli_web CHANGED
@@ -10,5 +10,5 @@ rackup_file = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'w
10
10
  argv = ARGV
11
11
  argv << ["-R", rackup_file] unless ARGV.include?("-R")
12
12
  argv << ["-p", "3000"] unless ARGV.include?("-p")
13
- argv << ["-e", "production"] unless ARGV.include?("-p")
13
+ argv << ["-e", "production"] unless ARGV.include?("-e")
14
14
  Thin::Runner.new(argv.flatten).run!
data/lib/wpa_cli_web.rb CHANGED
@@ -5,24 +5,29 @@ require_relative 'wpa_cli_web/access_point_list'
5
5
  class WpaCliWeb < Sinatra::Base
6
6
  include WpaCliRuby
7
7
 
8
+ def self.wpa_cli_client
9
+ if settings.development?
10
+ WpaCli.new(DummyWpaCliWrapper.new)
11
+ else
12
+ WpaCli.new
13
+ end
14
+ end
15
+
8
16
  configure do
9
- set :product_name, "Radiodan"
10
- set :method_override, true
11
- set :public_folder, File.expand_path(File.join(File.dirname(__FILE__), 'wpa_cli_web', 'public'))
12
- set :views, File.expand_path(File.join(File.dirname(__FILE__), 'wpa_cli_web', 'views'))
17
+ set :method_override, true
18
+ set :public_folder, File.expand_path(File.join(File.dirname(__FILE__), 'wpa_cli_web', 'public'))
19
+ set :views, File.expand_path(File.join(File.dirname(__FILE__), 'wpa_cli_web', 'views'))
20
+ set :wpa_cli_client, wpa_cli_client
21
+ set :access_point_list, AccessPointList.new(settings.wpa_cli_client)
13
22
  end
14
23
 
15
24
  helpers do
16
25
  def product_name
17
- settings.product_name
26
+ ENV['APPLICATION_NAME'] || ENV['application_name'] || "Raspberry Pi Wi-Fi"
18
27
  end
19
- end
20
28
 
21
- def wpa_cli_client
22
- if ENV['RACK_ENV'] == "development"
23
- WpaCli.new(DummyWpaCliWrapper.new)
24
- else
25
- WpaCli.new
29
+ def wpa_cli_client
30
+ settings.wpa_cli_client
26
31
  end
27
32
  end
28
33
 
@@ -35,8 +40,7 @@ class WpaCliWeb < Sinatra::Base
35
40
  end
36
41
 
37
42
  get '/access_points' do
38
- access_point_list = AccessPointList.new(wpa_cli_client)
39
- @access_points = access_point_list.access_points
43
+ @access_points = settings.access_point_list.access_points
40
44
  if request.xhr?
41
45
  erb :access_points_list, :layout => false
42
46
  else
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.10"
7
+ spec.version = "0.0.11"
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,8 +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.10
5
- prerelease:
4
+ version: 0.0.11
6
5
  platform: ruby
7
6
  authors:
8
7
  - Chris Lowis
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-09-03 00:00:00.000000000 Z
12
+ date: 2013-11-16 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: sinatra
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ! '>='
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ! '>='
29
26
  - !ruby/object:Gem::Version
@@ -31,7 +28,6 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: wpa_cli_ruby
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - ! '>='
37
33
  - !ruby/object:Gem::Version
@@ -39,7 +35,6 @@ dependencies:
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - ! '>='
45
40
  - !ruby/object:Gem::Version
@@ -47,7 +42,6 @@ dependencies:
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: thin
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - ! '>='
53
47
  - !ruby/object:Gem::Version
@@ -55,7 +49,6 @@ dependencies:
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - ! '>='
61
54
  - !ruby/object:Gem::Version
@@ -63,7 +56,6 @@ dependencies:
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: bundler
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ~>
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :development
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ~>
77
68
  - !ruby/object:Gem::Version
@@ -79,7 +70,6 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: rake
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ! '>='
85
75
  - !ruby/object:Gem::Version
@@ -87,7 +77,6 @@ dependencies:
87
77
  type: :development
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ! '>='
93
82
  - !ruby/object:Gem::Version
@@ -95,7 +84,6 @@ dependencies:
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: mocha
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
88
  - - ! '>='
101
89
  - !ruby/object:Gem::Version
@@ -103,7 +91,6 @@ dependencies:
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
95
  - - ! '>='
109
96
  - !ruby/object:Gem::Version
@@ -240,33 +227,27 @@ files:
240
227
  homepage: ''
241
228
  licenses:
242
229
  - Apache
230
+ metadata: {}
243
231
  post_install_message:
244
232
  rdoc_options: []
245
233
  require_paths:
246
234
  - lib
247
235
  required_ruby_version: !ruby/object:Gem::Requirement
248
- none: false
249
236
  requirements:
250
237
  - - ! '>='
251
238
  - !ruby/object:Gem::Version
252
239
  version: '0'
253
- segments:
254
- - 0
255
- hash: 231190901924834760
256
240
  required_rubygems_version: !ruby/object:Gem::Requirement
257
- none: false
258
241
  requirements:
259
242
  - - ! '>='
260
243
  - !ruby/object:Gem::Version
261
244
  version: '0'
262
- segments:
263
- - 0
264
- hash: 231190901924834760
265
245
  requirements: []
266
246
  rubyforge_project:
267
- rubygems_version: 1.8.23
247
+ rubygems_version: 2.1.10
268
248
  signing_key:
269
- specification_version: 3
249
+ specification_version: 4
270
250
  summary: Web interface for configuring wifi using wpa_cli
271
251
  test_files:
272
252
  - test/wpa_cli_web/access_point_list_test.rb
253
+ has_rdoc: