environmentalist 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -0
- data/{README.textile → README.rdoc} +5 -5
- data/Rakefile +2 -2
- data/VERSION.yml +1 -1
- data/lib/conf/preinitializer.rb +4 -4
- metadata +22 -222
- data/test/rails210test/README +0 -256
- data/test/rails210test/Rakefile +0 -10
- data/test/rails210test/app/controllers/application.rb +0 -15
- data/test/rails210test/app/helpers/application_helper.rb +0 -3
- data/test/rails210test/config/boot.rb +0 -111
- data/test/rails210test/config/demo/environment.rb +0 -22
- data/test/rails210test/config/development/database.yml +0 -5
- data/test/rails210test/config/development/environment.rb +0 -17
- data/test/rails210test/config/environment.rb +0 -67
- data/test/rails210test/config/initializers/inflections.rb +0 -10
- data/test/rails210test/config/initializers/mime_types.rb +0 -5
- data/test/rails210test/config/initializers/new_rails_defaults.rb +0 -15
- data/test/rails210test/config/postboot.rb +0 -27
- data/test/rails210test/config/preinitializer.rb +0 -20
- data/test/rails210test/config/production/database.yml +0 -5
- data/test/rails210test/config/production/environment.rb +0 -22
- data/test/rails210test/config/routes.rb +0 -41
- data/test/rails210test/config/staging/environment.rb +0 -22
- data/test/rails210test/config/test/database.yml +0 -5
- data/test/rails210test/config/test/environment.rb +0 -22
- data/test/rails210test/doc/README_FOR_APP +0 -2
- data/test/rails210test/log/development.log +0 -0
- data/test/rails210test/log/production.log +0 -0
- data/test/rails210test/log/server.log +0 -0
- data/test/rails210test/log/test.log +0 -0
- data/test/rails210test/public/404.html +0 -30
- data/test/rails210test/public/422.html +0 -30
- data/test/rails210test/public/500.html +0 -30
- data/test/rails210test/public/dispatch.cgi +0 -10
- data/test/rails210test/public/dispatch.fcgi +0 -24
- data/test/rails210test/public/dispatch.rb +0 -10
- data/test/rails210test/public/favicon.ico +0 -0
- data/test/rails210test/public/images/rails.png +0 -0
- data/test/rails210test/public/index.html +0 -274
- data/test/rails210test/public/javascripts/application.js +0 -2
- data/test/rails210test/public/javascripts/controls.js +0 -963
- data/test/rails210test/public/javascripts/dragdrop.js +0 -972
- data/test/rails210test/public/javascripts/effects.js +0 -1120
- data/test/rails210test/public/javascripts/prototype.js +0 -4225
- data/test/rails210test/public/robots.txt +0 -5
- data/test/rails210test/script/about +0 -3
- data/test/rails210test/script/console +0 -3
- data/test/rails210test/script/dbconsole +0 -3
- data/test/rails210test/script/destroy +0 -3
- data/test/rails210test/script/generate +0 -3
- data/test/rails210test/script/performance/benchmarker +0 -3
- data/test/rails210test/script/performance/profiler +0 -3
- data/test/rails210test/script/performance/request +0 -3
- data/test/rails210test/script/plugin +0 -3
- data/test/rails210test/script/process/inspector +0 -3
- data/test/rails210test/script/process/reaper +0 -3
- data/test/rails210test/script/process/spawner +0 -3
- data/test/rails210test/script/runner +0 -3
- data/test/rails210test/script/server +0 -3
- data/test/rails210test/test/test_helper.rb +0 -38
- data/test/rails212/README +0 -256
- data/test/rails212/Rakefile +0 -10
- data/test/rails212/app/controllers/application.rb +0 -15
- data/test/rails212/app/helpers/application_helper.rb +0 -3
- data/test/rails212/config/boot.rb +0 -109
- data/test/rails212/config/database.yml +0 -19
- data/test/rails212/config/environment.rb +0 -67
- data/test/rails212/config/environments/development.rb +0 -17
- data/test/rails212/config/environments/production.rb +0 -22
- data/test/rails212/config/environments/test.rb +0 -22
- data/test/rails212/config/initializers/inflections.rb +0 -10
- data/test/rails212/config/initializers/mime_types.rb +0 -5
- data/test/rails212/config/initializers/new_rails_defaults.rb +0 -17
- data/test/rails212/config/routes.rb +0 -43
- data/test/rails212/doc/README_FOR_APP +0 -2
- data/test/rails212/log/development.log +0 -0
- data/test/rails212/log/production.log +0 -0
- data/test/rails212/log/server.log +0 -0
- data/test/rails212/log/test.log +0 -0
- data/test/rails212/public/404.html +0 -30
- data/test/rails212/public/422.html +0 -30
- data/test/rails212/public/500.html +0 -30
- data/test/rails212/public/dispatch.cgi +0 -10
- data/test/rails212/public/dispatch.fcgi +0 -24
- data/test/rails212/public/dispatch.rb +0 -10
- data/test/rails212/public/favicon.ico +0 -0
- data/test/rails212/public/images/rails.png +0 -0
- data/test/rails212/public/index.html +0 -274
- data/test/rails212/public/javascripts/application.js +0 -2
- data/test/rails212/public/javascripts/controls.js +0 -963
- data/test/rails212/public/javascripts/dragdrop.js +0 -972
- data/test/rails212/public/javascripts/effects.js +0 -1120
- data/test/rails212/public/javascripts/prototype.js +0 -4225
- data/test/rails212/public/robots.txt +0 -5
- data/test/rails212/script/about +0 -4
- data/test/rails212/script/console +0 -3
- data/test/rails212/script/dbconsole +0 -3
- data/test/rails212/script/destroy +0 -3
- data/test/rails212/script/generate +0 -3
- data/test/rails212/script/performance/benchmarker +0 -3
- data/test/rails212/script/performance/profiler +0 -3
- data/test/rails212/script/performance/request +0 -3
- data/test/rails212/script/plugin +0 -3
- data/test/rails212/script/process/inspector +0 -3
- data/test/rails212/script/process/reaper +0 -3
- data/test/rails212/script/process/spawner +0 -3
- data/test/rails212/script/runner +0 -3
- data/test/rails212/script/server +0 -3
- data/test/rails212/test/test_helper.rb +0 -38
data/History.txt
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== v0.2.4
|
2
|
+
2009-04-30
|
3
|
+
|
4
|
+
* Fix error preventing nested geminstaller files from working properly. (thanks Nick Gauthier)
|
5
|
+
* Alter gem dependencies for geminstaller and rails in preinitializer.rb to reference actual releases
|
6
|
+
|
7
|
+
=== v0.2.3
|
8
|
+
2009-04-04
|
9
|
+
|
10
|
+
* Move loading of postboot.rb to the bottom of boot.rb. Addresses failures with rails 2.3.2
|
11
|
+
|
1
12
|
=== v0.2.1
|
2
13
|
2009-03-06
|
3
14
|
|
@@ -1,20 +1,20 @@
|
|
1
|
-
|
1
|
+
= environmentalist
|
2
2
|
|
3
3
|
* http://github.com/jtrupiano/environmentalist/tree/master
|
4
4
|
|
5
|
-
|
5
|
+
== DESCRIPTION
|
6
6
|
|
7
7
|
Provides an executable that converts a rails app's config structure. The basic idea is that environments themselves are now first-class citizens, allowing you to create several environments (e.g. staging, prodtest, demo, etc.) in a clean, organized fashion. Each environment is given its own folder where it can store its own set of configuration files (think mongrel configs, apache configs, etc.) without polluting the top-leve config/ directory.
|
8
8
|
|
9
|
-
|
9
|
+
== REQUIREMENTS
|
10
10
|
|
11
11
|
* none, but it's really only useful with a rails app
|
12
12
|
|
13
|
-
|
13
|
+
== INSTALL
|
14
14
|
|
15
15
|
sudo gem install environmentalist
|
16
16
|
|
17
|
-
|
17
|
+
== USAGE
|
18
18
|
|
19
19
|
This gem is intended to be a "one-time consumption." You use it once to alter/convert the structure of your rails app (works best with a newly-generated app). It should <b>not</b> be included as a gem dependency for your project.
|
20
20
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rake'
|
|
2
2
|
require 'rake/testtask'
|
3
3
|
require 'rake/rdoctask'
|
4
4
|
|
5
|
-
gem 'jeweler', '~> 0.
|
5
|
+
gem 'jeweler', '~> 0.11.1'
|
6
6
|
|
7
7
|
begin
|
8
8
|
require 'jeweler'
|
@@ -26,7 +26,7 @@ require 'rake/rdoctask'
|
|
26
26
|
Rake::RDocTask.new do |rdoc|
|
27
27
|
config = YAML.load(File.read('VERSION.yml'))
|
28
28
|
rdoc.rdoc_dir = 'rdoc'
|
29
|
-
rdoc.title = "
|
29
|
+
rdoc.title = "environmentalist #{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
30
30
|
rdoc.options << '--line-numbers' << '--inline-source'
|
31
31
|
rdoc.rdoc_files.include('README*')
|
32
32
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
data/VERSION.yml
CHANGED
data/lib/conf/preinitializer.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Ensure that proper versions of gems in config/geminstaller.yml are activated.
|
2
2
|
require 'rubygems'
|
3
|
-
gem 'rails', '
|
4
|
-
gem 'geminstaller', '
|
3
|
+
gem 'rails', '~> 2.3.2'
|
4
|
+
gem 'geminstaller', '~> 0.5.1'
|
5
5
|
require 'geminstaller'
|
6
6
|
|
7
7
|
rails_env = ENV['RAILS_ENV'] || 'development'
|
@@ -14,7 +14,7 @@ env_gemfile = File.join(RAILS_ROOT, "config", rails_env, "geminstaller.yml")
|
|
14
14
|
|
15
15
|
[common_gemfile, env_gemfile].each do |file|
|
16
16
|
if File.exists?(file)
|
17
|
-
GemInstaller.install("--exceptions --config=#{
|
18
|
-
GemInstaller.autogem("--exceptions --config=#{
|
17
|
+
GemInstaller.install("--exceptions --config=#{file}") if perform_install
|
18
|
+
GemInstaller.autogem("--exceptions --config=#{file}")
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: environmentalist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Trupiano
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-30 00:00:00 -04:00
|
13
13
|
default_executable: environmentalize
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -20,54 +20,38 @@ executables:
|
|
20
20
|
extensions: []
|
21
21
|
|
22
22
|
extra_rdoc_files:
|
23
|
-
- README.textile
|
24
23
|
- LICENSE
|
24
|
+
- README.rdoc
|
25
25
|
files:
|
26
26
|
- History.txt
|
27
27
|
- LICENSE
|
28
|
+
- README.rdoc
|
28
29
|
- Rakefile
|
29
|
-
- README.textile
|
30
30
|
- VERSION.yml
|
31
31
|
- bin/environmentalize
|
32
|
-
- lib/conf
|
33
32
|
- lib/conf/postboot.rb
|
34
33
|
- lib/conf/preinitializer.rb
|
35
|
-
- lib/environmentalist
|
36
|
-
- lib/environmentalist/version.rb
|
37
34
|
- lib/environmentalist.rb
|
38
|
-
-
|
39
|
-
- test/rails210/
|
40
|
-
- test/rails210/
|
35
|
+
- lib/environmentalist/version.rb
|
36
|
+
- test/rails210/README
|
37
|
+
- test/rails210/Rakefile
|
41
38
|
- test/rails210/app/controllers/application.rb
|
42
|
-
- test/rails210/app/helpers
|
43
39
|
- test/rails210/app/helpers/application_helper.rb
|
44
|
-
- test/rails210/app/models
|
45
|
-
- test/rails210/app/views
|
46
|
-
- test/rails210/app/views/layouts
|
47
|
-
- test/rails210/config
|
48
40
|
- test/rails210/config/boot.rb
|
49
41
|
- test/rails210/config/database.yml
|
50
42
|
- test/rails210/config/environment.rb
|
51
|
-
- test/rails210/config/environments
|
52
43
|
- test/rails210/config/environments/development.rb
|
53
44
|
- test/rails210/config/environments/production.rb
|
54
45
|
- test/rails210/config/environments/test.rb
|
55
|
-
- test/rails210/config/initializers
|
56
46
|
- test/rails210/config/initializers/inflections.rb
|
57
47
|
- test/rails210/config/initializers/mime_types.rb
|
58
48
|
- test/rails210/config/initializers/new_rails_defaults.rb
|
59
49
|
- test/rails210/config/routes.rb
|
60
|
-
- test/rails210/db
|
61
|
-
- test/rails210/doc
|
62
50
|
- test/rails210/doc/README_FOR_APP
|
63
|
-
- test/rails210/lib
|
64
|
-
- test/rails210/lib/tasks
|
65
|
-
- test/rails210/log
|
66
51
|
- test/rails210/log/development.log
|
67
52
|
- test/rails210/log/production.log
|
68
53
|
- test/rails210/log/server.log
|
69
54
|
- test/rails210/log/test.log
|
70
|
-
- test/rails210/public
|
71
55
|
- test/rails210/public/404.html
|
72
56
|
- test/rails210/public/422.html
|
73
57
|
- test/rails210/public/500.html
|
@@ -75,231 +59,34 @@ files:
|
|
75
59
|
- test/rails210/public/dispatch.fcgi
|
76
60
|
- test/rails210/public/dispatch.rb
|
77
61
|
- test/rails210/public/favicon.ico
|
78
|
-
- test/rails210/public/images
|
79
62
|
- test/rails210/public/images/rails.png
|
80
63
|
- test/rails210/public/index.html
|
81
|
-
- test/rails210/public/javascripts
|
82
64
|
- test/rails210/public/javascripts/application.js
|
83
65
|
- test/rails210/public/javascripts/controls.js
|
84
66
|
- test/rails210/public/javascripts/dragdrop.js
|
85
67
|
- test/rails210/public/javascripts/effects.js
|
86
68
|
- test/rails210/public/javascripts/prototype.js
|
87
69
|
- test/rails210/public/robots.txt
|
88
|
-
- test/rails210/public/stylesheets
|
89
|
-
- test/rails210/Rakefile
|
90
|
-
- test/rails210/README
|
91
|
-
- test/rails210/script
|
92
70
|
- test/rails210/script/about
|
93
71
|
- test/rails210/script/console
|
94
72
|
- test/rails210/script/dbconsole
|
95
73
|
- test/rails210/script/destroy
|
96
74
|
- test/rails210/script/generate
|
97
|
-
- test/rails210/script/performance
|
98
75
|
- test/rails210/script/performance/benchmarker
|
99
76
|
- test/rails210/script/performance/profiler
|
100
77
|
- test/rails210/script/performance/request
|
101
78
|
- test/rails210/script/plugin
|
102
|
-
- test/rails210/script/process
|
103
79
|
- test/rails210/script/process/inspector
|
104
80
|
- test/rails210/script/process/reaper
|
105
81
|
- test/rails210/script/process/spawner
|
106
82
|
- test/rails210/script/runner
|
107
83
|
- test/rails210/script/server
|
108
|
-
- test/rails210/test
|
109
|
-
- test/rails210/test/fixtures
|
110
|
-
- test/rails210/test/functional
|
111
|
-
- test/rails210/test/integration
|
112
84
|
- test/rails210/test/test_helper.rb
|
113
|
-
- test/rails210/test/unit
|
114
|
-
- test/rails210/tmp
|
115
|
-
- test/rails210/tmp/cache
|
116
|
-
- test/rails210/tmp/pids
|
117
|
-
- test/rails210/tmp/sessions
|
118
|
-
- test/rails210/tmp/sockets
|
119
|
-
- test/rails210/vendor
|
120
|
-
- test/rails210/vendor/plugins
|
121
|
-
- test/rails210test
|
122
|
-
- test/rails210test/app
|
123
|
-
- test/rails210test/app/controllers
|
124
|
-
- test/rails210test/app/controllers/application.rb
|
125
|
-
- test/rails210test/app/helpers
|
126
|
-
- test/rails210test/app/helpers/application_helper.rb
|
127
|
-
- test/rails210test/app/models
|
128
|
-
- test/rails210test/app/views
|
129
|
-
- test/rails210test/app/views/layouts
|
130
|
-
- test/rails210test/config
|
131
|
-
- test/rails210test/config/boot.rb
|
132
|
-
- test/rails210test/config/demo
|
133
|
-
- test/rails210test/config/demo/environment.rb
|
134
|
-
- test/rails210test/config/development
|
135
|
-
- test/rails210test/config/development/database.yml
|
136
|
-
- test/rails210test/config/development/environment.rb
|
137
|
-
- test/rails210test/config/environment.rb
|
138
|
-
- test/rails210test/config/initializers
|
139
|
-
- test/rails210test/config/initializers/inflections.rb
|
140
|
-
- test/rails210test/config/initializers/mime_types.rb
|
141
|
-
- test/rails210test/config/initializers/new_rails_defaults.rb
|
142
|
-
- test/rails210test/config/postboot.rb
|
143
|
-
- test/rails210test/config/preinitializer.rb
|
144
|
-
- test/rails210test/config/production
|
145
|
-
- test/rails210test/config/production/database.yml
|
146
|
-
- test/rails210test/config/production/environment.rb
|
147
|
-
- test/rails210test/config/routes.rb
|
148
|
-
- test/rails210test/config/staging
|
149
|
-
- test/rails210test/config/staging/environment.rb
|
150
|
-
- test/rails210test/config/test
|
151
|
-
- test/rails210test/config/test/database.yml
|
152
|
-
- test/rails210test/config/test/environment.rb
|
153
|
-
- test/rails210test/db
|
154
|
-
- test/rails210test/doc
|
155
|
-
- test/rails210test/doc/README_FOR_APP
|
156
|
-
- test/rails210test/lib
|
157
|
-
- test/rails210test/lib/tasks
|
158
|
-
- test/rails210test/log
|
159
|
-
- test/rails210test/log/development.log
|
160
|
-
- test/rails210test/log/production.log
|
161
|
-
- test/rails210test/log/server.log
|
162
|
-
- test/rails210test/log/test.log
|
163
|
-
- test/rails210test/public
|
164
|
-
- test/rails210test/public/404.html
|
165
|
-
- test/rails210test/public/422.html
|
166
|
-
- test/rails210test/public/500.html
|
167
|
-
- test/rails210test/public/dispatch.cgi
|
168
|
-
- test/rails210test/public/dispatch.fcgi
|
169
|
-
- test/rails210test/public/dispatch.rb
|
170
|
-
- test/rails210test/public/favicon.ico
|
171
|
-
- test/rails210test/public/images
|
172
|
-
- test/rails210test/public/images/rails.png
|
173
|
-
- test/rails210test/public/index.html
|
174
|
-
- test/rails210test/public/javascripts
|
175
|
-
- test/rails210test/public/javascripts/application.js
|
176
|
-
- test/rails210test/public/javascripts/controls.js
|
177
|
-
- test/rails210test/public/javascripts/dragdrop.js
|
178
|
-
- test/rails210test/public/javascripts/effects.js
|
179
|
-
- test/rails210test/public/javascripts/prototype.js
|
180
|
-
- test/rails210test/public/robots.txt
|
181
|
-
- test/rails210test/public/stylesheets
|
182
|
-
- test/rails210test/Rakefile
|
183
|
-
- test/rails210test/README
|
184
|
-
- test/rails210test/script
|
185
|
-
- test/rails210test/script/about
|
186
|
-
- test/rails210test/script/console
|
187
|
-
- test/rails210test/script/dbconsole
|
188
|
-
- test/rails210test/script/destroy
|
189
|
-
- test/rails210test/script/generate
|
190
|
-
- test/rails210test/script/performance
|
191
|
-
- test/rails210test/script/performance/benchmarker
|
192
|
-
- test/rails210test/script/performance/profiler
|
193
|
-
- test/rails210test/script/performance/request
|
194
|
-
- test/rails210test/script/plugin
|
195
|
-
- test/rails210test/script/process
|
196
|
-
- test/rails210test/script/process/inspector
|
197
|
-
- test/rails210test/script/process/reaper
|
198
|
-
- test/rails210test/script/process/spawner
|
199
|
-
- test/rails210test/script/runner
|
200
|
-
- test/rails210test/script/server
|
201
|
-
- test/rails210test/test
|
202
|
-
- test/rails210test/test/fixtures
|
203
|
-
- test/rails210test/test/functional
|
204
|
-
- test/rails210test/test/integration
|
205
|
-
- test/rails210test/test/test_helper.rb
|
206
|
-
- test/rails210test/test/unit
|
207
|
-
- test/rails210test/tmp
|
208
|
-
- test/rails210test/tmp/cache
|
209
|
-
- test/rails210test/tmp/pids
|
210
|
-
- test/rails210test/tmp/sessions
|
211
|
-
- test/rails210test/tmp/sockets
|
212
|
-
- test/rails210test/vendor
|
213
|
-
- test/rails210test/vendor/plugins
|
214
|
-
- test/rails212
|
215
|
-
- test/rails212/app
|
216
|
-
- test/rails212/app/controllers
|
217
|
-
- test/rails212/app/controllers/application.rb
|
218
|
-
- test/rails212/app/helpers
|
219
|
-
- test/rails212/app/helpers/application_helper.rb
|
220
|
-
- test/rails212/app/models
|
221
|
-
- test/rails212/app/views
|
222
|
-
- test/rails212/app/views/layouts
|
223
|
-
- test/rails212/config
|
224
|
-
- test/rails212/config/boot.rb
|
225
|
-
- test/rails212/config/database.yml
|
226
|
-
- test/rails212/config/environment.rb
|
227
|
-
- test/rails212/config/environments
|
228
|
-
- test/rails212/config/environments/development.rb
|
229
|
-
- test/rails212/config/environments/production.rb
|
230
|
-
- test/rails212/config/environments/test.rb
|
231
|
-
- test/rails212/config/initializers
|
232
|
-
- test/rails212/config/initializers/inflections.rb
|
233
|
-
- test/rails212/config/initializers/mime_types.rb
|
234
|
-
- test/rails212/config/initializers/new_rails_defaults.rb
|
235
|
-
- test/rails212/config/routes.rb
|
236
|
-
- test/rails212/db
|
237
|
-
- test/rails212/doc
|
238
|
-
- test/rails212/doc/README_FOR_APP
|
239
|
-
- test/rails212/lib
|
240
|
-
- test/rails212/lib/tasks
|
241
|
-
- test/rails212/log
|
242
|
-
- test/rails212/log/development.log
|
243
|
-
- test/rails212/log/production.log
|
244
|
-
- test/rails212/log/server.log
|
245
|
-
- test/rails212/log/test.log
|
246
|
-
- test/rails212/public
|
247
|
-
- test/rails212/public/404.html
|
248
|
-
- test/rails212/public/422.html
|
249
|
-
- test/rails212/public/500.html
|
250
|
-
- test/rails212/public/dispatch.cgi
|
251
|
-
- test/rails212/public/dispatch.fcgi
|
252
|
-
- test/rails212/public/dispatch.rb
|
253
|
-
- test/rails212/public/favicon.ico
|
254
|
-
- test/rails212/public/images
|
255
|
-
- test/rails212/public/images/rails.png
|
256
|
-
- test/rails212/public/index.html
|
257
|
-
- test/rails212/public/javascripts
|
258
|
-
- test/rails212/public/javascripts/application.js
|
259
|
-
- test/rails212/public/javascripts/controls.js
|
260
|
-
- test/rails212/public/javascripts/dragdrop.js
|
261
|
-
- test/rails212/public/javascripts/effects.js
|
262
|
-
- test/rails212/public/javascripts/prototype.js
|
263
|
-
- test/rails212/public/robots.txt
|
264
|
-
- test/rails212/public/stylesheets
|
265
|
-
- test/rails212/Rakefile
|
266
|
-
- test/rails212/README
|
267
|
-
- test/rails212/script
|
268
|
-
- test/rails212/script/about
|
269
|
-
- test/rails212/script/console
|
270
|
-
- test/rails212/script/dbconsole
|
271
|
-
- test/rails212/script/destroy
|
272
|
-
- test/rails212/script/generate
|
273
|
-
- test/rails212/script/performance
|
274
|
-
- test/rails212/script/performance/benchmarker
|
275
|
-
- test/rails212/script/performance/profiler
|
276
|
-
- test/rails212/script/performance/request
|
277
|
-
- test/rails212/script/plugin
|
278
|
-
- test/rails212/script/process
|
279
|
-
- test/rails212/script/process/inspector
|
280
|
-
- test/rails212/script/process/reaper
|
281
|
-
- test/rails212/script/process/spawner
|
282
|
-
- test/rails212/script/runner
|
283
|
-
- test/rails212/script/server
|
284
|
-
- test/rails212/test
|
285
|
-
- test/rails212/test/fixtures
|
286
|
-
- test/rails212/test/functional
|
287
|
-
- test/rails212/test/integration
|
288
|
-
- test/rails212/test/test_helper.rb
|
289
|
-
- test/rails212/test/unit
|
290
|
-
- test/rails212/tmp
|
291
|
-
- test/rails212/tmp/cache
|
292
|
-
- test/rails212/tmp/pids
|
293
|
-
- test/rails212/tmp/sessions
|
294
|
-
- test/rails212/tmp/sockets
|
295
|
-
- test/rails212/vendor
|
296
|
-
- test/rails212/vendor/plugins
|
297
85
|
- test/rails_version_test.rb
|
298
86
|
has_rdoc: true
|
299
87
|
homepage: http://github.com/jtrupiano/environmentalist
|
300
88
|
post_install_message:
|
301
89
|
rdoc_options:
|
302
|
-
- --inline-source
|
303
90
|
- --charset=UTF-8
|
304
91
|
require_paths:
|
305
92
|
- lib
|
@@ -322,5 +109,18 @@ rubygems_version: 1.3.1
|
|
322
109
|
signing_key:
|
323
110
|
specification_version: 2
|
324
111
|
summary: Provides an executable that converts a rails app's config structure. The basic idea is that environments themselves are now first-class citizens, allowing you to create several environments (e.g. staging, prodtest, demo, etc.) in a clean, organized fashion. Each environment is given its own folder where it can store its own set of configuration files (think mongrel configs, apache configs, etc.) without polluting the top-leve config/ directory.
|
325
|
-
test_files:
|
326
|
-
|
112
|
+
test_files:
|
113
|
+
- test/rails210/app/controllers/application.rb
|
114
|
+
- test/rails210/app/helpers/application_helper.rb
|
115
|
+
- test/rails210/config/boot.rb
|
116
|
+
- test/rails210/config/environment.rb
|
117
|
+
- test/rails210/config/environments/development.rb
|
118
|
+
- test/rails210/config/environments/production.rb
|
119
|
+
- test/rails210/config/environments/test.rb
|
120
|
+
- test/rails210/config/initializers/inflections.rb
|
121
|
+
- test/rails210/config/initializers/mime_types.rb
|
122
|
+
- test/rails210/config/initializers/new_rails_defaults.rb
|
123
|
+
- test/rails210/config/routes.rb
|
124
|
+
- test/rails210/public/dispatch.rb
|
125
|
+
- test/rails210/test/test_helper.rb
|
126
|
+
- test/rails_version_test.rb
|
data/test/rails210test/README
DELETED
@@ -1,256 +0,0 @@
|
|
1
|
-
== Welcome to Rails
|
2
|
-
|
3
|
-
Rails is a web-application framework that includes everything needed to create
|
4
|
-
database-backed web applications according to the Model-View-Control pattern.
|
5
|
-
|
6
|
-
This pattern splits the view (also called the presentation) into "dumb" templates
|
7
|
-
that are primarily responsible for inserting pre-built data in between HTML tags.
|
8
|
-
The model contains the "smart" domain objects (such as Account, Product, Person,
|
9
|
-
Post) that holds all the business logic and knows how to persist themselves to
|
10
|
-
a database. The controller handles the incoming requests (such as Save New Account,
|
11
|
-
Update Product, Show Post) by manipulating the model and directing data to the view.
|
12
|
-
|
13
|
-
In Rails, the model is handled by what's called an object-relational mapping
|
14
|
-
layer entitled Active Record. This layer allows you to present the data from
|
15
|
-
database rows as objects and embellish these data objects with business logic
|
16
|
-
methods. You can read more about Active Record in
|
17
|
-
link:files/vendor/rails/activerecord/README.html.
|
18
|
-
|
19
|
-
The controller and view are handled by the Action Pack, which handles both
|
20
|
-
layers by its two parts: Action View and Action Controller. These two layers
|
21
|
-
are bundled in a single package due to their heavy interdependence. This is
|
22
|
-
unlike the relationship between the Active Record and Action Pack that is much
|
23
|
-
more separate. Each of these packages can be used independently outside of
|
24
|
-
Rails. You can read more about Action Pack in
|
25
|
-
link:files/vendor/rails/actionpack/README.html.
|
26
|
-
|
27
|
-
|
28
|
-
== Getting Started
|
29
|
-
|
30
|
-
1. At the command prompt, start a new Rails application using the <tt>rails</tt> command
|
31
|
-
and your application name. Ex: rails myapp
|
32
|
-
2. Change directory into myapp and start the web server: <tt>script/server</tt> (run with --help for options)
|
33
|
-
3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
|
34
|
-
4. Follow the guidelines to start developing your application
|
35
|
-
|
36
|
-
|
37
|
-
== Web Servers
|
38
|
-
|
39
|
-
By default, Rails will try to use Mongrel and lighttpd if they are installed, otherwise
|
40
|
-
Rails will use WEBrick, the webserver that ships with Ruby. When you run script/server,
|
41
|
-
Rails will check if Mongrel exists, then lighttpd and finally fall back to WEBrick. This ensures
|
42
|
-
that you can always get up and running quickly.
|
43
|
-
|
44
|
-
Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
|
45
|
-
suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
|
46
|
-
getting up and running with mongrel is as easy as: <tt>gem install mongrel</tt>.
|
47
|
-
More info at: http://mongrel.rubyforge.org
|
48
|
-
|
49
|
-
If Mongrel is not installed, Rails will look for lighttpd. It's considerably faster than
|
50
|
-
Mongrel and WEBrick and also suited for production use, but requires additional
|
51
|
-
installation and currently only works well on OS X/Unix (Windows users are encouraged
|
52
|
-
to start with Mongrel). We recommend version 1.4.11 and higher. You can download it from
|
53
|
-
http://www.lighttpd.net.
|
54
|
-
|
55
|
-
And finally, if neither Mongrel or lighttpd are installed, Rails will use the built-in Ruby
|
56
|
-
web server, WEBrick. WEBrick is a small Ruby web server suitable for development, but not
|
57
|
-
for production.
|
58
|
-
|
59
|
-
But of course its also possible to run Rails on any platform that supports FCGI.
|
60
|
-
Apache, LiteSpeed, IIS are just a few. For more information on FCGI,
|
61
|
-
please visit: http://wiki.rubyonrails.com/rails/pages/FastCGI
|
62
|
-
|
63
|
-
|
64
|
-
== Apache .htaccess example
|
65
|
-
|
66
|
-
# General Apache options
|
67
|
-
AddHandler fastcgi-script .fcgi
|
68
|
-
AddHandler cgi-script .cgi
|
69
|
-
Options +FollowSymLinks +ExecCGI
|
70
|
-
|
71
|
-
# If you don't want Rails to look in certain directories,
|
72
|
-
# use the following rewrite rules so that Apache won't rewrite certain requests
|
73
|
-
#
|
74
|
-
# Example:
|
75
|
-
# RewriteCond %{REQUEST_URI} ^/notrails.*
|
76
|
-
# RewriteRule .* - [L]
|
77
|
-
|
78
|
-
# Redirect all requests not available on the filesystem to Rails
|
79
|
-
# By default the cgi dispatcher is used which is very slow
|
80
|
-
#
|
81
|
-
# For better performance replace the dispatcher with the fastcgi one
|
82
|
-
#
|
83
|
-
# Example:
|
84
|
-
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
|
85
|
-
RewriteEngine On
|
86
|
-
|
87
|
-
# If your Rails application is accessed via an Alias directive,
|
88
|
-
# then you MUST also set the RewriteBase in this htaccess file.
|
89
|
-
#
|
90
|
-
# Example:
|
91
|
-
# Alias /myrailsapp /path/to/myrailsapp/public
|
92
|
-
# RewriteBase /myrailsapp
|
93
|
-
|
94
|
-
RewriteRule ^$ index.html [QSA]
|
95
|
-
RewriteRule ^([^.]+)$ $1.html [QSA]
|
96
|
-
RewriteCond %{REQUEST_FILENAME} !-f
|
97
|
-
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
|
98
|
-
|
99
|
-
# In case Rails experiences terminal errors
|
100
|
-
# Instead of displaying this message you can supply a file here which will be rendered instead
|
101
|
-
#
|
102
|
-
# Example:
|
103
|
-
# ErrorDocument 500 /500.html
|
104
|
-
|
105
|
-
ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
|
106
|
-
|
107
|
-
|
108
|
-
== Debugging Rails
|
109
|
-
|
110
|
-
Sometimes your application goes wrong. Fortunately there are a lot of tools that
|
111
|
-
will help you debug it and get it back on the rails.
|
112
|
-
|
113
|
-
First area to check is the application log files. Have "tail -f" commands running
|
114
|
-
on the server.log and development.log. Rails will automatically display debugging
|
115
|
-
and runtime information to these files. Debugging info will also be shown in the
|
116
|
-
browser on requests from 127.0.0.1.
|
117
|
-
|
118
|
-
You can also log your own messages directly into the log file from your code using
|
119
|
-
the Ruby logger class from inside your controllers. Example:
|
120
|
-
|
121
|
-
class WeblogController < ActionController::Base
|
122
|
-
def destroy
|
123
|
-
@weblog = Weblog.find(params[:id])
|
124
|
-
@weblog.destroy
|
125
|
-
logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
|
-
The result will be a message in your log file along the lines of:
|
130
|
-
|
131
|
-
Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
|
132
|
-
|
133
|
-
More information on how to use the logger is at http://www.ruby-doc.org/core/
|
134
|
-
|
135
|
-
Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
|
136
|
-
|
137
|
-
* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
|
138
|
-
* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
|
139
|
-
|
140
|
-
These two online (and free) books will bring you up to speed on the Ruby language
|
141
|
-
and also on programming in general.
|
142
|
-
|
143
|
-
|
144
|
-
== Debugger
|
145
|
-
|
146
|
-
Debugger support is available through the debugger command when you start your Mongrel or
|
147
|
-
Webrick server with --debugger. This means that you can break out of execution at any point
|
148
|
-
in the code, investigate and change the model, AND then resume execution!
|
149
|
-
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
|
150
|
-
Example:
|
151
|
-
|
152
|
-
class WeblogController < ActionController::Base
|
153
|
-
def index
|
154
|
-
@posts = Post.find(:all)
|
155
|
-
debugger
|
156
|
-
end
|
157
|
-
end
|
158
|
-
|
159
|
-
So the controller will accept the action, run the first line, then present you
|
160
|
-
with a IRB prompt in the server window. Here you can do things like:
|
161
|
-
|
162
|
-
>> @posts.inspect
|
163
|
-
=> "[#<Post:0x14a6be8 @attributes={\"title\"=>nil, \"body\"=>nil, \"id\"=>\"1\"}>,
|
164
|
-
#<Post:0x14a6620 @attributes={\"title\"=>\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
|
165
|
-
>> @posts.first.title = "hello from a debugger"
|
166
|
-
=> "hello from a debugger"
|
167
|
-
|
168
|
-
...and even better is that you can examine how your runtime objects actually work:
|
169
|
-
|
170
|
-
>> f = @posts.first
|
171
|
-
=> #<Post:0x13630c4 @attributes={"title"=>nil, "body"=>nil, "id"=>"1"}>
|
172
|
-
>> f.
|
173
|
-
Display all 152 possibilities? (y or n)
|
174
|
-
|
175
|
-
Finally, when you're ready to resume execution, you enter "cont"
|
176
|
-
|
177
|
-
|
178
|
-
== Console
|
179
|
-
|
180
|
-
You can interact with the domain model by starting the console through <tt>script/console</tt>.
|
181
|
-
Here you'll have all parts of the application configured, just like it is when the
|
182
|
-
application is running. You can inspect domain models, change values, and save to the
|
183
|
-
database. Starting the script without arguments will launch it in the development environment.
|
184
|
-
Passing an argument will specify a different environment, like <tt>script/console production</tt>.
|
185
|
-
|
186
|
-
To reload your controllers and models after launching the console run <tt>reload!</tt>
|
187
|
-
|
188
|
-
== dbconsole
|
189
|
-
|
190
|
-
You can go to the command line of your database directly through <tt>script/dbconsole</tt>.
|
191
|
-
You would be connected to the database with the credentials defined in database.yml.
|
192
|
-
Starting the script without arguments will connect you to the development database. Passing an
|
193
|
-
argument will connect you to a different database, like <tt>script/dbconsole production</tt>.
|
194
|
-
Currently works for mysql, postgresql and sqlite.
|
195
|
-
|
196
|
-
== Description of Contents
|
197
|
-
|
198
|
-
app
|
199
|
-
Holds all the code that's specific to this particular application.
|
200
|
-
|
201
|
-
app/controllers
|
202
|
-
Holds controllers that should be named like weblogs_controller.rb for
|
203
|
-
automated URL mapping. All controllers should descend from ApplicationController
|
204
|
-
which itself descends from ActionController::Base.
|
205
|
-
|
206
|
-
app/models
|
207
|
-
Holds models that should be named like post.rb.
|
208
|
-
Most models will descend from ActiveRecord::Base.
|
209
|
-
|
210
|
-
app/views
|
211
|
-
Holds the template files for the view that should be named like
|
212
|
-
weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby
|
213
|
-
syntax.
|
214
|
-
|
215
|
-
app/views/layouts
|
216
|
-
Holds the template files for layouts to be used with views. This models the common
|
217
|
-
header/footer method of wrapping views. In your views, define a layout using the
|
218
|
-
<tt>layout :default</tt> and create a file named default.html.erb. Inside default.html.erb,
|
219
|
-
call <% yield %> to render the view using this layout.
|
220
|
-
|
221
|
-
app/helpers
|
222
|
-
Holds view helpers that should be named like weblogs_helper.rb. These are generated
|
223
|
-
for you automatically when using script/generate for controllers. Helpers can be used to
|
224
|
-
wrap functionality for your views into methods.
|
225
|
-
|
226
|
-
config
|
227
|
-
Configuration files for the Rails environment, the routing map, the database, and other dependencies.
|
228
|
-
|
229
|
-
db
|
230
|
-
Contains the database schema in schema.rb. db/migrate contains all
|
231
|
-
the sequence of Migrations for your schema.
|
232
|
-
|
233
|
-
doc
|
234
|
-
This directory is where your application documentation will be stored when generated
|
235
|
-
using <tt>rake doc:app</tt>
|
236
|
-
|
237
|
-
lib
|
238
|
-
Application specific libraries. Basically, any kind of custom code that doesn't
|
239
|
-
belong under controllers, models, or helpers. This directory is in the load path.
|
240
|
-
|
241
|
-
public
|
242
|
-
The directory available for the web server. Contains subdirectories for images, stylesheets,
|
243
|
-
and javascripts. Also contains the dispatchers and the default HTML files. This should be
|
244
|
-
set as the DOCUMENT_ROOT of your web server.
|
245
|
-
|
246
|
-
script
|
247
|
-
Helper scripts for automation and generation.
|
248
|
-
|
249
|
-
test
|
250
|
-
Unit and functional tests along with fixtures. When using the script/generate scripts, template
|
251
|
-
test files will be generated for you and placed in this directory.
|
252
|
-
|
253
|
-
vendor
|
254
|
-
External libraries that the application depends on. Also includes the plugins subdirectory.
|
255
|
-
If the app has frozen rails, those gems also go here, under vendor/rails/.
|
256
|
-
This directory is in the load path.
|