apphunk 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/apphunk.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{apphunk}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andreas Wolff"]
12
- s.date = %q{2009-11-27}
12
+ s.date = %q{2009-12-14}
13
13
  s.description = %q{Apphunk is a library that allows your applications (currently only Ruby AND Rails) to send messages to Apphunk.com}
14
14
  s.email = %q{andreas@apphunk.com}
15
15
  s.extra_rdoc_files = [
data/lib/apphunk.rb CHANGED
@@ -67,12 +67,13 @@ module Apphunk
67
67
  #
68
68
  def config(&block)
69
69
  yield Apphunk::Config
70
+ self.default_options ||= {}
70
71
  self.default_options[:tags] = Apphunk::Config.tags
71
72
  self.default_options[:token] = Apphunk::Config.token
72
73
  self.default_options[:trails] = Apphunk::Config.trails
73
74
  self.default_options[:environments] = Apphunk::Config.environments
74
75
 
75
- if Apphunk::Config.environment.blank?
76
+ if Apphunk::Config.environment.nil? || Apphunk::Config.environment == ""
76
77
  Apphunk::Config.environment = self.default_options[:environment]
77
78
  else
78
79
  self.default_options[:environment] = Apphunk::Config.environment
@@ -5,9 +5,9 @@ module Apphunk
5
5
  def error(message)
6
6
  message = "[Apphunk] Error: #{message}"
7
7
  case
8
- when Rails && Rails.logger
8
+ when defined?(Rails) && Rails.logger
9
9
  Rails.logger.error(message)
10
- when RAILS_DEFAULT_LOGGER
10
+ when defined?(RAILS_DEFAULT_LOGGER)
11
11
  RAILS_DEFAULT_LOGGER.error(message)
12
12
  else
13
13
  puts(message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apphunk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Wolff
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-27 00:00:00 +01:00
12
+ date: 2009-12-14 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency