herokuconf 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 898c4fd09b882a3e199aa0b05eb8d3ecaf42e385
4
- data.tar.gz: 867acce0a8ca10a653e8a6e28024ef03c232c803
3
+ metadata.gz: df66d31b1b270fa89cd82111bbbfd53edcf5db26
4
+ data.tar.gz: 7b6573bcc5afa806718c849e9b5e9200515bb2d3
5
5
  SHA512:
6
- metadata.gz: 8ad6fa33a8535b5b2e4c18cc747b623c2199b319e3d37732fa2455d16a0ad5f6ea9be5509ec7689b30fefb6e6d4d5ee7d688cde96ffa35c798d575957a6a4e6c
7
- data.tar.gz: 982da23a89c50aa2df008fd27b9b1f938279d09182a973ff48427f962259e624eb28b33e73d1c209e139a2ae2f4f0976bf9bcac5b078b81640cba43edd7ec0b3
6
+ metadata.gz: e9ba1e06e911c0d318651787cba73fbfc36a36264182d31b861a142cb73e636e321565d13ba47c9f47260528f0413c811a28217c12041c09fcb4456426df1528
7
+ data.tar.gz: 90b61ea3b5c4714b403983432ddb42495511bc57973c7053281fa8c39edba7e414dd21ca8b0da3fea5aa5bfd18cf9ffaf8b95c7a86bc535a7b5b9aad46cea4c7
data/herokuconf.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'herokuconf'
3
- s.version = '0.0.6'
3
+ s.version = '0.0.7'
4
4
  s.date = Time.now.strftime('%Y-%m-%d')
5
5
 
6
6
  s.summary = 'Configure local environment based on Heroku config variables'
data/lib/herokuconf.rb CHANGED
@@ -7,14 +7,18 @@ module HerokuConf
7
7
  class << self
8
8
  DEFAULT_OPTIONS = {
9
9
  app: nil,
10
- keys: nil
10
+ keys: nil,
11
+ exclude: ['RACK_ENV']
11
12
  }
12
13
 
13
14
  def configure!(params = {})
14
15
  return if ENV['DYNO']
15
- app, keys = DEFAULT_OPTIONS.dup.merge!(params).values_at(:app, :keys)
16
+ app, keys, exclude = DEFAULT_OPTIONS.dup.merge!(params).values_at(
17
+ :app, :keys, exclude
18
+ )
16
19
  pairs = config_vars(app)
17
20
  pairs.select! { |k, _| keys.include? k } if keys
21
+ pairs.reject! { |k, _| exclude.include? k } if exclude
18
22
  pairs.each { |k, v| ENV[k] = v }
19
23
  end
20
24
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herokuconf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-22 00:00:00.000000000 Z
11
+ date: 2015-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netrc