gorp 0.21.1 → 0.21.2

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -16,25 +16,28 @@ Execution instructions:
16
16
  This is a library which, among other things, will interpret ARGV. Here's
17
17
  an example based on http://github.com/rubys/awdwr:
18
18
 
19
- ruby makedepot.rb [VERSION] [bundle] [restore] [RANGE]... [save]
19
+ ruby makedepot.rb [VERSION] [--bundle] [--restore] [RANGE]... [--save]
20
20
 
21
21
  "VERSION" - specifies the Rails version to test. Examples:
22
22
  edge
23
23
  _2.2.2_
24
24
  ~/git
25
25
 
26
- "bundle" - bundle this version of rails with each Rails app generated.
26
+ "--bundle" - bundle this version of rails with each Rails app generated.
27
27
  - if libraries are listed in the RUBYLIB environment variable, they
28
28
  will be added as directories to the Gemfile before making the bundle
29
+ (adding '--system' will only bundle system gems)
29
30
 
30
- "restore" - restore from snapshot before resuming execution
31
+ "--restore" - restore from snapshot before resuming execution
31
32
 
32
33
  "RANGE" - specifies a set of sections to execute. Examples:
33
34
  6.2..6.5
34
35
  7.1-9.5
35
36
  16
36
37
 
37
- "save" - save snapshot after execution completes
38
+ "--save" - save snapshot after execution completes
39
+
40
+ "--rails-debug" - turn on BACKTRACE and Thread.abort_on_exception
38
41
 
39
42
  Tests against the output produced (e.g., makedepot.html) can also be run
40
43
  separately:
data/gorp.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{gorp}
5
- s.version = "0.21.1"
5
+ s.version = "0.21.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sam Ruby"]
9
- s.date = %q{2010-01-06}
9
+ s.date = %q{2010-01-08}
10
10
  s.description = %q{ Enables the creation of scenarios that involve creating a rails project,
11
11
  starting and stoppping of servers, generating projects, editing files,
12
12
  issuing http requests, running of commands, etc. Output is captured as
data/lib/gorp/output.rb CHANGED
@@ -31,7 +31,7 @@ at_exit do
31
31
  end
32
32
 
33
33
  # optionally save a snapshot
34
- if ARGV.include? 'restore'
34
+ if ARGV.include?('restore') or ARGV.include?('--restore')
35
35
  log :snap, 'restore'
36
36
  Dir.chdir $BASE
37
37
  FileUtils.rm_rf $WORK
@@ -73,7 +73,7 @@ at_exit do
73
73
  Gorp::Commands.stop_server
74
74
 
75
75
  # optionally save a snapshot
76
- if ARGV.include? 'save'
76
+ if ARGV.include?('save') or ARGV.include? '--save'
77
77
  log :snap, 'save'
78
78
  Dir.chdir $BASE
79
79
  FileUtils.rm_rf "snapshot"
data/lib/gorp/rails.rb CHANGED
@@ -67,7 +67,7 @@ else
67
67
  Process.exit!
68
68
  end
69
69
 
70
- $bundle = ARGV.include? 'bundle'
70
+ $bundle = ARGV.include?('bundle') or ARGV.include?('--bundle')
71
71
 
72
72
  module Gorp
73
73
  # determine which version of rails is running
@@ -107,12 +107,12 @@ module Gorp
107
107
  Dir.chdir(name)
108
108
  FileUtils.rm_rf 'public/.htaccess'
109
109
 
110
- cmd 'rake rails:freeze:edge' if ARGV.include? 'edge'
110
+ cmd 'rake rails:freeze:edge' if ARGV.include? '--edge'
111
111
 
112
112
  if $rails != 'rails' and File.directory?($rails)
113
113
  if File.exist? 'Gemfile'
114
114
  if $bundle
115
- if ENV['RUBYLIB'] or ARGV.include?('system')
115
+ if ENV['RUBYLIB'] or ARGV.include?('--system')
116
116
  gem=open('Gemfile') {|file| file.read}
117
117
 
118
118
  gem.sub! /gem "rails", :path => "(.*)"/ do
@@ -122,7 +122,7 @@ module Gorp
122
122
  eval(file.read.gsub(/\s*(module|end).*\n/, '').downcase)
123
123
  end
124
124
 
125
- if ARGV.include?('system')
125
+ if ARGV.include?('--system')
126
126
  rails = <<-EOF.gsub(/^\s+/,'') + rails
127
127
  @environment.clear_sources
128
128
  @environment.add_source SystemGemSource.instance
@@ -154,6 +154,15 @@ module Gorp
154
154
  end
155
155
  end
156
156
 
157
+ if ARGV.include?('--rails-debug')
158
+ edit 'config/initializers/rails_debug.rb' do |data|
159
+ data.all = <<-EOF.unindent(12)
160
+ ENV['BACKTRACE'] = '1'
161
+ Thread.abort_on_exception = true
162
+ EOF
163
+ end
164
+ end
165
+
157
166
  $rails_app = name
158
167
  end
159
168
 
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ module Gorp
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 21
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gorp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.21.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-06 00:00:00 -05:00
12
+ date: 2010-01-08 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency