envlogic 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +68 -67
- data/README.md +8 -4
- data/envlogic.gemspec +2 -2
- data/lib/envlogic.rb +2 -2
- data/lib/envlogic/env.rb +5 -3
- data/lib/envlogic/string_refinements.rb +2 -1
- data/lib/envlogic/version.rb +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd56fdd45690af5251f5eb580bba6868584239e4
|
4
|
+
data.tar.gz: 3981fbdef4b57ab55da9995850bbb872b56f4c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 412f11bca51268ae95fb2c608776a6650a7ae7bd82894883bd4c4b105c8efe3d1d78bd10c79049e9a0da98a807c30b60dcebd935b2476dcd2214fc1fa0a0bf3c
|
7
|
+
data.tar.gz: 2ff134d55fd2cdac2e3dac8ef2e97c2cd9d1d58f5ed8a7ba972596c3b2b2589e7e989ed868669280221e0daf62a90919b0c44137c1b78bcf6de2eb1858b24ad1
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
envlogic (1.0.
|
4
|
+
envlogic (1.0.1)
|
5
5
|
activesupport
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
abstract_type (0.0.7)
|
11
|
-
activemodel (4.2.
|
12
|
-
activesupport (= 4.2.
|
11
|
+
activemodel (4.2.5.1)
|
12
|
+
activesupport (= 4.2.5.1)
|
13
13
|
builder (~> 3.1)
|
14
|
-
activesupport (4.2.
|
14
|
+
activesupport (4.2.5.1)
|
15
15
|
i18n (~> 0.7)
|
16
16
|
json (~> 1.7, >= 1.7.7)
|
17
17
|
minitest (~> 5.1)
|
@@ -20,46 +20,47 @@ GEM
|
|
20
20
|
adamantium (0.2.0)
|
21
21
|
ice_nine (~> 0.11.0)
|
22
22
|
memoizable (~> 0.4.0)
|
23
|
-
ast (2.
|
24
|
-
astrolabe (1.3.1)
|
25
|
-
parser (~> 2.2)
|
23
|
+
ast (2.2.0)
|
26
24
|
axiom-types (0.1.1)
|
27
25
|
descendants_tracker (~> 0.0.4)
|
28
26
|
ice_nine (~> 0.11.0)
|
29
27
|
thread_safe (~> 0.3, >= 0.3.1)
|
30
|
-
brakeman (3.1.
|
28
|
+
brakeman (3.1.4)
|
31
29
|
erubis (~> 2.6)
|
32
30
|
fastercsv (~> 1.5)
|
33
31
|
haml (>= 3.0, < 5.0)
|
34
|
-
highline (
|
32
|
+
highline (>= 1.6.20, < 2.0)
|
35
33
|
multi_json (~> 1.2)
|
36
34
|
ruby2ruby (>= 2.1.1, < 2.3.0)
|
37
35
|
ruby_parser (~> 3.7.0)
|
36
|
+
safe_yaml (>= 1.0)
|
38
37
|
sass (~> 3.0)
|
39
38
|
slim (>= 1.3.6, < 4.0)
|
40
|
-
terminal-table (~> 1.4
|
41
|
-
bson (
|
39
|
+
terminal-table (~> 1.4)
|
40
|
+
bson (4.0.1)
|
42
41
|
builder (3.2.2)
|
42
|
+
codeclimate-engine-rb (0.1.0)
|
43
|
+
virtus (~> 1.0)
|
43
44
|
coderay (1.1.0)
|
44
45
|
coercible (1.0.0)
|
45
46
|
descendants_tracker (~> 0.0.1)
|
47
|
+
colorize (0.7.7)
|
46
48
|
concord (0.1.5)
|
47
49
|
adamantium (~> 0.2.0)
|
48
50
|
equalizer (~> 0.0.9)
|
49
|
-
connection_pool (2.2.0)
|
50
51
|
descendants_tracker (0.0.4)
|
51
52
|
thread_safe (~> 0.3, >= 0.3.1)
|
52
53
|
diff-lcs (1.2.5)
|
53
54
|
docile (1.1.5)
|
54
55
|
equalizer (0.0.11)
|
55
56
|
erubis (2.7.0)
|
56
|
-
faker (1.
|
57
|
+
faker (1.6.1)
|
57
58
|
i18n (~> 0.5)
|
58
59
|
fastercsv (1.5.5)
|
59
|
-
flay (2.
|
60
|
+
flay (2.6.1)
|
60
61
|
ruby_parser (~> 3.0)
|
61
62
|
sexp_processor (~> 4.0)
|
62
|
-
flog (4.2
|
63
|
+
flog (4.3.2)
|
63
64
|
ruby_parser (~> 3.1, > 3.1.0)
|
64
65
|
sexp_processor (~> 4.4)
|
65
66
|
haml (4.0.7)
|
@@ -68,33 +69,30 @@ GEM
|
|
68
69
|
haml (~> 4.0)
|
69
70
|
rubocop (>= 0.25.0)
|
70
71
|
sysexits (~> 1.1)
|
71
|
-
highline (1.7.
|
72
|
+
highline (1.7.8)
|
72
73
|
i18n (0.7.0)
|
73
74
|
ice_nine (0.11.1)
|
74
75
|
json (1.8.3)
|
75
76
|
memoizable (0.4.2)
|
76
77
|
thread_safe (~> 0.3, >= 0.3.1)
|
77
78
|
method_source (0.8.2)
|
78
|
-
minitest (5.8.
|
79
|
-
|
79
|
+
minitest (5.8.4)
|
80
|
+
mongo (2.2.2)
|
81
|
+
bson (~> 4.0)
|
82
|
+
mongoid (5.0.2)
|
80
83
|
activemodel (~> 4.0)
|
81
|
-
|
84
|
+
mongo (~> 2.1)
|
82
85
|
origin (~> 2.1)
|
83
86
|
tzinfo (>= 0.3.37)
|
84
|
-
mongoid-rspec (
|
85
|
-
mongoid (~>
|
87
|
+
mongoid-rspec (3.0.0)
|
88
|
+
mongoid (~> 5.0)
|
86
89
|
rake
|
87
|
-
rspec (~> 3.
|
88
|
-
moped (2.0.7)
|
89
|
-
bson (~> 3.0)
|
90
|
-
connection_pool (~> 2.0)
|
91
|
-
optionable (~> 0.2.0)
|
90
|
+
rspec (~> 3.3)
|
92
91
|
multi_json (1.11.2)
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
polishgeeks-dev-tools (1.1.2)
|
92
|
+
origin (2.2.0)
|
93
|
+
parser (2.3.0.2)
|
94
|
+
ast (~> 2.2)
|
95
|
+
polishgeeks-dev-tools (1.2.1)
|
98
96
|
brakeman
|
99
97
|
faker
|
100
98
|
haml-lint
|
@@ -102,64 +100,67 @@ GEM
|
|
102
100
|
pry
|
103
101
|
rspec
|
104
102
|
rubocop
|
105
|
-
rubycritic
|
103
|
+
rubycritic
|
106
104
|
shoulda
|
107
105
|
simplecov
|
108
106
|
timecop
|
109
107
|
yard
|
110
108
|
powerpack (0.1.1)
|
109
|
+
private_attr (1.1.0)
|
111
110
|
procto (0.0.2)
|
112
|
-
pry (0.10.
|
111
|
+
pry (0.10.3)
|
113
112
|
coderay (~> 1.1.0)
|
114
113
|
method_source (~> 0.8.1)
|
115
114
|
slop (~> 3.4)
|
116
|
-
rainbow (2.
|
117
|
-
rake (10.
|
118
|
-
reek (
|
119
|
-
|
120
|
-
|
115
|
+
rainbow (2.1.0)
|
116
|
+
rake (10.5.0)
|
117
|
+
reek (3.8.1)
|
118
|
+
codeclimate-engine-rb (~> 0.1.0)
|
119
|
+
parser (~> 2.2, >= 2.2.2.5)
|
120
|
+
private_attr (~> 1.1)
|
121
|
+
rainbow (~> 2.0)
|
121
122
|
unparser (~> 0.2.2)
|
122
|
-
rspec (3.
|
123
|
-
rspec-core (~> 3.
|
124
|
-
rspec-expectations (~> 3.
|
125
|
-
rspec-mocks (~> 3.
|
126
|
-
rspec-core (3.
|
127
|
-
rspec-support (~> 3.
|
128
|
-
rspec-expectations (3.
|
123
|
+
rspec (3.4.0)
|
124
|
+
rspec-core (~> 3.4.0)
|
125
|
+
rspec-expectations (~> 3.4.0)
|
126
|
+
rspec-mocks (~> 3.4.0)
|
127
|
+
rspec-core (3.4.1)
|
128
|
+
rspec-support (~> 3.4.0)
|
129
|
+
rspec-expectations (3.4.0)
|
129
130
|
diff-lcs (>= 1.2.0, < 2.0)
|
130
|
-
rspec-support (~> 3.
|
131
|
-
rspec-mocks (3.
|
131
|
+
rspec-support (~> 3.4.0)
|
132
|
+
rspec-mocks (3.4.1)
|
132
133
|
diff-lcs (>= 1.2.0, < 2.0)
|
133
|
-
rspec-support (~> 3.
|
134
|
-
rspec-support (3.
|
135
|
-
rubocop (0.
|
136
|
-
|
137
|
-
parser (>= 2.2.2.5, < 3.0)
|
134
|
+
rspec-support (~> 3.4.0)
|
135
|
+
rspec-support (3.4.1)
|
136
|
+
rubocop (0.36.0)
|
137
|
+
parser (>= 2.3.0.0, < 3.0)
|
138
138
|
powerpack (~> 0.1)
|
139
139
|
rainbow (>= 1.99.1, < 3.0)
|
140
|
-
ruby-progressbar (~> 1.
|
140
|
+
ruby-progressbar (~> 1.7)
|
141
141
|
ruby-progressbar (1.7.5)
|
142
142
|
ruby2ruby (2.2.0)
|
143
143
|
ruby_parser (~> 3.1)
|
144
144
|
sexp_processor (~> 4.0)
|
145
|
-
ruby_parser (3.7.
|
145
|
+
ruby_parser (3.7.3)
|
146
146
|
sexp_processor (~> 4.1)
|
147
|
-
rubycritic (
|
148
|
-
|
149
|
-
|
147
|
+
rubycritic (2.6.0)
|
148
|
+
colorize
|
149
|
+
flay (= 2.6.1)
|
150
|
+
flog (= 4.3.2)
|
150
151
|
parser (>= 2.2.0, < 3.0)
|
151
|
-
reek (=
|
152
|
-
ruby2ruby (>= 2.1.1, < 3.0)
|
152
|
+
reek (= 3.8.1)
|
153
153
|
virtus (~> 1.0)
|
154
|
-
|
155
|
-
|
154
|
+
safe_yaml (1.0.4)
|
155
|
+
sass (3.4.21)
|
156
|
+
sexp_processor (4.6.1)
|
156
157
|
shoulda (3.5.0)
|
157
158
|
shoulda-context (~> 1.0, >= 1.0.1)
|
158
159
|
shoulda-matchers (>= 1.4.1, < 3.0)
|
159
160
|
shoulda-context (1.2.1)
|
160
161
|
shoulda-matchers (2.8.0)
|
161
162
|
activesupport (>= 3.0.0)
|
162
|
-
simplecov (0.
|
163
|
+
simplecov (0.11.1)
|
163
164
|
docile (~> 1.1.0)
|
164
165
|
json (~> 1.8)
|
165
166
|
simplecov-html (~> 0.10.0)
|
@@ -170,19 +171,19 @@ GEM
|
|
170
171
|
slop (3.6.0)
|
171
172
|
sysexits (1.2.0)
|
172
173
|
temple (0.7.6)
|
173
|
-
terminal-table (1.
|
174
|
+
terminal-table (1.5.2)
|
174
175
|
thread_safe (0.3.5)
|
175
|
-
tilt (2.0.
|
176
|
+
tilt (2.0.2)
|
176
177
|
timecop (0.8.0)
|
177
178
|
tzinfo (1.2.2)
|
178
179
|
thread_safe (~> 0.1)
|
179
|
-
unparser (0.2.
|
180
|
+
unparser (0.2.5)
|
180
181
|
abstract_type (~> 0.0.7)
|
181
182
|
adamantium (~> 0.2.0)
|
182
183
|
concord (~> 0.1.5)
|
183
184
|
diff-lcs (~> 1.2.5)
|
184
185
|
equalizer (~> 0.0.9)
|
185
|
-
parser (~> 2.
|
186
|
+
parser (~> 2.3.0)
|
186
187
|
procto (~> 0.0.2)
|
187
188
|
virtus (1.0.5)
|
188
189
|
axiom-types (~> 0.1)
|
@@ -199,4 +200,4 @@ DEPENDENCIES
|
|
199
200
|
polishgeeks-dev-tools
|
200
201
|
|
201
202
|
BUNDLED WITH
|
202
|
-
1.
|
203
|
+
1.11.2
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/karafka/envlogic.png)](https://travis-ci.org/karafka/envlogic)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/karafka/envlogic/badges/gpa.svg)](https://codeclimate.com/github/karafka/envlogic)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/envlogic.svg)](http://badge.fury.io/rb/envlogic)
|
5
6
|
|
6
7
|
Envlogic is a library used to manage environments for your Ruby application in a similar to Rails.env way.
|
7
8
|
|
@@ -84,10 +85,13 @@ Basic::Karafka.env.development? # => true
|
|
84
85
|
|
85
86
|
## References
|
86
87
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
88
|
+
* [Karafka framework](https://github.com/karafka/karafka)
|
89
|
+
* [Waterdrop](https://github.com/karafka/waterdrop)
|
90
|
+
* [Envlogic](https://github.com/karafka/envlogic)
|
91
|
+
* [Worker Glass](https://github.com/karafka/worker-glass)
|
92
|
+
* [Null Logger](https://github.com/karafka/null-logger)
|
93
|
+
* [Envlogic Travis CI](https://travis-ci.org/karafka/envlogic)
|
94
|
+
* [Envlogic Code Climate](https://codeclimate.com/github/karafka/envlogic)
|
91
95
|
|
92
96
|
## Note on Patches/Pull Requests
|
93
97
|
|
data/envlogic.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
lib = File.expand_path('../lib', __FILE__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
|
3
|
+
|
4
4
|
require 'envlogic/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'envlogic'
|
8
8
|
spec.platform = Gem::Platform::RUBY
|
9
9
|
spec.version = Envlogic::VERSION
|
10
10
|
spec.authors = ['pavlo_vavruk', 'Maciej Mensfeld']
|
data/lib/envlogic.rb
CHANGED
data/lib/envlogic/env.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Main module
|
2
3
|
module Envlogic
|
3
4
|
# Env module to get and set environment
|
@@ -5,9 +6,9 @@ module Envlogic
|
|
5
6
|
using StringRefinements
|
6
7
|
|
7
8
|
# What environment key should be used by default
|
8
|
-
FALLBACK_ENV_KEY = 'RACK_ENV'
|
9
|
+
FALLBACK_ENV_KEY = 'RACK_ENV'.freeze
|
9
10
|
# What default environment should be asumed when there's nothing else
|
10
|
-
FALLBACK_ENV = 'development'
|
11
|
+
FALLBACK_ENV = 'development'.freeze
|
11
12
|
|
12
13
|
# @param klass [Class, Module] class/module for which we want to build a Envlogic::Env object
|
13
14
|
# @return [Envlogic::Env] envlogic env object]
|
@@ -37,7 +38,8 @@ module Envlogic
|
|
37
38
|
# @note Will return only the last part, so if the dir is /home/apps/my_app it will
|
38
39
|
# only return the 'my_app' part
|
39
40
|
def app_dir_name
|
40
|
-
Pathname
|
41
|
+
Pathname
|
42
|
+
.new(ENV['BUNDLE_GEMFILE'])
|
41
43
|
.dirname
|
42
44
|
.basename
|
43
45
|
.to_s
|
@@ -1,8 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
module Envlogic
|
2
3
|
# String refinements used in this library
|
3
4
|
module StringRefinements
|
4
5
|
# Postfix for ENV keys
|
5
|
-
ENV_KEY_POSTFIX = '_ENV'
|
6
|
+
ENV_KEY_POSTFIX = '_ENV'.freeze
|
6
7
|
|
7
8
|
refine String do
|
8
9
|
# Converts any string into a bash ENV key
|
data/lib/envlogic/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: envlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pavlo_vavruk
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- ".ruby-gemset"
|
38
38
|
- ".ruby-version"
|
39
39
|
- ".travis.yml"
|
40
|
+
- CHANGELOG.md
|
40
41
|
- Gemfile
|
41
42
|
- Gemfile.lock
|
42
43
|
- MIT-LICENCE
|
@@ -66,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
67
|
version: '0'
|
67
68
|
requirements: []
|
68
69
|
rubyforge_project:
|
69
|
-
rubygems_version: 2.
|
70
|
+
rubygems_version: 2.5.1
|
70
71
|
signing_key:
|
71
72
|
specification_version: 4
|
72
73
|
summary: Ruby based library which allows to set and get environments values and easily
|