gogo 1 → 2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source 'http://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in gogo.gemspec
4
4
  gemspec
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
+ ![Screaming dude meme: FASTER ALL THE RAILS](https://raw.github.com/brianhempel/gogo/master/irrelevant/faster_all_the_rails.jpg "FASTER ALL THE RAILS")
2
+
1
3
  # GoGo
2
4
 
3
5
  Yaknow how you're waiting for waiting for Rails to start and other people overhear you say "Go Go Go Go!" to your computer?
4
6
 
5
- Install the gem:
7
+ Install the gem (no need to put it in your Gemfile):
6
8
 
7
9
  gem install gogo
8
10
 
@@ -16,13 +18,17 @@ That will launch you into a pseudo-shell with the Rails test environment reloade
16
18
 
17
19
  Now, run some commands. Ruby scripts that load Rails should start astronomically faster.
18
20
 
21
+ Don't "bundle exec" inside gogo. It will really [exec](http://en.wikipedia.org/wiki/Exec_\(operating_system\)) and Rails will start as slow as before.
22
+
23
+ For the nitty gritty, [read the source](https://github.com/brianhempel/gogo/blob/master/bin/gogo) and inspect the [default Gofile](https://github.com/brianhempel/gogo/blob/master/lib/gogo/gofile_templates/rails.rb) that is created in your project.
24
+
19
25
  ## Sounds fishy...
20
26
 
21
27
  It is fishy. GoGo is a hack script.
22
28
 
23
- I'm sharing it with the world because it's an incredibly useful hack, but I can't guarantee any level of maintenance on my part. If stuff breaks, you're on your own to fix it. Leave your experience in the [wiki](https://github.com/brianhempel/gogo/wiki) to help others.
29
+ I'm sharing it with the world because it's an incredibly useful hack, but I can't guarantee any level of maintenance on my part. If stuff breaks, you're probably on your own to fix it. Leave your experience in the [wiki](https://github.com/brianhempel/gogo/wiki) to help others.
24
30
 
25
- GoGo is a lot like Spork. GoGo preloads your rails environment. When you run a ruby command, the gogo process is forked and the command is loaded into that environment. Here's a performance comparison for a large project:
31
+ GoGo is a lot like [Spork](https://github.com/sporkrb/spork). GoGo preloads your rails environment. When you run a ruby command, the gogo process is forked and the command is loaded into that environment. Here's a performance comparison for a large project:
26
32
 
27
33
  $ time bundle exec cucumber features/admin/dashboard.feature:0
28
34
  real 0m30.457s
data/bin/gogo CHANGED
@@ -47,7 +47,11 @@ history_file_path = ".gogo_history-#{ENV['GOGO_ENV']}"
47
47
 
48
48
  # load old history
49
49
  if File.exists?(history_file_path)
50
- Readline::HISTORY.clear
50
+ if Readline::HISTORY.respond_to?(:clear)
51
+ Readline::HISTORY.clear
52
+ else
53
+ Readline::HISTORY.size.times { Readline::HISTORY.pop }
54
+ end
51
55
  File.read(history_file_path).lines.each { |l| Readline::HISTORY << l.chomp }
52
56
  end
53
57
 
@@ -1,4 +1,4 @@
1
- # autocomplete commands
1
+ # commands for tab-completion -- feel free to add your own!
2
2
  # thanks to http://bogojoker.com/readline/
3
3
  # and to https://github.com/ruby/ruby/blob/trunk/ext/readline/readline.c
4
4
  AUTOCOMPLETE_COMMANDS = ['rake ', 'cucumber features/', 'rails ', 'rspec spec/'].sort
@@ -1,3 +1,3 @@
1
1
  module GoGo
2
- VERSION = "1"
2
+ VERSION = "2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gogo
3
3
  version: !ruby/object:Gem::Version
4
- version: '1'
4
+ version: '2'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-01 00:00:00.000000000Z
12
+ date: 2012-05-24 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Pseudo-shell hack with Rails environment preloaded for faster boot times
15
15
  and thus faster testing iterations. Go go go go go!
@@ -27,6 +27,7 @@ files:
27
27
  - Rakefile
28
28
  - bin/gogo
29
29
  - gogo.gemspec
30
+ - irrelevant/faster_all_the_rails.jpg
30
31
  - lib/gogo.rb
31
32
  - lib/gogo/gofile_templates/rails.rb
32
33
  - lib/gogo/version.rb