mobilize-base 1.0.53 → 1.0.54

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.
data/.gitignore CHANGED
@@ -11,4 +11,5 @@ config
11
11
  log
12
12
  tmp
13
13
  .DS_Store
14
+ REVISION
14
15
  test/dump.rdb
@@ -206,15 +206,25 @@ module Mobilize
206
206
 
207
207
  def Jobtracker.deployed_at
208
208
  #assumes deploy is as of last commit, or as of last deploy time
209
- #as given by the least recently updated file in the root folder
209
+ #as given by the REVISION file in the root folder
210
210
  deploy_time = begin
211
- %{git log -1 --format="%cd"}.bash
212
- rescue
213
- ls_string = "ls -l #{ENV['PWD']}/*".bash
214
- ls_rows = ls_string.split("\n").map{|lss| lss.strip.split(" ")}
215
- mod_times = ls_rows.select{|lsr| lsr.length == 8}.map{|lsr| lsr[5..6].join(" ")}
216
- mod_times.min
217
- end
211
+ %{git log -1 --format="%cd"}.bash
212
+ rescue
213
+ revision_path = "#{ENV['PWD']}/REVISION"
214
+ "touch #{revision_path}".bash unless File.exists?(revision_path)
215
+ revision_string = "ls -l #{revision_path}".bash
216
+ revision_rows = revision_string.split("\n").map{|lss| lss.strip.split(" ")}
217
+ mod_time = revision_rows.map do |lsr|
218
+ if lsr.length == 8
219
+ #ubuntu
220
+ lsr[5..6].join(" ")
221
+ elsif lsr.length == 9
222
+ #osx
223
+ lsr[5..7].join(" ")
224
+ end
225
+ end.first
226
+ mod_time
227
+ end.to_s.strip
218
228
  Time.parse(deploy_time)
219
229
  end
220
230
 
@@ -1,5 +1,5 @@
1
1
  module Mobilize
2
2
  module Base
3
- VERSION = "1.0.53"
3
+ VERSION = "1.0.54"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobilize-base
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.53
4
+ version: 1.0.54
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -255,7 +255,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
255
255
  version: '0'
256
256
  segments:
257
257
  - 0
258
- hash: 3136122815792063688
258
+ hash: -4062987681632311273
259
259
  required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  none: false
261
261
  requirements:
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  version: '0'
265
265
  segments:
266
266
  - 0
267
- hash: 3136122815792063688
267
+ hash: -4062987681632311273
268
268
  requirements: []
269
269
  rubyforge_project: mobilize-base
270
270
  rubygems_version: 1.8.24