activeldap 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. data/CHANGES +34 -0
  2. data/README +13 -0
  3. data/Rakefile +2 -1
  4. data/TODO +6 -0
  5. data/benchmark/bench-al.rb +68 -17
  6. data/examples/al-admin/app/helpers/application_helper.rb +3 -5
  7. data/examples/al-admin/app/views/layouts/_footer.html.erb +2 -0
  8. data/examples/al-admin/config/boot.rb +7 -7
  9. data/examples/al-admin/config/environment.rb +27 -12
  10. data/examples/al-admin/config/environments/development.rb +0 -1
  11. data/examples/al-admin/config/environments/production.rb +6 -1
  12. data/examples/al-admin/config/environments/test.rb +1 -1
  13. data/examples/al-admin/config/initializers/gettext.rb +15 -1
  14. data/examples/al-admin/po/en/al-admin.po +1 -1
  15. data/examples/al-admin/po/ja/al-admin.po +1 -1
  16. data/examples/al-admin/po/nl/al-admin.po +1 -1
  17. data/examples/al-admin/public/dispatch.cgi +0 -0
  18. data/examples/al-admin/public/dispatch.fcgi +0 -0
  19. data/examples/al-admin/public/dispatch.rb +0 -0
  20. data/examples/al-admin/public/javascripts/controls.js +73 -73
  21. data/examples/al-admin/public/javascripts/dragdrop.js +166 -165
  22. data/examples/al-admin/public/javascripts/effects.js +174 -166
  23. data/examples/al-admin/public/javascripts/prototype.js +362 -267
  24. data/examples/al-admin/script/about +0 -0
  25. data/examples/al-admin/script/console +0 -0
  26. data/examples/al-admin/script/dbconsole +3 -0
  27. data/examples/al-admin/script/destroy +0 -0
  28. data/examples/al-admin/script/generate +0 -0
  29. data/examples/al-admin/script/performance/benchmarker +0 -0
  30. data/examples/al-admin/script/performance/profiler +0 -0
  31. data/examples/al-admin/script/performance/request +0 -0
  32. data/examples/al-admin/script/plugin +0 -0
  33. data/examples/al-admin/script/process/inspector +0 -0
  34. data/examples/al-admin/script/process/reaper +0 -0
  35. data/examples/al-admin/script/process/spawner +0 -0
  36. data/examples/al-admin/script/runner +0 -0
  37. data/examples/al-admin/script/server +0 -0
  38. data/examples/al-admin/test/run-test.sh +0 -0
  39. data/examples/groupadd +0 -0
  40. data/examples/groupdel +0 -0
  41. data/examples/groupls +0 -0
  42. data/examples/groupmod +0 -0
  43. data/examples/lpasswd +0 -0
  44. data/examples/ouadd +0 -0
  45. data/examples/useradd +0 -0
  46. data/examples/useradd-binary +0 -0
  47. data/examples/userdel +0 -0
  48. data/examples/userls +0 -0
  49. data/examples/usermod +0 -0
  50. data/examples/usermod-binary-add +0 -0
  51. data/examples/usermod-binary-add-time +0 -0
  52. data/examples/usermod-binary-del +0 -0
  53. data/examples/usermod-lang-add +0 -0
  54. data/lib/active_ldap.rb +10 -4
  55. data/lib/active_ldap/action_controller/ldap_benchmarking.rb +28 -9
  56. data/lib/active_ldap/adapter/base.rb +30 -17
  57. data/lib/active_ldap/adapter/jndi.rb +5 -1
  58. data/lib/active_ldap/adapter/ldap.rb +5 -1
  59. data/lib/active_ldap/association/has_many_utils.rb +7 -1
  60. data/lib/active_ldap/associations.rb +10 -5
  61. data/lib/active_ldap/attributes.rb +6 -1
  62. data/lib/active_ldap/base.rb +154 -52
  63. data/lib/active_ldap/configuration.rb +1 -1
  64. data/lib/active_ldap/connection.rb +7 -4
  65. data/lib/active_ldap/get_text.rb +11 -3
  66. data/lib/active_ldap/ldif.rb +16 -4
  67. data/lib/active_ldap/operations.rb +13 -5
  68. data/lib/active_ldap/schema.rb +6 -2
  69. data/lib/active_ldap/schema/syntaxes.rb +15 -3
  70. data/lib/active_ldap/user_password.rb +4 -4
  71. data/lib/active_ldap/validations.rb +32 -44
  72. data/lib/active_ldap/xml.rb +125 -0
  73. data/po/en/active-ldap.po +740 -85
  74. data/po/ja/active-ldap.po +748 -547
  75. data/rails/README +54 -0
  76. data/rails/init.rb +33 -0
  77. data/rails/plugin/active_ldap/generators/README +2 -0
  78. data/rails/plugin/active_ldap/generators/model_active_ldap/model_active_ldap_generator.rb +1 -1
  79. data/rails/plugin/active_ldap/init.rb +3 -0
  80. data/rails_generators/model_active_ldap/USAGE +17 -0
  81. data/rails_generators/model_active_ldap/model_active_ldap_generator.rb +69 -0
  82. data/rails_generators/model_active_ldap/templates/model_active_ldap.rb +3 -0
  83. data/rails_generators/model_active_ldap/templates/unit_test.rb +8 -0
  84. data/rails_generators/scaffold_active_ldap/scaffold_active_ldap_generator.rb +7 -0
  85. data/rails_generators/scaffold_active_ldap/templates/ldap.yml +18 -0
  86. data/rails_generators/scaffold_al/scaffold_al_generator.rb +20 -0
  87. data/test-unit/History.txt +50 -1
  88. data/test-unit/Manifest.txt +22 -12
  89. data/test-unit/README.txt +31 -12
  90. data/test-unit/Rakefile +14 -1
  91. data/test-unit/TODO +5 -0
  92. data/test-unit/bin/testrb +0 -0
  93. data/test-unit/lib/test/unit.rb +62 -0
  94. data/test-unit/lib/test/unit/assertions.rb +419 -75
  95. data/test-unit/lib/test/unit/autorunner.rb +70 -13
  96. data/test-unit/lib/test/unit/collector.rb +1 -1
  97. data/test-unit/lib/test/unit/collector/load.rb +1 -1
  98. data/test-unit/lib/test/unit/color-scheme.rb +86 -0
  99. data/test-unit/lib/test/unit/color.rb +40 -5
  100. data/test-unit/lib/test/unit/diff.rb +14 -0
  101. data/test-unit/lib/test/unit/fixture.rb +7 -16
  102. data/test-unit/lib/test/unit/notification.rb +9 -0
  103. data/test-unit/lib/test/unit/omission.rb +14 -0
  104. data/test-unit/lib/test/unit/pending.rb +16 -0
  105. data/test-unit/lib/test/unit/priority.rb +17 -2
  106. data/test-unit/lib/test/unit/runner/console.rb +8 -2
  107. data/test-unit/lib/test/unit/testcase.rb +188 -2
  108. data/test-unit/lib/test/unit/ui/console/testrunner.rb +51 -26
  109. data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
  110. data/test-unit/lib/test/unit/version.rb +1 -1
  111. data/test-unit/sample/test_user.rb +22 -0
  112. data/test-unit/test/collector/{test_descendant.rb → test-descendant.rb} +0 -0
  113. data/test-unit/test/collector/{test_load.rb → test-load.rb} +1 -1
  114. data/test-unit/test/run-test.rb +0 -0
  115. data/test-unit/test/{test_attribute.rb → test-attribute.rb} +0 -0
  116. data/test-unit/test/test-color-scheme.rb +56 -0
  117. data/test-unit/test/{test_color.rb → test-color.rb} +10 -0
  118. data/test-unit/test/{test_diff.rb → test-diff.rb} +0 -0
  119. data/test-unit/test/{test_emacs_runner.rb → test-emacs-runner.rb} +0 -0
  120. data/test-unit/test/test-fixture.rb +287 -0
  121. data/test-unit/test/{test_notification.rb → test-notification.rb} +4 -4
  122. data/test-unit/test/{test_omission.rb → test-omission.rb} +6 -6
  123. data/test-unit/test/{test_pending.rb → test-pending.rb} +12 -6
  124. data/test-unit/test/{test_priority.rb → test-priority.rb} +30 -0
  125. data/test-unit/test/test_assertions.rb +411 -69
  126. data/test-unit/test/test_testcase.rb +70 -3
  127. data/test-unit/test/{testunit_test_util.rb → testunit-test-util.rb} +4 -2
  128. data/test-unit/test/ui/test_testrunmediator.rb +1 -1
  129. data/test-unit/test/util/test-method-owner-finder.rb +38 -0
  130. data/test/run-test.rb +0 -0
  131. data/test/test_adapter.rb +3 -0
  132. data/test/test_associations.rb +50 -7
  133. data/test/test_base.rb +193 -11
  134. data/test/test_connection_per_dn.rb +1 -1
  135. data/test/test_ldif.rb +86 -0
  136. data/test/test_load.rb +7 -0
  137. data/test/test_schema.rb +31 -1
  138. data/test/test_syntax.rb +20 -0
  139. data/test/test_user_password.rb +22 -14
  140. data/test/test_validation.rb +70 -29
  141. metadata +99 -77
  142. data/data/locale/en/LC_MESSAGES/active-ldap.mo +0 -0
  143. data/data/locale/ja/LC_MESSAGES/active-ldap.mo +0 -0
  144. data/examples/al-admin/config/initializers/ralative_url_support.rb +0 -1
  145. data/examples/al-admin/lib/accept_http_rails_relative_url_root.rb +0 -9
  146. data/test-unit-ext/misc/rd2html.rb +0 -42
  147. data/test-unit/test/test_fixture.rb +0 -275
