pipe2me-client 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea9b39bdabfdff554182252c3a14f48dfb723e56
4
- data.tar.gz: 4f7804c87900d6efe3539cf05affd4fb50560da5
3
+ metadata.gz: 7a4b518abcbe271bfd874a2368379ee307ea45bd
4
+ data.tar.gz: f89e443fb7f8741d923924c5852f66a20fd94769
5
5
  SHA512:
6
- metadata.gz: 531290a0666f54693bab6d48c15bafe070064bd9a275fec8570600a24571357753dc788c788f8b7c98970153ff04b79fd0718d9e7f083f3a9d8e53a10a2256bc
7
- data.tar.gz: 441b9f251e8fe932f3795ee482c35693c4c991cc1404a55655e4454b005d34b39c7ce4404d82b4a0293175bfa89faaea4635eaee946c46e5a9d489cd308e6030
6
+ metadata.gz: 594ebe9414dc36d0b2fb82636da00f481c74c211a8e90c36b0e17353e21b63cd4c4f3976eb2df45ddad48ce37a2f15748e3c5806454af9a2c9e1a2a4e2db07b2
7
+ data.tar.gz: a2378307eea92fb07c01c21b409629d82b390104c9f710b3fe838b0f9e2355bb92051a2bd5e3fc8657966d07bb45d64434a5774ade2c2901633a9787f7f785f2
@@ -1,4 +1,4 @@
1
1
  module Pipe2me
2
- VERSION = "0.2.13"
2
+ VERSION = "0.2.14"
3
3
  BANNER = "pipe2me command line client V#{Pipe2me::VERSION}; (c) The kinko team, 2013, 2014."
4
4
  end
data/rakelib/test.rake CHANGED
@@ -1,8 +1,17 @@
1
1
  task :test => "test:debug"
2
2
  namespace :test do
3
- # run a debug test - a test against pipe2.dev. This is the default
4
- # test scenario.
3
+ # run a debug test against pipe2.dev. This is the default test scenario.
4
+ #
5
+ # pipe2.dev, which should point to 127.0.0.1, should run a development
6
+ # version of the pipe2me server package.
5
7
  task :debug do
8
+ require "simple/ui"
9
+ require_relative "../lib/pipe2me/ext/sys"
10
+ unless Pipe2me::Sys.sys :bash, "-c", "curl -O /dev/null http://pipe2.dev:8080 2> /dev/null"
11
+ UI.error "Could not find test pipe2me test server on http://pipe2.dev:8080"
12
+ exit 1
13
+ end
14
+
6
15
  FileUtils.mkdir_p "tmp"
7
16
  system "TEST_ENV=debug sbin/roundup test/*-test.sh"
8
17
  end
data/test/env-test.sh CHANGED
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env roundup
2
- describe "show pipe2me environment"
2
+ describe "pipe2me environment tests"
3
+
4
+ #
5
+ # This tests check that the environment is setup properly.
6
+ # Note: the environment is generated via "pipe2me env"
3
7
 
4
8
  . $(dirname $1)/testhelper.inc
5
9
 
