test_server 0.3.7 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b9f2fa86b68208a6976f20d4da55315f857254c
4
- data.tar.gz: 5d60c786d071bc8c513e3a385403d090341ae77b
3
+ metadata.gz: 74ee7672fc41e27615e866439f9688fb0acfda2e
4
+ data.tar.gz: d86add8df6dde32ccd179e2832631509fa8448e4
5
5
  SHA512:
6
- metadata.gz: bf9fe6d674a19dd0cc210e7467390a2ef4610b8adc5c2ef38a46270e9da1f2c33d6b0704d77817c4abf29f80e9b86695998ada7c3472a8b6ec4ea36551a5644d
7
- data.tar.gz: 4eeb1b7292d6e9d2542776921ae46b9b5e72a35c5c6ee1e1810f086b0a7d7b765a82d228862a5bdeac3ca0f13190c3f48d3a45f6ae9fff8f8fcacb31fc704412
6
+ metadata.gz: 943707dbb433a08a09871338dbbdba4a81decd20d96dd033930e8d417b5111af1658aa6848f77b2b1d255ee103c5bdb1c1f9d506b0ac9b2a0ce0563ee88133fc
7
+ data.tar.gz: be4ab4631deff82e7a9156fe1574d455e6c7e4bbf9c5b33b859f6667d038996ca03dc7941dbd9d592d626f47e5f8a10ac3b5135f307aba64a1a292cdbec13ab1
@@ -0,0 +1,3 @@
1
+ # Place all the behaviors and hooks related to the matching controller here.
2
+ # All this logic will automatically be available in application.js.
3
+ # You can use CoffeeScript in this file: http://coffeescript.org/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the TestServer::Reflector controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,13 @@
1
+ module TestServer
2
+ class ReflectorController < ApplicationController
3
+ add_breadcrumb I18n.t('views.root.link'), :root_path
4
+ add_breadcrumb I18n.t('views.reflector.link'), :reflector_path
5
+
6
+ def client_ip_address
7
+ add_breadcrumb I18n.t('views.reflector.client_ip_address.link'), :reflector_client_ip_address_path
8
+ end
9
+
10
+ def index
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,2 @@
1
+ module TestServer::ReflectorHelper
2
+ end
@@ -51,6 +51,16 @@
51
51
  - [ :plain ].each do |action|
52
52
  %li
53
53
  = link_to t("views.static.#{action}.title"), "/static/#{action}.html"
54
+ %li.ts-dropdown
55
+ %a.dropdown-toggle{ href: '#', 'data-toggle' => 'dropdown'}
56
+ = t('views.reflector.link')
57
+ %b.ts-caret
58
+ %ul.ts-dropdown-menu
59
+ %li
60
+ = link_to t('views.reflector.index.link'), static_path
61
+ - [ :client_ip_address ].each do |action|
62
+ %li
63
+ = link_to t("views.reflector.#{action}.title"), send("reflector_#{action}_path")
54
64
  %ul.ts-breadcrumb
55
65
  = render_breadcrumbs builder: TestServer::BreadcrumbBuilder
56
66
  .ts-container
@@ -12,5 +12,6 @@
12
12
  = link_to t("views.#{controller_name}.#{action}.title"), send("#{controller_name}_#{action}_path")
13
13
  %br
14
14
  %span.ts-dashboard-known_params
15
- = surround '(', ')' do
16
- = permitted_params.known_params_for_controller(controller_name, action).join(', ')
15
+ - unless permitted_params.known_params_for_controller(controller_name, action).blank?
16
+ = surround '(', ')' do
17
+ = permitted_params.known_params_for_controller(controller_name, action).join(', ')
@@ -5,3 +5,4 @@
5
5
  = render partial: 'test_server/string/overview'
6
6
  = render partial: 'test_server/streaming/overview'
7
7
  = render partial: 'test_server/static/overview'
8
+ = render partial: 'test_server/reflector/overview'
@@ -0,0 +1,2 @@
1
+ %h1 Other#reflect_ip_address
2
+ %p Find me in app/views/other/reflect_ip_address.html.haml
@@ -0,0 +1 @@
1
+ = render partial: 'shared/overview', locals: { controller_name: 'reflector', supported_actions: [:client_ip_address], static: false }
@@ -0,0 +1,3 @@
1
+ %h2
2
+ = t('views.reflector.client_ip_address.title')
3
+ = request.remote_ip
@@ -0,0 +1 @@
1
+ = render partial: 'overview'
data/config/routes.rb CHANGED
@@ -3,6 +3,9 @@ Rails.application.routes.draw do
3
3
  root 'dashboard#show'
4
4
  #match '(errors)/:exception', to: 'errors#show', constraints: {exception: /[a-z_]+/}, via: :all
5
5
 
6
+ get '/reflector/client_ip_address', to: 'reflector#client_ip_address'
7
+ get '/reflector', to: 'reflector#index'
8
+
6
9
  get '/dashboard', to: 'dashboard#show'
7
10
 
8
11
  get '/streaming', to: 'streaming#index'
@@ -9,7 +9,7 @@
9
9
 
10
10
  # Make sure the secrets in this file are kept private
11
11
  # if you're sharing your code publicly.
12
- <%- require 'secure_random' -%>
12
+ <%- require 'securerandom' -%>
13
13
  development:
14
14
  secret_key_base: <%= SecureRandom.hex(128) %>
15
15
 
@@ -96,6 +96,15 @@ en:
96
96
  show:
97
97
  title: Dashboard
98
98
  link: Dashboard
99
+ reflector:
100
+ title: Reflector
101
+ link: Reflector
102
+ client_ip_address:
103
+ title: Show Your Client IP Address
104
+ link: Client IP Address
105
+ index:
106
+ title: Overview for Reflectors
107
+ link: Overview
99
108
  static:
100
109
  link: Static
101
110
  title: Static content
@@ -16,6 +16,10 @@ module TestServer
16
16
  dashboard: {
17
17
  show: [],
18
18
  },
19
+ reflector: {
20
+ client_ip_address: [],
21
+ index: [],
22
+ },
19
23
  static: {
20
24
  index: [],
21
25
  },
@@ -1,4 +1,4 @@
1
1
  #main TestServer
2
2
  module TestServer
3
- VERSION = '0.3.7'
3
+ VERSION = '0.4.0'
4
4
  end
@@ -6,7 +6,7 @@ pkgdesc="test server for proxy testing"
6
6
  arch=(i686 x86_64)
7
7
  url="https://github.com/dg-vrnetze/${pkgname}"
8
8
  license=('MIT')
9
- depends=('ruby' 'sqlite3')
9
+ depends=('ruby' 'sqlite3' 'libgit2')
10
10
  install=${pkgname}.install
11
11
  makedepends=('rubygems' 'filegen' 'phantomjs' 'ruby-bundler' 'libatomic_ops')
12
12
  source=(<%= lookup('source') %>)
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ describe TestServer::ReflectorController do
4
+
5
+ describe "GET 'client_ip_address'" do
6
+ it "returns http success" do
7
+ get 'client_ip_address'
8
+ response.should be_success
9
+ end
10
+ end
11
+
12
+ end
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+ describe "reflector/client_ip_address.html.haml" do
4
+ before :each do
5
+ config = Class.new do
6
+ include FeduxOrg::Stdlib::Filesystem
7
+
8
+ def root_directory
9
+ ::File.expand_path('../../../', __FILE__)
10
+ end
11
+
12
+ def log_level
13
+ :unknown
14
+ end
15
+
16
+ def access_log
17
+ File.join(working_directory, 'access.log')
18
+ end
19
+ end.new
20
+
21
+ TestServer.config = config
22
+ end
23
+
24
+ context 'Reflect Client IP-Adress' do
25
+ it 'lists links to all other test functions' do
26
+ visit '/reflector/client_ip_address'
27
+ expect(page).to have_content '127.0.0.1'
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+ describe "reflector/client_ip_address.html.haml" do
4
+ before :each do
5
+ config = Class.new do
6
+ include FeduxOrg::Stdlib::Filesystem
7
+
8
+ def root_directory
9
+ ::File.expand_path('../../../', __FILE__)
10
+ end
11
+
12
+ def log_level
13
+ :unknown
14
+ end
15
+
16
+ def access_log
17
+ File.join(working_directory, 'access.log')
18
+ end
19
+ end.new
20
+
21
+ TestServer.config = config
22
+ end
23
+
24
+ context 'Reflect Client IP-Adress' do
25
+ it 'lists links to all other test functions' do
26
+ visit '/reflector/'
27
+ expect(page).to have_content 'Show Your'
28
+ end
29
+ end
30
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Günnewig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -427,18 +427,22 @@ files:
427
427
  - app/assets/images/ajax-loader.gif
428
428
  - app/assets/javascripts/application.js
429
429
  - app/assets/javascripts/errors.js
430
+ - app/assets/javascripts/test_server/reflector.js.coffee
430
431
  - app/assets/stylesheets/application.scss
431
432
  - app/assets/stylesheets/errors.css
433
+ - app/assets/stylesheets/test_server/reflector.css.scss
432
434
  - app/controllers/concerns/.keep
433
435
  - app/controllers/test_server/application_controller.rb
434
436
  - app/controllers/test_server/dashboard_controller.rb
435
437
  - app/controllers/test_server/errors_controller.rb
436
438
  - app/controllers/test_server/generator_controller.rb
439
+ - app/controllers/test_server/reflector_controller.rb
437
440
  - app/controllers/test_server/static_controller.rb
438
441
  - app/controllers/test_server/streaming_controller.rb
439
442
  - app/controllers/test_server/string_controller.rb
440
443
  - app/helpers/application_helper.rb
441
444
  - app/helpers/errors_helper.rb
445
+ - app/helpers/test_server/reflector_helper.rb
442
446
  - app/mailers/.keep
443
447
  - app/models/.keep
444
448
  - app/models/concerns/.keep
@@ -450,6 +454,10 @@ files:
450
454
  - app/views/test_server/generator/_overview.html.haml
451
455
  - app/views/test_server/generator/index.html.haml
452
456
  - app/views/test_server/generator/xhr.html.haml
457
+ - app/views/test_server/other/reflect_ip_address.html.haml
458
+ - app/views/test_server/reflector/_overview.html.haml
459
+ - app/views/test_server/reflector/client_ip_address.html.haml
460
+ - app/views/test_server/reflector/index.html.haml
453
461
  - app/views/test_server/static/_overview.html.haml
454
462
  - app/views/test_server/static/index.html.haml
455
463
  - app/views/test_server/streaming/_overview.html.haml
@@ -538,7 +546,7 @@ files:
538
546
  - public/assets/bootstrap/glyphicons-halflings-regular-8921a93349df81eec3d107b946cadc11.woff
539
547
  - public/assets/bootstrap/glyphicons-halflings-regular-dabd247fcf6131fac2d5fb49ef946032.eot
540
548
  - public/assets/bootstrap/glyphicons-halflings-regular-f7c7c8f3c0d76e8572c38e5d8ee21a62.ttf
541
- - public/assets/manifest-5b2795ed303cc48b254ae387c280769c.json
549
+ - public/assets/manifest-7c069da388f8a976fadfaab958b9feb7.json
542
550
  - public/assets/open-sans/fonts/bold-italic/opensans-bold-italic-webfont-1fd4caae8a90824c18dab91d876abd96.eot
543
551
  - public/assets/open-sans/fonts/bold-italic/opensans-bold-italic-webfont-57323909f6eb12958ceb3d71a31124a5.woff
544
552
  - public/assets/open-sans/fonts/bold-italic/opensans-bold-italic-webfont-610aeecbe53403e7731391febf814c62.svg
@@ -608,6 +616,7 @@ files:
608
616
  - share/systemd/test_server.socket
609
617
  - share/systemd/tmpfiles.conf.erb
610
618
  - spec/controllers/errors_controller_spec.rb
619
+ - spec/controllers/test_server/reflector_controller_spec.rb
611
620
  - spec/encoder_spec.rb
612
621
  - spec/encoders/base64_spec.rb
613
622
  - spec/encoders/base64_strict_spec.rb
@@ -619,7 +628,6 @@ files:
619
628
  - spec/features/fetch_test_data_plain_spec.rb
620
629
  - spec/features/fetch_test_data_via_streaming_spec.rb
621
630
  - spec/features/helper_spec.rb
622
- - spec/helpers/errors_helper_spec.rb
623
631
  - spec/permitted_params_spec.rb
624
632
  - spec/process_environment_spec.rb
625
633
  - spec/spec_helper.rb
@@ -638,6 +646,8 @@ files:
638
646
  - spec/support/string.rb
639
647
  - spec/support/timeout.rb
640
648
  - spec/views/errors/not_found.html.haml_spec.rb
649
+ - spec/views/test_server/reflector/client_ip_address.html.haml_spec.rb
650
+ - spec/views/test_server/reflector/index.html.haml_spec.rb
641
651
  - test_server.gemspec
642
652
  - tmp/.keep
643
653
  - vendor/assets/components/open-sans/.bower.json
@@ -724,6 +734,7 @@ specification_version: 4
724
734
  summary: Test server for proxies
725
735
  test_files:
726
736
  - spec/controllers/errors_controller_spec.rb
737
+ - spec/controllers/test_server/reflector_controller_spec.rb
727
738
  - spec/encoder_spec.rb
728
739
  - spec/encoders/base64_spec.rb
729
740
  - spec/encoders/base64_strict_spec.rb
@@ -735,7 +746,6 @@ test_files:
735
746
  - spec/features/fetch_test_data_plain_spec.rb
736
747
  - spec/features/fetch_test_data_via_streaming_spec.rb
737
748
  - spec/features/helper_spec.rb
738
- - spec/helpers/errors_helper_spec.rb
739
749
  - spec/permitted_params_spec.rb
740
750
  - spec/process_environment_spec.rb
741
751
  - spec/spec_helper.rb
@@ -754,4 +764,6 @@ test_files:
754
764
  - spec/support/string.rb
755
765
  - spec/support/timeout.rb
756
766
  - spec/views/errors/not_found.html.haml_spec.rb
767
+ - spec/views/test_server/reflector/client_ip_address.html.haml_spec.rb
768
+ - spec/views/test_server/reflector/index.html.haml_spec.rb
757
769
  has_rdoc:
@@ -1,15 +0,0 @@
1
- require 'spec_helper'
2
-
3
- # Specs in this file have access to a helper object that includes
4
- # the ErrorsHelper. For example:
5
- #
6
- # describe ErrorsHelper do
7
- # describe "string concat" do
8
- # it "concats two strings with spaces" do
9
- # expect(helper.concat_strings("this","that")).to eq("this that")
10
- # end
11
- # end
12
- # end
13
- describe ErrorsHelper do
14
- pending "add some examples to (or delete) #{__FILE__}"
15
- end