rbbt-util 5.5.55 → 5.5.56

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjE4OWJkNTMxYTY2NTE1ZDhjMWZlNzYwZmIwMDM3OTQwY2U3MzIzMw==
4
+ YTdmNTRiNGE5OWE1NGU0MTY4MTRkYzE0MTM3NWIzOGI3ODk1M2ZlZA==
5
5
  data.tar.gz: !binary |-
6
- ODAzNjMyMDhiZDhjYjI3ZDAxMzczMjIxY2ZmOWViMjgyYzFiOGQ2MA==
6
+ Y2UyNzkwM2MyOTU1MDM4YWU0Nzg3YjdjNjhjM2EzNmUxMDg1NTZhOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDUyZTI5YWYxZjdjY2FiODM1NTQ5MzU5ZWJlZjAyNTM3ZTc2NDM4MjlmMTdh
10
- NGY0MzJjOGIzM2JlNGFlNzliNDkwMzFkY2IxMWI3MjM1N2JkZWE4ZWEyMjY0
11
- NmUwMzY3MGNhZWIzZDg3MDU4ZWIyYzAyNmI3NjRiZDdiZGNhYzU=
9
+ N2FkOTZiZWJhYmU1ODZhYmJkYWMwOTcxZjVjZWU0ZjMyNDc0ODkyZDVkNjgw
10
+ MzYyMDZiMDZhMzk0YzNiNGQ0ZDk4OTg2NGM2M2IyMjc0MjJlOWJmMDcwYjI0
11
+ OTY5MThlNDAxZWYyZjE1MThkNjM1MTQ4OTAwM2M4MjJkMzViMmY=
12
12
  data.tar.gz: !binary |-
13
- MTdjNDViZjJkYWI3NGMzNjE5Y2M4ZDU0N2FhMzllMzEzMWQ5YzNjODczYWE0
14
- NmRmYmY0ZDQ4Yjk5MWJkMzk4NGYzZDNkMzYyOWJhMmNmOThkYmY2NGViMmZh
15
- YjhkYjM0OTBkNTYyOWQxYTQ0MmUyOGY2Y2M4YjViYThkNDNjYjU=
13
+ YTNkOWQ1YmYwZmI3MWI4NTc2MDg5OTAzMWEwMDkyZjZkMzIyMDljMTA3YWRl
14
+ NGU3NzRkZWRhODk2NzY5ZWIxNzI4YTdhMGUzMjhkOGZjNTA1MDAzMGJkNGU2
15
+ NWZlZjViMWQ5MTUzZTE5YmFlMWNiN2E5MTQ4YWE5MzM2MDJlMWI=
data/lib/rbbt/resource.rb CHANGED
@@ -111,44 +111,46 @@ module Resource
111
111
  if not File.exists? final_path or force
112
112
  Log.medium "Producing: #{ final_path }"
113
113
  Misc.lock final_path + '.produce' do
114
- (remote_server and get_from_server(path, final_path)) or
115
- begin
116
- case type
117
- when :string
118
- Open.write(final_path, content)
119
- when :url
120
- Open.write(final_path, Open.open(content))
121
- when :proc
122
- data = case content.arity
123
- when 0
124
- content.call
125
- when 1
126
- content.call final_path
127
- end
128
- Open.write(final_path, data) unless data.nil?
129
- when :rake
130
- run_rake(path, content, rake_dir)
131
- when :install
132
- Log.debug "Installing software: #{path}"
133
- software_dir = path.resource.root.software.find :user
134
- preamble = <<-EOF
114
+ if not File.exists? final_path or force
115
+ (remote_server and get_from_server(path, final_path)) or
116
+ begin
117
+ case type
118
+ when :string
119
+ Open.write(final_path, content)
120
+ when :url
121
+ Open.write(final_path, Open.open(content))
122
+ when :proc
123
+ data = case content.arity
124
+ when 0
125
+ content.call
126
+ when 1
127
+ content.call final_path
128
+ end
129
+ Open.write(final_path, data) unless data.nil?
130
+ when :rake
131
+ run_rake(path, content, rake_dir)
132
+ when :install
133
+ Log.debug "Installing software: #{path}"
134
+ software_dir = path.resource.root.software.find :user
135
+ preamble = <<-EOF
135
136
  #!/bin/bash
136
137
 
137
138
  RBBT_SOFTWARE_DIR="#{software_dir}"
138
139
 
139
140
  INSTALL_HELPER_FILE="#{Rbbt.share.install.software.lib.install_helpers.find :lib, caller_lib_dir(__FILE__)}"
140
141
  source "$INSTALL_HELPER_FILE"
141
- EOF
142
+ EOF
142
143
 
143
- CMD.cmd('bash', :in => preamble + "\n" + Open.read(content))
144
+ CMD.cmd('bash', :in => preamble + "\n" + Open.read(content))
144
145
 
145
- set_software_env(software_dir)
146
- else
147
- raise "Could not produce #{ resource }. (#{ type }, #{ content })"
146
+ set_software_env(software_dir)
147
+ else
148
+ raise "Could not produce #{ resource }. (#{ type }, #{ content })"
149
+ end
150
+ rescue
151
+ FileUtils.rm_rf final_path if File.exists? final_path
152
+ raise $!
148
153
  end
149
- rescue
150
- FileUtils.rm_rf final_path if File.exists? final_path
151
- raise $!
152
154
  end
153
155
  end
154
156
  end
data/lib/rbbt/util/cmd.rb CHANGED
@@ -41,7 +41,7 @@ module CMD
41
41
  end
42
42
 
43
43
  def close
44
- self.original_read unless self.eof?
44
+ self.original_read unless self.closed? or self.eof?
45
45
 
46
46
  wait_and_status
47
47
 
@@ -67,9 +67,9 @@ module CMD
67
67
  end
68
68
 
69
69
  def read(*args)
70
- data = original_read(*args) unless self.eof?
70
+ data = original_read(*args) unless self.closed? or self.eof?
71
71
 
72
- self.close if self.eof?
72
+ self.close if self.eof? and not self.closed?
73
73
 
74
74
  data
75
75
  end
data/share/unicorn.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  worker_processes 4
2
- timeout 30
2
+ timeout 600
3
3
  preload_app true
4
4
 
5
5
  @app_path = Dir.pwd
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.55
4
+ version: 5.5.56
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez