hoe-manns 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/hoe/manns.rb CHANGED
@@ -1,106 +1,106 @@
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 'hoe'
18
- require_relative 'manns-methods.rb'
19
-
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
24
- module Hoe::Manns
25
- # Version constant for HOE::Manns
26
- VERSION = '2.1.1'.freeze
27
-
28
- attr_accessor :remove_pre_gemspec
29
- attr_accessor :copy_master
30
- attr_accessor :run_before_release
31
- attr_accessor :clean_pkg
32
- attr_accessor :bundle_audit
33
-
34
- # Initialize plugin
35
- def initialize_manns
36
- require 'fileutils'
37
- require 'rainbow/ext/string'
38
- require 'bundler/audit/cli'
39
- end
40
-
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
46
- def define_manns_tasks
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
54
- desc 'Update Gemfile.lock'
55
- task 'bundler:gemfile_lock' do
56
- Hoe::MannsMethods.update_gemfile_lock_method
57
- end
58
-
59
- # Task for removing Prerelease Gemspecs
60
- desc 'Remove Pre-Gemspec'
61
- task 'gem:spec_remove' do
62
- Hoe::MannsMethods.remove_pre_gemspec_method
63
- end
64
-
65
- # Task for git tag
66
- desc 'Copy master'
67
- task :copy_master do
68
- Hoe::MannsMethods.copy_master
69
- end
70
-
71
- # Task for running needed Rake Tasks before running rake release
72
- desc 'Run all tasks before rake release'
73
- task run_before_release:
74
- %w[git:manifest bundler:gemfile bundler:gemfile_lock gem:spec_remove bundle_audit:run copy_master] do
75
- puts 'Ready to run rake release VERSION=x.y.z'.color(:green)
76
- end
77
-
78
- # Task for cleaning up the pkg
79
- desc 'Clean pkg'
80
- task :clean_pkg do
81
- Hoe::MannsMethods.clean_pkg_method
82
- end
83
-
84
- # Tasks for bundle audit
85
- namespace :bundle_audit do
86
- desc 'Update bundle-audit database'
87
- task :update do
88
- Bundler::Audit::CLI.new.update
89
- end
90
-
91
- desc 'Check gems for vulns using bundle-audit'
92
- task :check do
93
- Bundler::Audit::CLI.new.check
94
- end
95
-
96
- desc 'Update vulns database and check gems using bundle-audit'
97
- task :run do
98
- Rake::Task['bundle_audit:update'].invoke
99
- Rake::Task['bundle_audit:check'].invoke
100
- end
101
- end
102
- task :bundle_audit do
103
- Rake::Task['bundle_audit:run'].invoke
104
- end
105
- end
106
- end
1
+ # Copyright (C) 2013-2018 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 'hoe'
18
+ require_relative 'manns-methods.rb'
19
+
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
24
+ module Hoe::Manns
25
+ # Version constant for HOE::Manns
26
+ VERSION = '2.1.2'.freeze
27
+
28
+ attr_accessor :remove_pre_gemspec
29
+ attr_accessor :copy_master
30
+ attr_accessor :run_before_release
31
+ attr_accessor :clean_pkg
32
+ attr_accessor :bundle_audit
33
+
34
+ # Initialize plugin
35
+ def initialize_manns
36
+ require 'fileutils'
37
+ require 'rainbow/ext/string'
38
+ require 'bundler/audit/cli'
39
+ end
40
+
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
46
+ def define_manns_tasks
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
54
+ desc 'Update Gemfile.lock'
55
+ task 'bundler:gemfile_lock' do
56
+ Hoe::MannsMethods.update_gemfile_lock_method
57
+ end
58
+
59
+ # Task for removing Prerelease Gemspecs
60
+ desc 'Remove Pre-Gemspec'
61
+ task 'gem:spec_remove' do
62
+ Hoe::MannsMethods.remove_pre_gemspec_method
63
+ end
64
+
65
+ # Task for git tag
66
+ desc 'Copy master'
67
+ task :copy_master do
68
+ Hoe::MannsMethods.copy_master
69
+ end
70
+
71
+ # Task for running needed Rake Tasks before running rake release
72
+ desc 'Run all tasks before rake release'
73
+ task run_before_release:
74
+ %w[git:manifest bundler:gemfile bundler:gemfile_lock gem:spec_remove bundle_audit:run copy_master] do
75
+ puts 'Ready to run rake release VERSION=x.y.z'.color(:green)
76
+ end
77
+
78
+ # Task for cleaning up the pkg
79
+ desc 'Clean pkg'
80
+ task :clean_pkg do
81
+ Hoe::MannsMethods.clean_pkg_method
82
+ end
83
+
84
+ # Tasks for bundle audit
85
+ namespace :bundle_audit do
86
+ desc 'Update bundle-audit database'
87
+ task :update do
88
+ Bundler::Audit::CLI.new.update
89
+ end
90
+
91
+ desc 'Check gems for vulns using bundle-audit'
92
+ task :check do
93
+ Bundler::Audit::CLI.new.check
94
+ end
95
+
96
+ desc 'Update vulns database and check gems using bundle-audit'
97
+ task :run do
98
+ Rake::Task['bundle_audit:update'].invoke
99
+ Rake::Task['bundle_audit:check'].invoke
100
+ end
101
+ end
102
+ task :bundle_audit do
103
+ Rake::Task['bundle_audit:run'].invoke
104
+ end
105
+ end
106
+ end
data/spec/manns_spec.rb CHANGED
@@ -1,41 +1,41 @@
1
- require 'rspec'
2
- require File.join(File.dirname(__FILE__), '..', 'lib/hoe/manns')
3
- require File.join(File.dirname(__FILE__), '..', 'lib/hoe/manns-methods')
4
- require File.join(File.dirname(__FILE__), '..', 'spec/spec_helper')
5
- require 'fileutils'
6
-
7
- # TODO: Try to split this block into smaller once
8
- # rubocop:disable Metrics/BlockLength
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
-
17
- describe 'update_gemfile_lock_method' do
18
- it 'creates a new Gemfile.lock' do
19
- FileUtils.rm(File.join(File.dirname(__FILE__), '..', 'Gemfile.lock'))
20
- Hoe::MannsMethods.update_gemfile_lock_method
21
- avail = File.exist?(File.join(File.dirname(__FILE__), '..',
22
- 'Gemfile.lock'))
23
- expect(avail)
24
- end
25
- end
26
-
27
- describe 'remove_pre_gemspec' do
28
- it 'removes the old gemspec' do
29
- FileUtils.touch('hoe-manns.gemspec')
30
- Hoe::MannsMethods.remove_pre_gemspec_method
31
- gemspec = Dir.glob('*.gemspec').empty?
32
- expect(gemspec)
33
- end
34
- end
35
-
36
- describe 'clean_pkg' do
37
- it 'cleans the pkg' do
38
- Hoe::MannsMethods.clean_pkg_method
39
- end
40
- end
41
- end
1
+ require 'rspec'
2
+ require File.join(File.dirname(__FILE__), '..', 'lib/hoe/manns')
3
+ require File.join(File.dirname(__FILE__), '..', 'lib/hoe/manns-methods')
4
+ require File.join(File.dirname(__FILE__), '..', 'spec/spec_helper')
5
+ require 'fileutils'
6
+
7
+ # TODO: Try to split this block into smaller once
8
+ # rubocop:disable Metrics/BlockLength
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
+
17
+ describe 'update_gemfile_lock_method' do
18
+ it 'creates a new Gemfile.lock' do
19
+ FileUtils.rm(File.join(File.dirname(__FILE__), '..', 'Gemfile.lock'))
20
+ Hoe::MannsMethods.update_gemfile_lock_method
21
+ avail = File.exist?(File.join(File.dirname(__FILE__), '..',
22
+ 'Gemfile.lock'))
23
+ expect(avail)
24
+ end
25
+ end
26
+
27
+ describe 'remove_pre_gemspec' do
28
+ it 'removes the old gemspec' do
29
+ FileUtils.touch('hoe-manns.gemspec')
30
+ Hoe::MannsMethods.remove_pre_gemspec_method
31
+ gemspec = Dir.glob('*.gemspec').empty?
32
+ expect(gemspec)
33
+ end
34
+ end
35
+
36
+ describe 'clean_pkg' do
37
+ it 'cleans the pkg' do
38
+ Hoe::MannsMethods.clean_pkg_method
39
+ end
40
+ end
41
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'coveralls'
2
- require 'fileutils'
3
- require 'rake'
4
- Coveralls.wear!
1
+ require 'coveralls'
2
+ require 'fileutils'
3
+ require 'rake'
4
+ Coveralls.wear!
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.1.1
4
+ version: 2.1.2
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-11-06 00:00:00.000000000 Z
11
+ date: 2018-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.2'
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.2'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler-audit
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.6'
41
- - !ruby/object:Gem::Dependency
42
- name: coveralls
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.8'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.8'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: hoe-bundler
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,76 +52,6 @@ dependencies:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
54
  version: '1.3'
69
- - !ruby/object:Gem::Dependency
70
- name: hoe-doofus
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.0'
83
- - !ruby/object:Gem::Dependency
84
- name: hoe-git
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.6'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.6'
97
- - !ruby/object:Gem::Dependency
98
- name: hoe-manns
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.6'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.6'
111
- - !ruby/object:Gem::Dependency
112
- name: hoe-reek
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '1.1'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '1.1'
125
- - !ruby/object:Gem::Dependency
126
- name: hoe-rubocop
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '1.0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '1.0'
139
55
  - !ruby/object:Gem::Dependency
140
56
  name: hoe-rubygems
141
57
  requirement: !ruby/object:Gem::Requirement
@@ -150,20 +66,6 @@ dependencies:
150
66
  - - "~>"
151
67
  - !ruby/object:Gem::Version
152
68
  version: '1.0'
153
- - !ruby/object:Gem::Dependency
154
- name: hoe-travis
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '1.3'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '1.3'
167
69
  - !ruby/object:Gem::Dependency
168
70
  name: hoe-version
169
71
  requirement: !ruby/object:Gem::Requirement
@@ -178,20 +80,6 @@ dependencies:
178
80
  - - "~>"
179
81
  - !ruby/object:Gem::Version
180
82
  version: '1.2'
