rails_pwnerer 0.6.102 → 0.6.103

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.103. Better git checkout command sequence.
2
+
1
3
  v0.6.102. Workaround for buggy apt-cache search output.
2
4
 
3
5
  v0.6.101. Install MRI 1.9.2+ instead of 1.8.7+ when available.
data/README CHANGED
@@ -25,12 +25,11 @@ application.
25
25
 
26
26
  Life with +rails_pwnerer+:
27
27
 
28
- 1) Install a bootstrap version of ruby and rubygems (yes the order is correct):
29
- sudo apt-get -y install ruby1.9.1
28
+ 1) Install a bootstrap version of ruby and rubygems:
29
+ sudo apt-get -y install ruby1.9.1 make
30
30
 
31
31
  2) Install +rails_pwnerer+:
32
- sudo gem install rails_pwnerer make
33
- (if it says gem not found, retry a couple of times)
32
+ sudo gem install rails_pwnerer
34
33
 
35
34
  3) Get your server production-ready:
36
35
  sudo rpwn scaffold
@@ -6,6 +6,7 @@ class RailsPwnerer::App::Git
6
6
  # remove any files not in Git in the application dir
7
7
  def cleanup_app_dir(app_name, instance_name, target_dir, app_name_is_dir = false)
8
8
  Dir.chdir(app_name_is_dir ? app_name : RailsPwnerer::Config[app_name, instance_name][:app_path]) do
9
+ next unless File.exist?(target_dir)
9
10
  Kernel.system "git clean -d -f -x -- #{target_dir}"
10
11
  Kernel.system "git checkout -- #{target_dir}"
11
12
  end
@@ -28,6 +29,7 @@ class RailsPwnerer::App::Git
28
29
  def revert_config_changes(app_name, instance_name)
29
30
  Dir.chdir RailsPwnerer::Config[app_name, instance_name][:app_path] do
30
31
  ['config', 'Gemfile', 'Gemfile.lock'].each do |dir|
32
+ next unless File.exist?(target_dir)
31
33
  Kernel.system "git clean -d -f -x -- #{dir}"
32
34
  Kernel.system "git checkout -- #{dir}"
33
35
  end
@@ -79,18 +81,10 @@ class RailsPwnerer::App::Git
79
81
 
80
82
  FileUtils.rm_rf app_path
81
83
  print "Doing Git clone, please enter your password if prompted...\n"
82
- system "git clone #{git_repository} #{app_path}"
84
+ system "git clone -b #{git_branch} -- #{git_repository} #{app_path}"
83
85
  FileUtils.mkpath app_path unless File.exists? app_path
84
- Dir.chdir app_path do
85
- system "git checkout -q origin/#{git_branch}"
86
- # NOTE: it is only safe to delete master now, we're on a remote branch
87
- system "git branch -d master"
88
- system "git checkout -q -b #{git_branch}"
89
- system "git config branch.#{git_branch}.remote origin"
90
- system "git config branch.#{git_branch}.merge #{git_branch}"
91
- end
92
86
 
93
87
  # check that we really checked out a Rails app
94
88
  return check_rails_root(app_path) ? :ok : false
95
89
  end
96
- end
90
+ end
@@ -30,7 +30,7 @@ class RailsPwnerer::Scaffolds::Gems
30
30
  install_gems %w(highline termios)
31
31
 
32
32
  # Debug gems on production machines.
33
- install_gems %w(echoe jeweler ruby-debug ruby-debug-ide)
33
+ install_gems %w(echoe jeweler ruby-debug ruby-debug19 ruby-debug-ide)
34
34
 
35
35
  # Determine number of CPUs and cores.
36
36
  install_gems %w(sys-cpu)
@@ -48,7 +48,7 @@ class RailsPwnerer::Scaffolds::Packages
48
48
  /^libcurl\d*-openssl-dev$/
49
49
 
50
50
  # needed for solr and other java-based services
51
- package 'openjdk-6-jdk'
51
+ package /^openjdk-\d+-jdk/
52
52
 
53
53
  # useful to be able to work with compressed data
54
54
  package 'zlib-dev', /^zlib[0-9a-z]*-dev$/
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rails_pwnerer"
5
- s.version = "0.6.102"
5
+ s.version = "0.6.103"
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 = "2011-10-12"
9
+ s.date = "2012-02-04"
10
10
  s.description = "Rails deployment hack."
