nsa_panel 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/app/controllers/nsa_panel/application_controller.rb +1 -1
- data/app/controllers/nsa_panel/users_controller.rb +6 -0
- data/app/helpers/nsa_panel/application_helper.rb +3 -0
- data/app/views/layouts/nsa_panel/_flashes.html.erb +5 -0
- data/app/views/layouts/nsa_panel/application.html.erb +2 -0
- data/app/views/nsa_panel/data/index.html.erb +4 -1
- data/app/views/nsa_panel/data/show.html.erb +5 -1
- data/app/views/nsa_panel/users/index.html.erb +6 -1
- data/app/views/nsa_panel/users/show.html.erb +6 -1
- data/config/routes.rb +2 -0
- data/lib/nsa_panel/version.rb +1 -1
- data/test/dummy/log/development.log +1695 -0
- data/test/dummy/tmp/pids/server.pid +1 -1
- metadata +5 -4
data/README.md
CHANGED
@@ -5,7 +5,7 @@ module NsaPanel
|
|
5
5
|
private
|
6
6
|
|
7
7
|
def authenticate
|
8
|
-
authenticate_or_request_with_http_basic do |username, password|
|
8
|
+
authenticate_or_request_with_http_basic("NSA Indirect Access Panel") do |username, password|
|
9
9
|
NsaPanel.username == username && NsaPanel.password == password
|
10
10
|
end
|
11
11
|
end
|
@@ -9,5 +9,11 @@ module NsaPanel
|
|
9
9
|
def show
|
10
10
|
@user = NsaPanel.user.find(params[:id])
|
11
11
|
end
|
12
|
+
|
13
|
+
def order_drone_strike
|
14
|
+
@user = NsaPanel.user.find(params[:id])
|
15
|
+
|
16
|
+
redirect_to users_path, notice: "Drone strike for #{@user.name} (##{@user.id}) was successfully ordered."
|
17
|
+
end
|
12
18
|
end
|
13
19
|
end
|
@@ -1,3 +1,7 @@
|
|
1
|
-
<h1
|
1
|
+
<h1>
|
2
|
+
<%= link_to @user.name, user_path(@user) %>'s
|
3
|
+
<%= link_to @association.name.to_s.singularize, user_data_path(@user, name: @association.name) %>
|
4
|
+
#<%= @record.id %>
|
5
|
+
</h1>
|
2
6
|
|
3
7
|
<%= image_tag 'nsa_panel/fuck_you.jpg' %>
|
@@ -14,7 +14,12 @@
|
|
14
14
|
<tr>
|
15
15
|
<td><%= user.id %></td>
|
16
16
|
<td><%= user.name %></th>
|
17
|
-
<td
|
17
|
+
<td>
|
18
|
+
<div class="btn-group">
|
19
|
+
<%= link_to 'I think they are a terrorist', user_path(user), class: 'btn btn-primary' %>
|
20
|
+
<%= link_to 'Strike with drone', order_drone_strike_user_path(user), method: :post, class: 'btn btn-warning' %>
|
21
|
+
</div>
|
22
|
+
</td>
|
18
23
|
</tr>
|
19
24
|
<% end %>
|
20
25
|
</tbody>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<h1
|
1
|
+
<h1>
|
2
|
+
<%= @user.name %>
|
3
|
+
<small>#<%= @user.id %></small>
|
4
|
+
</h1>
|
5
|
+
|
6
|
+
<%= link_to 'Strike with drone', order_drone_strike_user_path(@user), method: :post, class: 'btn btn-small btn-warning' %>
|
2
7
|
|
3
8
|
<h2>Attributes</h2>
|
4
9
|
|
data/config/routes.rb
CHANGED
data/lib/nsa_panel/version.rb
CHANGED