rails-boot-reporting 0.0.1

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.
@@ -0,0 +1,33 @@
1
+ require 'bundler'
2
+
3
+ module RailsBootReporting
4
+ extend self
5
+
6
+ def install
7
+ install_rails
8
+ install_bundler
9
+ puts "Done."
10
+ end
11
+
12
+ def install_rails
13
+ puts "-- Installing Rails patches"
14
+ install_file('rails-2.3.11/initializer.rb', gem_path('rails', '2.3.11', 'initializer.rb'))
15
+ end
16
+
17
+ def install_bundler
18
+ puts "-- Installing Bundler patches"
19
+ bundler_version = Bundler::VERSION
20
+ install_file('bundler-1.0/runtime.rb', gem_path('bundler', bundler_version, 'bundler/runtime.rb'))
21
+ end
22
+
23
+ def gem_path(gem, version, file)
24
+ install_path = File.join(ENV['GEM_HOME'], 'gems', "#{gem}-#{version}", 'lib', file)
25
+ end
26
+
27
+ def install_file(local_path, install_path)
28
+ local_path = File.join(File.dirname(File.expand_path(__FILE__)), local_path)
29
+ puts "Copying #{local_path} to #{install_path}"
30
+ FileUtils.cp(local_path, install_path)
31
+ end
32
+
33
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'rails-boot-reporting'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestRailsBootReporting < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails-boot-reporting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Aaron Quint
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-07 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: shoulda
16
+ requirement: &70211248761680 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70211248761680
25
+ - !ruby/object:Gem::Dependency
26
+ name: bundler
27
+ requirement: &70211248751600 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.0
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70211248751600
36
+ - !ruby/object:Gem::Dependency
37
+ name: jeweler
38
+ requirement: &70211248750980 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 1.6.3
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70211248750980
47
+ - !ruby/object:Gem::Dependency
48
+ name: rcov
49
+ requirement: &70211248750040 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70211248750040
58
+ description: Patches, specifically for rails 2 (now) that print out require and boot
59
+ times for different parts of the initialization process
60
+ email: aaron@quirkey.com
61
+ executables:
62
+ - install-boot-reporting
63
+ extensions: []
64
+ extra_rdoc_files:
65
+ - LICENSE.txt
66
+ - README.rdoc
67
+ files:
68
+ - .document
69
+ - Gemfile
70
+ - Gemfile.lock
71
+ - LICENSE.txt
72
+ - README.rdoc
73
+ - Rakefile
74
+ - VERSION
75
+ - bin/install-boot-reporting
76
+ - lib/bundler-1.0/runtime.rb
77
+ - lib/rails-2.3.11/initializer.rb
78
+ - lib/rails-boot-reporting.rb
79
+ - test/helper.rb
80
+ - test/test_rails-boot-reporting.rb
81
+ homepage: http://github.com/quirkey/rails-boot-reporting
82
+ licenses:
83
+ - MIT
84
+ post_install_message:
85
+ rdoc_options: []
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ segments:
95
+ - 0
96
+ hash: -4447686649373725411
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
104
+ rubyforge_project:
105
+ rubygems_version: 1.8.10
106
+ signing_key:
107
+ specification_version: 3
108
+ summary: A set of monkey patches for rails and bundler to print require/boot times
109
+ test_files: []