data/CHANGES CHANGED
@@ -1,3 +1,37 @@
1
+ 1.0.2:
2
+ * Removed Base64 module use.
3
+ * Improved LDIF parser.
4
+ * Improved scheme parser.
5
+ * Supported Base64 in XML serialization.
6
+ * Supported TLS options.
7
+ * Supported ActiveRecord 2.2.2.
8
+ * Supported Ruby on Rails 2.2.2.
9
+ * Used rails/init.rb and rails_generators/ directory structure convention
10
+ for Rails and gem. rails/ directory will be removed after 1.0.2 is released.
11
+ * AL-Admin migrated to Ruby on Rails 2.2.2 form 2.0.2.
12
+ * Improved ActiveDirectory integration.
13
+ * Accepted :class_name for belong_to and has_many option.
14
+ * Improved default port guess.
15
+ * Bug fixes:
16
+ * [#4] ModifyRecord#load doesn't operate atomic. [gwarf12]
17
+ * [#5] to_xml supports :except option. [baptiste.grenier]
18
+ * [#6] to_xml uses ActiveResource format. [baptiste.grenier]
19
+ * Out of ranged GeneralizedTime uses Time.at(0) as fallback value.
20
+ [Richard Nicholas]
21
+ * ActiveLdap::Base#to_s uses #to_ldif. [Kazuhiro NISHIYAMA]
22
+ * Fixed excess prefix extraction. [Grzegorz Marszałek]
23
+ * Skiped read only attribute validation. [しまさわらさん]
24
+ * Treated "" as empty value. [Ted Lepich]
25
+ * [#9][#16] Reduced raising when DN value is invalid.
26
+ [danger1986][Alexey.Chebotar]
27
+ * [#10][#12] Fixed needless ',' is appeared. [michael.j.konopka]
28
+ * [#11] Required missing 'active_ldap/user_password'. [michael.j.konopka]
29
+ * [#13] Returned entries if has_many :wrap has nonexistent entry.
30
+ [ingersoll]
31
+ * [#15] Fixed type error on computing DN. [ery.lee]
32
+ * ">=" filter operator doesn't work. [id:dicdak]
33
+ * [#17] ActiveLdap::Base.create doesn't raise exception. [Alexey.Chebotar]
34
+
1
35
  1.0.1:
2
36
  * Fixed GetText integration.
3
37
  * Fixed ActiveLdap::Base.find with ActiveLdap::DN. (Reported by Jeremy Pruitt)
data/README CHANGED
@@ -109,3 +109,16 @@ list, please point out.
109
109
  * Tilo: A bug report.
110
110
  * Matt Mencel: A bug report.
111
111
  * CultureSpy: A bug report.
112
+ * gwarf12: A bug report.
113
+ * Baptiste Grenier: API improvement ideas.
114
+ * Richard 3 Nicholas: API improvement ideas.
115
+ * Kazuhiro NISHIYAMA: A bug report.
116
+ * Grzegorz Marszałek: A bug report.
117
+ * しまさわらさん: A suggesetion.
118
+ * Ted Lepich: A suggestion.
119
+ * danger1986: A suggestion.
120
+ * michael.j.konopka: Bug reports.
121
+ * ingersoll: A suggestion.
122
+ * Alexey.Chebotar: Bug reports.
123
+ * ery.lee: A bug report.
124
+ * id:dicdak: A bug report.
data/Rakefile CHANGED
@@ -21,7 +21,8 @@ excluded_components = %w(.svn .test-result .config doc log tmp
21
21
  excluded_suffixes = %w(.help .sqlite3)
22
22
  white_list_paths =
23
23
  [
24
- "rails/plugin/active_ldap/generators/scaffold_al/templates/ldap.yml"
24
+ "rails/plugin/active_ldap/generators/scaffold_al/templates/ldap.yml",
25
+ "rails_generators/scaffold_active_ldap/templates/ldap.yml",
25
26
  ]
26
27
  Find.find(base_dir + File::SEPARATOR) do |target|
27
28
  target = truncate_base_dir[target]
data/TODO CHANGED
@@ -1,3 +1,9 @@
1
+ - [1.1.x] ActiveLdap::Base#dn returns ActiveLdap::DN. [#23932] [Marc Dequènes]
2
+ - How to support dSCorePropagationData? ignore it?
3
+ all systemOnly == "TRUE" attribute can be ignored?
4
+ - Add parsing position to DistinguishedNameInvalid error like
5
+ <NAME=VALUE,INVALID_HERE>@<REST=INPUT>.
6
+ - Support TLS optioins (e.g. CA certification file and so on)
1
7
  - Provide FormHelper for LDAP entry's attribute to handle multiple values
2
8
  (["foo", "bar", ...]) and option value ({"binary" => "..."},
3
9
  {"lang-en-us" => "..."})
@@ -21,31 +21,57 @@ ActiveLdap::Base.establish_connection
21
21
  config = ActiveLdap::Base.configuration
22
22
 
23
23
  LDAP_HOST = config[:host]
24
- LDAP_PORT = config[:port]
24
+ LDAP_METHOD = config[:method]
25
+ if LDAP_METHOD == :ssl
26
+ LDAP_PORT = config[:port] || URI::LDAPS::DEFAULT_PORT
27
+ else
28
+ LDAP_PORT = config[:port] || URI::LDAP::DEFAULT_PORT
29
+ end
25
30
  LDAP_BASE = config[:base]
26
31
  LDAP_PREFIX = options.prefix
27
32
  LDAP_USER = config[:bind_dn]
28
33
  LDAP_PASSWORD = config[:password]
29
- LDAP_METHOD = config[:method]
30
34
 
31
35
  class ALUser < ActiveLdap::Base
32
36
  ldap_mapping :dn_attribute => 'uid', :prefix => LDAP_PREFIX,
33
37
  :classes => ['posixAccount', 'person']
34
38
  end
35
39
 
36
- # === search_al
37
- #
38
- def search_al
40
+ class ALUserLdap < ALUser
41
+ end
42
+ ALUserLdap.establish_connection(config.merge(:adapter => "ldap"))
43
+
44
+ class ALUserNetLdap < ALUser
45
+ end
46
+ ALUserNetLdap.establish_connection(config.merge(:adapter => "net-ldap"))
47
+
48
+ def search_al_ldap
49
+ count = 0
50
+ ALUserLdap.find(:all).each do |e|
51
+ count += 1
52
+ end
53
+ count
54
+ end
55
+
56
+ def search_al_net_ldap
39
57
  count = 0
40
- ALUser.find(:all).each do |e|
58
+ ALUserNetLdap.find(:all).each do |e|
41
59
  count += 1
42
60
  end
43
61
  count
44
- end # -- search_al
62
+ end
63
+
64
+ def search_al_ldap_without_object_creation
65
+ count = 0
66
+ ALUserLdap.search.each do |e|
67
+ count += 1
68
+ end
69
+ count
70
+ end
45
71
 
46
- def search_al_without_object_creation
72
+ def search_al_net_ldap_without_object_creation
47
73
  count = 0
48
- ALUser.search.each do |e|
74
+ ALUserNetLdap.search.each do |e|
49
75
  count += 1
50
76
  end
51
77
  count
@@ -161,6 +187,7 @@ def main(do_populate)
161
187
  dumped_data = ActiveLdap::Base.dump(:scope => :sub)
162
188
  ActiveLdap::Base.delete_all(nil, :scope => :sub)
163
189
  populate
190
+ puts
164
191
  end
165
192
 
166
193
  # Standard connection
@@ -168,18 +195,33 @@ def main(do_populate)
168
195
  ldap_conn = ldap_connection
169
196
  net_ldap_conn = net_ldap_connection
170
197
 
171
- al_count = 0
172
- al_count_without_object_creation = 0
198
+ al_ldap_count = 0
199
+ al_net_ldap_count = 0
200
+ al_ldap_count_without_object_creation = 0
201
+ al_net_ldap_count_without_object_creation = 0
173
202
  ldap_count = 0
174
203
  net_ldap_count = 0
175
204
  Benchmark.bmbm(20) do |x|
176
205
  [1].each do |n|
177
206
  GC.start
178
- x.report("%3dx: AL" % n) {n.times {al_count = search_al}}
207
+ x.report("%3dx: AL(LDAP)" % n) do
208
+ n.times {al_ldap_count = search_al_ldap}
209
+ end
210
+ GC.start
211
+ x.report("%3dx: AL(Net::LDAP)" % n) do
212
+ n.times {al_net_ldap_count = search_al_net_ldap}
213
+ end
179
214
  GC.start
180
- x.report("%3dx: AL(No Obj)" % n) do
215
+ x.report("%3dx: AL(LDAP: No Obj)" % n) do
181
216
  n.times do
182
- al_count_without_object_creation = search_al_without_object_creation
217
+ al_ldap_count_without_object_creation =
218
+ search_al_ldap_without_object_creation
219
+ end
220
+ end
221
+ x.report("%3dx: AL(Net::LDAP: No Obj)" % n) do
222
+ n.times do
223
+ al_net_ldap_count_without_object_creation =
224
+ search_al_net_ldap_without_object_creation
183
225
  end
184
226
  end
185
227
  GC.start
@@ -196,13 +238,22 @@ def main(do_populate)
196
238
  end
197
239
  end
198
240
  end
199
- puts(_("Entries processed by Ruby/ActiveLdap: %d") % al_count)
200
- puts(_("Entries processed by Ruby/ActiveLdap (without object creation): " \
201
- "%d") % al_count_without_object_creation)
241
+
242
+ puts
243
+ puts(_("Entries processed by Ruby/ActiveLdap + LDAP: %d") % al_ldap_count)
244
+ puts(_("Entries processed by Ruby/ActiveLdap + Net::LDAP: %d") % \
245
+ al_net_ldap_count)
246
+ puts(_("Entries processed by Ruby/ActiveLdap + LDAP: " \
247
+ "(without object creation): %d") % \
248
+ al_ldap_count_without_object_creation)
249
+ puts(_("Entries processed by Ruby/ActiveLdap + Net::LDAP: " \
250
+ "(without object creation): %d") % \
251
+ al_net_ldap_count_without_object_creation)
202
252
  puts(_("Entries processed by Ruby/LDAP: %d") % ldap_count)
203
253
  puts(_("Entries processed by Net::LDAP: %d") % net_ldap_count)
204
254
  ensure
205
255
  if do_populate
256
+ puts
206
257
  puts(_("Cleaning..."))
207
258
  ActiveLdap::Base.delete_all(nil, :scope => :sub)
208
259
  ActiveLdap::Base.load(dumped_data)
@@ -24,14 +24,12 @@ module ApplicationHelper
24
24
  "#{flash_box_div}\n#{javascript_tag(javascript_content)}"
25
25
  end
26
26
 
27
- def switcher(prefix, title, options={}, &proc)
27
+ def switcher(prefix, title, options={})
28
28
  concat(render(:partial => "_switcher/before",
29
- :locals => {:prefix => prefix, :title => title}),
30
- proc.binding)
29
+ :locals => {:prefix => prefix, :title => title}))
31
30
  yield
32
31
  concat(render(:partial => "_switcher/after",
33
- :locals => {:prefix => prefix, :options => options}),
34
- proc.binding)
32
+ :locals => {:prefix => prefix, :options => options}))
35
33
  end
36
34
 
37
35
  def switcher_element(prefix, options={})
@@ -5,5 +5,7 @@
5
5
  <%= link_to("Ruby/ActiveLdap",
6
6
  "http://rubyforge.org/projects/ruby-activeldap") %>
7
7
  <%= ActiveLdap::VERSION %>
8
+ and
9
+ Ruby on Rails <%= Rails::VERSION::STRING %>
8
10
  </address>
9
11
  </div>
@@ -24,9 +24,8 @@ module Rails
24
24
  File.exist?("#{RAILS_ROOT}/vendor/rails")
25
25
  end
26
26
 
27
- # FIXME : Ruby 1.9
28
27
  def preinitialize
29
- load(preinitializer_path) if File.exists?(preinitializer_path)
28
+ load(preinitializer_path) if File.exist?(preinitializer_path)
30
29
  end
31
30
 
32
31
  def preinitializer_path
@@ -44,6 +43,7 @@ module Rails
44
43
  class VendorBoot < Boot
45
44
  def load_initializer
46
45
  require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
46
+ Rails::Initializer.run(:install_gem_spec_stubs)
47
47
  end
48
48
  end
49
49
 
@@ -67,7 +67,7 @@ module Rails
67
67
 
68
68
  class << self
69
69
  def rubygems_version
70
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
70
+ Gem::RubyGemsVersion rescue nil
71
71
  end
72
72
 
73
73
  def gem_version
@@ -82,14 +82,14 @@ module Rails
82
82
 
83
83
  def load_rubygems
84
84
  require 'rubygems'
85
-
86
- unless rubygems_version >= '0.9.4'
87
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
85
+ min_version = '1.3.1'
86
+ unless rubygems_version >= min_version
87
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
88
88
  exit 1
89
89
  end
90
90
 
91
91
  rescue LoadError
92
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
92
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
93
93
  exit 1
94
94
  end
95
95
 
@@ -5,7 +5,7 @@
5
5
  # ENV['RAILS_ENV'] ||= 'production'
6
6
 
7
7
  # Specifies gem version of Rails to use when vendor/rails is not present
8
- RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
8
+ RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
9
9
 
10
10
  # Bootstrap the Rails environment, frameworks, and default configuration
11
11
  require File.join(File.dirname(__FILE__), 'boot')
@@ -16,10 +16,19 @@ Rails::Initializer.run do |config|
16
16
  # -- all .rb files in that directory are automatically loaded.
17
17
  # See Rails::Configuration for more options.
18
18
 
19
- # Skip frameworks you're not going to use (only works if using vendor/rails).
20
- # To use Rails without a database, you must remove the Active Record framework
19
+ # Skip frameworks you're not going to use. To use Rails without a database
20
+ # you must remove the Active Record framework.
21
21
  # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
22
22
 
23
+ # Specify gems that this application depends on.
24
+ # They can then be installed with "rake gems:install" on new installations.
25
+ # You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
26
+ # config.gem "bj"
27
+ # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
28
+ # config.gem "sqlite3-ruby", :lib => "sqlite3"
29
+ # config.gem "aws-s3", :lib => "aws/s3"
30
+ config.gem "locale_rails"
31
+
23
32
  # Only load the plugins named here, in the order given. By default, all plugins
24
33
  # in vendor/plugins are loaded in alphabetical order.
25
34
  # :all can be used as a placeholder for all plugins not explicitly named
@@ -28,11 +37,22 @@ Rails::Initializer.run do |config|
28
37
  # Add additional load paths for your own custom dirs
29
38
  # config.load_paths += %W( #{RAILS_ROOT}/extras )
30
39
  config.load_paths += %W(#{RAILS_ROOT}/../../lib)
31
- config.plugin_paths += %W(#{RAILS_ROOT}/../../rails/plugin)
40
+ config.plugin_paths += %W(#{RAILS_ROOT}/../..)
32
41
 
33
42
  # Force all environments to use the same logger level
34
43
  # (by default production uses :info, the others :debug)
35
44
  # config.log_level = :debug
45
+ config.log_path = Logger::LogDevice.new(config.log_path)
46
+
47
+ # Make Time.zone default to the specified zone, and make Active Record store time values
48
+ # in the database in UTC, and return them converted to the specified local zone.
49
+ # Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
50
+ config.time_zone = 'UTC'
51
+
52
+ # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
53
+ # All files from config/locales/*.rb,yml are added automatically.
54
+ # config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
55
+ # config.i18n.default_locale = :de
36
56
 
37
57
  # Your secret key for verifying cookie session data integrity.
38
58
  # If you change this key, all old sessions will become invalid!
@@ -45,7 +65,7 @@ Rails::Initializer.run do |config|
45
65
 
46
66
  # Use the database for sessions instead of the cookie-based default,
47
67
  # which shouldn't be used to store highly confidential information
48
- # (create the session table with 'rake db:sessions:create')
68
+ # (create the session table with "rake db:sessions:create")
49
69
  # config.action_controller.session_store = :active_record_store
50
70
 
51
71
  # Use SQL instead of Active Record's schema dumper when creating the test database.
@@ -54,11 +74,6 @@ Rails::Initializer.run do |config|
54
74
  # config.active_record.schema_format = :sql
55
75
 
56
76
  # Activate observers that should always be running
57
- # config.active_record.observers = :cacher, :garbage_collector
58
-
59
- # Make Active Record use UTC-base instead of local time
60
- # config.active_record.default_timezone = :utc
61
-
62
- config.logger = Logger.new(config.log_path, 7)
63
- config.logger.level = Logger.const_get(config.log_level.to_s.upcase)
77
+ # Please note that observers generated using script/generate observer need to have an _observer suffix
78
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
64
79
  end
@@ -12,7 +12,6 @@ config.whiny_nils = true
12
12
  config.action_controller.consider_all_requests_local = true
13
13
  config.action_view.debug_rjs = true
14
14
  config.action_controller.perform_caching = false
15
- config.action_view.cache_template_extensions = false
16
15
 
17
16
  # Don't care if the mailer can't send
18
17
  config.action_mailer.raise_delivery_errors = false
@@ -4,13 +4,18 @@
4
4
  # Code is not reloaded between requests
5
5
  config.cache_classes = true
6
6
 
7
+ # Enable threaded mode
8
+ # config.threadsafe!
9
+
7
10
  # Use a different logger for distributed setups
8
11
  # config.logger = SyslogLogger.new
9
12
 
10
13
  # Full error reports are disabled and caching is turned on
11
14
  config.action_controller.consider_all_requests_local = false
12
15
  config.action_controller.perform_caching = true
13
- config.action_view.cache_template_loading = true
16
+
17
+ # Use a different cache store in production
18
+ # config.cache_store = :mem_cache_store
14
19
 
15
20
  # Enable serving of images, stylesheets, and javascripts from an asset server
16
21
  # config.action_controller.asset_host = "http://assets.example.com"
@@ -16,7 +16,7 @@ config.action_controller.perform_caching = false
16
16
  # Disable request forgery protection in test environment
17
17
  config.action_controller.allow_forgery_protection = false
18
18
 
19
- # Tell ActionMailer not to deliver emails to the real world.
19
+ # Tell Action Mailer not to deliver emails to the real world.
20
20
  # The :test delivery method accumulates sent emails in the
21
21
  # ActionMailer::Base.deliveries array.
22
22
  config.action_mailer.delivery_method = :test
@@ -1 +1,15 @@
1
- require 'gettext/rails'
1
+ # GetText doesn't support Rails 2.2.2 yet. :<
2
+ # require 'gettext/rails'
3
+
4
+ class ::ActionController::Base
5
+ include ActiveLdap::GetText
6
+
7
+ class << self
8
+ def init_gettext(*args)
9
+ end
10
+ end
11
+ end
12
+
13
+ class ::ActionView::Base
14
+ include ActiveLdap::GetText
15
+ end
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: AL Admin 1.0.1\n"
8
+ "Project-Id-Version: AL Admin 1.0.2\n"
9
9
  "POT-Creation-Date: 2008-02-09 14:25+0900\n"
10
10
  "PO-Revision-Date: 2007-08-19 09:44+0900\n"
11
11
  "Last-Translator: Kouhei Sutou <kou@cozmixng.org>\n"
@@ -5,7 +5,7 @@
5
5
  #
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: AL Admin 1.0.1\n"
8
+ "Project-Id-Version: AL Admin 1.0.2\n"
9
9
  "POT-Creation-Date: 2008-02-09 14:25+0900\n"
10
10
  "PO-Revision-Date: 2007-11-04 16:02+0900\n"
11
11
  "Last-Translator: Kouhei Sutou <kou@cozmixng.org>\n"
@@ -6,7 +6,7 @@
6
6
  # Ace Suares <ace@suares.an>, 2007,2008.
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: AL Admin 1.0.1\n"
9
+ "Project-Id-Version: AL Admin 1.0.2\n"
10
10
  "POT-Creation-Date: 2008-02-09 14:25+0900\n"
11
11
  "PO-Revision-Date: 2007-08-24 22:03+0900\n"
12
12
  "Last-Translator: Ace Suares <ace@suares.an>\n"