rails_pwnerer 0.6.72 → 0.6.73

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.6.73. Update bundler commands for bundler 1.0.
2
+
1
3
  v0.6.72. More packages in the ruby scaffold.
2
4
 
3
5
  v0.6.71. Bugfix 2 for CPU enumeration in VM.
@@ -26,10 +26,10 @@ class RailsPwnerer::App::Gems
26
26
  # Phase 2: bundler / rails install
27
27
  # Install the gems needed by the app.
28
28
  if File.exist? 'Gemfile'
29
- File.open('Gemfile', 'a') { |f| f.write "\ngem 'thin'\n"}
30
- system "bundle unlock"
29
+ unless /^gem ['"]thin['"]/ =~ File.read('Gemfile')
30
+ File.open('Gemfile', 'a') { |f| f.write "\ngem 'thin'\n"}
31
+ end
31
32
  system "bundle install"
32
- system "bundle lock"
33
33
  else
34
34
  system "rake gems:install RAILS_ENV=production"
35
35
  end
@@ -31,7 +31,12 @@ module RailsPwnerer::Base
31
31
 
32
32
  # executes a block in a temporary directory
33
33
  def with_temp_dir(options = {})
34
- temp_dir = "#{options[:root] ? '/' : ''}rbpwn_#{(Time.now.to_f * 1000).to_i}"
34
+ base_dir = if options[:root]
35
+ File.exists?('/tmp') ? '/tmp' : '/'
36
+ else
37
+ './'
38
+ end
39
+ temp_dir = base_dir + "rbpwn_#{(Time.now.to_f * 1000).to_i}"
35
40
  Dir.mkdir temp_dir
36
41
  Dir.chdir(temp_dir) { yield }
37
42
  FileUtils.rm_r temp_dir
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rails_pwnerer}
5
- s.version = "0.6.72"
5
+ s.version = "0.6.73"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
9
- s.date = %q{2010-07-04}
9
+ s.date = %q{2010-07-21}
10
10
  s.default_executable = %q{bin/rpwn}
11
11
  s.description = %q{Rails deployment hack.}
12
12
  s.email = %q{victor@costan.us}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 151
4
+ hash: 149
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 72
10
- version: 0.6.72
9
+ - 73
10
+ version: 0.6.73
11
11
  platform: ruby
12
12
  authors:
13
13
  - Victor Costan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-04 00:00:00 -04:00
18
+ date: 2010-07-21 00:00:00 -04:00
19
19
  default_executable: bin/rpwn
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency