rails-dev-boost 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/.gitignore +1 -0
  2. data/LICENSE +19 -0
  3. data/README.markdown +105 -0
  4. data/Rakefile +52 -0
  5. data/TODO.txt +2 -0
  6. data/VERSION +1 -0
  7. data/init.rb +3 -0
  8. data/lib/rails_development_boost.rb +32 -0
  9. data/lib/rails_development_boost/dependencies_patch.rb +332 -0
  10. data/lib/rails_development_boost/descendants_tracker_patch.rb +18 -0
  11. data/lib/rails_development_boost/loaded_file.rb +76 -0
  12. data/lib/rails_development_boost/reference_patch.rb +24 -0
  13. data/lib/rails_development_boost/view_helpers_patch.rb +17 -0
  14. data/rails-dev-boost.gemspec +116 -0
  15. data/test/constants/active_record/comment.rb +2 -0
  16. data/test/constants/active_record/message.rb +2 -0
  17. data/test/constants/active_record/other.rb +2 -0
  18. data/test/constants/active_record/post.rb +3 -0
  19. data/test/constants/deep_nesting/a.rb +2 -0
  20. data/test/constants/deep_nesting/a/b.rb +2 -0
  21. data/test/constants/deep_nesting/a/b/c.rb +2 -0
  22. data/test/constants/deep_nesting/a/b/c/d.rb +2 -0
  23. data/test/constants/double_removal/ns.rb +3 -0
  24. data/test/constants/double_removal/ns/c.rb +3 -0
  25. data/test/constants/double_removal/ns/m.rb +2 -0
  26. data/test/constants/mixins/client.rb +3 -0
  27. data/test/constants/mixins/mixin.rb +4 -0
  28. data/test/constants/mixins/update/mixin.rb +4 -0
  29. data/test/constants/nested_mixins/b.rb +2 -0
  30. data/test/constants/nested_mixins/b/c.rb +2 -0
  31. data/test/constants/nested_mixins/ma.rb +3 -0
  32. data/test/constants/nested_mixins/ma/mb.rb +3 -0
  33. data/test/constants/nested_mixins/ma/mb/mc.rb +2 -0
  34. data/test/constants/nested_mixins/oa.rb +4 -0
  35. data/test/constants/nested_mixins/oa/ob.rb +3 -0
  36. data/test/constants/nested_mixins/oa/ob/oc.rb +2 -0
  37. data/test/constants/single_removal/a.rb +2 -0
  38. data/test/constants/single_removal/b.rb +2 -0
  39. data/test/constants/singleton_mixins/a.rb +3 -0
  40. data/test/constants/singleton_mixins/b.rb +2 -0
  41. data/test/constants/subclass/a.rb +2 -0
  42. data/test/constants/subclass/b.rb +2 -0
  43. data/test/constants/subclass/c.rb +2 -0
  44. data/test/rails_development_boost_test.rb +222 -0
  45. data/test/stub_environment.rb +41 -0
  46. metadata +144 -0
@@ -0,0 +1,41 @@
1
+ require 'active_support'
2
+
3
+ require 'action_controller'
4
+ require 'action_controller/dispatcher'
5
+
6
+ module ActionController
7
+ def self.define_nested_module(name)
8
+ name.to_s.split('::').inject(self) do |namespace, name|
9
+ begin
10
+ namespace.const_get(name)
11
+ rescue LoadError
12
+ namespace.const_set(name, Module.new)
13
+ end
14
+ end
15
+ end
16
+
17
+ Dispatcher.class_eval(<<-RUBY)
18
+ if defined? @@middleware
19
+ m = @@middleware
20
+ def m.build(*a) end
21
+ end
22
+ RUBY
23
+
24
+ # Routing::Routes.reload
25
+ routes = define_nested_module("Routing::Routes")
26
+ def routes.reload; end
27
+
28
+ # ActionController::Base.view_paths.reload!
29
+ base = define_nested_module("Base")
30
+ def base.view_paths; self; end
31
+ def base.reload!; end
32
+
33
+ # ActionView::Helpers::AssetTagHelper::AssetTag::Cache.clear
34
+ asset_cache = define_nested_module("ActionView::Helpers::AssetTagHelper::AssetTag::Cache")
35
+ def asset_cache.clear; end
36
+ end
37
+
38
+ require 'active_record'
39
+ ActiveRecord::Base.class_eval { def self.columns; []; end }
40
+ ActiveRecord::Base.class_eval { def self.inspect; super; end }
41
+ ActiveRecord::Associations::HasManyAssociation.class_eval { def construct_sql; end }
metadata ADDED
@@ -0,0 +1,144 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails-dev-boost
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
11
+ platform: ruby
12
+ authors:
13
+ - "Roman Le N\xC3\xA9grate"
14
+ - thedarkone
15
+ autorequire:
16
+ bindir: bin
17
+ cert_chain: []
18
+
19
+ date: 2010-11-11 00:00:00 +03:00
20
+ default_executable:
21
+ dependencies: []
22
+
23
+ description: Make your Rails app 10 times faster in development mode
24
+ email: roman.lenegrate@gmail.com
25
+ executables: []
26
+
27
+ extensions: []
28
+
29
+ extra_rdoc_files:
30
+ - LICENSE
31
+ - README.markdown
32
+ files:
33
+ - .gitignore
34
+ - LICENSE
35
+ - README.markdown
36
+ - Rakefile
37
+ - TODO.txt
38
+ - VERSION
39
+ - init.rb
40
+ - lib/rails_development_boost.rb
41
+ - lib/rails_development_boost/dependencies_patch.rb
42
+ - lib/rails_development_boost/descendants_tracker_patch.rb
43
+ - lib/rails_development_boost/loaded_file.rb
44
+ - lib/rails_development_boost/reference_patch.rb
45
+ - lib/rails_development_boost/view_helpers_patch.rb
46
+ - rails-dev-boost.gemspec
47
+ - test/constants/.DS_Store
48
+ - test/constants/active_record/comment.rb
49
+ - test/constants/active_record/message.rb
50
+ - test/constants/active_record/other.rb
51
+ - test/constants/active_record/post.rb
52
+ - test/constants/deep_nesting/a.rb
53
+ - test/constants/deep_nesting/a/b.rb
54
+ - test/constants/deep_nesting/a/b/c.rb
55
+ - test/constants/deep_nesting/a/b/c/d.rb
56
+ - test/constants/double_removal/ns.rb
57
+ - test/constants/double_removal/ns/c.rb
58
+ - test/constants/double_removal/ns/m.rb
59
+ - test/constants/mixins/client.rb
60
+ - test/constants/mixins/mixin.rb
61
+ - test/constants/mixins/update/mixin.rb
62
+ - test/constants/nested_mixins/b.rb
63
+ - test/constants/nested_mixins/b/c.rb
64
+ - test/constants/nested_mixins/ma.rb
65
+ - test/constants/nested_mixins/ma/mb.rb
66
+ - test/constants/nested_mixins/ma/mb/mc.rb
67
+ - test/constants/nested_mixins/oa.rb
68
+ - test/constants/nested_mixins/oa/ob.rb
69
+ - test/constants/nested_mixins/oa/ob/oc.rb
70
+ - test/constants/single_removal/a.rb
71
+ - test/constants/single_removal/b.rb
72
+ - test/constants/singleton_mixins/a.rb
73
+ - test/constants/singleton_mixins/b.rb
74
+ - test/constants/subclass/a.rb
75
+ - test/constants/subclass/b.rb
76
+ - test/constants/subclass/c.rb
77
+ - test/rails_development_boost_test.rb
78
+ - test/stub_environment.rb
79
+ has_rdoc: true
80
+ homepage: http://github.com/thedarkone/rails-dev-boost
81
+ licenses: []
82
+
83
+ post_install_message:
84
+ rdoc_options:
85
+ - --charset=UTF-8
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
+ hash: 3
94
+ segments:
95
+ - 0
96
+ version: "0"
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ requirements: []
107
+
108
+ rubyforge_project:
109
+ rubygems_version: 1.4.2
110
+ signing_key:
111
+ specification_version: 3
112
+ summary: Speeds up Rails development mode
113
+ test_files:
114
+ - test/constants/active_record/comment.rb
115
+ - test/constants/active_record/message.rb
116
+ - test/constants/active_record/other.rb
117
+ - test/constants/active_record/post.rb
118
+ - test/constants/deep_nesting/a/b/c/d.rb
119
+ - test/constants/deep_nesting/a/b/c.rb
120
+ - test/constants/deep_nesting/a/b.rb
121
+ - test/constants/deep_nesting/a.rb
122
+ - test/constants/double_removal/ns/c.rb
123
+ - test/constants/double_removal/ns/m.rb
124
+ - test/constants/double_removal/ns.rb
125
+ - test/constants/mixins/client.rb
126
+ - test/constants/mixins/mixin.rb
127
+ - test/constants/mixins/update/mixin.rb
128
+ - test/constants/nested_mixins/b/c.rb
129
+ - test/constants/nested_mixins/b.rb
130
+ - test/constants/nested_mixins/ma/mb/mc.rb
131
+ - test/constants/nested_mixins/ma/mb.rb
132
+ - test/constants/nested_mixins/ma.rb
133
+ - test/constants/nested_mixins/oa/ob/oc.rb
134
+ - test/constants/nested_mixins/oa/ob.rb
135
+ - test/constants/nested_mixins/oa.rb
136
+ - test/constants/single_removal/a.rb
137
+ - test/constants/single_removal/b.rb
138
+ - test/constants/singleton_mixins/a.rb
139
+ - test/constants/singleton_mixins/b.rb
140
+ - test/constants/subclass/a.rb
141
+ - test/constants/subclass/b.rb
142
+ - test/constants/subclass/c.rb
143
+ - test/rails_development_boost_test.rb
144
+ - test/stub_environment.rb