we-call 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69f66aa69feae611ed12ee72c9b3f917a3830815
4
- data.tar.gz: 94c7398f16869940e972f24ae8e8b825e79590ea
3
+ metadata.gz: 59d68f14fd2cda11f1d6cd52e2b32fdfdb421367
4
+ data.tar.gz: 51a4bd92977608377a2fe8629567a695479cad0e
5
5
  SHA512:
6
- metadata.gz: 0e2e726d99a1884bca85cb62c4dde824768ef4ee2927368700900a7d9c6a1e3a416673552ebc50d1ad1cd4ab58957a80a9b77cfd5946a0756126e45d35aef589
7
- data.tar.gz: 91ef6b15cff86007e1e2dfd8e7f7f39c1a891baacecc134b344489f54c52e7be1324984c4ab879bebedaa02858c74d85c4ca6d54dd3913e63d96786c4043cc21
6
+ metadata.gz: 947ea782b5b62f8f1b4a2745371fd05534785205cabf1544741c2fb123a17e2754b580a45cf7e4e83d664f9e8d503291df4d3acdeef31c1cf9b80b3f543940e5
7
+ data.tar.gz: 4091063b24a038187bcf95f635e414b096e7a3375f474119c453ff1ce0446e9f131cad9a40acaa799ab8fd6368773348471730f06624c1a84a73ad6332615a4a
data/CHANGELOG CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
+ ## v0.5.4
9
+
10
+ ### Fixed
11
+ - Connection checks `Rails.env` instead of `ENV['RAILS_ENV']` as most people dont have RAILS_ENV in their `.env` file
12
+
8
13
  ## v0.5.3
9
14
 
10
15
  ### Fixed
data/README.md CHANGED
@@ -183,11 +183,11 @@ References: [Blog Post](https://rossta.net/blog/how-to-specify-local-ruby-gems-i
183
183
  Bug reports and pull requests are welcome on GitHub at [wework/we-call](https://github.com/wework/we-call). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
184
184
 
185
185
 
186
- [coveralls-image]:https://coveralls.io/repos/github/wework/we-call/badge.svg?branch=master
187
- [coveralls-url]:https://coveralls.io/github/wework/we-call?branch=master
186
+ [coveralls-image]:https://coveralls.io/repos/github/wework/we-call-gem/badge.svg?branch=master
187
+ [coveralls-url]:https://coveralls.io/github/wework/we-call-gem?branch=master
188
188
 
189
- [travis-url]:https://travis-ci.org/wework/we-call
190
- [travis-image]: https://travis-ci.org/wework/we-call.svg?branch=master
189
+ [travis-url]:https://travis-ci.org/wework/we-call-gem
190
+ [travis-image]: https://travis-ci.org/wework/we-call-gem.svg?branch=master
191
191
 
192
192
  [license-url]: LICENSE
193
193
  [license-image]: http://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
@@ -100,14 +100,17 @@ module We
100
100
  # @return [String] Environment (usually 'development', 'staging', 'production', etc.)
101
101
  def guess_env
102
102
  return config.app_env if config.app_env
103
- ENV['RAILS_ENV'] || ENV['RACK_ENV']
103
+ ENV['RACK_ENV'] || rails_app_env
104
104
  end
105
105
 
106
106
  # @return [String] Check for config.app_name, or detect name from Rails application
107
107
  def guess_app
108
108
  return config.app_name if config.app_name
109
- return ENV['APP_NAME'] if ENV['APP_NAME']
110
- rails_app_name
109
+ ENV['APP_NAME'] || rails_app_name
110
+ end
111
+
112
+ def rails_app_env
113
+ ::Rails.env if (defined? ::Rails)
111
114
  end
112
115
 
113
116
  def rails_app_name
@@ -1,5 +1,5 @@
1
1
  module We
2
2
  module Call
3
- VERSION = "0.5.3"
3
+ VERSION = "0.5.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: we-call
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - WeWork Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-19 00:00:00.000000000 Z
11
+ date: 2017-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday