trails 1.1.3 → 1.1.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,7 @@
1
+ === 1.1.4 / 2010-05-09
2
+
3
+ Backwards-compatible support for environment-specific twilio configuration
4
+
1
5
  === 1.1.1 / 2010-03-16
2
6
 
3
7
  Typo fix.
data/lib/trails.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Trails
2
- VERSION = '1.1.3'
2
+ VERSION = '1.1.4'
3
3
  end
4
4
  begin
5
5
  TwilioRest
@@ -178,7 +178,15 @@ module Trails
178
178
  return @logger
179
179
  end
180
180
  def self.config
181
- @@cfg ||= YAML::load_file( config_file )
181
+ @@all_cfg ||= YAML::load_file( config_file ).freeze
182
+ # allow per-environment configuration
183
+ @@cfg ||= if ( @@all_cfg.has_key?( RAILS_ENV ) )
184
+ @@all_cfg[ RAILS_ENV ]
185
+ elsif( @@all_cfg.has_key?( 'default' ) )
186
+ @@all_cfg['default']
187
+ else
188
+ @@all_cfg
189
+ end
182
190
  end
183
191
 
184
192
  def self.config_file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hemant Bhanoo
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-11 00:00:00 -07:00
12
+ date: 2010-05-09 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.0.4
23
+ version: 2.0.3
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: gemcutter