hoe-manns 2.0.0 → 2.1.0
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 +4 -4
- data/History.rdoc +11 -0
- data/Manifest.txt +1 -0
- data/README.rdoc +0 -1
- data/Rakefile +2 -10
- data/lib/hoe/manns-methods.rb +70 -0
- data/lib/hoe/manns.rb +28 -60
- data/spec/manns_spec.rb +13 -3
- data/spec/spec_helper.rb +0 -11
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24e8a05d3e2815eaf89233b8dba6e0f879f54faf
|
4
|
+
data.tar.gz: 208d0551004f9beffdd33f069566a14f6cdd328e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67a366ceb2601c6fdbf6c9c11a75290df7d673089f93bc23eda832147129a8d37238d676f6b0e64c78feb4768243985e4c9fe14b1b7bf8e68683267df1c686f3
|
7
|
+
data.tar.gz: 5c1e4d929026f4b93ce4e45f33d967bf33a13b7e5a3dca8e78a0daf5c580676997ca8aa6e02b903df260b2ba395c20bbd9ce5ffc3f205f585cbbd0d259941c95
|
data/Gemfile.lock
CHANGED
@@ -34,9 +34,9 @@ GEM
|
|
34
34
|
bundler-audit (~> 0.5)
|
35
35
|
parseconfig (~> 1.0)
|
36
36
|
rainbow (~> 2.2)
|
37
|
-
hoe-reek (1.
|
38
|
-
bundler (~> 1.
|
39
|
-
reek (~> 4.
|
37
|
+
hoe-reek (1.2.0)
|
38
|
+
bundler (~> 1.15)
|
39
|
+
reek (~> 4.7)
|
40
40
|
hoe-rubocop (1.0.8)
|
41
41
|
bundler (~> 1.14)
|
42
42
|
rubocop (~> 0.47)
|
@@ -53,7 +53,7 @@ GEM
|
|
53
53
|
powerpack (0.1.1)
|
54
54
|
rainbow (2.2.2)
|
55
55
|
rake
|
56
|
-
rake (12.1
|
56
|
+
rake (12.2.1)
|
57
57
|
rdoc (5.1.0)
|
58
58
|
reek (4.7.2)
|
59
59
|
codeclimate-engine-rb (~> 0.4.0)
|
data/History.rdoc
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== 2.1.0 / 2017-10-25
|
2
|
+
|
3
|
+
* 5 minor enhancements
|
4
|
+
|
5
|
+
* HM-9: Split module into two seperate modules
|
6
|
+
* HM-10: Remove run_after_release
|
7
|
+
* HM-11: Remove system('git add recipes/recipe.rb') if File.exist?('recipes/recipe.rb')
|
8
|
+
* HM-13: Add more tests
|
9
|
+
* Added task 'rake bundler:gemfile install'
|
10
|
+
* Changed publican to daps docbook managing
|
11
|
+
|
1
12
|
=== 2.0.0 / 2017-10-19
|
2
13
|
|
3
14
|
* 5 major enhancements
|
data/Manifest.txt
CHANGED
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -1,14 +1,6 @@
|
|
1
1
|
# -*- ruby -*-
|
2
2
|
# Release:
|
3
|
-
#
|
4
|
-
# * do stuff
|
5
|
-
# * update documentation
|
6
|
-
# * enable :git
|
7
|
-
# * rake run_before_release
|
8
|
-
# * disable :git
|
9
|
-
# * Checkin
|
10
|
-
# * rake release
|
11
|
-
# * rake run_after_release
|
3
|
+
# See README.rdoc.release
|
12
4
|
|
13
5
|
require 'rubygems'
|
14
6
|
require 'hoe'
|
@@ -29,7 +21,7 @@ Hoe.plugin :version
|
|
29
21
|
# rubocop:disable Metrics/LineLength
|
30
22
|
Hoe.spec 'hoe-manns' do
|
31
23
|
developer('Sascha Manns', 'Sascha.Manns@mailbox.org')
|
32
|
-
license 'GPL-3' # this should match the license in the README
|
24
|
+
license 'GPL-3.0' # this should match the license in the README
|
33
25
|
require_ruby_version '>= 2.2.0'
|
34
26
|
|
35
27
|
dependency 'rainbow', '~> 2.2'
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# Copyright (C) 2013-2017 Sascha Manns <Sascha.Manns@mailbox.org>
|
2
|
+
#
|
3
|
+
# This program is free software: you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU General Public License as published by
|
5
|
+
# the Free Software Foundation, either version 3 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU General Public License
|
14
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
|
+
|
16
|
+
# Dependencies
|
17
|
+
require 'rainbow/ext/string'
|
18
|
+
|
19
|
+
# Module Hoe
|
20
|
+
# rubocop:disable Metrics/ClassAndModuleChildren
|
21
|
+
module Hoe::MannsMethods
|
22
|
+
# Installs a bundle
|
23
|
+
def self.bundle_install
|
24
|
+
puts 'Installing Bundle'.color(:yellow)
|
25
|
+
system('bundle install')
|
26
|
+
puts 'Installed Bundle'.color(:green)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Update Gemfile.lock
|
30
|
+
def self.update_gemfile_lock_method
|
31
|
+
puts 'Updating Gemfile.lock'.color(:yellow)
|
32
|
+
system('bundle update')
|
33
|
+
puts 'Updated Gemfile.lock'.color(:green)
|
34
|
+
end
|
35
|
+
|
36
|
+
# Remove prerelease gemspec
|
37
|
+
def self.remove_pre_gemspec_method
|
38
|
+
puts 'Removing pre version of gemspec'.color(:yellow)
|
39
|
+
File.delete(*Dir.glob('*.gemspec'))
|
40
|
+
puts 'Removed'.color(:green)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Copying stuff to master
|
44
|
+
def self.copy_master
|
45
|
+
copy_master_co_master
|
46
|
+
puts 'Set a Git Tag'.color(:yellow)
|
47
|
+
system('rake git:tag')
|
48
|
+
puts 'Checking out develop again'.color(:yellow)
|
49
|
+
system('git checkout develop')
|
50
|
+
puts 'Done'.color(:green)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Check out master
|
54
|
+
def self.copy_master_co_master
|
55
|
+
puts 'Checking out master'.color(:yellow)
|
56
|
+
system('git checkout master')
|
57
|
+
puts 'Merging master with develop'.color(:yellow)
|
58
|
+
system('git merge develop')
|
59
|
+
puts 'Pushing master to origin'.color(:yellow)
|
60
|
+
system('git push')
|
61
|
+
end
|
62
|
+
|
63
|
+
# Cleanup the pkg
|
64
|
+
def self.clean_pkg_method
|
65
|
+
puts 'Cleaning pkg'.color(:yellow)
|
66
|
+
FileUtils.rm_rf('pkg') if Dir.exist?('pkg')
|
67
|
+
FileUtils.rm_rf('recipes/pkg') if Dir.exist?('recipes/pkg')
|
68
|
+
puts 'Cleanup succeed'.color(:green)
|
69
|
+
end
|
70
|
+
end
|
data/lib/hoe/manns.rb
CHANGED
@@ -15,16 +15,19 @@
|
|
15
15
|
|
16
16
|
# Dependencies
|
17
17
|
require 'hoe'
|
18
|
+
require_relative 'manns-methods.rb'
|
18
19
|
|
19
|
-
# Main module
|
20
|
+
# Main module Hoe
|
21
|
+
# TODO: Currently i don't know how to fix this.
|
22
|
+
# Nested usage triggers error "hoe not a module"
|
23
|
+
# rubocop:disable Metrics/ClassAndModuleChildren
|
20
24
|
module Hoe::Manns
|
21
25
|
# Version constant for HOE::Manns
|
22
|
-
VERSION = '2.
|
26
|
+
VERSION = '2.1.0'.freeze
|
23
27
|
|
24
28
|
attr_accessor :remove_pre_gemspec
|
25
29
|
attr_accessor :copy_master
|
26
30
|
attr_accessor :run_before_release
|
27
|
-
attr_accessor :run_after_release
|
28
31
|
attr_accessor :clean_pkg
|
29
32
|
attr_accessor :bundle_audit
|
30
33
|
|
@@ -36,45 +39,49 @@ module Hoe::Manns
|
|
36
39
|
end
|
37
40
|
|
38
41
|
# Definitions of the Rake task
|
42
|
+
# TODO: Check if this smells can be pacified in future
|
43
|
+
# rubocop:disable Metrics/AbcSize
|
44
|
+
# rubocop:disable Metrics/MethodLength
|
45
|
+
# This method smells of :reek:TooManyStatements
|
39
46
|
def define_manns_tasks
|
40
|
-
#
|
47
|
+
# Install a Bundle
|
48
|
+
desc 'Install a Bundle'
|
49
|
+
task 'bundler:gemfile_install' do
|
50
|
+
Hoe::MannsMethods.bundle_install
|
51
|
+
end
|
52
|
+
|
53
|
+
# Task for updating Gemfile.lock
|
41
54
|
desc 'Update Gemfile.lock'
|
42
55
|
task 'bundler:gemfile_lock' do
|
43
|
-
Hoe::
|
56
|
+
Hoe::MannsMethods.update_gemfile_lock_method
|
44
57
|
end
|
45
58
|
|
46
|
-
#
|
59
|
+
# Task for removing Prerelease Gemspecs
|
47
60
|
desc 'Remove Pre-Gemspec'
|
48
61
|
task 'gem:spec_remove' do
|
49
|
-
Hoe::
|
62
|
+
Hoe::MannsMethods.remove_pre_gemspec_method
|
50
63
|
end
|
51
64
|
|
52
|
-
#
|
65
|
+
# Task for git tag
|
53
66
|
desc 'Copy master'
|
54
67
|
task :copy_master do
|
55
|
-
Hoe::
|
68
|
+
Hoe::MannsMethods.copy_master
|
56
69
|
end
|
57
70
|
|
58
|
-
#
|
71
|
+
# Task for running needed Rake Tasks before running rake release
|
59
72
|
desc 'Run all tasks before rake release'
|
60
|
-
task run_before_release:
|
61
|
-
|
73
|
+
task run_before_release:
|
74
|
+
%w[git:manifest bundler:gemfile bundler:gemfile_lock gem:spec_remove bundle_audit:run copy_master] do
|
62
75
|
puts 'Ready to run rake release VERSION=x.y.z'.color(:green)
|
63
76
|
end
|
64
77
|
|
65
|
-
#
|
66
|
-
desc 'Run all tasks after rake release'
|
67
|
-
task run_after_release: %w[send_email clean_pkg] do
|
68
|
-
puts 'Release finished'.color :green
|
69
|
-
end
|
70
|
-
|
71
|
-
# Rake Task for cleaning up the pkg
|
78
|
+
# Task for cleaning up the pkg
|
72
79
|
desc 'Clean pkg'
|
73
80
|
task :clean_pkg do
|
74
|
-
Hoe::
|
81
|
+
Hoe::MannsMethods.clean_pkg_method
|
75
82
|
end
|
76
83
|
|
77
|
-
#
|
84
|
+
# Tasks for bundle audit
|
78
85
|
namespace :bundle_audit do
|
79
86
|
desc 'Update bundle-audit database'
|
80
87
|
task :update do
|
@@ -96,43 +103,4 @@ module Hoe::Manns
|
|
96
103
|
Rake::Task['bundle_audit:run'].invoke
|
97
104
|
end
|
98
105
|
end
|
99
|
-
|
100
|
-
require 'rainbow/ext/string'
|
101
|
-
# Method for updating Gemfile.lock
|
102
|
-
def self.update_gemfile_lock_method
|
103
|
-
puts 'Updating Gemfile.lock'.color(:yellow)
|
104
|
-
system('bundle update')
|
105
|
-
puts 'Updated Gemfile.lock'.color(:green)
|
106
|
-
end
|
107
|
-
|
108
|
-
# Method for removing prerelease gemspec
|
109
|
-
def self.remove_pre_gemspec_method
|
110
|
-
puts 'Removing pre version of gemspec'.color(:yellow)
|
111
|
-
File.delete(*Dir.glob('*.gemspec'))
|
112
|
-
puts 'Removed'.color(:green)
|
113
|
-
end
|
114
|
-
|
115
|
-
# Method for copying to master
|
116
|
-
def self.copy_master
|
117
|
-
puts 'Checking out master'.color(:yellow)
|
118
|
-
system('git checkout master')
|
119
|
-
puts 'Merging master with develop'.color(:yellow)
|
120
|
-
system('git merge develop')
|
121
|
-
puts 'Pushing master to origin'.color(:yellow)
|
122
|
-
system('git add recipes/recipe.rb') if File.exist?('recipes/recipe.rb')
|
123
|
-
system('git push')
|
124
|
-
puts 'Set a Git Tag'.color(:yellow)
|
125
|
-
system('rake git:tag')
|
126
|
-
puts 'Checking out develop again'.color(:yellow)
|
127
|
-
system('git checkout develop')
|
128
|
-
puts 'Done'.color(:green)
|
129
|
-
end
|
130
|
-
|
131
|
-
# Method for cleanup the pkg
|
132
|
-
def self.clean_pkg_method
|
133
|
-
puts 'Cleaning pkg'.color(:yellow)
|
134
|
-
FileUtils.rm_rf('pkg') if Dir.exist?('pkg')
|
135
|
-
FileUtils.rm_rf('recipes/pkg') if Dir.exist?('recipes/pkg')
|
136
|
-
puts 'Cleanup succeed'.color(:green)
|
137
|
-
end
|
138
106
|
end
|
data/spec/manns_spec.rb
CHANGED
@@ -1,13 +1,23 @@
|
|
1
1
|
require 'rspec'
|
2
2
|
require File.join(File.dirname(__FILE__), '..', 'lib/hoe/manns')
|
3
|
+
require File.join(File.dirname(__FILE__), '..', 'lib/hoe/manns-methods')
|
3
4
|
require File.join(File.dirname(__FILE__), '..', 'spec/spec_helper')
|
4
5
|
require 'fileutils'
|
5
6
|
|
7
|
+
# TODO: Try to split this block into smaller once
|
8
|
+
# rubocop:disable Metrics/BlockLength
|
6
9
|
describe 'Hoe::Manns' do
|
10
|
+
describe 'bundle_install' do
|
11
|
+
it 'installs a bundle' do
|
12
|
+
success = Hoe::MannsMethods.bundle_install
|
13
|
+
expect(success)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
7
17
|
describe 'update_gemfile_lock_method' do
|
8
18
|
it 'creates a new Gemfile.lock' do
|
9
19
|
FileUtils.rm(File.join(File.dirname(__FILE__), '..', 'Gemfile.lock'))
|
10
|
-
Hoe::
|
20
|
+
Hoe::MannsMethods.update_gemfile_lock_method
|
11
21
|
avail = File.exist?(File.join(File.dirname(__FILE__), '..',
|
12
22
|
'Gemfile.lock'))
|
13
23
|
expect(avail)
|
@@ -17,7 +27,7 @@ describe 'Hoe::Manns' do
|
|
17
27
|
describe 'remove_pre_gemspec' do
|
18
28
|
it 'removes the old gemspec' do
|
19
29
|
FileUtils.touch('hoe-manns.gemspec')
|
20
|
-
Hoe::
|
30
|
+
Hoe::MannsMethods.remove_pre_gemspec_method
|
21
31
|
gemspec = Dir.glob('*.gemspec').empty?
|
22
32
|
expect(gemspec)
|
23
33
|
end
|
@@ -25,7 +35,7 @@ describe 'Hoe::Manns' do
|
|
25
35
|
|
26
36
|
describe 'clean_pkg' do
|
27
37
|
it 'cleans the pkg' do
|
28
|
-
Hoe::
|
38
|
+
Hoe::MannsMethods.clean_pkg_method
|
29
39
|
end
|
30
40
|
end
|
31
41
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,15 +1,4 @@
|
|
1
1
|
require 'coveralls'
|
2
|
-
require 'simplecov'
|
3
2
|
require 'fileutils'
|
4
3
|
require 'rake'
|
5
4
|
Coveralls.wear!
|
6
|
-
|
7
|
-
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
|
8
|
-
SimpleCov.start do
|
9
|
-
add_filter '.yardoc'
|
10
|
-
add_filter 'config'
|
11
|
-
add_filter 'doc'
|
12
|
-
add_filter 'manual'
|
13
|
-
add_filter 'pkg'
|
14
|
-
add_filter 'vendor'
|
15
|
-
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoe-manns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sascha Manns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -290,12 +290,13 @@ files:
|
|
290
290
|
- README.rdoc
|
291
291
|
- Rakefile
|
292
292
|
- STATUS.rdoc
|
293
|
+
- lib/hoe/manns-methods.rb
|
293
294
|
- lib/hoe/manns.rb
|
294
295
|
- spec/manns_spec.rb
|
295
296
|
- spec/spec_helper.rb
|
296
297
|
homepage: https://launchpad.net/hoe-manns
|
297
298
|
licenses:
|
298
|
-
- GPL-3
|
299
|
+
- GPL-3.0
|
299
300
|
metadata: {}
|
300
301
|
post_install_message: 'Please file bugreports on: https://bugs.launchpad.net/hoe-manns'
|
301
302
|
rdoc_options:
|