environ 1.0.1 → 1.0.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/environ.rb +22 -22
  3. data/lib/environ/version.rb +1 -1
  4. metadata +13 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30ad142326a0abde1ee4308c62727a5bce561376
4
- data.tar.gz: 16e73cabe92e3fad22fa71b9da9482ea7b1d6758
3
+ metadata.gz: 91eaf4b63ac40c8caaecd1117dd9a908af6f3bd6
4
+ data.tar.gz: 0d451f8333008881f613b1783d6d7c41adba1ec6
5
5
  SHA512:
6
- metadata.gz: 365da35f036994b67119dbbbf6072feb7aa931923f561cf450a431a96ec27f2f2afce876bd9a81ed7bc4758cc604551caca7afcd56e78dcbea82bf027f7d4a2b
7
- data.tar.gz: 0de76d7286a75eb0aceb3fe049fc8b18d6aabf5de4dd77f2f6098fc0b8b578e2b11ebe6a8853838112e84e2f2d81d5a6d8de67fc806f6cd0de149911592b5f0d
6
+ metadata.gz: 929a5c6230e92f9ac6b589fae2f500134b0fec6e4f45ce485873501ce79ed6c2180ec6312d6705eba72d62122344826299e250caaca8f5873d05ed7b495a3525
7
+ data.tar.gz: c9b575166c8005098989025f780ca265b1658609cc9d88689ea2733086748a96da106bad9117197d90e4e01eb8da7cb99e3bfac5b11f54edba241c437675d3a2
@@ -2,34 +2,34 @@ require_relative "environ/version"
2
2
 
3
3
  # Public: Main handler for accessing variables
4
4
  module Environ
5
- module_function
6
-
7
- @_data = {}
8
- @_no_conflict = true
5
+ module_function
9
6
 
10
- # Public: Returns boolean indicating whether no conflict prefixing is on or off
7
+ @_data = {}
8
+ @_no_conflict = true
9
+
10
+ # Public: Returns boolean indicating whether no conflict prefixing is on or off
11
11
  #
12
12
  # Examples
13
13
  #
14
14
  # Environ.no_conflict => true
15
15
  #
16
16
  # returns boolean
17
- def no_conflict
18
- @_no_conflict
19
- end
17
+ def no_conflict
18
+ @_no_conflict
19
+ end
20
20
 
21
- # Public: Sets boolean indicating whether no conflict prefixing is on or off
22
- # If set to false, env vars can be accessed without the 'env_' prefix
23
- # Examples
24
- #
25
- # Environ.no_conflict = false
26
- # Environ.path => {"PATH"=>"/Users/someone/.rvm/gems/ruby-2.2.0/bin", "RUBY_VERSION"=>"ruby-2.2.0", "_"=>"/Users/someone/.rvm/rubies/ruby-2.2.0/bin/irb"}
27
- #
28
- # returns nothing
29
- def no_conflict=(value)
30
- @_no_conflict = value
31
- create_methods unless @_no_conflict
32
- end
21
+ # Public: Sets boolean indicating whether no conflict prefixing is on or off
22
+ # If set to false, env vars can be accessed without the 'env_' prefix
23
+ # Examples
24
+ #
25
+ # Environ.no_conflict = false
26
+ # Environ.path => {"PATH"=>"/Users/someone/.rvm/gems/ruby-2.2.0/bin", "RUBY_VERSION"=>"ruby-2.2.0", "_"=>"/Users/someone/.rvm/rubies/ruby-2.2.0/bin/irb"}
27
+ #
28
+ # returns nothing
29
+ def no_conflict=(value)
30
+ @_no_conflict = value
31
+ create_methods unless @_no_conflict
32
+ end
33
33
 
34
34
  # Public: Returns all environment variables as hash
35
35
  #
@@ -84,8 +84,8 @@ module Environ
84
84
  #
85
85
  # returns nothing
86
86
  def create_method(name, val)
87
- var_prefix = @_no_conflict ? 'env_' : ''
88
- var_name = "#{var_prefix}#{name.strip.downcase}"
87
+ var_prefix = @_no_conflict ? 'env_' : ''
88
+ var_name = "#{var_prefix}#{name.strip.downcase}"
89
89
  @_data[var_name] = val
90
90
  define_singleton_method(var_name) do
91
91
  @_data[var_name]
@@ -1,3 +1,3 @@
1
1
  module Environ
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: environ
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Mondok
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: A gem to access environment variables in a OOP way. Rather than relying
@@ -60,8 +60,8 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - ".gitignore"
64
- - ".travis.yml"
63
+ - .gitignore
64
+ - .travis.yml
65
65
  - Gemfile
66
66
  - LICENSE.txt
67
67
  - README.md
@@ -81,17 +81,17 @@ require_paths:
81
81
  - lib
82
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ">="
84
+ - - '>='
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ">="
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.5
94
+ rubygems_version: 2.4.6
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: A gem to access environment variables in a OOP way.