falkorlib 0.7.11 → 0.7.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76ac30acb34753aee392761a3d3d3bb779a0e40e
4
- data.tar.gz: 0fbb0c3f20f1ac99e8e070a3e4eafadf2606f044
3
+ metadata.gz: 1241d0b0ac6c35f26b8bc4c6cd4590f87da72adc
4
+ data.tar.gz: 42b0b755cf2d606c68f2f43b3059111842eeac4c
5
5
  SHA512:
6
- metadata.gz: 7dc680e984085557b1ef548c755f3362a4095c50408548d67d9e0d55b578347b31611cb95baecd3d79936d2174908abb1cff9c436d2d582b7e66ff518c02bfa1
7
- data.tar.gz: 4ec409045636b70f04d067b13bea17cfddfda02f7c5fc89f1aa520f135b17a85717ff766a79306730aa6a8a71417b1047b0277ce3df6d5c1f44a4e58ce1a914f
6
+ metadata.gz: 0c3b9749fe46d00311ec2b88d75d93e4f29ce546804902dfa78f021f4c39b8c807b16b05dcb7028600d32b4be8b11d47ff935b460cf441e694311d346d80cf87
7
+ data.tar.gz: d7cbee49ac0992c9ab5a2148a6e6fa2228eb11eb9fef52f58ae3924c4238028b0890aa02377a17119185c9d3e2b0d7eef3f6e6b4916787028705d1385512586d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.7.11)
4
+ falkorlib (0.7.13)
5
5
  activesupport (~> 4.0)
6
6
  artii (>= 2.1)
7
7
  awesome_print (~> 1.2)
@@ -1,7 +1,7 @@
1
1
  #compdef falkor
2
2
  ########################################################################################
3
3
  # -*- mode:sh; -*-
4
- # Time-stamp: <Tue 2017-04-04 11:43 svarrette>
4
+ # Time-stamp: <Fri 2018-04-27 15:36 svarrette>
5
5
  #
6
6
  # ZSH completion for [FalkorLib](https://github.com/Falkor/falkorlib)
7
7
  #
@@ -46,6 +46,7 @@ _falkor()
46
46
  'mkdocs:Initialize mkdocs for the current project'
47
47
  'motd:bootstrap a Message of the Day (motd) file'
48
48
  'new:Initialize the directory PATH with one of Falkors template(s)'
49
+ 'vagrant:Initialize vagrant in the current project'
49
50
  'version:Prints the FalkorLib version information'
50
51
  )
51
52
 
@@ -82,6 +83,8 @@ _falkor()
82
83
  __falkor_motd && ret=0 ;;
83
84
  (new)
84
85
  __falkor_new && ret=0 ;;
86
+ (vagrant)
87
+ __falkor_vagrant && ret=0 ;;
85
88
  (version|*)
86
89
  _nothing
87
90
  ;;
@@ -279,6 +282,15 @@ __falkor_motd() {
279
282
  '*:directory:_files -/'
280
283
  }
281
284
 
285
+ ##################
286
+ __falkor_vagrant() {
287
+ local curcontext=$curcontext state line ret=1
288
+ declare -A opt_args
289
+
290
+ _arguments -C \
291
+ {--force,-f}'[Force generation]' \
292
+ '*:directory:_directories'
293
+ }
282
294
 
283
295
 
284
296
 
@@ -19,7 +19,7 @@ module FalkorLib #:nodoc:
19
19
  # MAJOR: Defines the major version
20
20
  # MINOR: Defines the minor version
21
21
  # PATCH: Defines the patch version
22
- MAJOR, MINOR, PATCH = 0, 7, 11
22
+ MAJOR, MINOR, PATCH = 0, 7, 13
23
23
 
24
24
  module_function
25
25
 
@@ -1,6 +1,6 @@
1
1
  # -*- mode: ruby -*-
2
2
  # vi: set ft=ruby :
3
- # Time-stamp: <Fri 2018-04-27 15:16 svarrette>
3
+ # Time-stamp: <Fri 2018-04-27 15:36 svarrette>
4
4
  ###########################################################################################
5
5
  # __ __ _ __ _ _
6
6
  # \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ / _(_) | ___
@@ -132,12 +132,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
132
132
  # network settings
133
133
  ipaddr = IPAddr.new network[:range]
134
134
  ip_range = ipaddr.to_range.to_a
135
- ip_index = {
136
- :frontend => 2,
137
- :controller => 11,
138
- :node => 101,
139
- :easybuild => 1,
140
- }
135
+ ip_index = 2
141
136
 
