-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.envrc
68 lines (63 loc) · 2.51 KB
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
#
# THIS FILE IS IGNORED UNLESS YOU ARE USING *direnv*.
#
# * This file is only used in development and currently may
# contain Mac-OS specific settings.
#
# * This file sets shell environment that will be activated when
# running shell commands from within the project directory, or any
# sub-directories. The act of changing into any of these folder
# also invokes direnv.
#
# * See the actual code for comments on what each does and why.
#
# In order for this file to be used, you must install `direnv`. To
# install direnv:
#
# brew install direnv
# echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile
#
# when you CD into the project folder subseqently you may see a warning.
# Direnv generally requires you to approve each version of .envrc file
# before it is enabled, so you must run the following command every time
# .envrc file changes and you get a warning that it's not allowed:
#
# direnv allow .
#
# Optionally, you might consider adding a shell alias so that you can
# just type 'dada' instead of the above command:
#
# echo "alias dada='direnv allow .'" >> ~/.bash_profile
# source ~/.bash_profile
#
# Of course feel free to change 'dada', although considering "Da" means "Yes"
# in Russian while also abbreviating into "Direnv Allow", you'd be pressed hard
# to find a better alias.
if [[ $(ruby --version) =~ "2.7" ]]; then
# Ruby 2.7 deprecated many features and so the warnings from all of the popular
# gems are through the roof. It's overwhelming, so turn them down using these
# warnings specications that only apply to Ruby 2.7.
export RUBYOPT='-W:no-deprecated -W:no-experimental -W0'
else
# Otherwise we just set W0 which still generates warnings, but not as much.
export RUBYOPT='W0'
fi
# We set this variable to be able to build mysql2 gem against openssl.
export LIBRARY_PATH=$(brew --prefix openssl)/lib
# This was required to support building on OS-X Catalina.
export CXX=clang++
# Also Catalina. Below command grabs OS-X version without the minor version,
# so eg. "10.15.1" it will return "10.15"
export OSX_VERSION=$(sw_vers -productVersion | sed -E 's/\.[0-9]+$//g')
export GYPFLAGS=-Dmac_deployment_target=${OSX_VERSION}
export CODECOV_TOKEN="4b9f9704-0cee-42f9-a4b1-a7334f905fe1"
# Finally, add bin/ to the PATH when in the project folder
# so that you can use `bin/rails` and `bin/rake` etc. without typing
# `bin/`.
PATH_add bin
export DISABLE_SPRING=1
export COVERBAND=true
export COVERAGE=true
export PUMA_THREADS=4
export PUMA_WORKERS=6