falkorlib 0.7.4 → 0.7.5

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: 3ad3f550a62d9dfd5586fd354d7dc138f1a2a664
4
- data.tar.gz: 43e21b29da17d2eac2ec84a87c83f78ff9a1b5a5
3
+ metadata.gz: adff66871b17ed77ecc427e9651899795ac53f94
4
+ data.tar.gz: 6d593b8cac74e841d51eee49cfea45fe952a2ca8
5
5
  SHA512:
6
- metadata.gz: 562114553dbf8047462ac6211db83ee23bac0a13cce15fa6b044aca149d0b7ff908eece17b7d2351c55c9fe55bbc3534dff68e7efd7d20b0c601ae57c872a44b
7
- data.tar.gz: 4a665f9359a2237b8a1e3571cdc8a29aa0ab59deb660bb969d16cf7158443bb12a4a7d12e3606628349cb9af5129498228bb46b3605efef5c775dc64160da917
6
+ metadata.gz: fccdaa61678f557f832814084898947f5392432730751a306d7a1a4aeb17d887d72759a905391ce8179102072f3a241a2ab6e718833aa2d906fedee61f32d84f
7
+ data.tar.gz: bad2d3d5ec3e772ca535a418c51eff0288eb7d2e5f8aeb73f7411dcf317d80da12e24df46333d38dd17bcb3971198fcf5803528d3b88f2718a41a753095343b5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.7.4)
4
+ falkorlib (0.7.5)
5
5
  activesupport (~> 4.0)
6
6
  artii (>= 2.1)
7
7
  awesome_print (~> 1.2)
@@ -45,7 +45,7 @@ GEM
45
45
  docile (1.1.5)
46
46
  ethon (0.9.1)
47
47
  ffi (>= 1.3.0)
48
- facter (2.4.6)
48
+ facter (2.4.6-universal-darwin)
49
49
  CFPropertyList (~> 2.2.6)
50
50
  faraday (0.10.0)
51
51
  multipart-post (>= 1.2, < 3)
@@ -63,7 +63,7 @@ GEM
63
63
  hashr (0.0.22)
64
64
  highline (1.7.8)
65
65
  i18n (0.7.0)
66
- json (1.8.3)
66
+ json (1.8.6)
67
67
  launchy (2.4.3)
68
68
  addressable (~> 2.3)
69
69
  license-generator (0.4.1)
@@ -71,7 +71,7 @@ GEM
71
71
  logger (1.2.8)
72
72
  method_source (0.8.2)
73
73
  minigit (0.0.4)
74
- minitest (5.9.1)
74
+ minitest (5.10.1)
75
75
  multi_json (1.12.1)
76
76
  multipart-post (2.0.0)
77
77
  net-http-persistent (2.9.4)
@@ -119,10 +119,10 @@ GEM
119
119
  slop (3.6.0)
120
120
  term-ansicolor (1.4.0)
121
121
  tins (~> 1.0)
122
- thor (0.19.1)
122
+ thor (0.19.4)
123
123
  thor-zsh_completion (0.1.1)
124
124
  thread_safe (0.3.5)
125
- tins (1.12.0)
125
+ tins (1.13.0)
126
126
  travis (1.8.4)
127
127
  backports
128
128
  faraday (~> 0.9)
@@ -162,4 +162,4 @@ DEPENDENCIES
162
162
  yard (~> 0.8)
163
163
 
164
164
  BUNDLED WITH
165
- 1.13.6
165
+ 1.14.3
data/LICENCE.md CHANGED
@@ -1,22 +1,19 @@
1
- # The MIT Licence
1
+ Copyright (c) 2012-2017 S. Varrette <Sebastien.Varrette@uni.lu>
2
2
 
3
- Copyright (c) 2012 - Sebastien Varrette
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
4
9
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
12
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
data/README.md CHANGED
@@ -13,15 +13,15 @@
13
13
  | _| (_| | | < (_) | | | |___| | |_) |
14
14
  |_| \__,_|_|_|\_\___/|_| |_____|_|_.__/
15
15
 
16
-
17
- Copyright (c) 2012-2016 Sebastien Varrette <Sebastien.Varrette@uni.lu>
18
16
 
19
- Sebastien Varrette aka Falkor's Common library to share Ruby code and `{rake,cap}`
20
- tasks.
17
+ Copyright (c) 2012-2017 Sebastien Varrette <Sebastien.Varrette@uni.lu>
21
18
 