181
- - !ruby/object:Gem::Dependency
182
- name: rake
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '12.1'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '12.1'
195
83
  - !ruby/object:Gem::Dependency
196
84
  name: rdoc
197
85
  requirement: !ruby/object:Gem::Requirement
@@ -206,20 +94,6 @@ dependencies:
206
94
  - - "~>"
207
95
  - !ruby/object:Gem::Version
208
96
  version: '5.1'
209
- - !ruby/object:Gem::Dependency
210
- name: rubocop
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '0.50'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - "~>"
221
- - !ruby/object:Gem::Version
222
- version: '0.50'
223
97
  - !ruby/object:Gem::Dependency
224
98
  name: rspec
225
99
  requirement: !ruby/object:Gem::Requirement
@@ -240,14 +114,14 @@ dependencies:
240
114
  requirements:
241
115
  - - "~>"
242
116
  - !ruby/object:Gem::Version
243
- version: '3.16'
117
+ version: '3.17'
244
118
  type: :development
245
119
  prerelease: false
246
120
  version_requirements: !ruby/object:Gem::Requirement
247
121
  requirements:
248
122
  - - "~>"
249
123
  - !ruby/object:Gem::Version
250
- version: '3.16'
124
+ version: '3.17'
251
125
  description: |-
252
126
  hoe-manns is a small collection of my personal used rake tasks for using with hoe. Actually it includes that tasks:
253
127
 
@@ -259,16 +133,16 @@ description: |-
259
133
  * run_before_release
260
134
  * run_after_release
261
135
 
262
- The History.rdoc contains a detailed description on what has changed. For most
136
+ The History.rdoc contains a detailed description of what has changed. For most
263
137
  users the NEWS file might be a better place to look since it contains
264
138
  change summaries between the different versions.
265
139
 
266
- hoe-manns is released under the GPL3 License, see the file 'License.rdoc'
140
+ hoe-manns is released under the GPL3 License, see the file 'LICENSE.rdoc'
267
141
  for more information.
268
142
 
269
- The official web site is:
143
+ The official website is:
270
144
 
271
- https://launchpad.net/hoe-manns
145
+ http://saigkill.tuxfamily.org/wordpress
272
146
  email:
273
147
  - Sascha.Manns@mailbox.org
274
148
  executables: []
@@ -278,7 +152,6 @@ extra_rdoc_files:
278
152
  - LICENSE.rdoc
279
153
  - Manifest.txt
280
154
  - README.rdoc
281
- - STATUS.rdoc
282
155
  files:
283
156
  - Gemfile
284
157
  - Gemfile.lock
@@ -288,16 +161,15 @@ files:
288
161
  - NEWS
289
162
  - README.rdoc
290
163
  - Rakefile
291
- - STATUS.rdoc
292
164
  - lib/hoe/manns-methods.rb
293
165
  - lib/hoe/manns.rb
294
166
  - spec/manns_spec.rb
295
167
  - spec/spec_helper.rb
296
- homepage: https://launchpad.net/hoe-manns
168
+ homepage: https://github.com/saigkill/hoe-manns
297
169
  licenses:
298
170
  - GPL-3.0
299
171
  metadata: {}
300
- post_install_message: 'Please file bugreports on: https://bugs.launchpad.net/hoe-manns'
172
+ post_install_message: 'Please file bugreports on: https://github.com/saigkill/hoe-manns/issues'
301
173
  rdoc_options:
302
174
  - "--main"
303
175
  - README.rdoc
@@ -315,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
187
  version: '0'
316
188
  requirements: []
317
189
  rubyforge_project:
318
- rubygems_version: 2.6.13
190
+ rubygems_version: 2.7.6
319
191
  signing_key:
320
192
  specification_version: 4
321
193
  summary: hoe-manns is a small collection of my personal used rake tasks for using