procodile 1.0.22 → 1.0.23

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: 3efcb781b257140b9018f9e7dfc1b841ad9be467
4
- data.tar.gz: 2778571ca5b2dd6525090434aa7f0999950dbb97
3
+ metadata.gz: 452e2a19d36b035e1439532b3ebf25e028fa8255
4
+ data.tar.gz: ebf441b7f3c6a3485b6cd563d1a424500b4e111f
5
5
  SHA512:
6
- metadata.gz: 5f5a372edc34fa2282cb1a59d166866d51320c623e45d5d47206f431be67b6b8070d69d15fc5ef0dcf37a9a94d312dc103f549974fe75f8f2315800ee281763b
7
- data.tar.gz: 19295ee0becef4df9867e72a1c5355810545b6f172e309dcaeb99d9f7cd7c5c3789afc57d26e1e8580a661b09f3bed9a2cd146c2fb4394f32ca7310d245bb5e2
6
+ metadata.gz: 719045e24a2851f5e3404a34832b343d16edeb41c12ec79f68ad9b37eecc28d30ff6deee1603f4ea489fdc268ce68a1329d77095ccde3e152ca67986ed736da7
7
+ data.tar.gz: bcc29b545e4781f42f68f96db31032e2196151b1cd5a6866682252f06296f58567fb167d83c8939cd1aa47dbfbc421506e65f33bf85d4c3ef15360c0f76aa60e
data/bin/procodile CHANGED
@@ -42,7 +42,6 @@ rescue OptionParser::InvalidOption, OptionParser::MissingArgument => e
42
42
  exit 1
43
43
  end
44
44
 
45
-
46
45
  # Get the global configuration file data
47
46
  global_config_path = ENV['PROCODILE_CONFIG'] || "/etc/procodile"
48
47
  if File.file?(global_config_path)
@@ -30,9 +30,9 @@ module Procodile
30
30
  @in_app_directory == true
31
31
  end
32
32
 
33
- # If we have a root and procfile, we're all good
33
+ # If we have a root, we're all good
34
34
  def unambiguous?
35
- !!(@root && @procfile)
35
+ !!@root
36
36
  end
37
37
 
38
38
  def ambiguous?
@@ -75,10 +75,8 @@ module Procodile
75
75
  @root = expand_path(root)
76
76
  @procfile = expand_path(procfile, @root)
77
77
  elsif root && procfile.nil?
78
- # The user has given us a root, we can assume they want to use the procfile
79
- # from the root
78
+ # The user has given us a root, we'll use that as the root
80
79
  @root = expand_path(root)
81
- @procfile = File.join(@root, 'Procfile')
82
80
  elsif root.nil? && procfile
83
81
  # The user has given us a procfile but no root. We will assume the procfile
84
82
  # is in the root of the directory
@@ -88,9 +86,9 @@ module Procodile
88
86
  # The user has given us nothing. We will check to see if there's a Procfile
89
87
  # in the root of our current pwd
90
88
  if File.file?(File.join(pwd, 'Procfile'))
91
- # If there's a procfile in our current pwd, we'll look at using that.
92
- @procfile = File.join(pwd, 'Procfile')
93
- @root = File.dirname(@procfile)
89
+ # If there's a procfile in our current pwd, we'll use our current
90
+ # directory as the root.
91
+ @root = pwd
94
92
  @in_app_directory = true
95
93
  end
96
94
  end
data/lib/procodile/cli.rb CHANGED
@@ -396,7 +396,7 @@ module Procodile
396
396
  #
397
397
  # Open up the procodile log if it exists
398
398
  #
399
- desc "Open a console within the environment"
399
+ desc "Open/stream a Procodile log file"
400
400
  options do |opts, cli|
401
401
  opts.on("-f", "Wait for additional data and display it straight away") do
402
402
  cli.options[:wait] = true
@@ -425,7 +425,6 @@ module Procodile
425
425
  else
426
426
  log_path = @config.log_path
427
427
  end
428
- puts opts
429
428
  if File.exist?(log_path)
430
429
  exec("tail #{opts.join(' ')} #{log_path}")
431
430
  else
@@ -11,6 +11,7 @@ module Procodile
11
11
  def initialize(root, procfile = nil)
12
12
  @root = root
13
13
  @procfile_path = procfile
14
+
14
15
  unless File.file?(procfile_path)
15
16
  raise Error, "Procfile not found at #{procfile_path}"
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module Procodile
2
- VERSION = '1.0.22'
2
+ VERSION = '1.0.23'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: procodile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.22
4
+ version: 1.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-20 00:00:00.000000000 Z
11
+ date: 2019-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json