rails_log_autotruncator 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,16 +1,24 @@
1
1
  = rails_log_autotruncator
2
2
 
3
- rails_log_autotruncator is a simple patch for ActiveSupport::BufferedLogger that limits a log file size. Use it if you just don't want your rails project development log file becomes large.
4
-
5
- == Contributing to rails_log_autotruncator
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
- * Fork the project
10
- * Start a feature/bugfix branch
11
- * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
3
+ rails_log_autotruncator is a simple patch for ActiveSupport::BufferedLogger that limits a log file size. Use it if you just don't want your rails project development or test log file becomes large.
4
+
5
+ == Compatibility
6
+
7
+ * Ruby 1.9.2 Rails 3.0.6
8
+ * Ruby 1.8.7 Rails 2.3.5
9
+
10
+
11
+ == Installation
12
+ === Bundler
13
+ Add the rails_log_autotruncator to your Gemfile:
14
+
15
+ gem 'rails_log_autotruncator'
16
+
17
+ === Rails 2 Without Bundler
18
+ Just write the following to your environment.rb to Rails::Initializer.run block:
19
+
20
+ config.gem "rails_log_autotruncator", :lib => "rails_log_autotruncator"
21
+
14
22
 
15
23
  == Copyright
16
24
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -11,7 +11,7 @@ module ActiveSupport
11
11
  @log.write(all_content.string)
12
12
  end
13
13
 
14
- if @log.size > 1_000_000
14
+ if @log.stat.size > 1_000_000
15
15
  log = @log.path
16
16
  @log.close
17
17
  File.atomic_write(log) do |file|
@@ -0,0 +1,60 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rails_log_autotruncator}
8
+ s.version = "0.2.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Dmitry Plashchynski"]
12
+ s.date = %q{2011-04-10}
13
+ s.description = %q{rails_log_autotruncator is a simple patch for ActiveSupport::BufferedLogger that limits a log file size. Use it if you just don't want your rails project development log file becomes large.}
14
+ s.email = %q{plashchynski@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "LICENSE.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "init.rb",
27
+ "lib/rails_log_autotruncator.rb",
28
+ "rails_log_autotruncator.gemspec",
29
+ "spec/rails_log_autotruncator_spec.rb",
30
+ "spec/spec_helper.rb"
31
+ ]
32
+ s.homepage = %q{http://github.com/plashchynski/rails_log_autotruncator}
33
+ s.licenses = ["MIT"]
34
+ s.require_paths = ["lib"]
35
+ s.rubygems_version = %q{1.7.2}
36
+ s.summary = %q{The tool for automatically rotating and truncating a rails development log file}
37
+ s.test_files = [
38
+ "spec/rails_log_autotruncator_spec.rb",
39
+ "spec/spec_helper.rb"
40
+ ]
41
+
42
+ if s.respond_to? :specification_version then
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
47
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
48
+ s.add_development_dependency(%q<rcov>, [">= 0"])
49
+ else
50
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
51
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
52
+ s.add_dependency(%q<rcov>, [">= 0"])
53
+ end
54
+ else
55
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
56
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
57
+ s.add_dependency(%q<rcov>, [">= 0"])
58
+ end
59
+ end
60
+
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rails_log_autotruncator
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dmitry Plashchynski
@@ -63,6 +63,7 @@ files:
63
63
  - VERSION
64
64
  - init.rb
65
65
  - lib/rails_log_autotruncator.rb
66
+ - rails_log_autotruncator.gemspec
66
67
  - spec/rails_log_autotruncator_spec.rb
67
68
  - spec/spec_helper.rb
68
69
  homepage: http://github.com/plashchynski/rails_log_autotruncator