142
137
  # cosmetics for the post-up message
143
138
  __table = {
@@ -159,9 +154,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
159
154
 
160
155
  abort "Non-existing box OS '#{os}' for the VM '#{name}'" if settings[:boxes][os.to_sym].nil?
161
156
  abort "Empty IP address range" if ip_range.empty?
162
- abort "Unknown role '#{role}' for the VM '#{name}'" unless ip_index[role.to_sym]
163
- ip = ip_range[ ip_index[role.to_sym].to_i ].to_s
164
- ip_index[role.to_sym] += 1 # increment index for the next VM of this type
157
+ ip = ip_range[ ip_index.to_i ].to_s
158
+ ip_index += 1 # increment index for the next VM of this type
165
159
 
166
160
  config.vm.define "#{name}" do |c|
167
161
  c.vm.box = settings[:boxes][os.to_sym]
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
- # Time-stamp: <Fri 2018-04-27 11:57 svarrette>
2
+ # Time-stamp: <Fri 2018-04-27 15:53 svarrette>
3
3
  ###########################################################################################
4
4
  # __ __ _ ____ _ _
5
5
  # \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ | __ ) ___ ___ | |_ ___| |_ _ __ __ _ _ __
@@ -202,57 +202,6 @@ EOF
202
202
  EOF
203
203
  }
204
204
 
205
- setup_easybuild() {
206
- cat <<EOF > /etc/profile.d/easybuild.sh
207
- export EASYBUILD_PREFIX=\$HOME/.local/easybuild
208
- export GLOBAL_EASYBUILD_PREFIX=/opt/apps/
209
- export EASYBUILD_MODULES_TOOL=Lmod
210
- export EASYBUILD_MODULE_NAMING_SCHEME=CategorizedModuleNamingScheme
211
- # Use the below variable to run:
212
- # module use $LOCAL_MODULES
213
- # module load tools/EasyBuild
214
- export LOCAL_MODULES=\$EASYBUILD_PREFIX/modules/all
215
- export GLOBAL_MODULES=\$GLOBAL_EASYBUILD_PREFIX/modules/all
216
-
217
- alias ma="module avail"
218
- alias ml="module list"
219
- function mu(){
220
- module use \$GLOBAL_MODULES
221
- module use \$LOCAL_MODULES
222
- module load tools/EasyBuild
223
- }
224
-
225
- # Prepend directories holding eb file for this turorial to the robot path
226
- # See http://easybuild.readthedocs.io/en/latest/Using_the_EasyBuild_command_line.html?highlight=EASYBUILD_ROBOT#prepending-and-or-appending-to-the-default-robot-search-path
227
- # export EASYBUILD_ROBOT_PATHS=\$(find /vagrant/resources/ -name *.eb | xargs dirname | sort | uniq | xargs echo | tr ' ' ':'):
228
-
229
- alias global_eb='eb --installpath=\$GLOBAL_EASYBUILD_PREFIX'
230
-
231
- EOF
232
- pip install --upgrade pip
233
- pip install functools32
234
- if [ ! -f "${EB_INSTALL_SCRIPT}" ]; then
235
- curl -o ${EB_INSTALL_SCRIPT} ${EB_INSTALL_SCRIPT_URL}
236
- fi
237
-
238
- info 'Installing Easybuild'
239
- sudo -u vagrant EASYBUILD_MODULE_NAMING_SCHEME=CategorizedModuleNamingScheme python ${EB_INSTALL_SCRIPT} ~vagrant/.local/easybuild
240
- }
241
-
242
- setup_pyenv() {
243
- cat <<EOF > /etc/profile.d/pyenv.sh
244
- if [ -d "\$HOME/.pyenv" ]; then
245
- export PATH="\$HOME/.pyenv/bin:\$PATH"
246
- eval "\$(pyenv init -)"
247
- eval "\$(pyenv virtualenv-init -)"
248
- fi
249
- EOF
250
- if [ ! -h "/home/vagrant/.config/direnv" ]; then
251
- sudo -u vagrant mkdir -p /home/vagrant/.config
252
- sudo -u vagrant ln -sf /vagrant/config/direnv /home/vagrant/.config/direnv
253
- fi
254
- }
255
-
256
205
 
257
206
  ######################################################################################
258
207
  [ $UID -gt 0 ] && error "You must be root to execute this script (current uid: $UID)"
@@ -284,5 +233,3 @@ esac
284
233
 
285
234
  setup_dotfiles
286
235
  setup_motd
287
- setup_easybuild
288
- setup_pyenv
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falkorlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.11
4
+ version: 0.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette