nsa_panel 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +96 -0
- data/Rakefile +40 -0
- data/app/assets/images/nsa_panel/fuck_you.jpg +0 -0
- data/app/assets/images/nsa_panel/nsa-eagle-tiny.png +0 -0
- data/app/assets/javascripts/nsa_panel/application.js +15 -0
- data/app/assets/javascripts/nsa_panel/dashboard.js +2 -0
- data/app/assets/javascripts/nsa_panel/data.js +2 -0
- data/app/assets/stylesheets/nsa_panel/application.css +22 -0
- data/app/assets/stylesheets/nsa_panel/bootstrap.css +6167 -0
- data/app/assets/stylesheets/nsa_panel/dashboard.css +4 -0
- data/app/assets/stylesheets/nsa_panel/data.css +4 -0
- data/app/controllers/nsa_panel/application_controller.rb +11 -0
- data/app/controllers/nsa_panel/data_controller.rb +25 -0
- data/app/controllers/nsa_panel/users_controller.rb +13 -0
- data/app/helpers/nsa_panel/application_helper.rb +4 -0
- data/app/helpers/nsa_panel/data_helper.rb +4 -0
- data/app/helpers/nsa_panel/users_helper.rb +4 -0
- data/app/views/layouts/nsa_panel/application.html.erb +29 -0
- data/app/views/nsa_panel/data/index.html.erb +19 -0
- data/app/views/nsa_panel/data/show.html.erb +3 -0
- data/app/views/nsa_panel/users/index.html.erb +21 -0
- data/app/views/nsa_panel/users/show.html.erb +29 -0
- data/config/routes.rb +7 -0
- data/lib/nsa_panel/engine.rb +5 -0
- data/lib/nsa_panel/version.rb +3 -0
- data/lib/nsa_panel.rb +13 -0
- data/lib/tasks/nsa_panel_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/secret.rb +4 -0
- data/test/dummy/app/models/user.rb +4 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/nsa_panel.rb +3 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130608161208_create_users.rb +9 -0
- data/test/dummy/db/migrate/20130608162029_create_secrets.rb +10 -0
- data/test/dummy/db/schema.rb +29 -0
- data/test/dummy/db/seeds.rb +13 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +8415 -0
- data/test/dummy/log/production.log +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/secrets.yml +9 -0
- data/test/dummy/test/fixtures/users.yml +7 -0
- data/test/dummy/test/unit/secret_test.rb +7 -0
- data/test/dummy/test/unit/user_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/BFE/250/sprockets%2F89aa6d7790a3930164b2368777646801 +0 -0
- data/test/dummy/tmp/cache/assets/C2D/BD0/sprockets%2F91420485435a2183f6ae09346d4987f7 +0 -0
- data/test/dummy/tmp/cache/assets/C8E/CE0/sprockets%2F4b8842d65367955c550c0b5711cf499e +0 -0
- data/test/dummy/tmp/cache/assets/CB7/7D0/sprockets%2F59993a2b857b25da46bd55882b1470a6 +0 -0
- data/test/dummy/tmp/cache/assets/CED/C10/sprockets%2F6d09d327d57748e31b7fc6f0119f81a9 +0 -0
- data/test/dummy/tmp/cache/assets/D0C/9F0/sprockets%2F491e8d1f2a4e8d43a6641e68ee00533a +0 -0
- data/test/dummy/tmp/cache/assets/D0E/0D0/sprockets%2Fdfe37504eb9bbc71a611969ff0582212 +0 -0
- data/test/dummy/tmp/cache/assets/D11/490/sprockets%2F756fcfc8063ea7561ea336f0356ff005 +0 -0
- data/test/dummy/tmp/cache/assets/D12/870/sprockets%2F4b81d5532be95396ec25b13aefe78053 +0 -0
- data/test/dummy/tmp/cache/assets/D2F/B10/sprockets%2F5642bc1d7cea07b4b20871e0b6b17f19 +0 -0
- data/test/dummy/tmp/cache/assets/D30/110/sprockets%2Fd0cd21816fda8d4c87c21064b4d426d0 +0 -0
- data/test/dummy/tmp/cache/assets/D33/AF0/sprockets%2Fcdeb00261f07c945b39f4c0a61b43e85 +0 -0
- data/test/dummy/tmp/cache/assets/D39/610/sprockets%2F8d2e10b2572fefe0785371a6a1ce57a4 +0 -0
- data/test/dummy/tmp/cache/assets/D3A/8F0/sprockets%2F17cce87a24436f017bacb71d3c75682d +0 -0
- data/test/dummy/tmp/cache/assets/D3E/650/sprockets%2F5311f8af9108989eebb6710a40af29bb +0 -0
- data/test/dummy/tmp/cache/assets/D42/4B0/sprockets%2F69d0264be37272b08d625bf3ac86e3ef +0 -0
- data/test/dummy/tmp/cache/assets/D53/6F0/sprockets%2F78776e1fdc06184f7493b98f21cbad8c +0 -0
- data/test/dummy/tmp/cache/assets/D65/0E0/sprockets%2F71bfb265bec02b52f4b3c8c2774f92b1 +0 -0
- data/test/dummy/tmp/cache/assets/D6D/800/sprockets%2F285fb95480a7891ae68c201ca62fdada +0 -0
- data/test/dummy/tmp/cache/assets/D6E/410/sprockets%2Fd82c68c0c287a712c7bd2fe34e3a991a +0 -0
- data/test/dummy/tmp/cache/assets/D6E/9B0/sprockets%2F2397ed9d0aa6f8625709e0bb5d3c05eb +0 -0
- data/test/dummy/tmp/cache/assets/D6E/BD0/sprockets%2F5089f0cbf8e7e71b070a98b22bc6e25b +0 -0
- data/test/dummy/tmp/cache/assets/E0B/F60/sprockets%2Fc2e14aeedcbfbc9e4fc16a818872598f +0 -0
- data/test/dummy/tmp/cache/assets/E2C/140/sprockets%2F7b29107426cecdbee365edf5adbace56 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/functional/nsa_panel/dashboard_controller_test.rb +11 -0
- data/test/functional/nsa_panel/data_controller_test.rb +11 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/nsa_panel_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- data/test/unit/helpers/nsa_panel/dashboard_helper_test.rb +6 -0
- data/test/unit/helpers/nsa_panel/data_helper_test.rb +6 -0
- metadata +261 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Raise exception on mass assignment protection for Active Record models
|
26
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
+
|
28
|
+
# Log the query plan for queries taking more than this (works
|
29
|
+
# with SQLite, MySQL, and PostgreSQL)
|
30
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
+
|
32
|
+
# Do not compress assets
|
33
|
+
config.assets.compress = false
|
34
|
+
|
35
|
+
# Expands the lines which load the assets
|
36
|
+
config.assets.debug = true
|
37
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
51
|
+
# Disable delivery errors, bad email addresses will be ignored
|
52
|
+
# config.action_mailer.raise_delivery_errors = false
|
53
|
+
|
54
|
+
# Enable threaded mode
|
55
|
+
# config.threadsafe!
|
56
|
+
|
57
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
+
# the I18n.default_locale when a translation can not be found)
|
59
|
+
config.i18n.fallbacks = true
|
60
|
+
|
61
|
+
# Send deprecation notices to registered listeners
|
62
|
+
config.active_support.deprecation = :notify
|
63
|
+
|
64
|
+
# Log the query plan for queries taking more than this (works
|
65
|
+
# with SQLite, MySQL, and PostgreSQL)
|
66
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
67
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '6e495d0caf25cfc279c3c6162c875c3b7ce5335dfb4ca95fdc40f06db4dcefbcbcf06e8ffe5e0be45887d0fa2d473dcd32708267bbddecb7b128d94beea38d59'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20130608162029) do
|
15
|
+
|
16
|
+
create_table "secrets", :force => true do |t|
|
17
|
+
t.integer "user_id"
|
18
|
+
t.text "text"
|
19
|
+
t.datetime "created_at", :null => false
|
20
|
+
t.datetime "updated_at", :null => false
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table "users", :force => true do |t|
|
24
|
+
t.string "name"
|
25
|
+
t.datetime "created_at", :null => false
|
26
|
+
t.datetime "updated_at", :null => false
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
def generate_word
|
2
|
+
['he', 'ro', 'ku', 'mat', 'su', 'mo', 'to', 'yu', 'ki', 'hi'].shuffle.take((2..6).to_a.sample).join
|
3
|
+
end
|
4
|
+
|
5
|
+
def generate_name
|
6
|
+
"#{generate_word.capitalize} #{generate_word.capitalize}"
|
7
|
+
end
|
8
|
+
|
9
|
+
100.times do
|
10
|
+
user = User.create(name: generate_name)
|
11
|
+
|
12
|
+
10.times { user.secrets.create(text: 'Something no one should see.') }
|
13
|
+
end
|
File without changes
|