tphases 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,8 +22,8 @@ module TPhases
22
22
  @config ||= begin
23
23
 
24
24
  default_mode = begin
25
- if defined? Rails
26
- case Rails.env
25
+ if defined? ::Rails
26
+ case ::Rails.env
27
27
  when 'production', 'staging', 'demo'
28
28
  :pass_through
29
29
  when 'development'
@@ -6,7 +6,7 @@ module TPhases
6
6
  # initiates TPhases. Any overrides to config mode need to be made prior to running this.
7
7
  def initiate!
8
8
  add_mode_methods!
9
- add_rails_methods! if defined? Rails
9
+ add_rails_methods! if defined? ::Rails
10
10
  end
11
11
 
12
12
  private
@@ -9,7 +9,7 @@ module TPhases
9
9
  module CollectMode
10
10
  extend ActiveSupport::Concern
11
11
  include Helpers::TransactionalViolationsHelper
12
- include Helpers::RailsHelper if defined? Rails
12
+ include Helpers::RailsHelper if defined? ::Rails
13
13
 
14
14
  included do
15
15
  add_rspec_after! if defined?(RSpec)
@@ -74,8 +74,8 @@ module TPhases
74
74
  # taken from https://github.com/rails/rails/blob/77977f34a5a4ea899f59e31ad869b582285fa5c1/actionpack/lib/action_dispatch/middleware/show_exceptions.rb#L148 :
75
75
  # shows a cleaned stack for Rails apps by default
76
76
  def cleaned_call_stack(call_stack)
77
- defined?(Rails) && Rails.respond_to?(:backtrace_cleaner) ?
78
- Rails.backtrace_cleaner.clean(call_stack, :silent) :
77
+ defined?(::Rails) && ::Rails.respond_to?(:backtrace_cleaner) ?
78
+ ::Rails.backtrace_cleaner.clean(call_stack, :silent) :
79
79
  call_stack
80
80
  end
81
81
 
@@ -1,3 +1,3 @@
1
1
  module Tphases
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tphases
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
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: 2012-11-15 00:00:00.000000000 Z
12
+ date: 2012-11-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -178,3 +178,4 @@ test_files:
178
178
  - spec/lib/tphases/modes/pass_through_mode_spec.rb
179
179
  - spec/spec_helper.rb
180
180
  - spec/support/setup_modes_specs_context.rb
181
+ has_rdoc: