threeman 0.7.0 → 0.8.0

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
  SHA256:
3
- metadata.gz: 1b2f74bfedc2d8fd381783ea740e84ce88c18fc6426629b33a150ad627f6a383
4
- data.tar.gz: fbc264bd35bd20dca3108697bf116cd97a8e3cfa8b77b469804837041937e580
3
+ metadata.gz: d45d2cd254f2c7ac356e640e3b4abce6a3295423a67c3db6722a9eabe8e92fa0
4
+ data.tar.gz: a31bbf2712949c338a831bcf598468812c63d0aeba81b54baa8ceeee3ca495c1
5
5
  SHA512:
6
- metadata.gz: 1218f32b4acb25d4cdc37a0a1cd78e453f7d39c94c7d7ef33d488c35d6780f82cef5432f14dbca87b871a76ed17d61c4ced4269a61ee6862c93d77f89aeaa70d
7
- data.tar.gz: b243bd7541a51db9e174a15b3018de48d7c03a52d6de917ce4a2c83e1209a96411abe67cffc974e857816bf73a2cd6800d0ae66d6b8a16579b3ba61a5586491a
6
+ metadata.gz: 9404cf7e0e41790b19a0ee22adf902a1963932d9cc465c984b61824d6877af66f07c4f9e93c059ef7eb0d7b3e10a024ccb409d968788f35cea7b6be351061284
7
+ data.tar.gz: 782b73e714aac292a4ef3af01699fd07e892d540d6d53b071be9ea7d0a54c98f3e4c7485dbac202af1a25c8c39572b0d63832105f082b6dd31bd256b46515c61
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.8.0 - November 29, 2018
2
+
3
+ * Add a `--command-prefix` option, which will make this easier to use in Docker Compose setups
4
+
1
5
  # 0.7.0 - July 16, 2018
2
6
 
3
7
  * Support `--procfile` and `--root` options just like Foreman does
data/lib/threeman/cli.rb CHANGED
@@ -41,12 +41,17 @@ module Threeman
41
41
  desc: "The port to run the application on. This will set the PORT environment variable.",
42
42
  type: :numeric
43
43
  )
44
+ option(
45
+ :command_prefix,
46
+ desc: "If specified, prefix each command in Procfile with this string",
47
+ type: :string
48
+ )
44
49
 
45
50
  def start
46
51
  procfile_name = options[:procfile]
47
52
  pwd = options[:root] || Dir.pwd
48
53
  procfile = Threeman::Procfile.new(File.expand_path(procfile_name, pwd))
49
- commands = procfile.commands(pwd, options[:port] || 5000)
54
+ commands = procfile.commands(pwd, options[:port] || 5000, options[:command_prefix])
50
55
 
51
56
  frontend_name = options[:frontend] || auto_frontend
52
57
  unless frontend_name
@@ -15,4 +15,4 @@ module Threeman
15
15
  "export PORT=#{port} ; #{command}"
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -3,11 +3,12 @@ require 'threeman/command'
3
3
 
4
4
  module Threeman
5
5
  class Procfile < Foreman::Procfile
6
- def commands(workdir, port)
6
+ def commands(workdir, port, command_prefix)
7
7
  commands = []
8
8
 
9
9
  entries do |name, command|
10
- commands << Threeman::Command.new(name, command, workdir, port)
10
+ command_with_prefix = [command_prefix, command].compact.join(' ')
11
+ commands << Threeman::Command.new(name, command_with_prefix, workdir, port)
11
12
  end
12
13
 
13
14
  commands
@@ -1,3 +1,3 @@
1
1
  module Threeman
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threeman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nat Budin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-16 00:00:00.000000000 Z
11
+ date: 2018-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.7.3
148
+ rubygems_version: 2.7.6
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Runs Procfile commands in tabs