falkorlib 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +64 -67
- data/falkorlib.gemspec +2 -2
- data/lib/falkorlib/bootstrap/python.rb +27 -23
- data/lib/falkorlib/config.rb +2 -2
- data/lib/falkorlib/version.rb +1 -1
- data/spec/falkorlib/bootstrap_python_spec.rb +3 -4
- data/spec/spec_helper.rb +2 -2
- data/templates/direnv/direnvrc +57 -7
- metadata +10 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f6c753e462c35ce2c8cb3f896315931ef6eedb0cc8a2976955fc45baee50a1b
|
4
|
+
data.tar.gz: 2d6f11affc72651b6156fcf905d6498d2e2d1a925619d366fc5a1be233ebea25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f04f7cdaaf56fe15cda4632bdb0f7ae37dc94eeb01a5b03b6c8070cae836b77ad4398bbd7d46d6a46c94ec0f57d667fc99b020737ad59c8e63b35e3cd68db4b
|
7
|
+
data.tar.gz: bfd68a396b5063be6f044851d23927ad8cf2919423a94834aaec7c74fd16235e399d435c76fd9569d3445c48048c0ee5efccc3698eebb598be1f3654a42ff554
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
falkorlib (0.8.
|
4
|
+
falkorlib (0.8.3)
|
5
5
|
activesupport (~> 4.0)
|
6
6
|
artii (>= 2.1)
|
7
7
|
awesome_print (~> 1.2)
|
@@ -14,7 +14,7 @@ PATH
|
|
14
14
|
license-generator (~> 0)
|
15
15
|
logger (>= 1.2.8)
|
16
16
|
minigit (~> 0)
|
17
|
-
rake (
|
17
|
+
rake (>= 12.3.3)
|
18
18
|
term-ansicolor (~> 1.3)
|
19
19
|
thor (>= 0.19)
|
20
20
|
thor-zsh_completion
|
@@ -22,119 +22,115 @@ PATH
|
|
22
22
|
GEM
|
23
23
|
remote: http://rubygems.org/
|
24
24
|
specs:
|
25
|
-
activesupport (4.2.11)
|
25
|
+
activesupport (4.2.11.1)
|
26
26
|
i18n (~> 0.7)
|
27
27
|
minitest (~> 5.1)
|
28
28
|
thread_safe (~> 0.3, >= 0.3.4)
|
29
29
|
tzinfo (~> 1.1)
|
30
|
-
addressable (2.
|
31
|
-
public_suffix (~> 2.0, >= 2.0.2)
|
30
|
+
addressable (2.4.0)
|
32
31
|
artii (2.1.2)
|
33
32
|
ast (2.4.0)
|
34
33
|
awesome_print (1.8.0)
|
35
|
-
backports (3.
|
36
|
-
codeclimate-test-reporter (0.
|
34
|
+
backports (3.17.1)
|
35
|
+
codeclimate-test-reporter (0.6.0)
|
37
36
|
simplecov (>= 0.7.1, < 1.0.0)
|
38
|
-
coderay (1.1.
|
39
|
-
concurrent-ruby (1.1.
|
37
|
+
coderay (1.1.2)
|
38
|
+
concurrent-ruby (1.1.6)
|
40
39
|
configatron (3.2.0)
|
41
40
|
deep_merge (1.0.1)
|
42
|
-
diff-lcs (1.
|
41
|
+
diff-lcs (1.3)
|
43
42
|
diffy (3.3.0)
|
44
|
-
docile (1.
|
45
|
-
ethon (0.
|
43
|
+
docile (1.3.2)
|
44
|
+
ethon (0.12.0)
|
46
45
|
ffi (>= 1.3.0)
|
47
46
|
facter (2.4.6)
|
48
|
-
faraday (0.
|
47
|
+
faraday (0.17.3)
|
49
48
|
multipart-post (>= 1.2, < 3)
|
50
|
-
faraday_middleware (0.
|
49
|
+
faraday_middleware (0.14.0)
|
51
50
|
faraday (>= 0.7.4, < 1.0)
|
52
|
-
ffi (1.
|
53
|
-
gh (0.
|
54
|
-
addressable
|
51
|
+
ffi (1.12.2)
|
52
|
+
gh (0.15.1)
|
53
|
+
addressable (~> 2.4.0)
|
55
54
|
backports
|
56
55
|
faraday (~> 0.8)
|
57
56
|
multi_json (~> 1.0)
|
58
|
-
net-http-persistent (
|
57
|
+
net-http-persistent (~> 2.9)
|
59
58
|
net-http-pipeline
|
60
59
|
git_remote_branch (0.3.8)
|
61
60
|
hashr (0.0.22)
|
62
|
-
highline (1.7.
|
61
|
+
highline (1.7.10)
|
63
62
|
i18n (0.9.5)
|
64
63
|
concurrent-ruby (~> 1.0)
|
65
|
-
|
64
|
+
irb (1.1.1)
|
65
|
+
jaro_winkler (1.5.4)
|
66
66
|
json (1.8.6)
|
67
67
|
launchy (2.4.3)
|
68
68
|
addressable (~> 2.3)
|
69
69
|
license-generator (0.4.1)
|
70
70
|
thor
|
71
71
|
logger (1.3.0)
|
72
|
-
method_source (0.
|
72
|
+
method_source (1.0.0)
|
73
73
|
minigit (0.0.4)
|
74
|
-
minitest (5.
|
75
|
-
multi_json (1.
|
76
|
-
multipart-post (2.
|
74
|
+
minitest (5.14.0)
|
75
|
+
multi_json (1.14.1)
|
76
|
+
multipart-post (2.1.1)
|
77
77
|
net-http-persistent (2.9.4)
|
78
78
|
net-http-pipeline (1.0.1)
|
79
|
-
parallel (1.
|
80
|
-
parser (2.
|
79
|
+
parallel (1.19.1)
|
80
|
+
parser (2.7.1.0)
|
81
81
|
ast (~> 2.4.0)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
method_source (~> 0.8.1)
|
86
|
-
slop (~> 3.4)
|
87
|
-
public_suffix (2.0.4)
|
82
|
+
pry (0.13.0)
|
83
|
+
coderay (~> 1.1)
|
84
|
+
method_source (~> 1.0)
|
88
85
|
pusher-client (0.6.2)
|
89
86
|
json
|
90
87
|
websocket (~> 1.0)
|
91
88
|
rainbow (3.0.0)
|
92
|
-
rake (
|
93
|
-
rspec (3.
|
94
|
-
rspec-core (~> 3.
|
95
|
-
rspec-expectations (~> 3.
|
96
|
-
rspec-mocks (~> 3.
|
97
|
-
rspec-core (3.
|
98
|
-
rspec-support (~> 3.
|
99
|
-
rspec-expectations (3.
|
89
|
+
rake (13.0.1)
|
90
|
+
rspec (3.9.0)
|
91
|
+
rspec-core (~> 3.9.0)
|
92
|
+
rspec-expectations (~> 3.9.0)
|
93
|
+
rspec-mocks (~> 3.9.0)
|
94
|
+
rspec-core (3.9.1)
|
95
|
+
rspec-support (~> 3.9.1)
|
96
|
+
rspec-expectations (3.9.1)
|
100
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
101
|
-
rspec-support (~> 3.
|
102
|
-
rspec-mocks (3.
|
98
|
+
rspec-support (~> 3.9.0)
|
99
|
+
rspec-mocks (3.9.1)
|
103
100
|
diff-lcs (>= 1.2.0, < 2.0)
|
104
|
-
rspec-support (~> 3.
|
105
|
-
rspec-support (3.
|
106
|
-
rubocop (0.
|
101
|
+
rspec-support (~> 3.9.0)
|
102
|
+
rspec-support (3.9.2)
|
103
|
+
rubocop (0.68.1)
|
107
104
|
jaro_winkler (~> 1.5.1)
|
108
105
|
parallel (~> 1.10)
|
109
|
-
parser (>= 2.5)
|
110
|
-
powerpack (~> 0.1)
|
106
|
+
parser (>= 2.5, != 2.5.1.1)
|
111
107
|
rainbow (>= 2.2.2, < 4.0)
|
112
108
|
ruby-progressbar (~> 1.7)
|
113
|
-
unicode-display_width (
|
114
|
-
ruby-progressbar (1.10.
|
115
|
-
rubygems-tasks (0.2.
|
109
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
110
|
+
ruby-progressbar (1.10.1)
|
111
|
+
rubygems-tasks (0.2.5)
|
112
|
+
irb (~> 1.0)
|
116
113
|
safe_yaml (0.9.7)
|
117
|
-
simplecov (0.
|
118
|
-
docile (~> 1.1
|
119
|
-
|
120
|
-
simplecov-html (~> 0.
|
121
|
-
simplecov-html (0.
|
122
|
-
|
114
|
+
simplecov (0.17.1)
|
115
|
+
docile (~> 1.1)
|
116
|
+
json (>= 1.8, < 3)
|
117
|
+
simplecov-html (~> 0.10.0)
|
118
|
+
simplecov-html (0.10.2)
|
119
|
+
sync (0.5.0)
|
123
120
|
term-ansicolor (1.7.1)
|
124
121
|
tins (~> 1.0)
|
125
|
-
thor (0.
|
126
|
-
thor-zsh_completion (0.1.
|
127
|
-
thor (~> 0)
|
122
|
+
thor (1.0.1)
|
123
|
+
thor-zsh_completion (0.1.2)
|
128
124
|
thread_safe (0.3.6)
|
129
|
-
tins (1.
|
130
|
-
|
125
|
+
tins (1.24.1)
|
126
|
+
sync
|
127
|
+
travis (1.8.13)
|
131
128
|
backports
|
132
129
|
faraday (~> 0.9)
|
133
130
|
faraday_middleware (~> 0.9, >= 0.9.1)
|
134
131
|
gh (~> 0.13)
|
135
132
|
highline (~> 1.6)
|
136
133
|
launchy (~> 2.1)
|
137
|
-
net-http-persistent (~> 2.9)
|
138
134
|
pusher-client (~> 0.4)
|
139
135
|
typhoeus (~> 0.6, >= 0.6.8)
|
140
136
|
travis-lint (1.8.0)
|
@@ -142,15 +138,16 @@ GEM
|
|
142
138
|
safe_yaml (~> 0.9.0)
|
143
139
|
typhoeus (0.8.0)
|
144
140
|
ethon (>= 0.8.0)
|
145
|
-
tzinfo (1.2.
|
141
|
+
tzinfo (1.2.7)
|
146
142
|
thread_safe (~> 0.1)
|
147
|
-
unicode-display_width (1.
|
148
|
-
websocket (1.2.
|
149
|
-
yard (0.9.
|
143
|
+
unicode-display_width (1.5.0)
|
144
|
+
websocket (1.2.8)
|
145
|
+
yard (0.9.24)
|
150
146
|
|
151
147
|
PLATFORMS
|
152
148
|
ruby
|
153
149
|
x86_64-darwin-16
|
150
|
+
x86_64-darwin-17
|
154
151
|
x86_64-darwin-18
|
155
152
|
|
156
153
|
DEPENDENCIES
|
@@ -166,7 +163,7 @@ DEPENDENCIES
|
|
166
163
|
simplecov
|
167
164
|
travis (~> 1.6)
|
168
165
|
travis-lint (~> 1.8)
|
169
|
-
yard (
|
166
|
+
yard (>= 0.9.20)
|
170
167
|
|
171
168
|
BUNDLED WITH
|
172
169
|
1.17.3
|
data/falkorlib.gemspec
CHANGED
@@ -68,7 +68,7 @@ Gem::Specification.new do |s|
|
|
68
68
|
# "~> 2.2.0" (shortcut for ">= 2.2.0", "< 2.3.0")
|
69
69
|
#
|
70
70
|
#s.add_dependency("rake", ">= 10.1.0")
|
71
|
-
s.add_runtime_dependency 'rake', '
|
71
|
+
s.add_runtime_dependency 'rake', '>= 12.3.3'
|
72
72
|
s.add_runtime_dependency 'git_remote_branch', '~> 0'
|
73
73
|
#s.add_runtime_dependency 'git', '~> 1.2', '>= 1.2.5'
|
74
74
|
s.add_runtime_dependency('minigit', '~> 0')
|
@@ -100,7 +100,7 @@ Gem::Specification.new do |s|
|
|
100
100
|
s.add_development_dependency("bundler", "~> 1.0")
|
101
101
|
s.add_development_dependency 'rspec', '~> 3.0' #, '>= 2.7.0'
|
102
102
|
s.add_development_dependency("pry", "~> 0.9")
|
103
|
-
s.add_development_dependency("yard", "
|
103
|
+
s.add_development_dependency("yard", ">= 0.9.20")
|
104
104
|
s.add_development_dependency('rubocop', '~> 0.49.0')
|
105
105
|
s.add_development_dependency("rubygems-tasks", "~> 0.2")
|
106
106
|
s.add_development_dependency("travis", "~> 1.6")
|
@@ -87,49 +87,53 @@ module FalkorLib
|
|
87
87
|
default_virtualenv = File.basename(rootdir)
|
88
88
|
default_virtualenv = `cat #{file}`.chomp if File.exist?( file )
|
89
89
|
g = (options[:virtualenv]) ? options[:virtualenv] : ask("Enter virtualenv name for this directory", default_virtualenv)
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
if (g != default_virtualenv)
|
91
|
+
info " ==> configuring virtualenv file '#{files[:virtualenvfile]}' with content '#{g}'"
|
92
|
+
File.open( File.join(rootdir, files[:virtualenvfile]), 'w') do |f|
|
93
|
+
f.puts g
|
94
|
+
end
|
95
|
+
exit_status = (File.exist?(file) && (`cat #{file}`.chomp == g)) ? 0 : 1
|
96
|
+
FalkorLib::Git.add(File.join(rootdir, files[:virtualenvfile])) if use_git
|
93
97
|
end
|
94
|
-
exit_status = (File.exist?(file) && (`cat #{file}`.chomp == g)) ? 0 : 1
|
95
|
-
FalkorLib::Git.add(File.join(rootdir, files[:virtualenvfile])) if use_git
|
96
98
|
end
|
97
99
|
# ==== Global direnvrc ====
|
98
100
|
if options and options[:global]
|
99
101
|
direnvrc = config[:direnvrc]
|
100
102
|
direnvrc_dir = File.dirname( direnvrc )
|
101
103
|
unless File.directory?( direnvrc_dir )
|
102
|
-
warning "The directory '#{direnvrc_dir}' meant for hosting the
|
104
|
+
warning "The directory '#{direnvrc_dir}' meant for hosting the global direnv settings does not exist"
|
103
105
|
warning "About to create this directory"
|
104
106
|
really_continue?
|
105
107
|
run %(mkdir -p #{direnvrc_dir})
|
106
108
|
end
|
107
109
|
if (!File.exists?(direnvrc) or options[:force])
|
108
|
-
templatedir = File.join( FalkorLib.templates, 'direnv')
|
109
|
-
info " ==> configuring Global direnvrc #{files[:direnvrc]}"
|
110
|
-
init_from_template(templatedir, direnvrc_dir, config,
|
111
|
-
|
112
|
-
|
113
|
-
|
110
|
+
# templatedir = File.join( FalkorLib.templates, 'direnv')
|
111
|
+
# info " ==> configuring Global direnvrc #{files[:direnvrc]}"
|
112
|
+
# init_from_template(templatedir, direnvrc_dir, config,
|
113
|
+
# :no_interaction => true,
|
114
|
+
# :no_commit => true,
|
115
|
+
# )
|
116
|
+
run %(curl -o #{direnvrc} https://raw.githubusercontent.com/Falkor/dotfiles/master/direnv/direnvrc)
|
114
117
|
end
|
115
118
|
end
|
116
119
|
# ==== Local Direnv setup and .envrc ===
|
117
120
|
if files[:direnvfile]
|
118
121
|
envrc = File.join(rootdir, files[:direnvfile])
|
119
|
-
setup = File.join(rootdir, 'setup.sh')
|
120
|
-
if (!File.exists?(setup) or options[:force])
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
end
|
122
|
+
# setup = File.join(rootdir, 'setup.sh')
|
123
|
+
# if (!File.exists?(setup) or options[:force])
|
124
|
+
# templatedir = File.join( FalkorLib.templates, 'python')
|
125
|
+
# info " ==> configuring local direnv setup and #{files[:direnvfile]}"
|
126
|
+
# init_from_template(templatedir, rootdir, config,
|
127
|
+
# :no_interaction => true,
|
128
|
+
# :no_commit => true,
|
129
|
+
# )
|
130
|
+
# end
|
128
131
|
if (!File.exists?(envrc) or options[:force])
|
129
|
-
run %(
|
132
|
+
run %(curl -o #{envrc} https://raw.githubusercontent.com/Falkor/dotfiles/master/direnv/envrc)
|
133
|
+
# run %(ln -s setup.sh #{envrc})
|
130
134
|
end
|
131
135
|
FalkorLib::Git.add( envrc ) if use_git
|
132
|
-
FalkorLib::Git.add( setup ) if use_git
|
136
|
+
# FalkorLib::Git.add( setup ) if use_git
|
133
137
|
end
|
134
138
|
# Last motd
|
135
139
|
warning <<-MOTD
|
data/lib/falkorlib/config.rb
CHANGED
@@ -61,8 +61,8 @@ module FalkorLib #:nodoc:
|
|
61
61
|
:gemsetfile => '.ruby-gemset'
|
62
62
|
},
|
63
63
|
:pyenv => {
|
64
|
-
:versions => ['2.7.
|
65
|
-
:version => '
|
64
|
+
:versions => ['2.7.16', '3.7.4' ],
|
65
|
+
:version => '3.7.4',
|
66
66
|
:versionfile => '.python-version',
|
67
67
|
:virtualenvfile => '.python-virtualenv',
|
68
68
|
:direnvfile => '.envrc',
|
data/lib/falkorlib/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#########################################
|
3
3
|
# bootstrap_python_spec.rb
|
4
4
|
# @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
5
|
-
# Time-stamp: <
|
5
|
+
# Time-stamp: <Fri 2020-04-10 23:52 svarrette>
|
6
6
|
#
|
7
7
|
# @description Check the Bootstrapping operations for python-based projects
|
8
8
|
#
|
@@ -59,14 +59,14 @@ describe FalkorLib::Bootstrap do
|
|
59
59
|
c = FalkorLib::Bootstrap.pyenv(dir)
|
60
60
|
expect(c).to eq(0)
|
61
61
|
content = {}
|
62
|
-
[:versionfile, :
|
62
|
+
[:versionfile, :direnvfile].each do |type|
|
63
63
|
f = File.join(dir, FalkorLib.config[:pyenv][type.to_sym])
|
64
64
|
t = File.exists?(f)
|
65
65
|
expect(t).to be true
|
66
66
|
content[type.to_sym] = `cat #{f}`.chomp
|
67
67
|
end
|
68
68
|
expect(content[:versionfile]).to eq(FalkorLib.config[:pyenv][:version])
|
69
|
-
expect(content[:virtualenvfile]).to eq(File.basename(dir))
|
69
|
+
#expect(content[:virtualenvfile]).to eq(File.basename(dir))
|
70
70
|
File.read(File.realpath( File.join(dir, FalkorLib.config[:pyenv][:direnvfile]))) do |f|
|
71
71
|
[
|
72
72
|
'layout virtualenv ${pyversion} ${pvenv}',
|
@@ -83,7 +83,6 @@ describe FalkorLib::Bootstrap do
|
|
83
83
|
c = capture(:stdout) { FalkorLib::Bootstrap.pyenv(dir, { :force => true }) }
|
84
84
|
[
|
85
85
|
"The python/pyenv file '.python-version' already exists",
|
86
|
-
"The python/pyenv file '.python-virtualenv' already exists",
|
87
86
|
"The python/pyenv file '.envrc' already exists",
|
88
87
|
"and it WILL BE overwritten"
|
89
88
|
].each do |pattern|
|
data/spec/spec_helper.rb
CHANGED
data/templates/direnv/direnvrc
CHANGED
@@ -1,32 +1,82 @@
|
|
1
1
|
# -*- mode: sh; -*-
|
2
|
-
#
|
3
|
-
#
|
2
|
+
# Custom global configuration for [direnv](https://direnv.net/)
|
3
|
+
# i.e. override/complete the direnv-stdlib:
|
4
|
+
# https://github.com/direnv/direnv/blob/master/stdlib.sh
|
4
5
|
#
|
6
|
+
# Quick installation of this file:
|
7
|
+
# mkdir -p ~/.config/direnv
|
8
|
+
# cd ~/.config/direnv
|
9
|
+
# curl -o direnvrc https://raw.githubusercontent.com/Falkor/dotfiles/master/direnv/direnvrc
|
10
|
+
#
|
11
|
+
# Sample .envrc you can use for Python projects based on the
|
12
|
+
# layouts defined in this file:
|
13
|
+
# https://github.com/Falkor/dotfiles/blob/master/direnv/envrc
|
14
|
+
#
|
15
|
+
############################ Python ############################
|
16
|
+
# Workfow based on:
|
17
|
+
# - 'pyenv' to easily switch to a special version of python
|
18
|
+
# - 'pyenv-virtualenv' to manage python versions AND virtualenvs
|
19
|
+
#
|
20
|
+
# Typical .envrc for your python project using the below functions:
|
21
|
+
# if [ -f ".python-version" ]; then
|
22
|
+
# pyversion=$(head .python-version)
|
23
|
+
# else
|
24
|
+
# pyversion=2.7.16
|
25
|
+
# fi
|
26
|
+
# pvenv=$(basename $PWD)
|
27
|
+
#
|
28
|
+
# use python ${pyversion}
|
29
|
+
# layout virtualenv ${pyversion} ${pvenv}
|
30
|
+
# layout activate ${pvenv}
|
31
|
+
#
|
5
32
|
# Adapted from
|
6
33
|
# - https://github.com/direnv/direnv/wiki/Python#-pyenv and
|
7
34
|
# - https://github.com/direnv/direnv/wiki/Python#-virtualenvwrapper
|
35
|
+
#
|
36
|
+
# Side note:
|
37
|
+
# It appeared required to reload the pyenv [virtualenv-]init as for
|
38
|
+
# It May be due to the fact that direnv is creating a new bash
|
39
|
+
# sub-process to load the stdlib, direnvrc and .envrc
|
40
|
+
###
|
8
41
|
|
9
|
-
#
|
42
|
+
# === Use a specific python version ===
|
43
|
+
# Usage in .envrc:
|
44
|
+
# use python <version>
|
10
45
|
use_python() {
|
11
46
|
if [ -n "$(which pyenv)" ]; then
|
12
47
|
local pyversion=$1
|
13
|
-
pyenv
|
48
|
+
eval "$(pyenv init -)"
|
49
|
+
pyenv local ${pyversion} || log_error "Could not find pyenv version '${pyversion}'. Consider running 'pyenv install ${pyversion}'"
|
14
50
|
fi
|
15
51
|
}
|
16
52
|
|
53
|
+
# === Create a new virtualenv ===
|
54
|
+
# Usage in .envrc:
|
55
|
+
# layout virtualenv <version> <name>
|
17
56
|
layout_virtualenv() {
|
18
57
|
local pyversion=$1
|
19
58
|
local pvenv=$2
|
59
|
+
pyenv local ${pyversion}
|
20
60
|
if [ -n "$(which pyenv-virtualenv)" ]; then
|
21
|
-
pyenv virtualenv
|
61
|
+
eval "$(pyenv virtualenv-init -)"
|
62
|
+
pyenv virtualenv --force --quiet ${pyversion} ${pvenv}
|
63
|
+
else
|
64
|
+
log_error "pyenv-virtualenv is not installed."
|
22
65
|
fi
|
23
66
|
}
|
24
67
|
|
68
|
+
# === Activate a virtualenv ===
|
69
|
+
# Note that pyenv-virtualenv uses 'python -m venv' if it is
|
70
|
+
# available (CPython 3.3 and newer) and 'virtualenv' otherwise
|
71
|
+
# Usage in .envrc:
|
72
|
+
# layout activate <name>
|
25
73
|
layout_activate() {
|
26
74
|
if [ -n "$(which pyenv)" ]; then
|
27
75
|
local pyenvprefix=$(pyenv prefix)
|
28
76
|
local pyversion=$(pyenv version-name)
|
29
77
|
local pvenv="$1"
|
30
|
-
|
78
|
+
# Below initialization is necessary to recall ;(
|
79
|
+
|
80
|
+
pyenv activate ${pvenv}
|
31
81
|
fi
|
32
|
-
}
|
82
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falkorlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien Varrette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "~>"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '10.1'
|
19
|
+
version: 12.3.3
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "~>"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '10.1'
|
26
|
+
version: 12.3.3
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: git_remote_branch
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -286,16 +280,16 @@ dependencies:
|
|
286
280
|
name: yard
|
287
281
|
requirement: !ruby/object:Gem::Requirement
|
288
282
|
requirements:
|
289
|
-
- - "
|
283
|
+
- - ">="
|
290
284
|
- !ruby/object:Gem::Version
|
291
|
-
version: 0.9.
|
285
|
+
version: 0.9.20
|
292
286
|
type: :development
|
293
287
|
prerelease: false
|
294
288
|
version_requirements: !ruby/object:Gem::Requirement
|
295
289
|
requirements:
|
296
|
-
- - "
|
290
|
+
- - ">="
|
297
291
|
- !ruby/object:Gem::Version
|
298
|
-
version: 0.9.
|
292
|
+
version: 0.9.20
|
299
293
|
- !ruby/object:Gem::Dependency
|
300
294
|
name: rubocop
|
301
295
|
requirement: !ruby/object:Gem::Requirement
|
@@ -582,7 +576,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
582
576
|
- !ruby/object:Gem::Version
|
583
577
|
version: '0'
|
584
578
|
requirements: []
|
585
|
-
|
579
|
+
rubyforge_project:
|
580
|
+
rubygems_version: 2.7.7
|
586
581
|
signing_key:
|
587
582
|
specification_version: 4
|
588
583
|
summary: Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap}
|