hoe-packaging 1.0.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 +7 -0
- checksums.yaml.gz.sig +4 -0
- data/.autotest +25 -0
- data/.codeclimate.yml +8 -0
- data/.coveralls.yml +2 -0
- data/.gemnasium.yml +5 -0
- data/.rspec +2 -0
- data/.rubocop.yml +39 -0
- data/.scrutinizer.yml +17 -0
- data/.travis.yml +29 -0
- data/CODE_OF_CONDUCT.md +17 -0
- data/CONTRIBUTING.md +33 -0
- data/Gemfile +43 -0
- data/Gemfile.lock +291 -0
- data/History.rdoc +7 -0
- data/LICENSE.rdoc +24 -0
- data/MAINTENANCE.md +11 -0
- data/Manifest.txt +25 -0
- data/README.rdoc +103 -0
- data/Rakefile +101 -0
- data/VERSION +1 -0
- data/config.reek +111 -0
- data/etc/hoe-packaging.cfg +2 -0
- data/lib/hoe/packaging.rb +83 -0
- data/post-commit +1 -0
- data/recipes/recipe.rb +6 -0
- data/test/hoe/test_packaging.rb +9 -0
- data.tar.gz.sig +0 -0
- metadata +580 -0
- metadata.gz.sig +0 -0
data/README.rdoc
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
= hoe-packaging
|
2
|
+
|
3
|
+
home :: http://saigkill.github.io
|
4
|
+
code :: http://gitlab.com/saigkill/hoe-packaging
|
5
|
+
docs :: https://gitlab.com/saigkill/hoe-packaging/wikis/home
|
6
|
+
apidoc :: http://www.rubydoc.info/gems/hoe-packaging
|
7
|
+
bugs :: https://gitlab.com/saigkill/hoe-packaging/issues
|
8
|
+
license :: {<img src="http://img.shields.io/:license-mit-blue.svg" />}[https://gitlab.com/saigkill/hoe-packaging/blob/master/LICENSE.rdoc]
|
9
|
+
last public version :: {<img src="https://badge.fury.io/rb/hoe-packaging.png" alt="Last Version" />}[http://rubygems.org/gems/hoe-packaging]
|
10
|
+
last rpm :: {<img src="https://img.shields.io/bintray/v/saigkill/rpm/hoe-packaging.svg" />}[https://bintray.com/saigkill/rpm/hoe-packaging]
|
11
|
+
last deb :: {<img src="https://img.shields.io/bintray/v/saigkill/deb/hoe-packaging.svg" />}[https://bintray.com/saigkill/deb/hoe-packaging]
|
12
|
+
downloads latest :: {<img src="https://img.shields.io/gem/dtv/hoe-packaging.svg" alt="Downloads latest version" />}[http://rubygems.org/gems/hoe-packaging]
|
13
|
+
downloads all :: {<img src="https://img.shields.io/gem/dt/hoe-packaging.svg" alt="Downloads all versions" />}[http://rubygems.org/gems/hoe-packaging]
|
14
|
+
continuous integration :: {<img src="https://scrutinizer-ci.com/gp/hoe-packaging/badges/build.png?b=master&s=4560c0b82c76d781188a5fa5cceaf85622afb274" />}[https://scrutinizer-ci.com/gp/hoe-packaging]
|
15
|
+
code quality :: {<img src="https://scrutinizer-ci.com/gp/hoe-packaging/badges/quality-score.png?b=master&s=e1381e9a2a22728c9933ec4558a61ed2b8bfacb7" />}[https://scrutinizer-ci.com/gp/hoe-packaging]
|
16
|
+
code quality :: {<img src="https://d3s6mut3hikguw.cloudfront.net/github/saigkill/hoe-packaging/badges/gpa.svg" alt="Code Quality" />}[https://codeclimate.com/github/saigkill/hoe-packaging]
|
17
|
+
code quality :: {<img src="https://api.codacy.com/project/badge/0c40f3ac6de747ffa794474fa7f2d840" />}[https://www.codacy.com/app/saigkill/hoe-packaging]
|
18
|
+
dependency check :: {<img src="https://gemnasium.com/000013fdff020ec3ee53268f59f7e202.svg" alt="Build Status" />}[https://gemnasium.com/000013fdff020ec3ee53268f59f7e202]
|
19
|
+
still maintained? :: {<img src="http://stillmaintained.com/saigkill/hoe-packaging.png" alt="Still maintained?" />}[http://stillmaintained.com/saigkill/hoe-packaging]
|
20
|
+
documentation quality :: {<img src="http://inch-ci.org/github/saigkill/hoe-packaging.svg?branch=master" alt="Documentation Quality" />}[http://inch-ci.org/github/saigkill/hoe-packaging]
|
21
|
+
donations :: {<img src="https://pledgie.com/campaigns/30335.png?skin_name=chrome" alt="Donations" />}[https://pledgie.com/campaigns/30335]
|
22
|
+
donations :: {<img src="http://img.shields.io/gratipay/saigkill.svg" alt="Donations" />}[https://gratipay.com/~saigkill/]
|
23
|
+
donations :: {<img src="http://tsv-neuss.de/cms/upload/News-Bilder/amazon1.png" alt="Donations" />}[http://www.amazon.de/registry/wishlist/D75HOEQ00BDD]
|
24
|
+
|
25
|
+
|
26
|
+
== DESCRIPTION:
|
27
|
+
|
28
|
+
hoe-packaging is a plugin for the hoe ruby projecthelper (https://github.com/seattlerb/hoe). It provides creation of rpm and deb packages,
|
29
|
+
also a deployment to bintray.
|
30
|
+
|
31
|
+
== FEATURES/PROBLEMS:
|
32
|
+
|
33
|
+
* creating of deb & rpm packages
|
34
|
+
* deploying to bintray.
|
35
|
+
|
36
|
+
This Gem was programmed and tested for Linux systems. If anyone would like to make the methods also fit for other OS, i'm happy about Pull requests.
|
37
|
+
|
38
|
+
For a detailed information please visit: https://gitlab.com/saigkill/hoe-packaging/wikis/home
|
39
|
+
|
40
|
+
If you like this little program so don't forget to give this GitLab repository a star :-)
|
41
|
+
|
42
|
+
== SYNOPSIS:
|
43
|
+
|
44
|
+
Use in your Rakefile:
|
45
|
+
|
46
|
+
Hoe.plugin :packaging
|
47
|
+
|
48
|
+
Hoe.spec 'yourproject' do
|
49
|
+
...
|
50
|
+
end
|
51
|
+
|
52
|
+
Also add hoe-packaging to your requirements and recreate your Gemfile.
|
53
|
+
|
54
|
+
== REQUIREMENTS:
|
55
|
+
|
56
|
+
* setup
|
57
|
+
* fpm
|
58
|
+
* fpm-cookery
|
59
|
+
|
60
|
+
== INSTALL:
|
61
|
+
|
62
|
+
gem install hoe-packaging
|
63
|
+
cd /path/to/gem (In case of using RVM anything like ~/.rvm/gems/ruby-2.2.3/gems/hoe-packaging)
|
64
|
+
rake setup
|
65
|
+
|
66
|
+
== DEVELOPERS:
|
67
|
+
|
68
|
+
After checking out the source, run:
|
69
|
+
|
70
|
+
$ rake newb
|
71
|
+
|
72
|
+
This task will install any missing dependencies, run the tests/specs,
|
73
|
+
and generate the RDoc.
|
74
|
+
|
75
|
+
Merge Requests are welcome :-)
|
76
|
+
|
77
|
+
Read https://gitlab.com/saigkill/hoe-packaging/blob/master/CONTRIBUTING.md
|
78
|
+
Maintenance infos: https://gitlab.com/saigkill/hoe-packaging/blob/master/MAINTENANCE.md
|
79
|
+
|
80
|
+
== LICENSE:
|
81
|
+
|
82
|
+
(The MIT License)
|
83
|
+
|
84
|
+
Copyright (c) 2015 Sascha Manns <samannsml@directbox.com>
|
85
|
+
|
86
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
87
|
+
a copy of this software and associated documentation files (the
|
88
|
+
'Software'), to deal in the Software without restriction, including
|
89
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
90
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
91
|
+
permit persons to whom the Software is furnished to do so, subject to
|
92
|
+
the following conditions:
|
93
|
+
|
94
|
+
The above copyright notice and this permission notice shall be
|
95
|
+
included in all copies or substantial portions of the Software.
|
96
|
+
|
97
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
98
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
99
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
100
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
101
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
102
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
103
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
# Release:
|
3
|
+
# * update *.wiki markdown documentation for GitLab
|
4
|
+
# * enable :git
|
5
|
+
# * rake run_before_release
|
6
|
+
# * disable :git
|
7
|
+
# * Checkin
|
8
|
+
# * rake release
|
9
|
+
# * rake run_after_release
|
10
|
+
|
11
|
+
require 'rubygems'
|
12
|
+
require 'hoe'
|
13
|
+
|
14
|
+
Hoe.plugin :bundler
|
15
|
+
# Hoe.plugin :deveiate
|
16
|
+
Hoe.plugin :doofus
|
17
|
+
Hoe.plugin :email
|
18
|
+
Hoe.plugin :gemspec
|
19
|
+
#Hoe.plugin :gem_prelude_sucks
|
20
|
+
Hoe.plugins.delete :git
|
21
|
+
#Hoe.plugin :git
|
22
|
+
Hoe.plugin :history
|
23
|
+
Hoe.plugin :highline
|
24
|
+
#Hoe.plugin :inline
|
25
|
+
Hoe.plugin :manns
|
26
|
+
Hoe.plugin :packaging
|
27
|
+
# Hoe.plugin :mercurial
|
28
|
+
# Hoe.plugin :perforce
|
29
|
+
# Hoe.plugin :racc
|
30
|
+
# Hoe.plugin :rcov
|
31
|
+
Hoe.plugin :reek
|
32
|
+
Hoe.plugin :rdoc
|
33
|
+
Hoe.plugin :rubocop
|
34
|
+
Hoe.plugin :rubygems
|
35
|
+
# Hoe.plugin :seattlerb
|
36
|
+
Hoe.plugin :travis
|
37
|
+
Hoe.plugin :version
|
38
|
+
Hoe.plugin :website
|
39
|
+
Hoe.plugin :yard
|
40
|
+
|
41
|
+
###########################################DEVELOPING ZONE##############################################################
|
42
|
+
# rubocop:disable Metrics/LineLength
|
43
|
+
Hoe.spec 'hoe-packaging' do
|
44
|
+
developer('Sascha Manns', 'samannsml@directbox.com')
|
45
|
+
license 'MIT' # this should match the license in the README
|
46
|
+
require_ruby_version '>= 2.2.0'
|
47
|
+
|
48
|
+
email_to << 'ruby-talk@ruby-lang.org'
|
49
|
+
|
50
|
+
self.history_file = 'History.rdoc'
|
51
|
+
self.readme_file = 'README.rdoc'
|
52
|
+
self.extra_rdoc_files = FileList['*.rdoc'].to_a
|
53
|
+
self.post_install_message = '*** Run rake setup to finish the installation *** Please file bugreports and feature requests on: https://gitlab.com/saigkill/hoe-packaging/issues'
|
54
|
+
|
55
|
+
dependency 'bundler', '~> 1.10'
|
56
|
+
dependency 'setup', '~> 5.2'
|
57
|
+
dependency 'fpm', '~> 1.4'
|
58
|
+
dependency 'fpm-cookery', '~> 0.30.1'
|
59
|
+
|
60
|
+
extra_dev_deps << ['coveralls', '~> 0.8']
|
61
|
+
extra_dev_deps << ['gem-release', '~> 0.7']
|
62
|
+
extra_dev_deps << ['hoe-bundler', '~> 1.2']
|
63
|
+
extra_dev_deps << ['hoe-deveiate', '~> 0.7']
|
64
|
+
extra_dev_deps << ['hoe-doofus', '~> 1.0']
|
65
|
+
extra_dev_deps << ['hoe-gemspec', '~> 1.0']
|
66
|
+
extra_dev_deps << ['hoe-git', '~> 1.6']
|
67
|
+
extra_dev_deps << ['hoe-highline', '~> 0.2']
|
68
|
+
extra_dev_deps << ['hoe-manns', '~> 1.0']
|
69
|
+
extra_dev_deps << ['hoe-packaging', '~> 1.0']
|
70
|
+
extra_dev_deps << ['hoe-reek', '~> 1.0']
|
71
|
+
extra_dev_deps << ['hoe-rubocop', '~> 0.1']
|
72
|
+
extra_dev_deps << ['hoe-rubygems', '~> 1.0']
|
73
|
+
extra_dev_deps << ['hoe-seattlerb', '~> 1.3']
|
74
|
+
extra_dev_deps << ['hoe-travis', '~> 1.2']
|
75
|
+
extra_dev_deps << ['hoe-version', '~> 1.2']
|
76
|
+
extra_dev_deps << ['hoe-yard', '~> 0.1']
|
77
|
+
extra_dev_deps << ['indexer', '~> 0.3']
|
78
|
+
extra_dev_deps << ['minitest', '~> 5.8.1']
|
79
|
+
extra_dev_deps << ['rake', '~> 10.0']
|
80
|
+
extra_dev_deps << ['reek', '~> 3.3']
|
81
|
+
extra_dev_deps << ['rspec', '~> 3.3']
|
82
|
+
extra_dev_deps << ['rubocop', '~> 0.34']
|
83
|
+
extra_dev_deps << ['simplecov', '~> 0.10']
|
84
|
+
extra_dev_deps << ['test', '~> 1.0.0']
|
85
|
+
extra_dev_deps << ['test-unit', '~> 3.1.4']
|
86
|
+
extra_dev_deps << ['ZenTest', '~> 4.11']
|
87
|
+
extra_dev_deps << ['bundler-audit', '~> 0.4.0']
|
88
|
+
extra_dev_deps << ['manns_shared', '~> 1.0.0']
|
89
|
+
extra_dev_deps << ['bundler-audit', '~> 0.4.0']
|
90
|
+
end
|
91
|
+
|
92
|
+
##################################################SETUP ZONE############################################################
|
93
|
+
|
94
|
+
require 'setup'
|
95
|
+
task :setup do
|
96
|
+
system('setup.rb uninstall --force')
|
97
|
+
system('setup.rb config --sysconfdir=$HOME/.hoe-packaging')
|
98
|
+
system('setup.rb install')
|
99
|
+
end
|
100
|
+
|
101
|
+
# vim: syntax=ruby
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/config.reek
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
---
|
2
|
+
Attribute:
|
3
|
+
enabled: false
|
4
|
+
exclude: []
|
5
|
+
BooleanParameter:
|
6
|
+
enabled: true
|
7
|
+
exclude: []
|
8
|
+
ClassVariable:
|
9
|
+
enabled: true
|
10
|
+
exclude: []
|
11
|
+
ControlParameter:
|
12
|
+
enabled: true
|
13
|
+
exclude: []
|
14
|
+
DataClump:
|
15
|
+
enabled: true
|
16
|
+
exclude: []
|
17
|
+
max_copies: 2
|
18
|
+
min_clump_size: 2
|
19
|
+
DuplicateMethodCall:
|
20
|
+
enabled: true
|
21
|
+
exclude: []
|
22
|
+
max_calls: 3
|
23
|
+
allow_calls: []
|
24
|
+
FeatureEnvy:
|
25
|
+
enabled: true
|
26
|
+
exclude: []
|
27
|
+
IrresponsibleModule:
|
28
|
+
enabled: true
|
29
|
+
exclude: []
|
30
|
+
LongParameterList:
|
31
|
+
enabled: true
|
32
|
+
exclude: []
|
33
|
+
max_params: 3
|
34
|
+
overrides:
|
35
|
+
initialize:
|
36
|
+
max_params: 5
|
37
|
+
LongYieldList:
|
38
|
+
enabled: true
|
39
|
+
exclude: []
|
40
|
+
max_params: 3
|
41
|
+
ModuleInitialize:
|
42
|
+
enabled: true
|
43
|
+
exclude: []
|
44
|
+
NestedIterators:
|
45
|
+
enabled: true
|
46
|
+
exclude: []
|
47
|
+
max_allowed_nesting: 1
|
48
|
+
ignore_iterators: []
|
49
|
+
NilCheck:
|
50
|
+
enabled: true
|
51
|
+
exclude: []
|
52
|
+
PrimaDonnaMethod:
|
53
|
+
enabled: true
|
54
|
+
exclude: []
|
55
|
+
RepeatedConditional:
|
56
|
+
enabled: true
|
57
|
+
exclude: []
|
58
|
+
max_ifs: 2
|
59
|
+
TooManyInstanceVariables:
|
60
|
+
enabled: true
|
61
|
+
exclude: []
|
62
|
+
max_instance_variables: 9
|
63
|
+
TooManyMethods:
|
64
|
+
enabled: true
|
65
|
+
exclude: []
|
66
|
+
max_methods: 25
|
67
|
+
TooManyStatements:
|
68
|
+
enabled: true
|
69
|
+
exclude:
|
70
|
+
- initialize
|
71
|
+
max_statements: 15
|
72
|
+
UncommunicativeMethodName:
|
73
|
+
enabled: true
|
74
|
+
exclude: []
|
75
|
+
reject:
|
76
|
+
- !ruby/regexp /^[a-z]$/
|
77
|
+
- !ruby/regexp /[0-9]$/
|
78
|
+
- !ruby/regexp /[A-Z]/
|
79
|
+
accept: []
|
80
|
+
UncommunicativeModuleName:
|
81
|
+
enabled: true
|
82
|
+
exclude: []
|
83
|
+
reject:
|
84
|
+
- !ruby/regexp /^.$/
|
85
|
+
- !ruby/regexp /[0-9]$/
|
86
|
+
accept:
|
87
|
+
- Inline::C
|
88
|
+
UncommunicativeParameterName:
|
89
|
+
enabled: true
|
90
|
+
exclude: []
|
91
|
+
reject:
|
92
|
+
- !ruby/regexp /^.$/
|
93
|
+
- !ruby/regexp /[0-9]$/
|
94
|
+
- !ruby/regexp /[A-Z]/
|
95
|
+
- !ruby/regexp /^_/
|
96
|
+
accept: []
|
97
|
+
UncommunicativeVariableName:
|
98
|
+
enabled: true
|
99
|
+
exclude: []
|
100
|
+
reject:
|
101
|
+
- !ruby/regexp /^.$/
|
102
|
+
- !ruby/regexp /[0-9]$/
|
103
|
+
- !ruby/regexp /[A-Z]/
|
104
|
+
accept:
|
105
|
+
- _
|
106
|
+
UnusedParameters:
|
107
|
+
enabled: true
|
108
|
+
exclude: []
|
109
|
+
UtilityFunction:
|
110
|
+
enabled: true
|
111
|
+
exclude: []
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# @encoding: utf-8
|
3
|
+
# @author: Sascha Manns
|
4
|
+
# @abstract: hoe-packaging
|
5
|
+
#
|
6
|
+
# Copyright (c) 2015 Sascha Manns <samannsml@directbox.com>
|
7
|
+
# License: MIT
|
8
|
+
|
9
|
+
# Dependencies
|
10
|
+
|
11
|
+
|
12
|
+
# Main module for hoe-packaging
|
13
|
+
class Hoe; end
|
14
|
+
|
15
|
+
# main
|
16
|
+
module Hoe::Packaging
|
17
|
+
VERSION = '1.0.0'
|
18
|
+
attr_accessor :create_packages
|
19
|
+
attr_accessor :deploy_packages
|
20
|
+
|
21
|
+
# Initialize plugin
|
22
|
+
def initialize_packaging
|
23
|
+
require 'fileutils'
|
24
|
+
require 'parseconfig'
|
25
|
+
require 'rainbow/ext/string'
|
26
|
+
require 'fpm'
|
27
|
+
end
|
28
|
+
|
29
|
+
def define_packaging_tasks
|
30
|
+
# Rake Task for building packages
|
31
|
+
desc 'Creating deb and rpm files'
|
32
|
+
task :create_packages do
|
33
|
+
create_packages_method
|
34
|
+
end
|
35
|
+
|
36
|
+
# Rake task for deploying packages
|
37
|
+
desc 'Deploying packages to bintray'
|
38
|
+
task :deploy_packages do
|
39
|
+
deploy_bintray_method
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Method for creating deb and rpm packages
|
44
|
+
def create_packages_method
|
45
|
+
FileUtils.cd('recipes') do
|
46
|
+
puts 'Creating the deb package'.colour(:yellow)
|
47
|
+
system('fpm-cook -t deb')
|
48
|
+
puts 'deb creating done'.colour(:green)
|
49
|
+
puts 'Creating the rpm package'.colour(:yellow)
|
50
|
+
system('fpm-cook -t rpm')
|
51
|
+
puts 'rpm creating done'.colour(:green)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# Method for deploying to bintray
|
56
|
+
def deploy_bintray_method
|
57
|
+
project = get_projectname
|
58
|
+
config = ParseConfig.new(File.join("#{Dir.home}/.hoe-packaging/hoe-packaging.cfg"))
|
59
|
+
user = config['bintray_user'].to_s
|
60
|
+
apikey = config['bintray_api_key'].to_s
|
61
|
+
version = File.open(*Dir.glob('VERSION')) { |f| f.readline }
|
62
|
+
puts 'Deploying packages to bintray'.colour(:yellow)
|
63
|
+
puts project
|
64
|
+
FileUtils.cd('recipes/pkg') do
|
65
|
+
filerpm = Dir.glob('*.rpm')
|
66
|
+
filedeb = Dir.glob('*.deb')
|
67
|
+
rpm = filerpm.first.to_s
|
68
|
+
deb = filedeb.first.to_s
|
69
|
+
puts deb
|
70
|
+
puts rpm
|
71
|
+
system("curl -T #{rpm} -u#{user}:#{apikey} https://api.bintray.com/content/#{user}/rpm/#{project}/v#{version}/pool/main/r/;publish=1")
|
72
|
+
system("curl -T #{deb} -u#{user}:#{apikey} 'https://api.bintray.com/content/#{user}/deb/#{project}/v#{version}/pool/main/r/#{deb};deb_distribution=ubuntu;deb_component=main;deb_architecture=i386,amd64'")
|
73
|
+
end
|
74
|
+
puts 'Deploying succeeded'.colour(:green)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Method for getting the project name
|
78
|
+
def get_projectname
|
79
|
+
pnameraw = File.open(*Dir.glob('README.*')) { |f| f.readline }
|
80
|
+
project = pnameraw.gsub(/[^0-9A-Za-z_-]/, '')
|
81
|
+
return project
|
82
|
+
end
|
83
|
+
end
|
data/post-commit
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
curl -X POST https://readthedocs.org/build/hoe-manns
|
data/recipes/recipe.rb
ADDED
data.tar.gz.sig
ADDED
Binary file
|