sinicum-runner 0.5.0.pre4 → 0.5.0.pre5

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: a05c2535dfe8ca1e64b49c453c294f09936e896e
4
- data.tar.gz: 03d1ce4591bf7202bbff103b5fe6194317810f3d
3
+ metadata.gz: f026d7de68669850ee53380614ce5a4a39df97b7
4
+ data.tar.gz: ee6c8554b03221666a2428b5fe04285ced1909f4
5
5
  SHA512:
6
- metadata.gz: 4164b3e4ffbae6705f86d3bba69a24a7d19c6ddf357285a6c1e13084ce3ed4741ecf7afbc95f42e69378ecd190ece75d7b8917ed835894ab5bf896d799dd15ea
7
- data.tar.gz: db60d95b9cfb04404763d486248a69535cac7bdd31220ff271644e7a2771d363d81941c46f753043e897cd66d6c31de7b663cce910df7f9efbdaed43f3320fb8
6
+ metadata.gz: 49aec1cfa5c762a97cc812eed59be427cb37c1a525e35b674bdc3fc1d907dc3c179640cdb728758aae635c22f8399b5aa8eee5e6eefc80539c234c8887671e81
7
+ data.tar.gz: 5ea75f329d53b77b89f6d4b80f3023635eeb61c67e73b82010451951dd8f90a2a78491a80a4a21f6d1029de44734e917ac7dac8c6b950c3d6bb78b6256e68dc7
@@ -149,7 +149,8 @@ module Sinicum
149
149
 
150
150
  class Options
151
151
  DEFAULT_ENVIRONMENT = "development"
152
- attr_reader :port, :ajp_port, :context, :skip_build, :only_build, :hostname, :environment
152
+ attr_reader :port, :ajp_port, :context, :skip_build, :only_build, :hostname,
153
+ :environment, :scheme, :proxyport
153
154
 
154
155
  def initialize(args = [])
155
156
  options = OptionParser.new do |opts|
@@ -165,6 +166,12 @@ module Sinicum
165
166
  opts.on("-n", "--hostname [HOSTNAME]", "application host name") do |hostname|
166
167
  @hostname = hostname
167
168
  end
169
+ opts.on("-S", "--https-scheme", "use HTTPS as connector scheme and 443 as proxy port") do |scheme|
170
+ @scheme = scheme
171
+ end
172
+ opts.on("-P", "--proxyport [PROXYPORT]", "tomcat connector proxy port") do |proxyport|
173
+ @proxyport = proxyport
174
+ end
168
175
  @skip_build = false
169
176
  opts.on("-s", "--skip-build", "skips the build of the Maven project") do |skip|
170
177
  @skip_build = true
@@ -205,6 +212,8 @@ module Sinicum
205
212
  args.concat(["-a", ajp_port]) if ajp_port
206
213
  args.concat(["-c", context]) if context
207
214
  args.concat(["-n", hostname]) if hostname
215
+ args.concat(["-S", scheme]) if scheme
216
+ args.concat(["-P", proxyport]) if proxyport
208
217
  args
209
218
  end
210
219
  end
@@ -1,5 +1,5 @@
1
1
  module Sinicum
2
2
  module Runner
3
- VERSION = "0.5.0.pre4"
3
+ VERSION = "0.5.0.pre5"
4
4
  end
5
5
  end
data/pom.xml CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <groupId>com.dievision.sinicum</groupId>
6
6
  <artifactId>sinicum-runner</artifactId>
7
- <version>0.5.0.pre4</version>
7
+ <version>0.5.0.pre5</version>
8
8
  <packaging>jar</packaging>
9
9
 
10
10
  <name>sinicum-runner</name>
