jtrupiano-environmentalist 0.2.1 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
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
- h1. environmentalist
1
+ = environmentalist
2
2
 
3
3
  * http://github.com/jtrupiano/environmentalist/tree/master
4
4
 
5
- h2. DESCRIPTION
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
- h2. REQUIREMENTS
9
+ == REQUIREMENTS
10
10
 
11
11
  * none, but it's really only useful with a rails app
12
12
 
13
- h2. INSTALL
13
+ == INSTALL
14
14
 
15
15
  sudo gem install environmentalist
16
16
 
17
- h2. USAGE
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,11 +2,13 @@ require 'rake'
2
2
  require 'rake/testtask'
3
3
  require 'rake/rdoctask'
4
4
 
5
+ gem 'jeweler', '~> 0.11.1'
6
+
5
7
  begin
6
8
  require 'jeweler'
7
9
  Jeweler::Tasks.new do |s|
8
10
  s.name = "environmentalist"
9
- #s.rubyforge_name = 'johntrupiano' # if different than lowercase project name
11
+ s.rubyforge_project = 'johntrupiano' # if different than lowercase project name
10
12
  s.description = %q(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.)
11
13
  s.summary = s.description # More details later??
12
14
  s.email = "jtrupiano@gmail.com"
@@ -20,3 +22,38 @@ rescue LoadError
20
22
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
21
23
  end
22
24
 
25
+ require 'rake/rdoctask'
26
+ Rake::RDocTask.new do |rdoc|
27
+ config = YAML.load(File.read('VERSION.yml'))
28
+ rdoc.rdoc_dir = 'rdoc'
29
+ rdoc.title = "environmentalist #{config[:major]}.#{config[:minor]}.#{config[:patch]}"
30
+ rdoc.options << '--line-numbers' << '--inline-source'
31
+ rdoc.rdoc_files.include('README*')
32
+ rdoc.rdoc_files.include('lib/**/*.rb')
33
+ end
34
+
35
+ begin
36
+ require 'rake/contrib/sshpublisher'
37
+ namespace :rubyforge do
38
+
39
+ desc "Release gem and RDoc documentation to RubyForge"
40
+ task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
41
+
42
+ namespace :release do
43
+ desc "Publish RDoc to RubyForge."
44
+ task :docs => [:rdoc] do
45
+ config = YAML.load(
46
+ File.read(File.expand_path('~/.rubyforge/user-config.yml'))
47
+ )
48
+
49
+ host = "#{config['username']}@rubyforge.org"
50
+ remote_dir = "/var/www/gforge-projects/johntrupiano/environmentalist"
51
+ local_dir = 'rdoc'
52
+
53
+ Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
54
+ end
55
+ end
56
+ end
57
+ rescue LoadError
58
+ puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
59
+ end
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 4
3
3
  :major: 0
4
4
  :minor: 2
data/bin/environmentalize CHANGED
@@ -50,19 +50,17 @@ if !File.exists?(preinitializer)
50
50
  cp(gem_preinitializer, preinitializer)
51
51
  end
52
52
 
53
- main_env_file = File.join(config_base, "environment.rb")
54
- env_contents = File.open(main_env_file).read
55
- if !env_contents.include?("require File.join(File.dirname(__FILE__), 'postboot')")
53
+ boot_file = File.join(config_base, "boot.rb")
54
+ boot_contents = File.open(boot_file).read
55
+ if !boot_contents.include?("require File.join(File.dirname(__FILE__), 'postboot')")
56
56
 
57
57
  contents = <<-CONTENTS
58
58
  # Load postboot file to change Rails paths
59
59
  require File.join(File.dirname(__FILE__), 'postboot')
60
-
61
- Rails::Initializer.run do |config|
62
60
  CONTENTS
63
61
 
64
- env_contents.sub!("Rails::Initializer.run do |config|", contents)
65
- File.open(main_env_file, 'w') {|f| f.write(env_contents) }
62
+ boot_contents << contents
63
+ File.open(boot_file, 'w') {|f| f.write(boot_contents) }
66
64
  end
67
65
 