11
11
  s.email = "victor@costan.us"
12
12
  s.executables = ["rpwn", "rpwnctl", "rpwndev"]
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rails_pwnerer", "--main", "README"]
18
18
  s.require_paths = ["lib", "ext"]
19
19
  s.rubyforge_project = "rails-pwnage"
20
- s.rubygems_version = "1.8.10"
20
+ s.rubygems_version = "1.8.15"
21
21
  s.summary = "Rails deployment hack."
22
22
  s.test_files = ["test/base_package_test.rb"]
23
23
 
metadata CHANGED
@@ -1,87 +1,69 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
- version: !ruby/object:Gem::Version
4
- hash: 203
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.103
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 102
10
- version: 0.6.102
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Victor Costan
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-10-12 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-04 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: zerg_support
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &19263240 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: echoe
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *19263240
25
+ - !ruby/object:Gem::Dependency
26
+ name: echoe
27
+ requirement: &19262540 !ruby/object:Gem::Requirement
38
28
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
46
33
  type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: fakefs
50
34
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *19262540
36
+ - !ruby/object:Gem::Dependency
37
+ name: fakefs
38
+ requirement: &19261940 !ruby/object:Gem::Requirement
52
39
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
60
44
  type: :development
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: flexmock
64
45
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *19261940
47
+ - !ruby/object:Gem::Dependency
48
+ name: flexmock
49
+ requirement: &19261080 !ruby/object:Gem::Requirement
66
50
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
74
55
  type: :development
75
- version_requirements: *id004
56
+ prerelease: false
57
+ version_requirements: *19261080
76
58
  description: Rails deployment hack.
77
59
  email: victor@costan.us
78
- executables:
60
+ executables:
79
61
  - rpwn
80
62
  - rpwnctl
81
63
  - rpwndev
82
- extensions:
64
+ extensions:
83
65
  - ext/rpwn_setup_notice/extconf.rb
84
- extra_rdoc_files:
66
+ extra_rdoc_files:
85
67
  - CHANGELOG
86
68
  - LICENSE
87
69
  - README
@@ -134,7 +116,7 @@ extra_rdoc_files:
134
116
  - lib/rails_pwnerer/scaffolds/sshd.rb
135
117
  - lib/rails_pwnerer/util/kill_process_set.rb
136
118
  - lib/rails_pwnerer/util/main.rb
137
- files:
119
+ files:
138
120
  - CHANGELOG
139
121
  - LICENSE
140
122
  - Manifest
@@ -195,43 +177,34 @@ files:
195
177
  - rails_pwnerer.gemspec
196
178
  homepage: http://www.costan.us/rails_pwnage
197
179
  licenses: []
198
-
199
180
  post_install_message:
200
- rdoc_options:
181
+ rdoc_options:
201
182
  - --line-numbers
202
183
  - --inline-source
203
184
  - --title
204
185
  - Rails_pwnerer
205
186
  - --main
206
187
  - README
207
- require_paths:
188
+ require_paths:
208
189
  - lib
209
190
  - ext
210
- required_ruby_version: !ruby/object:Gem::Requirement
191
+ required_ruby_version: !ruby/object:Gem::Requirement
211
192
  none: false
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- hash: 3
216
- segments:
217
- - 0
218
- version: "0"
219
- required_rubygems_version: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - ! '>='
195
+ - !ruby/object:Gem::Version
196
+ version: '0'
197
+ required_rubygems_version: !ruby/object:Gem::Requirement
220
198
  none: false
221
- requirements:
222
- - - ">="
223
- - !ruby/object:Gem::Version
224
- hash: 11
225
- segments:
226
- - 1
227
- - 2
228
- version: "1.2"
199
+ requirements:
200
+ - - ! '>='
201
+ - !ruby/object:Gem::Version
202
+ version: '1.2'
229
203
  requirements: []
230
-
231
204
  rubyforge_project: rails-pwnage
232
- rubygems_version: 1.8.10
205
+ rubygems_version: 1.8.15
233
206
  signing_key:
234
207
  specification_version: 3
235
208
  summary: Rails deployment hack.
236
- test_files:
209
+ test_files:
237
210
  - test/base_package_test.rb