@@ -21,3 +21,37 @@ it_redirects_http_and_https_connections() {
21
21
  http_redirection_target=$(curl -s -o /dev/null -I -w %{redirect_url} http://$fqdn:8080)
22
22
  [ $PIPE2ME_URLS_0/ = "$http_redirection_target" ]
23
23
  }
24
+
25
+ it_redirects_http_to_https_if_needed() {
26
+ # later 'redirects https://subdomain.$pipe2me_server to https://subdomain.$pipe2me_server:port'
27
+ fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token --ports 8100 --protocols https)
28
+
29
+ # load pipe2me environment settings. As a result, ..
30
+ eval $($pipe2me env)
31
+
32
+ [[ "$PIPE2ME_URLS_0" ]] # .. PIPE2ME_URLS_0 is the HTTPS redirection target URL, and ..
33
+ [[ -z "$PIPE2ME_URLS_1" ]] # .. PIPE2ME_URLS_1 is the HTTPS redirection target URL
34
+
35
+ https_redirection_target=$(curl -s -o /dev/null -I -k -w %{redirect_url} https://$fqdn:8443)
36
+ [ $PIPE2ME_URLS_0/ = "$https_redirection_target" ]
37
+
38
+ http_redirection_target=$(curl -s -o /dev/null -I -w %{redirect_url} http://$fqdn:8080)
39
+ [ $PIPE2ME_URLS_0/ = "$http_redirection_target" ]
40
+ }
41
+
42
+ it_does_not_redirects_https_to_http() {
43
+ # later 'redirects https://subdomain.$pipe2me_server to https://subdomain.$pipe2me_server:port'
44
+ fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token --ports 8100 --protocols http)
45
+
46
+ # load pipe2me environment settings. As a result, ..
47
+ eval $($pipe2me env)
48
+
49
+ [[ "$PIPE2ME_URLS_0" ]] # .. PIPE2ME_URLS_0 is the HTTPS redirection target URL, and ..
50
+ [[ -z "$PIPE2ME_URLS_1" ]] # .. PIPE2ME_URLS_1 is the HTTPS redirection target URL
51
+
52
+ https_redirection_target=$(curl -s -o /dev/null -I -k -w %{redirect_url} https://$fqdn:8443)
53
+ [[ -z "$https_redirection_target" ]]
54
+
55
+ http_redirection_target=$(curl -s -o /dev/null -I -w %{redirect_url} http://$fqdn:8080)
56
+ [[ $PIPE2ME_URLS_0/ = "$http_redirection_target" ]]
57
+ }
@@ -1,25 +1,28 @@
1
1
  #!/usr/bin/env roundup
2
- describe "openssl tests"
2
+ describe "SSL tests"
3
+
4
+ # This file contains tests related to SSL functionality.
5
+ #
3
6
 
4
7
  . $(dirname $1)/testhelper.inc
5
8
 
6
9
  # setup creates and signs openssl credentials
7
- it_sets_up_openssl_certs() {
10
+ it_sets_up_ssl_certs() {
11
+ # setup the pipe2me client. This must create a private key and a server
12
+ # certificate, amongst other things. The certificate must contain the
13
+ # correct name.
14
+
15
+
8
16
  fqdn=$($pipe2me setup --server $pipe2me_server --token $pipe2me_token)
17
+
18
+ # test for private key
9
19
  test -f pipe2me.openssl.priv
10
20
  cat pipe2me.openssl.priv | grep -E "BEGIN.*PRIVATE KEY"
11
21
 
22
+ # test for certificate
12
23
  test -f pipe2me.openssl.cert
13
24
  cat pipe2me.openssl.cert | grep "BEGIN CERTIFICATE"
14
25
 
15
- # verify cert name
26
+ # verify name in certificate
16
27
  openssl x509 -in pipe2me.openssl.cert -text | grep CN=$fqdn
17
28
  }
18
-
19
- it_cannot_sign_other_certs() {
20
- later A certificate cannot be used to sign other certificates
21
- }
22
-
23
- it_cannot_sign_fake_certs() {
24
- later A client cannot ask the server to sign certs with different names
25
- }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipe2me-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-15 00:00:00.000000000 Z
11
+ date: 2014-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: pipe2me command line client V0.2.13; (c) The kinko team, 2013, 2014.
69
+ description: pipe2me command line client V0.2.14; (c) The kinko team, 2013, 2014.
70
70
  email: contact@kinko.me
71
71
  executables:
72
72
  - pipe2me
@@ -102,10 +102,10 @@ files:
102
102
  - test/env-test.sh
103
103
  - test/foreman-test.sh
104
104
  - test/monitrc-test.sh
105
- - test/opensslkey-test.sh
106
105
  - test/redirection-test.sh
107
106
  - test/setup-test.sh
108
107
  - test/sshkey-test.sh
108
+ - test/ssl-test.sh
109
109
  - test/testhelper.debug
110
110
  - test/testhelper.inc
111
111
  - test/testhelper.release
@@ -133,5 +133,5 @@ rubyforge_project:
133
133
  rubygems_version: 2.2.2
134
134
  signing_key:
135
135
  specification_version: 4
136
- summary: pipe2me command line client V0.2.13; (c) The kinko team, 2013, 2014.
136
+ summary: pipe2me command line client V0.2.14; (c) The kinko team, 2013, 2014.
137
137
  test_files: []