68
66
  if File.directory?(old_env_dir)
@@ -1,22 +1,20 @@
1
1
  # Ensure that proper versions of gems in config/geminstaller.yml are activated.
2
2
  require 'rubygems'
3
- gem 'rails', '= 2.3.0'
4
- gem 'geminstaller', '= 0.5.1'
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'
8
- #perform_install = %w(development test).include?(rails_env)
9
8
 
10
- # Activate common gems
9
+ perform_install = %w(development test).include?(rails_env)
10
+
11
+ # Activate gems
11
12
  common_gemfile = File.join(RAILS_ROOT, 'config', 'geminstaller.yml')
12
- GemInstaller.install('--sudo --exceptions --config=#{common_gemfile}') if perform_install
13
- Gem.refresh # in the event that we did install new gems, we'll need to update the cache so that we can activate them
14
- GemInstaller.autogem("--sudo --exceptions --config=#{common_gemfile}") if File.exists?(common_gemfile)
13
+ env_gemfile = File.join(RAILS_ROOT, "config", rails_env, "geminstaller.yml")
15
14
 
16
- # Activate environment-specific gems
17
- path = File.join(RAILS_ROOT, "config", rails_env, "geminstaller.yml")
18
- if File.exists?(path)
19
- GemInstaller.install("--sudo --exceptions --config=#{path}") if perform_install
20
- Gem.refresh # in the event that we did install new gems, we'll need to update the cache so that we can activate them
21
- GemInstaller.autogem("--sudo --exceptions --config=#{path}")
22
- end
15
+ [common_gemfile, env_gemfile].each do |file|
16
+ if File.exists?(file)
17
+ GemInstaller.install("--exceptions --config=#{file}") if perform_install
18
+ GemInstaller.autogem("--exceptions --config=#{file}")
19
+ end
20
+ end
@@ -16,8 +16,8 @@ class RailsVersionTest < Test::Unit::TestCase
16
16
 
17
17
  assert File.exists?(File.join(config_root, 'postboot.rb'))
18
18
 
19
- env_rb = File.open(File.join(config_root, 'environment.rb')).read
20
- assert env_rb.include?("require File.join(File.dirname(__FILE__), 'postboot')")
19
+ boot_rb = File.open(File.join(config_root, 'boot.rb')).read
20
+ assert boot_rb.include?("require File.join(File.dirname(__FILE__), 'postboot')")
21
21
 
22
22
  %w(development test demo staging production).each do |env|
23
23
  assert File.directory?(File.join(config_root, env))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jtrupiano-environmentalist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
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-03-06 00:00:00 -08:00
12
+ date: 2009-04-30 00:00:00 -07:00
13
13
  default_executable: environmentalize
14
14
  dependencies: []
15
15
 
@@ -19,54 +19,39 @@ executables:
19
19
  - environmentalize
20
20
  extensions: []
21
21
 
22
- extra_rdoc_files: []
23
-
22
+ extra_rdoc_files:
23
+ - LICENSE
24
+ - README.rdoc
24
25
  files:
25
26
  - History.txt
26
27
  - LICENSE
28
+ - README.rdoc
27
29
  - Rakefile
28
- - README.textile
29
30
  - VERSION.yml
30
31
  - bin/environmentalize
31
- - lib/conf
32
32
  - lib/conf/postboot.rb
33
33
  - lib/conf/preinitializer.rb
34
- - lib/environmentalist
35
- - lib/environmentalist/version.rb
36
34
  - lib/environmentalist.rb
37
- - test/rails210
38
- - test/rails210/app
39
- - test/rails210/app/controllers
35
+ - lib/environmentalist/version.rb
36
+ - test/rails210/README
37
+ - test/rails210/Rakefile
40
38
  - test/rails210/app/controllers/application.rb
41
- - test/rails210/app/helpers
42
39
  - test/rails210/app/helpers/application_helper.rb
43
- - test/rails210/app/models
44
- - test/rails210/app/views
45
- - test/rails210/app/views/layouts
46
- - test/rails210/config
47
40
  - test/rails210/config/boot.rb
48
41
  - test/rails210/config/database.yml
