rack-rails-logger 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md ADDED
@@ -0,0 +1,9 @@
1
+ # rack-rails-logger CHANGES
2
+
3
+ ## rack-rails-logger 1.0.1 -- 2011-09-01
4
+
5
+ * rails app might not be at the top level! so we pick singleton
6
+
7
+ ## rack-rails-logger 1.0.0 -- 2011-07-21
8
+
9
+ * Birthday!
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # rack-logger-rails
1
+ # rack-rails-logger
2
2
  by Lin Jen-Shin (godfat) <http://godfat.org>
3
3
 
4
4
  ## LINKS:
5
5
 
6
- * [github](http://github.com/godfat/rack-logger-rails)
7
- * [rubygems](http://rubygems.org/gems/rack-logger-rails)
6
+ * [github](http://github.com/godfat/rack-rails-logger)
7
+ * [rubygems](http://rubygems.org/gems/rack-rails-logger)
8
8
 
9
9
  ## DESCRIPTION:
10
10
 
@@ -20,7 +20,7 @@ After installing this middleware, any Rails logs would be redirected to
20
20
 
21
21
  ## INSTALLATION:
22
22
 
23
- gem install rack-logger-rails
23
+ gem install rack-rails-logger
24
24
 
25
25
  ## SYNOPSIS:
26
26
 
@@ -6,7 +6,7 @@ class Rack::RailsLogger
6
6
  end
7
7
 
8
8
  def call env
9
- racklogger(env, @app.config,
9
+ racklogger(env, Rails.application.config,
10
10
  Rails,
11
11
  ActionController::Base,
12
12
  ActiveRecord::Base)
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Rack; end
3
3
  class Rack::RailsLogger
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
5
5
  end
@@ -1,35 +1,29 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  Gem::Specification.new do |s|
4
- s.name = %q{rack-rails-logger}
5
- s.version = "1.0.0"
4
+ s.name = "rack-rails-logger"
5
+ s.version = "1.0.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = [%q{Lin Jen-Shin (godfat)}]
9
- s.date = %q{2011-07-21}
10
- s.description = %q{Tell Rails to respect `env['rack.logger']`
11
-
12
- After installing this middleware, any Rails logs would be redirected to
13
- `env['rack.logger']`.}
14
- s.email = [%q{godfat (XD) godfat.org}]
8
+ s.authors = ["Lin Jen-Shin (godfat)"]
9
+ s.date = "2011-09-01"
10
+ s.description = "Tell Rails to respect `env['rack.logger']`\n\nAfter installing this middleware, any Rails logs would be redirected to\n`env['rack.logger']`."
11
+ s.email = ["godfat (XD) godfat.org"]
15
12
  s.files = [
16
- %q{.gitignore},
17
- %q{.gitmodules},
18
- %q{README},
19
- %q{README.md},
20
- %q{Rakefile},
21
- %q{lib/rack-rails-logger.rb},
22
- %q{lib/rack-rails-logger/version.rb},
23
- %q{rack-rails-logger.gemspec},
24
- %q{task/.gitignore},
25
- %q{task/gemgem.rb}]
26
- s.homepage = %q{https://github.com/godfat/rack-rails-logger}
27
- s.rdoc_options = [
28
- %q{--main},
29
- %q{README}]
30
- s.require_paths = [%q{lib}]
31
- s.rubygems_version = %q{1.8.5}
32
- s.summary = %q{Tell Rails to respect `env['rack.logger']`}
13
+ ".gitignore",
14
+ ".gitmodules",
15
+ "CHANGES.md",
16
+ "README.md",
17
+ "Rakefile",
18
+ "lib/rack-rails-logger.rb",
19
+ "lib/rack-rails-logger/version.rb",
20
+ "rack-rails-logger.gemspec",
21
+ "task/.gitignore",
22
+ "task/gemgem.rb"]
23
+ s.homepage = "https://github.com/godfat/rack-rails-logger"
24
+ s.require_paths = ["lib"]
25
+ s.rubygems_version = "1.8.10"
26
+ s.summary = "Tell Rails to respect `env['rack.logger']`"
33
27
 
34
28
  if s.respond_to? :specification_version then
35
29
  s.specification_version = 3
data/task/gemgem.rb CHANGED
@@ -12,26 +12,35 @@ module Gemgem
12
12
  s.authors = ['Lin Jen-Shin (godfat)']
13
13
  s.email = ['godfat (XD) godfat.org']
14
14
 
15
- description = File.read("#{Gemgem.dir}/README").
15
+ description = readme.
16
16
  match(/DESCRIPTION:\n\n(.+?)(?=\n\n[^\n]+:\n)/m)[1].
17
17
  lines.to_a
18
18
 
19
19
  s.description = description.join
20
20
  s.summary = description.first
21
21
 
22
- s.extra_rdoc_files = %w[CHANGES CONTRIBUTORS LICENSE TODO].select{ |f|
23
- File.exist?(f) }
24
- s.rdoc_options = %w[--main README]
25
22
  s.rubygems_version = Gem::VERSION
26
23
  s.date = Time.now.strftime('%Y-%m-%d')
27
24
  s.files = gem_files
28
25
  s.test_files = gem_files.grep(%r{^test/(.+?/)*test_.+?\.rb$})
26
+ s.executables = Dir['bin/*'].map{ |f| File.basename(f) }
29
27
  s.require_paths = %w[lib]
30
28
  })
31
29
  spec.homepage ||= "https://github.com/godfat/#{spec.name}"
32
30
  spec
33
31
  end
34
32
 
33
+ def readme
34
+ path = %w[README.md README].find{ |name|
35
+ File.exist?("#{Gemgem.dir}/#{name}")
36
+ }
37
+ if path
38
+ File.read(path)
39
+ else
40
+ "DESCRIPTION:\n\n \n\nEND:\n"
41
+ end
42
+ end
43
+
35
44
  def gem_tag
36
45
  "#{spec.name}-#{spec.version}"
37
46
  end
@@ -151,16 +160,12 @@ task :test do
151
160
  Bacon.extend(Bacon::TestUnitOutput)
152
161
  Bacon.summary_on_exit
153
162
  $LOAD_PATH.unshift('lib')
154
- Dir['test/test_*.rb'].each{ |file| load file }
163
+ Dir['./test/**/test_*.rb'].each{ |file| require file[0..-4] }
155
164
  end
156
165
 
157
166
  desc 'Run tests with shell'
158
167
  task 'test:shell', :RUBY_OPTS do |t, args|
159
- files = unless defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
160
- 'test/test_*.rb'
161
- else
162
- Dir['test/test_*.rb'].join(' ')
163
- end
168
+ files = Dir['test/**/test_*.rb'].join(' ')
164
169
 
165
170
  cmd = [Gem.ruby, args[:RUBY_OPTS],
166
171
  '-I', 'lib', '-S', 'bacon', '--quiet', files]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-rails-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-21 00:00:00.000000000Z
12
+ date: 2011-09-01 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: ! 'Tell Rails to respect `env[''rack.logger'']`
15
15
 
@@ -25,7 +25,7 @@ extra_rdoc_files: []
25
25
  files:
26
26
  - .gitignore
27
27
  - .gitmodules
28
- - README
28
+ - CHANGES.md
29
29
  - README.md
30
30
  - Rakefile
31
31
  - lib/rack-rails-logger.rb
@@ -36,9 +36,7 @@ files:
36
36
  homepage: https://github.com/godfat/rack-rails-logger
37
37
  licenses: []
38
38
  post_install_message:
39
- rdoc_options:
40
- - --main
41
- - README
39
+ rdoc_options: []
42
40
  require_paths:
43
41
  - lib
44
42
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -55,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
53
  version: '0'
56
54
  requirements: []
57
55
  rubyforge_project:
58
- rubygems_version: 1.8.5
56
+ rubygems_version: 1.8.10
59
57
  signing_key:
60
58
  specification_version: 3
61
59
  summary: Tell Rails to respect `env['rack.logger']`
data/README DELETED
@@ -1,45 +0,0 @@
1
- # rack-logger-rails
2
- by Lin Jen-Shin (godfat) <http://godfat.org>
3
-
4
- ## LINKS:
5
-
6
- * [github](http://github.com/godfat/rack-logger-rails)
7
- * [rubygems](http://rubygems.org/gems/rack-logger-rails)
8
-
9
- ## DESCRIPTION:
10
-
11
- Tell Rails to respect `env['rack.logger']`
12
-
13
- After installing this middleware, any Rails logs would be redirected to
14
- `env['rack.logger']`.
15
-
16
- ## REQUIREMENTS:
17
-
18
- * Any Ruby
19
- * Rails 3+
20
-
21
- ## INSTALLATION:
22
-
23
- gem install rack-logger-rails
24
-
25
- ## SYNOPSIS:
26
-
27
- use Rack::RailsLogger
28
-
29
- ## LICENSE:
30
-
31
- Apache License 2.0
32
-
33
- Copyright (c) 2011, Lin Jen-Shin (godfat)
34
-
35
- Licensed under the Apache License, Version 2.0 (the "License");
36
- you may not use this file except in compliance with the License.
37
- You may obtain a copy of the License at
38
-
39
- <http://www.apache.org/licenses/LICENSE-2.0>
40
-
41
- Unless required by applicable law or agreed to in writing, software
42
- distributed under the License is distributed on an "AS IS" BASIS,
43
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
- See the License for the specific language governing permissions and
45
- limitations under the License.