22
- * [MIT Licence](Licence.md)
23
- * [Official Gem site](https://rubygems.org/gems/falkorlib)
24
- * [GitHub Homepage](https://github.com/Falkor/falkorlib)
19
+ Sebastien Varrette aka Falkor's Common library to share Ruby code, `{rake,cap}`
20
+ tasks and project templates
21
+
22
+ * [MIT Licence](Licence.md)
23
+ * [Official Gem site](https://rubygems.org/gems/falkorlib)
24
+ * [GitHub Homepage](https://github.com/Falkor/falkorlib)
25
25
 
26
26
  ## Installation
27
27
 
@@ -29,7 +29,7 @@ You'll typically want to install FalkorLib using [Bundler](http://bundler.io/).
29
29
  To do this, simply add this line to your application's `Gemfile`:
30
30
 
31
31
  gem 'falkorlib'
32
-
32
+
33
33
  And then execute:
34
34
 
35
35
  $> bundle
@@ -39,89 +39,96 @@ Or install it yourself as:
39
39
  $> gem install falkorlib
40
40
 
41
41
  **Note** you probably wants to do the above within an isolated environment. See
42
- below for some explanation on this setup.
42
+ below for some explanation on this setup.
43
43
 
44
44
  ## Usage
45
45
 
46
46
  This library features two aspects
47
47
 
48
+ * a binary `falkor` I use daily to bootstrap and operate with the projects I'm
49
+ working one
50
+
48
51
  * A set of toolbox functions / components I'm using everywhere in my Ruby
49
- developments, more specifically a set of modules:
50
- * `FalkorLib::Common`: Recipe for all my toolbox and versatile Ruby functions
51
- I'm using everywhere.
52
+ developments, more specifically a set of modules:
53
+ - `FalkorLib::Common`: Recipe for all my toolbox and versatile Ruby functions
54
+ I'm using everywhere.
52
55
  You'll typically want to include the `FalkorLib::Common` module to bring the
53
- corresponding definitions into your scope. Example:
54
-
55
- require 'falkorlib'
56
- include FalkorLib::Common
57
-
58
- info 'exemple of information text'
59
- really_continue?
60
- run %{ echo 'this is an executed command' }
61
-
62
- Falkor.config.debug = true
63
- run %{ echo 'this is a simulated command that *will not* be executed' }
64
- error "that's an error text, let's exit with status code 1"all my toolbox printing functions I'm using everywhere
65
-
66
-
67
- * `FalkorLib::Config`: all configuration aspects, implemented using [configatron](https://github.com/Falkor/falkorlib). `FalkorLib.config` canbe used to customized the defaults settings, for instance by;
68
-
69
- FalkorLib.config do |c|
70
- c.debug = true
71
- end
72
-
56
+ corresponding definitions into your scope. Example:
57
+
58
+ ```ruby
59
+ require 'falkorlib'
60
+ include FalkorLib::Common
61
+
62
+ info 'exemple of information text'
63
+ really_continue?
64
+ run %{ echo 'this is an executed command' }
65
+
66
+ Falkor.config.debug = true
67
+ run %{ echo 'this is a simulated command that *will not* be executed' }
68
+ error "that's an error text, let's exit with status code 1"all my toolbox printing functions I'm using everywhere
69
+ ```
70
+
71
+ * `FalkorLib::Config`: all configuration aspects, implemented using [configatron](https://github.com/Falkor/falkorlib). `FalkorLib.config` canbe used to customized the defaults settings, for instance by;
72
+
73
+ ```ruby
74
+ FalkorLib.config do |c|
75
+ c.debug = true
76
+ end
77
+ ```
78
+
73
79
  __IMPORTANT__: You can also place a special file `.falkorlib.yaml` to customize the
74
80
  FalkorLib settings. Most probably, you shall ignore this file in your
75
- `.gitignore` so you can place there your private settings (tokens etc.)
76
-
77
- * `FalkorLib::Git`: all [git](http://git-scm.com/) operations
78
- * `FalkorLib::GitFlow`: all [git-flow](http://nvie.com/posts/a-successful-git-branching-model/) operations
79
- * `FalkorLib::Version`: for the [semantic versioning](http://semver.org/)
80
- management of your project.
81
- * `FalkorLib::Puppet`: for all [puppet](http://puppetlabs.com) operations
81
+ `.gitignore` so you can place there your private settings (tokens etc.)
82
+
83
+ - `FalkorLib::Git`: all [git](http://git-scm.com/) operations
84
+ - `FalkorLib::GitFlow`: all [git-flow](http://nvie.com/posts/a-successful-git-branching-model/) operations
85
+ - `FalkorLib::Version`: for the [semantic versioning](http://semver.org/) management of your project.
86
+ - `FalkorLib::Puppet`: for all [puppet](http://puppetlabs.com) operations
87
+ - `FalkorLib::Bootstrap`: for all project bootstrapping
88
+
82
89
 
83
90
  * Some [rake](https://github.com/jimweirich/rake) tasks to facilitate common operations.
84
91
  In general you can simply embedded my tasks by adding the following header in your `Rakefile`:
85
-
92
+
86
93
  # In Rakefile
87
94
  require "falkorlib"
88
-
89
- ## Place-holder to customize the configuration of the <object> tasks,
95
+
96
+ ## Place-holder to customize the configuration of the <object> tasks,
90
97
  ## Typically by altering FalkorLib.config.<object>
91
-
92
- require "falkorlib/tasks/<object>" # OR require "falkorlib/<object>_tasks"
93
-
98
+
99
+ require "falkorlib/tasks/<object>" # OR require "falkorlib/<object>_tasks"
100
+
94
101
  ### `FalkorLib` Ruby Modules / Classes Documentation
95
102
 
96
- [Online documentation](https://rubygems.org/gems/falkorlib) is a available.
97
- Yet to get the latest version, you might want to run
103
+ [Online documentation](https://rubygems.org/gems/falkorlib) is a available.
104
+ Yet to get the latest version, you might want to run
98
105
 
99
106
  $> rake yard:doc
100
107
 
101
- This will generate the documentation in `doc/api/` folder.
108
+ This will generate the documentation in `doc/api/` folder.
102
109
 
103
- Statistics on the documentation generation (in particular *non*-documented components) can be obtained by
110
+ Statistics on the documentation generation (in particular *non*-documented components) can be obtained by
104
111
 
105
- $> rake yard:stats
112
+ $> rake yard:stats
106
113
 
107
114
  ### Overview of the implemented Rake tasks
108
115
 
109
116
  You can find the list of implemented Rake tasks (detailed below) in the
110
- `lib/falkorlib/*_tasks.rb` files
117
+ `lib/falkorlib/*_tasks.rb` files
111
118
 
112
119
  As mentioned above, for a given task object `<obj>` (*git* tasks for instance as
113
120
  proposed in `lib/falkorlib/git_tasks.rb`), you can specialize the corresponding
114
121
  configuration by using the block construction of `FalkorLib.config do |c|
115
- ... end` **before** requiring the task file:
122
+ ... end` **before** requiring the task file:
116
123
 
117
124
  # In Rakefile
118
125
  require 'falkorlib'
119
-
126
+
120
127
  # Configuration for the 'toto' tasks
121
128
  FalkorLib.config.toto do |c|
122
129
  toto.foo = bar # see `rake falkorlib:conf` to print the current configuration of FalkorLib
123
- end
124
-
130
+ end
131
+
125
132
  require "falkorlib/tasks/toto" # OR require "falkorlib/toto_tasks"
126
133
 
127
134
 
@@ -129,13 +136,13 @@ configuration by using the block construction of `FalkorLib.config do |c|
129
136
 
130
137
  FalkorLib is meant to facilitate many common operations performed within your
131
138
  projects and piloted via a
132
- [Rakefile](https://github.com/jimweirich/rake/blob/master/doc/rakefile.rdoc).
139
+ [Rakefile](https://github.com/jimweirich/rake/blob/master/doc/rakefile.rdoc).
133
140
 
134
- ### Bootstrapping the project
141
+ ### Bootstrapping the project
135
142
 
136
143
  Within your fresh new directory that will hold your project data
137
144
  (`/path/to/myproject` for instance), you'll need to bootstrap the following
138
- files:
145
+ files:
139
146
 
140
147
  * `.ruby-{version,gemset}`: [RVM](https://rvm.io/) configuration, use the name of the
141
148
  project as [gemset](https://rvm.io/gemsets) name
@@ -147,7 +154,7 @@ init` that contain _at least_ the line `gem 'falkorlib'`
147
154
 
148
155
  __Assuming you are in your project directory `/path/to/myproject`__ and that RVM
149
156
  is installed on your system, you can bootstrap the above file by copy/pasting
150
- all the following command-lines in your terminal:
157
+ all the following command-lines in your terminal:
151
158
 
152
159
  ```
153
160
  bash <(curl --silent https://raw.githubusercontent.com/Falkor/falkorlib/devel/binscripts/bootstrap.sh)
@@ -158,17 +165,17 @@ before running the above command.
158
165
 
159
166
  Alternatively, assuming you have installed the `falkorlib` gem, you can create a
160
167
  minimal `Rakefile` (containing `require 'falkorlib'`) and run `rake bootstrap:rvm`.
161
-
162
- You can now complete your `Rakefile` depending on the tasks you wish to see.
168
+
169
+ You can now complete your `Rakefile` depending on the tasks you wish to see.
163
170
  Below is a detailed overview of the implemented rake tasks in `FalkorLib`.
164
171
 
165
172
  ### Git[Flow] and Versioning Management
166
173
 
167
174
  Nearly all my projects are organized under [Git](http://git-scm.com/) using the
168
175
  [gitflow](http://nvie.com/posts/a-successful-git-branching-model/) branching
169
- model.
176
+ model.
170
177
  Thus I create a flexible framework to pilot the interaction with Git, git-flow,
171
- git submodules, git subtrees etc.
178
+ git submodules, git subtrees etc.
172
179
 
173
180
  Typical [Minimal] setup of your Rakefile, hopefully self-speaking
174
181
 
@@ -177,7 +184,7 @@ require 'falkorlib'
177
184
 
178
185
  ## placeholder for custom configuration of FalkorLib.config.git and
179
186
  ## FalkorLib.config.gitflow
180
-
187
+
181
188
  # Git[Flow] and Versioning management
182
189
  require "falkorlib/tasks/git" # OR require "falkorlib/git_tasks"
183
190
  ```
@@ -203,7 +210,7 @@ Configuration aspects for git-flow are stored in the
203
210
  * __[Default Configuration for Gitflow](http://rubydoc.info/gems/falkorlib/FalkorLib/Config/GitFlow)__
204
211
 
205
212
  You can easily customize these default settings in your Rakefile, __before__ the
206
- `require "falkorlib/tasks/git"` lines. Just proceed with ruby magic as follows:
213
+ `require "falkorlib/tasks/git"` lines. Just proceed with ruby magic as follows:
207
214
 
208
215
  ```
209
216
  require 'falkorlib'
@@ -221,7 +228,7 @@ require "falkorlib/tasks/git"
221
228
 
222
229
  Now you can run `rake git:flow:init` to bootstrap your repository with git-flow.
223
230
 
224
- Running `rake -T` shall now raises many new tasks linked to git-flow operations:
231
+ Running `rake -T` shall now raises many new tasks linked to git-flow operations:
225
232
 
226
233
  ```
227
234
  $> rake -T
@@ -244,9 +251,9 @@ So you can now:
244
251
  * Start/finish features with `rake git:feature:{start,finish}`
245
252
  * perform basic git operation with `rake git:{fetch,push,up}`
246
253
  * initiate semantic versioning of the project (typically with a `VERSION` file
247
- at the root of your project) with `rake version:bump:{patch,minor,patch}`.
248
- Note that these tasks make use of the git flow `release` feature.
249
-
254
+ at the root of your project) with `rake version:bump:{patch,minor,patch}`.
255
+ Note that these tasks make use of the git flow `release` feature.
256
+
250
257
  Concluding a release is performed by `rake version:release`
251
258
 
252
259
  ### Git submodules configuration
@@ -258,7 +265,7 @@ Configuration aspects for git are stored in the
258
265
 
259
266
  In particular, you can add as many
260
267
  [Git submodules](http://git-scm.com/book/en/Git-Tools-Submodules) as you wish as
261
- follows:
268
+ follows:
262
269
 
263
270
  ```
264
271
  require 'falkorlib'
@@ -268,7 +275,7 @@ FalkorLib.config.git do |c|
268
275
  c[:submodules] = {
269
276
  'veewee' => {
270
277
  :url => 'https://github.com/jedi4ever/veewee.git',
271
- :branch => 'master' # not mandatory if 'master' actually
278
+ :branch => 'master' # not mandatory if 'master' actually
272
279
  }
273
280
  }
274
281
  end
@@ -277,12 +284,12 @@ require "falkorlib/tasks/git"
277
284
  ```
278
285
 
279
286
  You can now bootstrap the configured sub-module(s) by running `rake
280
- git:submodules:init`.
287
+ git:submodules:init`.
281
288
  In the above scenario, the Git sub-module `veewee` will be initiated in
282
289
  `.submodules/veewee` -- you can change the root submodules directory by altering
283
290
  `FalkorLib.config.git[:submodulesdir]` value (see [defaults](http://rubydoc.info/gems/falkorlib/FalkorLib/Config/Git)).
284
291
 
285
- Now you will have new rake tasks available:
292
+ Now you will have new rake tasks available:
286
293
 
287
294
  $> rake -T
288
295
  [...]
@@ -296,7 +303,7 @@ Now you will have new rake tasks available:
296
303
 
297
304
  You can also add as many
298
305
  [Git subtrees](http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/)
299
- as you wish -- as follows:
306
+ as you wish -- as follows:
300
307
 
301
308
  ```
302
309
  require 'falkorlib'
@@ -319,11 +326,11 @@ require "falkorlib/tasks/git"
319
326
  ```
320
327
 
321
328
  You can now bootstrap the configured sub-tree(s) by running `rake
322
- git:subtrees:init`.
329
+ git:subtrees:init`.
323
330
  In the above scenario, the Git sub-trees will be initiated in the
324
331
  sub-directories `easybuild/easyblocks` and `easybuild/easyconfigs`.
325
332
 
326
- Now you will have new rake tasks available:
333
+ Now you will have new rake tasks available:
327
334
 
328
335
  ```
329
336
  [...]
@@ -336,7 +343,7 @@ rake git:subtrees:up # Pull the latest changes from the remote to the l
336
343
  ### Gem Management
337
344
 
338
345
  See `lib/falkorlib/tasks/gem.rake`: you just have to add the following line to
339
- your Rakefile:
346
+ your Rakefile:
340
347
 
341
348
  ```
342
349
  require "falkorlib/tasks/gem" # OR require "falkorlib/gem_tasks"
@@ -377,10 +384,10 @@ rake version:release # Finalize the release of a given bumped version
377
384
  ```
378
385
  If your gem is coupled with [Code Climate](https://codeclimate.com/), you might
379
386
  wish to set the code climate token to report the test coverage for you gem (see
380
- [these instructions](http://docs.codeclimate.com/article/104-how-do-i-set-up-test-coverage-for-one-of-my-repos)).
387
+ [these instructions](http://docs.codeclimate.com/article/104-how-do-i-set-up-test-coverage-for-one-of-my-repos)).
381
388
  To avoid exposing this token in your (potentially public) repository, simply
382
389
  set that token in `.falkorlib.yaml` (ignored you shall ignore in your
383
- `.gitignore`) as follows:
390
+ `.gitignore`) as follows:
384
391
 
385
392
  ```
386
393
  :tokens:
@@ -390,58 +397,58 @@ set that token in `.falkorlib.yaml` (ignored you shall ignore in your
390
397
  ## FalkorLib Developments / Implementation details
391
398
 
392
399
  If you want to contribute to the code, you shall be aware of the way I organized
393
- this gem and its implementation details.
400
+ this gem and its implementation details.
394
401
 
395
402
  ### [RVM](https://rvm.io/) setup
396
403
 
397
- Get the source of this library by cloning the repository as follows:
404
+ Get the source of this library by cloning the repository as follows:
398
405
 
399
406
  $> git clone git://github.com/Falkor/falkorlib.git
400
407
 
401
408
  You'll end in the `devel` branch. The precise branching model is explained in
402
- the sequel.
409
+ the sequel.
403
410
 
404
411
  If you use [RVM](http://beginrescueend.com/), you perhaps wants to create a
405
412
  separate gemset so that we can create and install this gem in a clean
406
- environment.
413
+ environment.
407
414
 
408
415
  * create a file `.ruby-gemset` containing the name of the wished Gemset
409
416
  (`falkorlib` for instance)
410
417
  * create a file `.ruby-version` containing the wished version of Ruby (`2.1.0`
411
418
  for instance - check on [Travis](https://travis-ci.org/Falkor/falkorlib) for
412
419
  the supported version)
413
-
420
+
414
421
  To load these files, you have to re-enter the directory where you cloned
415
- `falkorlib` and placed the above files
422
+ `falkorlib` and placed the above files
416
423
 
417
424
  To do that, proceed as follows:
418
425
 
419
426
  $> rvm gemset create falkorlib
420
427
  $> rvm gemset use falkorlib
421
428
 
422
- Install bundler if it's not yet done:
429
+ Install bundler if it's not yet done:
423
430
 
424
431
  $> gem install builder
425
432
 
426
- Then install the required dependent gems as follows:
433
+ Then install the required dependent gems as follows:
427
434
 
428
- $> bundle install
435
+ $> bundle install
429
436
 
430
437
 
431
438
  ### Git Branching Model
432
439
 
433
- The Git branching model for this repository follows the guidelines of [gitflow](http://nvie.com/posts/a-successful-git-branching-model/).
434
- In particular, the central repository holds two main branches with an infinite lifetime:
440
+ The Git branching model for this repository follows the guidelines of [gitflow](http://nvie.com/posts/a-successful-git-branching-model/).
441
+ In particular, the central repository holds two main branches with an infinite lifetime:
435
442
 
436
443
  * `production`: the branch holding tags of the successive releases of this tutorial
437
- * `devel`: the main branch where the sources are in a state with the latest delivered development changes for the next release. This is the *default* branch you get when you clone the repo, and the one on which developments will take places.
444
+ * `devel`: the main branch where the sources are in a state with the latest delivered development changes for the next release. This is the *default* branch you get when you clone the repo, and the one on which developments will take places.
438
445
 
439
- You should therefore install [git-flow](https://github.com/nvie/gitflow), and probably also its associated [bash completion](https://github.com/bobthecow/git-flow-completion).
440
- Also, to facilitate the tracking of remote branches, you probably wants to install [grb](https://github.com/webmat/git_remote_branch) (typically via ruby gems).
446
+ You should therefore install [git-flow](https://github.com/nvie/gitflow), and probably also its associated [bash completion](https://github.com/bobthecow/git-flow-completion).
447
+ Also, to facilitate the tracking of remote branches, you probably wants to install [grb](https://github.com/webmat/git_remote_branch) (typically via ruby gems).
441
448
 
442
449
  Then, to make your local copy of the repository ready to use my git-flow workflow, you have to run the following commands once you cloned it for the first time:
443
450
 
444
- $> rake setup
451
+ $> rake setup
445
452
 
446
453
  ### Working in a separate project
447
454
 
@@ -456,7 +463,7 @@ To illustrate the usage of the library as a regular user would do, you are advis
456
463
  └── test
457
464
  └── tester.rb # in a subdirectory on purpose
458
465
 
459
- $> cat cat Gemfile
466
+ $> cat cat Gemfile
460
467
  source "https://rubygems.org"
461
468
  gem 'falkorlib' #, :path => '~/git/github.com/Falkor/falkorlib' # or whichever path that works for you
462
469
 
@@ -470,8 +477,8 @@ I try to define a set of unitary tests to validate the different function of my
470
477
  You can run these tests by issuing:
471
478
 
472
479
  $> rake rspec
473
-
474
- By conventions, you will find all the currently implemented tests in the `spec/` directory, in files having the `_spec.rb` suffix. This is expected from the `rspec` task of the Rakefile (see `lib/falkorlib/tasks/rspec.rake`) for details.
480
+
481
+ By conventions, you will find all the currently implemented tests in the `spec/` directory, in files having the `_spec.rb` suffix. This is expected from the `rspec` task of the Rakefile (see `lib/falkorlib/tasks/rspec.rake`) for details.
475
482
 
476
483
 
477
484
  **Important** Kindly stick to this convention, and feature tests for all definitions/classes/modules you might want to add to `FalkorLib`.
@@ -489,7 +496,7 @@ By conventions, you will find all the currently implemented tests in the `spec/`
489
496
 
490
497
  By default, the gem take all files included in the `.Manifest.txt` file on the
491
498
  root of the project. Entries of the manifest file are interpreted as `Dir[...]`
492
- patterns so that lazy people may use wilcards like `lib/**/*`
499
+ patterns so that lazy people may use wilcards like `lib/**/*`
493
500
 
494
501
  __IMPORTANT__ If you want to add a file/directory to this gem, remember to add
495
502
  the associated entry into the manifest file `.Manifest.txt`
@@ -497,9 +504,9 @@ the associated entry into the manifest file `.Manifest.txt`
497
504
 
498
505
  ## Resources
499
506
 
500
- ### Git
507
+ ### Git
501
508
 
502
- You should become familiar (if not yet) with Git. Consider these resources:
509
+ You should become familiar (if not yet) with Git. Consider these resources:
503
510
 
504
511
  * [Git book](http://book.git-scm.com/index.html)
505
512
  * [Github:help](http://help.github.com/mac-set-up-git/)
data/completion/_falkor CHANGED
@@ -1,7 +1,7 @@
1
1
  #compdef falkor
2
2
  ########################################################################################
3
3
  # -*- mode:sh; -*-
4
- # Time-stamp: <Mon 2017-01-16 23:21 svarrette>
4
+ # Time-stamp: <Mon 2017-01-16 23:55 svarrette>
5
5
  #
6
6
  # ZSH completion for [FalkorLib](https://github.com/Falkor/falkorlib)
7
7
  #
@@ -38,12 +38,13 @@ _falkor()
38
38
  {
39
39
  local -a _falkor_cmds
40
40
  _falkor_cmds=(
41
+ 'commands:Lists all available commands'
41
42
  'config:Print the current configuration of FalkorLib'
42
43
  'help:Describe available commands or one specific command'
43
44
  'init:Bootstrap a Git Repository the falkor way'
44
45
  'link:Initialize a special symlink (.root, .makefile.d etc.)'
45
- 'motd:bootstrap a Message of the Day (motd) file'
46
46
  'mkdocs:Initialize mkdocs for the current project'
47
+ 'motd:bootstrap a Message of the Day (motd) file'
47
48
  'new:Initialize the directory PATH with one of Falkors template(s)'
48
49
  'version:Prints the FalkorLib version information'
49
50
  )
@@ -255,8 +256,8 @@ __falkor_mkdocs() {
255
256
  declare -A opt_args
256
257
 
257
258
  _arguments -C \
258
- {--force,-f}'[Force generation]'
259
- '*:directory:_files -/'
259
+ {--force,-f}'[Force generation]' \
260
+ '*:directory:_directories'
260
261
  }
261
262
 
262
263
 
data/falkorlib.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.version = FalkorLib::Version.to_s #$version
9
9
  s.date = Time.now.strftime('%Y-%m-%d')
10
10
  s.summary = "Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap} tasks"
11
- s.description = "This is my personal library I use to share the Ruby tidbits and Rake tasks I made it for my various projects, and also to bootstrap easily several element of my daily workflow (new git repository, new beamer slides etc.).\nThis is also my first gem so any comments on the code/organization are welcome, I'm a newbie in this domain. \nNote that I used [Noe](https://github.com/blambeau/noe) to bootstrap this project and get a fully documented environment."
11
+ s.description = "This is my personal library I use to share the Ruby tidbits and Rake tasks I made it for my various projects, and also to bootstrap easily several element of my daily workflow (new git repository, new beamer slides etc.).\n"
12
12
 
13
13
  s.homepage = "https://github.com/Falkor/falkorlib"
14
14
  s.licenses = 'MIT'
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Mon 2017-01-16 23:17 svarrette>
3
+ # Time-stamp: <Mon 2017-01-16 23:52 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require 'thor'
@@ -70,9 +70,9 @@ By default, NAME is '.' meaning that the repository will be initialized in the c
70
70
  ###### articles ######
71
71
  method_option :name, :aliases => '-n', :desc => 'Name of the LaTeX project'
72
72
  method_option :dir, :aliases => '-d', :desc => 'Project directory (relative to the git root directory)'
73
- method_option :ieee, :type => :boolean, :default => :false, :desc => 'Use the IEEEtran style for IEEE conference'
74
- method_option :llncs, :type => :boolean, :default => :false, :desc => 'Use the Springer LNCS style', :aliases => '--lncs'
75
- method_option :acm, :type => :boolean, :default => :false, :desc => 'Use the ACM style'
73
+ method_option :ieee, :type => :boolean, :default => false, :desc => 'Use the IEEEtran style for IEEE conference'
74
+ method_option :llncs, :type => :boolean, :default => false, :desc => 'Use the Springer LNCS style', :aliases => '--lncs'
75
+ method_option :acm, :type => :boolean, :default => false, :desc => 'Use the ACM style'
76
76
  # ......................................
77
77
  desc "article [options]", "Bootstrap a LaTeX Article"
78
78
  #___________________
@@ -242,6 +242,29 @@ module FalkorLib #:nodoc:
242
242
  raw_l[Integer(answer)]
243
243
  end # select_from
244
244
 
245
+ ## Display a indexed list to select multiple indexes
246
+ def select_multiple_from(list, text = 'Select the index', default_idx = 1, raw_list = list)
247
+ error "list and raw_list differs in size" if list.size != raw_list.size
248
+ l = list
249
+ raw_l = raw_list
250
+ if list.is_a?(Array)
251
+ l = raw_l = { 0 => 'Exit', 1 => 'End of selection' }
252
+ list.each_with_index do |e, idx|
253
+ l[idx + 2] = e
254
+ raw_l[idx + 2] = raw_list[idx]
255
+ end
256
+ end
257
+ puts l.to_yaml
258
+ choices = Array.new
259
+ answer = 0
260
+ begin
261
+ choices.push(raw_l[Integer(answer)]) if Integer(answer) > 1
262
+ answer = ask("=> #{text}", default_idx.to_s)
263
+ raise SystemExit, 'exiting selection' if answer == '0'
264
+ raise RangeError, 'Undefined index' if Integer(answer) >= l.length
265
+ end while Integer(answer) != 1
266
+ choices
267
+ end # select_multiple_from
245
268
 
246
269
  ###############################
247
270
  ### YAML File loading/store ###
@@ -0,0 +1 @@
1
+ lib/falkorlib/tasks/../gem_tasks.rb
@@ -0,0 +1 @@
1
+ lib/falkorlib/tasks/../git_tasks.rb
@@ -129,7 +129,7 @@ namespace :version do
129
129
  expected_branch = FalkorLib.config[:gitflow][:prefix][:release] + version
130
130
  error "You are not in the '#{expected_branch}' branch but in the '#{branch}' one. May be you forgot to run 'rake version:bump:{patch,minor,major}' first" if branch != expected_branch
131
131
  info "=> Finalize the release of the version '#{version}' into the '#{FalkorLib.config[:gitflow][:branches][:master]}' branch/environment"
132
- o = FalkorLib::GitFlow.finish('release', version, Dir.pwd, '-s')
132
+ o = FalkorLib::GitFlow.finish('release', version, Dir.pwd) #, '-s')
133
133
  error "Git flow release process failed" unless o.zero?
134
134
  if FalkorLib::Git.remotes?
135
135
  info("=> about to update remote tracked branches")
@@ -0,0 +1 @@
1
+ lib/falkorlib/tasks/../puppet_tasks.rb
@@ -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, 4
22
+ MAJOR, MINOR, PATCH = 0, 7, 5
23
23
 
24
24
  module_function
25
25
 
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.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-16 00:00:00.000000000 Z
11
+ date: 2017-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -380,12 +380,8 @@ dependencies:
380
380
  - - "~>"
381
381
  - !ruby/object:Gem::Version
382
382
  version: '0'
383
- description: "This is my personal library I use to share the Ruby tidbits and Rake
384
- tasks I made it for my various projects, and also to bootstrap easily several element
385
- of my daily workflow (new git repository, new beamer slides etc.).\nThis is also
386
- my first gem so any comments on the code/organization are welcome, I'm a newbie
387
- in this domain. \nNote that I used [Noe](https://github.com/blambeau/noe) to bootstrap
388
- this project and get a fully documented environment."
383
+ description: |
384
+ This is my personal library I use to share the Ruby tidbits and Rake tasks I made it for my various projects, and also to bootstrap easily several element of my daily workflow (new git repository, new beamer slides etc.).
389
385
  email:
390
386
  - Sebastien.Varrette@uni.lu
391
387
  executables:
@@ -573,7 +569,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
573
569
  version: '0'
574
570
  requirements: []
575
571
  rubyforge_project:
576
- rubygems_version: 2.4.8
572
+ rubygems_version: 2.6.10
577
573
  signing_key:
578
574
  specification_version: 4
579
575
  summary: Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap}
@@ -1,30 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- ################################################################################
3
- # Time-stamp: <Fri 2016-11-11 14:28 svarrette>
4
- ################################################################################
5
- #
6
- # FalkorLib rake tasks to pilot Gem operations
7
- #
8
-
9
- require 'rake'
10
- require 'falkorlib'
11
- require 'falkorlib/tasks'
12
-
13
- module FalkorLib #:nodoc:
14
- # Rake tasks to pilot Gem operations
15
- class GemTasks
16
-
17
- include Rake::DSL if defined? Rake::DSL
18
-
19
- # Install the gem tasks for Rake
20
- def install_tasks
21
- load 'falkorlib/tasks/gem.rake'
22
- load 'falkorlib/tasks/yard.rake'
23
- load 'falkorlib/tasks/rspec.rake'
24
- end
25
-
26
- end # class FalkorLib::GemTasks
27
- end # module FalkorLib
28
-
29
- # Now install them ;)
30
- FalkorLib::GemTasks.new.install_tasks
@@ -1,52 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- ################################################################################
3
- # Time-stamp: <Fri 2016-11-11 14:29 svarrette>
4
- ################################################################################
5
- #
6
- # FalkorLib rake tasks to pilot Git [flow] operations
7
- #
8
-
9
- require 'rake'
10
- require 'falkorlib'
11
- require 'falkorlib/tasks'
12
-
13
- module FalkorLib #:nodoc:
14
- # Rake tasks to pilot Git operations
15
- class GitTasks
16
-
17
- include Rake::DSL if defined? Rake::DSL
18
-
19
- # Install the git[flow] tasks for Rake
20
- def install_tasks
21
- load 'falkorlib/tasks/git.rake'
22
- load 'falkorlib/tasks/gitflow.rake'
23
- end
24
-
25
- end # class FalkorLib::GitTasks
26
- end # module FalkorLib
27
-
28
-
29
- if FalkorLib::Git.init?
30
- # Now install them ;)
31
- FalkorLib::GitTasks.new.install_tasks
32
- else
33
- warn "Git is not initialized for this directory."
34
- warn "==> consider running 'rake git[:flow]:init' to be able to access the regular git Rake tasks"
35
- #.....................
36
- namespace :git do
37
- ########### git:init ###########
38
- desc "Initialize Git repository"
39
- task :init do
40
- FalkorLib::Git.init
41
- end
42
-
43
- #.....................
44
- namespace :flow do
45
- ########### git:flow:init ###########
46
- desc "Initialize the Git-flow repository"
47
- task :init do
48
- FalkorLib::GitFlow.init
49
- end
50
- end # namespace git:flow
51
- end # namespace git
52
- end
@@ -1,27 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- ################################################################################
3
- # Time-stamp: <Fri 2016-11-11 14:45 svarrette>
4
- ################################################################################
5
- #
6
- # FalkorLib rake tasks to pilot Puppet operations
7
- #
8
-
9
- require 'rake'
10
- require 'falkorlib'
11
- require 'falkorlib/tasks'
12
-
13
- module FalkorLib #:nodoc:
14
- # Puppet tasks for Rake
15
- class PuppetTasks
16
-
17
- include Rake::DSL if defined? Rake::DSL
18
-
19
- # Install the puppet tasks for Rake
20
- def install_tasks
21
- load 'falkorlib/tasks/puppet_modules.rake'
22
- end
23
-
24
- end
25
- end
26
-
27
- FalkorLib::PuppetTasks.new.install_tasks