49
42
  - test/rails210/config/environment.rb
50
- - test/rails210/config/environments
51
43
  - test/rails210/config/environments/development.rb
52
44
  - test/rails210/config/environments/production.rb
53
45
  - test/rails210/config/environments/test.rb
54
- - test/rails210/config/initializers
55
46
  - test/rails210/config/initializers/inflections.rb
56
47
  - test/rails210/config/initializers/mime_types.rb
57
48
  - test/rails210/config/initializers/new_rails_defaults.rb
58
49
  - test/rails210/config/routes.rb
59
- - test/rails210/db
60
- - test/rails210/doc
61
50
  - test/rails210/doc/README_FOR_APP
62
- - test/rails210/lib
63
- - test/rails210/lib/tasks
64
- - test/rails210/log
65
51
  - test/rails210/log/development.log
66
52
  - test/rails210/log/production.log
67
53
  - test/rails210/log/server.log
68
54
  - test/rails210/log/test.log
69
- - test/rails210/public
70
55
  - test/rails210/public/404.html
71
56
  - test/rails210/public/422.html
72
57
  - test/rails210/public/500.html
@@ -74,147 +59,34 @@ files:
74
59
  - test/rails210/public/dispatch.fcgi
75
60
  - test/rails210/public/dispatch.rb
76
61
  - test/rails210/public/favicon.ico
77
- - test/rails210/public/images
78
62
  - test/rails210/public/images/rails.png
79
63
  - test/rails210/public/index.html
80
- - test/rails210/public/javascripts
81
64
  - test/rails210/public/javascripts/application.js
82
65
  - test/rails210/public/javascripts/controls.js
83
66
  - test/rails210/public/javascripts/dragdrop.js
84
67
  - test/rails210/public/javascripts/effects.js
85
68
  - test/rails210/public/javascripts/prototype.js
86
69
  - test/rails210/public/robots.txt
87
- - test/rails210/public/stylesheets
88
- - test/rails210/Rakefile
89
- - test/rails210/README
90
- - test/rails210/script
91
70
  - test/rails210/script/about
92
71
  - test/rails210/script/console
93
72
  - test/rails210/script/dbconsole
94
73
  - test/rails210/script/destroy
95
74
  - test/rails210/script/generate
96
- - test/rails210/script/performance
97
75
  - test/rails210/script/performance/benchmarker
98
76
  - test/rails210/script/performance/profiler
99
77
  - test/rails210/script/performance/request
100
78
  - test/rails210/script/plugin
101
- - test/rails210/script/process
102
79
  - test/rails210/script/process/inspector
103
80
  - test/rails210/script/process/reaper
104
81
  - test/rails210/script/process/spawner
105
82
  - test/rails210/script/runner
106
83
  - test/rails210/script/server
107
- - test/rails210/test
108
- - test/rails210/test/fixtures
109
- - test/rails210/test/functional
110
- - test/rails210/test/integration
111
84
  - test/rails210/test/test_helper.rb
