fontana_client_support 0.8.3 → 0.8.4
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 +4 -4
- data/bin/assign_port_to_env +20 -0
- data/lib/fontana.rb +20 -0
- data/lib/fontana_client_support/tasks/server.rake +8 -2
- data/lib/fontana_client_support/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23117e178e3c27bfe84c8424e154d9c3753932f7
|
4
|
+
data.tar.gz: ce6c6ff7e9b08ad1ccec5b87a90c4ab3a4187808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbe19aad2db515a4cb543c33e4ee81c85e217a66714669adcd6c8599a4c25ee372c30e7207c2e5814f61e0fa05219e614a1b3fdc0998f1023803bee29c7044fe
|
7
|
+
data.tar.gz: 11749ad9c57046156fbe99963f35f0ee3f4292b12cc577de2045f3040bc691873eacaab1289d2c2e69a02a8382cee6eed1c9afe9ed90bd6ad033d4de48768bdf
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
idx = ARGV.index("--")
|
4
|
+
unless idx
|
5
|
+
raise "%s [port_env1] [port_env2]... -- <command>" % File.basename(__FILE__)
|
6
|
+
end
|
7
|
+
|
8
|
+
targets = ARGV[0, idx]
|
9
|
+
command = ARGV[(idx + 1)..-1].join(" ")
|
10
|
+
|
11
|
+
port_range = 10000..60000
|
12
|
+
len = (port_range.max - port_range.min)
|
13
|
+
|
14
|
+
targets.each do |target|
|
15
|
+
ENV[target] = (rand(len) + port_range.min).to_s
|
16
|
+
end
|
17
|
+
|
18
|
+
require File.expand_path("../../lib/fontana/command_utils", __FILE__)
|
19
|
+
|
20
|
+
Fontana::CommandUtils.system!(command)
|
data/lib/fontana.rb
CHANGED
@@ -62,5 +62,25 @@ module Fontana
|
|
62
62
|
end
|
63
63
|
private :load_fontana_version_file
|
64
64
|
|
65
|
+
def development_http_server_port
|
66
|
+
(ENV["FONTANA_DEVELOPMENT_HTTP_SERVER_PORT" ] || 3000).to_i
|
67
|
+
end
|
68
|
+
|
69
|
+
def development_https_server_port
|
70
|
+
(ENV["FONTANA_DEVELOPMENT_HTTPS_SERVER_PORT"] || 3001).to_i
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_http_server_port
|
74
|
+
(ENV["FONTANA_TEST_HTTP_SERVER_PORT" ] || 4000).to_i
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_https_server_port
|
78
|
+
(ENV["FONTANA_TEST_HTTPS_SERVER_PORT"] || 4001).to_i
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_server_url(hostname = "localhost")
|
82
|
+
"http://#{hostname}:#{test_http_server_port}"
|
83
|
+
end
|
84
|
+
|
65
85
|
end
|
66
86
|
end
|
@@ -13,8 +13,14 @@ def build_env_str(env)
|
|
13
13
|
end
|
14
14
|
|
15
15
|
{
|
16
|
-
development: {
|
17
|
-
|
16
|
+
development: {
|
17
|
+
http_port: Fontana.development_http_server_port,
|
18
|
+
https_port: Fontana.development_https_server_port,
|
19
|
+
},
|
20
|
+
test: {
|
21
|
+
http_port: Fontana.test_http_server_port,
|
22
|
+
https_port: Fontana.test_https_server_port,
|
23
|
+
},
|
18
24
|
}.each do |app_mode, config|
|
19
25
|
namespace app_mode.to_sym do
|
20
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fontana_client_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,6 +84,7 @@ description: gem to support development and testing with GSS/fontana
|
|
84
84
|
email:
|
85
85
|
- t-akima@groovenauts.jp
|
86
86
|
executables:
|
87
|
+
- assign_port_to_env
|
87
88
|
- fontana_config_server
|
88
89
|
- fontana_fixture
|
89
90
|
extensions: []
|
@@ -95,6 +96,7 @@ files:
|
|
95
96
|
- LICENSE.txt
|
96
97
|
- README.md
|
97
98
|
- Rakefile
|
99
|
+
- bin/assign_port_to_env
|
98
100
|
- bin/fontana_config_server
|
99
101
|
- bin/fontana_fixture
|
100
102
|
- fontana_client_support.gemspec
|