falkorlib 0.7.15 → 0.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/falkorlib/git/base.rb +2 -2
- data/lib/falkorlib/tasks/git.rb +11 -21
- data/lib/falkorlib/tasks/gitflow.rake +23 -4
- data/lib/falkorlib/tasks/rspec.rake +1 -0
- data/lib/falkorlib/version.rb +1 -1
- data/spec/falkorlib/git_spec.rb +3 -3
- data/templates/puppet/modules/Rakefile +1 -1
- data/templates/puppet/modules/metadata.json.erb +1 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5357864bd82cefc2a1c4f104374275a3ab7094c9
|
4
|
+
data.tar.gz: 00a2932ff2fe26c8d60b36a6573b506e8f682016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40c6b160ea3cea3ae23916c5273312805633134f4795f90c9d6c482dbde39836046196d1831e18a358e4d1bb4d37d7387fd17a470cae9138b2e873ad55fea65c
|
7
|
+
data.tar.gz: cef36b07f6538759a1973d1152b30349b393cb1da652ef785db092e254397098e676c2647d27b28680d563b8163664640b5055f8186625f77d83b7bace308936
|
data/Gemfile.lock
CHANGED
data/lib/falkorlib/git/base.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Thu 2018-10-04 08:07 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the main Git operations
|
6
6
|
#
|
@@ -156,7 +156,7 @@ module FalkorLib #:nodoc:
|
|
156
156
|
if (options[:list] || (key.is_a? Regexp) || (key =~ /\*/))
|
157
157
|
cg = MiniGit::Capturing.new(dir)
|
158
158
|
res = (cg.config :list => true).split("\n")
|
159
|
-
res.select! { |e| e.match(key) } unless key == '*'
|
159
|
+
res.select! { |e| e.match(/^#{key}/) } unless key == '*'
|
160
160
|
#res = res.map { |e| e.split('=') }.to_h if options[:hash]
|
161
161
|
res = Hash[ res.map { |e| e.split('=') } ] if options[:hash]
|
162
162
|
else
|
data/lib/falkorlib/tasks/git.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Wed 2018-10-03 21:57 svarrette>
|
4
4
|
################################################################################
|
5
5
|
#
|
6
6
|
# FalkorLib rake tasks to pilot Git [flow] operations
|
@@ -48,25 +48,15 @@ else
|
|
48
48
|
FalkorLib::GitFlow.init
|
49
49
|
end
|
50
50
|
end # namespace git:flow
|
51
|
-
|
52
|
-
if FalkorLib::GitFlow.init?
|
53
|
-
########### git:up ###########
|
54
|
-
desc "Update your local branches"
|
55
|
-
task :up do |t|
|
56
|
-
info "#{t.comment}"
|
57
|
-
FalkorLib::Git.fetch
|
58
|
-
branches = FalkorLib::Git.list_branch
|
59
|
-
#puts branches.to_yaml
|
60
|
-
unless FalkorLib::Git.dirty?
|
61
|
-
FalkorLib.config.gitflow[:branches].each do |t, br|
|
62
|
-
info "updating Git Flow #{t} branch '#{br}' with the 'origin' remote"
|
63
|
-
run %{ git checkout #{br} && git merge origin/#{br} }
|
64
|
-
end
|
65
|
-
run %{ git checkout #{branches[0]} } # Go back to the initial branch
|
66
|
-
else
|
67
|
-
warning "Unable to update -- your local repository copy is dirty"
|
68
|
-
end
|
69
|
-
end # task git:up
|
70
|
-
end
|
71
51
|
end # namespace git
|
72
52
|
end
|
53
|
+
|
54
|
+
########### up ###########
|
55
|
+
desc "upgrade your local branche(s)"
|
56
|
+
task :up do |t|
|
57
|
+
if FalkorLib::GitFlow.init?
|
58
|
+
Rake::Task['git:flow:up'].invoke
|
59
|
+
else
|
60
|
+
Rake::Task['git:up'].invoke
|
61
|
+
end
|
62
|
+
end # task up
|
@@ -1,6 +1,6 @@
|
|
1
1
|
################################################################################
|
2
2
|
# gitflow.rake - Special tasks for the management of Git [Flow] operations
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Wed 2018-10-03 16:00 svarrette>
|
4
4
|
#
|
5
5
|
# Copyright (c) 2014 Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
6
6
|
# http://varrette.gforge.uni.lu
|
@@ -27,6 +27,25 @@ namespace :git do
|
|
27
27
|
info t.comment
|
28
28
|
FalkorLib::GitFlow.init(git_root_dir)
|
29
29
|
end # task init
|
30
|
+
|
31
|
+
########### git:flow:up ###########
|
32
|
+
desc "Update your gitflow local branches"
|
33
|
+
task :up do |t|
|
34
|
+
info "#{t.comment}"
|
35
|
+
FalkorLib::Git.fetch
|
36
|
+
branches = FalkorLib::Git.list_branch
|
37
|
+
#puts branches.to_yaml
|
38
|
+
unless FalkorLib::Git.dirty?
|
39
|
+
FalkorLib.config.gitflow[:branches].each do |t, br|
|
40
|
+
info "updating Git Flow #{t} branch '#{br}' with the 'origin' remote"
|
41
|
+
run %{ git checkout #{br} && git merge origin/#{br} }
|
42
|
+
end
|
43
|
+
run %{ git checkout #{branches[0]} } # Go back to the initial branch
|
44
|
+
else
|
45
|
+
warning "Unable to update -- your local repository copy is dirty"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
30
49
|
end # namespace git::flow
|
31
50
|
|
32
51
|
#.....................
|
@@ -103,8 +122,8 @@ namespace :version do
|
|
103
122
|
if (current_branch == expected_branch)
|
104
123
|
FalkorLib::Versioning.set_version(release_version)
|
105
124
|
if (!FalkorLib.config[:versioning].nil?) &&
|
106
|
-
|
107
|
-
|
125
|
+
FalkorLib.config[:versioning][:type] == 'gem' &&
|
126
|
+
File.exist?(File.join(FalkorLib::Git.rootdir, 'Gemfile'))
|
108
127
|
info "Updating Gemfile information"
|
109
128
|
run %(
|
110
129
|
# Update cache info
|
@@ -144,7 +163,7 @@ namespace :version do
|
|
144
163
|
end
|
145
164
|
#info "Update the changelog"
|
146
165
|
if (!FalkorLib.config[:versioning].nil?) &&
|
147
|
-
|
166
|
+
FalkorLib.config[:versioning][:type] == 'gem'
|
148
167
|
warn "About to push the released new gem (version #{version}) to the gem server (rybygems.org)"
|
149
168
|
really_continue?
|
150
169
|
Rake::Task['gem:release'].invoke
|
data/lib/falkorlib/version.rb
CHANGED
data/spec/falkorlib/git_spec.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#########################################
|
3
3
|
# git_spec.rb
|
4
4
|
# @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
5
|
-
# Time-stamp: <
|
5
|
+
# Time-stamp: <Thu 2018-10-04 08:05 svarrette>
|
6
6
|
#
|
7
7
|
# @description Check the Git operations
|
8
8
|
#
|
@@ -228,11 +228,11 @@ describe FalkorLib::Git do
|
|
228
228
|
end
|
229
229
|
|
230
230
|
it "#config -- check pattern 2" do
|
231
|
-
c = FalkorLib::Git.config(
|
231
|
+
c = FalkorLib::Git.config(/user.*name*=/, dir)
|
232
232
|
expect(c).not_to be_empty
|
233
233
|
t = c.is_a? Array
|
234
234
|
expect(t).to be true
|
235
|
-
expect(c.length).to eq(1)
|
235
|
+
expect(c.length).to eq(1), lambda { "expected array of size 1, got #{c.inspect}" }
|
236
236
|
end
|
237
237
|
|
238
238
|
it "#config -- return hash" do
|
@@ -37,7 +37,7 @@ end
|
|
37
37
|
|
38
38
|
|
39
39
|
require 'falkorlib/tasks/git'
|
40
|
-
|
40
|
+
require 'falkorlib/tasks/puppet'
|
41
41
|
|
42
42
|
##############################################################################
|
43
43
|
#TOP_SRCDIR = File.expand_path(File.join(File.dirname(__FILE__), "."))
|
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
|
+
version: 0.7.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien Varrette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04
|
11
|
+
date: 2018-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -582,19 +582,19 @@ specification_version: 4
|
|
582
582
|
summary: Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap}
|
583
583
|
tasks
|
584
584
|
test_files:
|
585
|
-
- spec/
|
586
|
-
- spec/
|
587
|
-
- spec/falkorlib/
|
588
|
-
- spec/falkorlib/bootstrap_ruby_spec.rb
|
585
|
+
- spec/spec_helper.rb
|
586
|
+
- spec/falkorlib_spec.rb
|
587
|
+
- spec/falkorlib/error_spec.rb
|
589
588
|
- spec/falkorlib/bootstrap_spec.rb
|
590
|
-
- spec/falkorlib/common_spec.rb
|
591
589
|
- spec/falkorlib/config_spec.rb
|
592
|
-
- spec/falkorlib/
|
590
|
+
- spec/falkorlib/bootstrap_ruby_spec.rb
|
591
|
+
- spec/falkorlib/bootstrap_link_spec.rb
|
593
592
|
- spec/falkorlib/git_spec.rb
|
594
593
|
- spec/falkorlib/gitflow_spec.rb
|
594
|
+
- spec/falkorlib/bootstrap_latex_spec.rb
|
595
|
+
- spec/falkorlib/bootstrap_helpers_spec.rb
|
596
|
+
- spec/falkorlib/common_spec.rb
|
597
|
+
- spec/falkorlib/versioning_spec.rb
|
595
598
|
- spec/falkorlib/puppet_modules_spec.rb
|
596
|
-
- spec/falkorlib/versioning_gem_spec.rb
|
597
599
|
- spec/falkorlib/versioning_puppet_module_spec.rb
|
598
|
-
- spec/falkorlib/
|
599
|
-
- spec/falkorlib_spec.rb
|
600
|
-
- spec/spec_helper.rb
|
600
|
+
- spec/falkorlib/versioning_gem_spec.rb
|