@@ -18,6 +18,12 @@ public class Configuration {
18
18
  @Parameter(names = {"-n", "--hostname"}, description = "Tomcat Hostname")
19
19
  private String hostname;
20
20
 
21
+ @Parameter(names = {"-S", "--https-scheme"}, description = "Tomcat Connector HTTPS Scheme")
22
+ private boolean scheme;
23
+
24
+ @Parameter(names = {"-P", "--proxyport"}, description = "Tomcat Connector Proxy port")
25
+ private Integer proxyPort = 443;
26
+
21
27
  @Parameter(names = "--basedir", description = "Tomcat Base directory", required = true)
22
28
  private String baseDir;
23
29
 
@@ -47,4 +53,12 @@ public class Configuration {
47
53
  public String getHostname() {
48
54
  return hostname;
49
55
  }
56
+
57
+ public boolean isHttpsScheme() {
58
+ return scheme;
59
+ }
60
+
61
+ public Integer getProxyPort() {
62
+ return proxyPort;
63
+ }
50
64
  }
@@ -14,6 +14,13 @@ public class Main {
14
14
  Tomcat tomcat = new Tomcat();
15
15
  tomcat.setPort(config.getHttpPort());
16
16
  tomcat.getConnector().setURIEncoding("UTF-8");
17
+ if (config.isHttpsScheme()) {
18
+ tomcat.getConnector().setScheme("https");
19
+ tomcat.getConnector().setProxyPort(443);
20
+ }
21
+ if (config.getProxyPort() != null) {
22
+ tomcat.getConnector().setProxyPort(config.getProxyPort());
23
+ }
17
24
  if (config.getAjpPort() != null) {
18
25
  Connector connector = new Connector("AJP/1.3");
19
26
  connector.setPort(config.getAjpPort());
@@ -52,6 +52,22 @@ public class ConfigurationTest {
52
52
  assertEquals("ahostname", config.getHostname());
53
53
  }
54
54
 
55
+ @Test
56
+ public void testHttpsScheme() {
57
+ addArgs(new String[]{ "-S" });
58
+ new JCommander(config, argv);
59
+ assertEquals(true, config.isHttpsScheme());
60
+ assertEquals(443, config.getProxyPort().intValue());
61
+ }
62
+
63
+ @Test
64
+ public void testHttpsSchemeWithProxyPort() {
65
+ addArgs(new String[]{ "-S", "-P", "4242" });
66
+ new JCommander(config, argv);
67
+ assertEquals(true, config.isHttpsScheme());
68
+ assertEquals(4242, config.getProxyPort().intValue());
69
+ }
70
+
55
71
  @Test
56
72
  public void testBaseDirAppBase() {
57
73
  argv = new String[]{ "--basedir", "/path/to/dir", "--appbase", "/path/to/appbase"};
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinicum-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre4
4
+ version: 0.5.0.pre5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Metzmacher
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-29 00:00:00.000000000 Z
12
+ date: 2015-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">"
18
+ - - '>'
19
19
  - !ruby/object:Gem::Version
20
20
  version: '10.3'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">"
25
+ - - '>'
26
26
  - !ruby/object:Gem::Version
27
27
  version: '10.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '3.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '3.0'
42
42
  description: A gem to easily run Magnolia CMS in a Tomcat instance
@@ -47,29 +47,14 @@ executables:
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - ".gitignore"
51
- - ".rspec"
52
- - ".travis.yml"
50
+ - .gitignore
51
+ - .rspec
52
+ - .travis.yml
53
53
  - Gemfile
54
54
  - LICENSE
55
55
  - README.md
56
56
  - Rakefile
57
57
  - bin/sinicum-runner
58
- - lib/java/lib/ecj-P20140317-1600.jar
59
- - lib/java/lib/hamcrest-core-1.3.jar
60
- - lib/java/lib/jcommander-1.30.jar
61
- - lib/java/lib/tomcat-annotations-api-7.0.54.jar
62
- - lib/java/lib/tomcat-api-7.0.54.jar
63
- - lib/java/lib/tomcat-catalina-7.0.54.jar
64
- - lib/java/lib/tomcat-el-api-7.0.54.jar
65
- - lib/java/lib/tomcat-embed-core-7.0.54.jar
66
- - lib/java/lib/tomcat-jasper-7.0.54.jar
67
- - lib/java/lib/tomcat-jasper-el-7.0.54.jar
68
- - lib/java/lib/tomcat-jsp-api-7.0.54.jar
69
- - lib/java/lib/tomcat-juli-7.0.54.jar
70
- - lib/java/lib/tomcat-servlet-api-7.0.54.jar
71
- - lib/java/lib/tomcat-util-7.0.54.jar
72
- - lib/java/sinicum-runner-0.5.0.pre4.jar
73
58
  - lib/sinicum-runner.rb
74
59
  - lib/sinicum-runner/runner_cli.rb
75
60
  - lib/sinicum-runner/version.rb
@@ -90,17 +75,17 @@ require_paths:
90
75
  - lib
91
76
  required_ruby_version: !ruby/object:Gem::Requirement
92
77
  requirements:
93
- - - ">="
78
+ - - '>='
94
79
  - !ruby/object:Gem::Version
95
80
  version: '0'
96
81
  required_rubygems_version: !ruby/object:Gem::Requirement
97
82
  requirements:
98
- - - ">"
83
+ - - '>'
99
84
  - !ruby/object:Gem::Version
100
85
  version: 1.3.1
101
86
  requirements: []
102
87
  rubyforge_project:
103
- rubygems_version: 2.2.2
88
+ rubygems_version: 2.0.14
104
89
  signing_key:
105
90
  specification_version: 4
106
91
  summary: Simple embedded Tomcat server
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file