112
- - test/rails210/test/unit
113
- - test/rails210/tmp
114
- - test/rails210/tmp/cache
115
- - test/rails210/tmp/pids
116
- - test/rails210/tmp/sessions
117
- - test/rails210/tmp/sockets
118
- - test/rails210/vendor
119
- - test/rails210/vendor/plugins
120
- - test/rails210test
121
- - test/rails210test/app
122
- - test/rails210test/app/controllers
123
- - test/rails210test/app/controllers/application.rb
124
- - test/rails210test/app/helpers
125
- - test/rails210test/app/helpers/application_helper.rb
126
- - test/rails210test/app/models
127
- - test/rails210test/app/views
128
- - test/rails210test/app/views/layouts
129
- - test/rails210test/config
130
- - test/rails210test/config/boot.rb
131
- - test/rails210test/config/demo
132
- - test/rails210test/config/demo/environment.rb
133
- - test/rails210test/config/development
134
- - test/rails210test/config/development/database.yml
135
- - test/rails210test/config/development/environment.rb
136
- - test/rails210test/config/environment.rb
137
- - test/rails210test/config/initializers
138
- - test/rails210test/config/initializers/inflections.rb
139
- - test/rails210test/config/initializers/mime_types.rb
140
- - test/rails210test/config/initializers/new_rails_defaults.rb
141
- - test/rails210test/config/postboot.rb
142
- - test/rails210test/config/production
143
- - test/rails210test/config/production/database.yml
144
- - test/rails210test/config/production/environment.rb
145
- - test/rails210test/config/routes.rb
146
- - test/rails210test/config/staging
147
- - test/rails210test/config/staging/environment.rb
148
- - test/rails210test/config/test
149
- - test/rails210test/config/test/database.yml
150
- - test/rails210test/config/test/environment.rb
151
- - test/rails210test/db
152
- - test/rails210test/doc
153
- - test/rails210test/doc/README_FOR_APP
154
- - test/rails210test/lib
155
- - test/rails210test/lib/tasks
156
- - test/rails210test/log
157
- - test/rails210test/log/development.log
158
- - test/rails210test/log/production.log
159
- - test/rails210test/log/server.log
160
- - test/rails210test/log/test.log
161
- - test/rails210test/public
162
- - test/rails210test/public/404.html
163
- - test/rails210test/public/422.html
164
- - test/rails210test/public/500.html
165
- - test/rails210test/public/dispatch.cgi
166
- - test/rails210test/public/dispatch.fcgi
167
- - test/rails210test/public/dispatch.rb
168
- - test/rails210test/public/favicon.ico
169
- - test/rails210test/public/images
170
- - test/rails210test/public/images/rails.png
171
- - test/rails210test/public/index.html
172
- - test/rails210test/public/javascripts
173
- - test/rails210test/public/javascripts/application.js
174
- - test/rails210test/public/javascripts/controls.js
175
- - test/rails210test/public/javascripts/dragdrop.js
176
- - test/rails210test/public/javascripts/effects.js
177
- - test/rails210test/public/javascripts/prototype.js
178
- - test/rails210test/public/robots.txt
179
- - test/rails210test/public/stylesheets
180
- - test/rails210test/Rakefile
181
- - test/rails210test/README
182
- - test/rails210test/script
183
- - test/rails210test/script/about
184
- - test/rails210test/script/console
185
- - test/rails210test/script/dbconsole
186
- - test/rails210test/script/destroy
187
- - test/rails210test/script/generate
188
- - test/rails210test/script/performance
189
- - test/rails210test/script/performance/benchmarker
190
- - test/rails210test/script/performance/profiler
191
- - test/rails210test/script/performance/request
192
- - test/rails210test/script/plugin
193
- - test/rails210test/script/process
194
- - test/rails210test/script/process/inspector
195
- - test/rails210test/script/process/reaper
196
- - test/rails210test/script/process/spawner
197
- - test/rails210test/script/runner
198
- - test/rails210test/script/server
199
- - test/rails210test/test
200
- - test/rails210test/test/fixtures
201
- - test/rails210test/test/functional
202
- - test/rails210test/test/integration
203
- - test/rails210test/test/test_helper.rb
204
- - test/rails210test/test/unit
205
- - test/rails210test/tmp
206
- - test/rails210test/tmp/cache
207
- - test/rails210test/tmp/pids
208
- - test/rails210test/tmp/sessions
209
- - test/rails210test/tmp/sockets
210
- - test/rails210test/vendor
211
- - test/rails210test/vendor/plugins
212
85
  - test/rails_version_test.rb
213
86
  has_rdoc: true
214
87
  homepage: http://github.com/jtrupiano/environmentalist
215
88
  post_install_message:
216
89
  rdoc_options:
217
- - --inline-source
218
90
  - --charset=UTF-8
219
91
  require_paths:
220
92
  - lib
@@ -232,10 +104,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
104
  version:
233
105
  requirements: []
234
106
 
235
- rubyforge_project:
107
+ rubyforge_project: johntrupiano
236
108
  rubygems_version: 1.2.0
237
109
  signing_key:
238
- specification_version: 3
110
+ specification_version: 2
239
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.
240
- test_files: []
241
-
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