hoe-packaging 1.0.0 → 1.1.0

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: dd09e0b99f57652dc92a12e8ff1886d3e7affe89
4
- data.tar.gz: 745aed5c0340e29b44ed40690db4ee4d21ad0c21
3
+ metadata.gz: 9c24408d4ea20d163853719bf9028cb58685b293
4
+ data.tar.gz: 0b771a1007bfe977f92d7e7de11b80f917f1c703
5
5
  SHA512:
6
- metadata.gz: 7a0376a376d2179161452e290f0fccf364729b92629e95bdd80ff63b2ff114d98eca78177749ab64733b42af246cefc23ffcdcf57d05b3979dd7ff7988149065
7
- data.tar.gz: 80b3ccffcadca43232fd828081678df53e231dd6df3475deb3108b751bce1cc2957b2fdd041b20d6ee2c56a45c9e4aff26f9d116deb3eb6ed0436ad9fa1087fa
6
+ metadata.gz: aa193ebcb810c83714e369400997ea5c0457a46a4fb2f9f589dbbd60a311f9ea1b84268f50961c59231ae38e3d6b21d326718abf331f9666fd6e4ea178340114
7
+ data.tar.gz: 14d43627942c0a66e29c2938ce3a154e2c4bea3333f829c8b06f8050eddde94d2e60ffd2890afcf3e67f894c758e94b90984e94e9fd0f39939b079d693b82f04
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- t�&v��lyl����IJ��b���`r���!�,`�\ (Q$_3٦��y��#Yg0:Ƭ"���}y$Bd thq@-����p��vc��=QB&��R%��#GZr}��g.�r����-l�B�n�?�����Q
2
- ��w>��>���5�偁\y����E�mW�"��-���[�BB%3���_��be�!���������Nj�k<S1
3
- q�A������
4
- #���K��逸�����O(�Z7;�eX�
1
+ Bg���fY3�%֭o�+l3�u��ծ"ZRk /7W<FFE�&������F��{xqd5�t���*�Eq-�T�!
2
+ ��n ��&�`����
3
+ ��c�F_�<�K��ƾ���g��Bs�%�^U� },9k;��� c/(J+�GTW�?ށQQ��T�{_���l ?�-�
data.tar.gz.sig CHANGED
Binary file
data/.index ADDED
@@ -0,0 +1,163 @@
1
+ ---
2
+ revision: 2013
3
+ type: ruby
4
+ sources:
5
+ - VERSION
6
+ - Index.yml
7
+ authors:
8
+ - name: Sascha Manns
9
+ email: samannsml@directbox.com
10
+ organizations: []
11
+ requirements:
12
+ - name: setup
13
+ - name: fpm
14
+ - name: fpm-cookery
15
+ - groups:
16
+ - build
17
+ development: true
18
+ name: bundler
19
+ - groups:
20
+ - build
21
+ development: true
22
+ name: gem-release
23
+ - groups:
24
+ - build
25
+ development: true
26
+ name: hoe
27
+ - groups:
28
+ - build
29
+ development: true
30
+ name: hoe-bundler
31
+ - groups:
32
+ - build
33
+ development: true
34
+ name: hoe-deveiate
35
+ - groups:
36
+ - build
37
+ development: true
38
+ name: hoe-doofus
39
+ - groups:
40
+ - build
41
+ development: true
42
+ name: hoe-gemspec
43
+ - groups:
44
+ - build
45
+ development: true
46
+ name: hoe-git
47
+ - groups:
48
+ - build
49
+ development: true
50
+ name: hoe-highline
51
+ - groups:
52
+ - build
53
+ development: true
54
+ name: hoe-manifest
55
+ - groups:
56
+ - build
57
+ development: true
58
+ name: hoe-manns
59
+ - groups:
60
+ - build
61
+ development: true
62
+ name: hoe-manualgen
63
+ - groups:
64
+ - build
65
+ development: true
66
+ name: hoe-reek
67
+ - groups:
68
+ - build
69
+ development: true
70
+ name: hoe-rubocop
71
+ - groups:
72
+ - build
73
+ development: true
74
+ name: hoe-rubygems
75
+ - groups:
76
+ - build
77
+ development: true
78
+ name: hoe-seattlerb
79
+ - groups:
80
+ - build
81
+ development: true
82
+ name: hoe-travis
83
+ - groups:
84
+ - build
85
+ development: true
86
+ name: hoe-version
87
+ - groups:
88
+ - build
89
+ development: true
90
+ name: hoe-yard
91
+ - groups:
92
+ - build
93
+ development: true
94
+ name: indexer
95
+ - groups:
96
+ - build
97
+ development: true
98
+ name: rake
99
+ - groups:
100
+ - build
101
+ development: true
102
+ name: rdcoc
103
+ - groups:
104
+ - build
105
+ development: true
106
+ name: rspec
107
+ - groups:
108
+ - build
109
+ development: true
110
+ name: reek
111
+ - groups:
112
+ - build
113
+ development: true
114
+ name: rubocop
115
+ - groups:
116
+ - build
117
+ development: true
118
+ name: simplecov
119
+ - groups:
120
+ - test
121
+ development: true
122
+ name: coveralls
123
+ - groups:
124
+ - test
125
+ development: true
126
+ name: ZenTest
127
+ conflicts: []
128
+ alternatives: []
129
+ resources:
130
+ - type: home
131
+ uri: http://saigkill.github.io
132
+ label: Homepage
133
+ - type: code
134
+ uri: https://gitlab.com/saigkill/hoe-packaging
135
+ label: Source Code
136
+ - type: bugs
137
+ uri: https://gitlab.com/saigkill/hoe-manns/issues
138
+ label: Issue Tracker
139
+ - type: features
140
+ uri: https://gitlab.com/saigkill/hoe-manns/issues
141
+ repositories:
142
+ - name: upstream
143
+ scm: git
144
+ uri: https://gitlab.com/saigkill/hoe-packaging.git
145
+ categories:
146
+ - ruby
147
+ - development
148
+ - hoe
149
+ copyrights:
150
+ - holder: Sascha Manns
151
+ year: '2015'
152
+ license: MIT
153
+ customs: []
154
+ paths:
155
+ lib:
156
+ - lib
157
+ version: 1.0.0
158
+ name: hoe-packaging
159
+ title: hoe-packaging
160
+ summary: hoe packaging and deployment
161
+ description: hoe-packaging is a plugin for the hoe ruby projecthelper (https://github.com/seattlerb/hoe).
162
+ It provides creation of rpm and deb packages, also a deployment to bintray.
163
+ date: '2015-10-13'
data/Gemfile CHANGED
@@ -5,13 +5,11 @@
5
5
  source "https://rubygems.org/"
6
6
 
7
7
  gem "bundler", "~>1.10"
8
- gem "setup", "~>5.2"
9
8
  gem "fpm", "~>1.4"
10
- gem "fpm-cookery", "~>0.30.1"
9
+ gem "fpm-cookery", "~>0.30"
11
10
 
12
11
  gem "hoe-highline", "~>0.2", :group => [:development, :test]
13
12
  gem "hoe-yard", ">=0.1.2", :group => [:development, :test]
14
- gem "coveralls", "~>0.8", :group => [:development, :test]
15
13
  gem "gem-release", "~>0.7", :group => [:development, :test]
16
14
  gem "hoe-bundler", "~>1.2", :group => [:development, :test]
17
15
  gem "hoe-deveiate", "~>0.7", :group => [:development, :test]
@@ -26,18 +24,11 @@ gem "hoe-rubygems", "~>1.0", :group => [:development, :test]
26
24
  gem "hoe-seattlerb", "~>1.3", :group => [:development, :test]
27
25
  gem "hoe-travis", "~>1.2", :group => [:development, :test]
28
26
  gem "hoe-version", "~>1.2", :group => [:development, :test]
29
- gem "indexer", "~>0.3", :group => [:development, :test]
30
27
  gem "minitest", "~>5.8.1", :group => [:development, :test]
31
28
  gem "rake", "~>10.0", :group => [:development, :test]
32
29
  gem "reek", "~>3.3", :group => [:development, :test]
33
30
  gem "rspec", "~>3.3", :group => [:development, :test]
34
31
  gem "rubocop", "~>0.34", :group => [:development, :test]
35
- gem "simplecov", "~>0.10", :group => [:development, :test]
36
- gem "test", "~>1.0.0", :group => [:development, :test]
37
- gem "test-unit", "~>3.1.4", :group => [:development, :test]
38
- gem "ZenTest", "~>4.11", :group => [:development, :test]
39
- gem "bundler-audit", "~>0.4.0", :group => [:development, :test]
40
- gem "manns_shared", "~>1.0.0", :group => [:development, :test]
41
32
  gem "hoe", "~>3.14", :group => [:development, :test]
42
33
 
43
34
  # vim: syntax=ruby
data/Gemfile.lock CHANGED
@@ -37,16 +37,7 @@ GEM
37
37
  concord (0.1.5)
38
38
  adamantium (~> 0.2.0)
39
39
  equalizer (~> 0.0.9)
40
- coveralls (0.8.3)
41
- json (~> 1.8)
42
- rest-client (>= 1.6.8, < 2)
43
- simplecov (~> 0.10.0)
44
- term-ansicolor (~> 1.3)
45
- thor (~> 0.19.1)
46
40
  diff-lcs (1.2.5)
47
- docile (1.1.5)
48
- domain_name (0.5.25)
49
- unf (>= 0.0.5, < 1.0.0)
50
41
  equalizer (0.0.11)
51
42
  facter (2.4.4)
52
43
  CFPropertyList (~> 2.2.6)
@@ -71,7 +62,7 @@ GEM
71
62
  hashr (0.0.22)
72
63
  hiera (1.3.4)
73
64
  json_pure
74
- highline (1.7.7)
65
+ highline (1.7.8)
75
66
  hoe (3.14.2)
76
67
  rake (>= 0.8, < 11.0)
77
68
  hoe-bundler (1.2.0)
@@ -104,9 +95,7 @@ GEM
104
95
  hoe-packaging (1.0.0)
105
96
  bundler (~> 1.10)
106
97
  fpm (~> 1.4)
107
- fpm-cookery (~> 0.30.1)
108
- rest-client (~> 1.8)
109
- setup (~> 5.2)
98
+ fpm-cookery (~> 0.30)
110
99
  hoe-reek (1.1.1)
111
100
  bundler (~> 1.10)
112
101
  setup (~> 5.2)
@@ -121,8 +110,6 @@ GEM
121
110
  hoe-version (1.2.0)
122
111
  hoe-yard (0.1.2)
123
112
  yard (>= 0.2.3.1)
124
- http-cookie (1.0.2)
125
- domain_name (~> 0.5)
126
113
  ice_nine (0.11.1)
127
114
  indexer (0.3.1)
128
115
  ipaddress (0.8.0)
@@ -132,22 +119,15 @@ GEM
132
119
  libyajl2 (1.2.0)
133
120
  mail (2.6.3)
134
121
  mime-types (>= 1.16, < 3)
135
- manns_shared (1.0.0)
136
- nokogiri (~> 1.6.6.2)
137
- setup (~> 5.2)
138
122
  memoizable (0.4.2)
139
123
  thread_safe (~> 0.3, >= 0.3.1)
140
124
  mime-types (2.6.2)
141
- mini_portile (0.6.2)
142
125
  minitest (5.8.1)
143
126
  mixlib-cli (1.5.0)
144
127
  mixlib-config (2.2.1)
145
128
  mixlib-log (1.6.0)
146
129
  mixlib-shellout (2.2.1)
147
130
  mixlib-versioning (1.1.0)
148
- netrc (0.10.3)
149
- nokogiri (1.6.6.2)
150
- mini_portile (~> 0.6.0)
151
131
  ohai (8.6.0)
152
132
  chef-config (>= 12.5.0.alpha.1, < 13)
153
133
  ffi (~> 1.9)
@@ -173,7 +153,6 @@ GEM
173
153
  parseconfig (1.0.6)
174
154
  parser (2.2.2.6)
175
155
  ast (>= 1.1, < 3.0)
176
- power_assert (0.2.4)
177
156
  powerpack (0.1.1)
178
157
  private_attr (1.1.0)
179
158
  procto (0.0.2)
@@ -189,10 +168,6 @@ GEM
189
168
  private_attr (~> 1.1)
190
169
  rainbow (~> 2.0)
191
170
  unparser (~> 0.2.2)
192
- rest-client (1.8.0)
193
- http-cookie (>= 1.0.2, < 2.0)
194
- mime-types (>= 1.16, < 3.0)
195
- netrc (~> 0.7)
196
171
  rspec (3.3.0)
197
172
  rspec-core (~> 3.3.0)
198
173
  rspec-expectations (~> 3.3.0)
@@ -213,30 +188,14 @@ GEM
213
188
  rainbow (>= 1.99.1, < 3.0)
214
189
  ruby-progressbar (~> 1.4)
215
190
  ruby-progressbar (1.7.5)
216
- rubytest (0.8.1)
217
191
  safe_yaml (0.9.7)
218
192
  setup (5.2.0)
219
- simplecov (0.10.0)
220
- docile (~> 1.1.0)
221
- json (~> 1.8)
222
- simplecov-html (~> 0.10.0)
223
- simplecov-html (0.10.0)
224
193
  systemu (2.6.5)
225
- term-ansicolor (1.3.2)
226
- tins (~> 1.0)
227
- test (1.0.0)
228
- rubytest
229
- test-unit (3.1.4)
230
- power_assert
231
194
  thor (0.19.1)
232
195
  thread_safe (0.3.5)
233
- tins (1.6.0)
234
196
  travis-lint (1.8.0)
235
197
  hashr (~> 0.0.22)
236
198
  safe_yaml (~> 0.9.0)
237
- unf (0.1.4)
238
- unf_ext
239
- unf_ext (0.0.7.1)
240
199
  unparser (0.2.4)
241
200
  abstract_type (~> 0.0.7)
242
201
  adamantium (~> 0.2.0)
@@ -252,12 +211,9 @@ PLATFORMS
252
211
  ruby
253
212
 
254
213
  DEPENDENCIES
255
- ZenTest (~> 4.11)
256
214
  bundler (~> 1.10)
257
- bundler-audit (~> 0.4.0)
258
- coveralls (~> 0.8)
259
215
  fpm (~> 1.4)
260
- fpm-cookery (~> 0.30.1)
216
+ fpm-cookery (~> 0.30)
261
217
  gem-release (~> 0.7)
262
218
  hoe (~> 3.14)
263
219
  hoe-bundler (~> 1.2)
@@ -275,17 +231,11 @@ DEPENDENCIES
275
231
  hoe-travis (~> 1.2)
276
232
  hoe-version (~> 1.2)
277
233
  hoe-yard (>= 0.1.2)
278
- indexer (~> 0.3)
279
- manns_shared (~> 1.0.0)
280
234
  minitest (~> 5.8.1)
281
235
  rake (~> 10.0)
282
236
  reek (~> 3.3)
283
237
  rspec (~> 3.3)
284
238
  rubocop (~> 0.34)
285
- setup (~> 5.2)
286
- simplecov (~> 0.10)
287
- test (~> 1.0.0)
288
- test-unit (~> 3.1.4)
289
239
 
290
240
  BUNDLED WITH
291
241
  1.10.6
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.1.0 / 2015-10-13
2
+
3
+ * 1 major enhancement
4
+
5
+ * fixed upload to bintray
6
+
1
7
  === 1.0.0 / 2015-10-08
2
8
 
3
9
  * 1 major enhancement
data/Manifest.txt CHANGED
@@ -2,6 +2,7 @@
2
2
  .codeclimate.yml
3
3
  .coveralls.yml
4
4
  .gemnasium.yml
5
+ .index
5
6
  .rspec
6
7
  .rubocop.yml
7
8
  .scrutinizer.yml
@@ -18,8 +19,7 @@ README.rdoc
18
19
  Rakefile
19
20
  VERSION
20
21
  config.reek
21
- etc/hoe-packaging.cfg
22
+ docs/index.md
22
23
  lib/hoe/packaging.rb
23
- post-commit
24
24
  recipes/recipe.rb
25
25
  test/hoe/test_packaging.rb
data/README.rdoc CHANGED
@@ -12,10 +12,11 @@ last deb :: {<img src="https://img.shields.io/bintray/v/saigkill/deb/hoe-packagi
12
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
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
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
+ docs (pdf, epub) :: {<img src="https://readthedocs.org/projects/hoe-packaging/badge/?version=latest" />}[http://hoe-packaging.readthedocs.org/en/latest/?badge=latest]
15
16
  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
17
  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
18
  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
+ dependency check :: {<img src="https://gemnasium.com/000013fdff020ec3ee53268f59f7e202.svg" alt="Dependency Status" />}[https://gemnasium.com/22929d60895d5b3958c980e115239bbc]
19
20
  still maintained? :: {<img src="http://stillmaintained.com/saigkill/hoe-packaging.png" alt="Still maintained?" />}[http://stillmaintained.com/saigkill/hoe-packaging]
20
21
  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
22
  donations :: {<img src="https://pledgie.com/campaigns/30335.png?skin_name=chrome" alt="Donations" />}[https://pledgie.com/campaigns/30335]
@@ -60,8 +61,6 @@ Also add hoe-packaging to your requirements and recreate your Gemfile.
60
61
  == INSTALL:
61
62
 
62
63
  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
64
 
66
65
  == DEVELOPERS:
67
66
 
@@ -75,6 +74,7 @@ and generate the RDoc.
75
74
  Merge Requests are welcome :-)
76
75
 
77
76
  Read https://gitlab.com/saigkill/hoe-packaging/blob/master/CONTRIBUTING.md
77
+
78
78
  Maintenance infos: https://gitlab.com/saigkill/hoe-packaging/blob/master/MAINTENANCE.md
79
79
 
80
80
  == LICENSE:
data/Rakefile CHANGED
@@ -16,12 +16,12 @@ Hoe.plugin :bundler
16
16
  Hoe.plugin :doofus
17
17
  Hoe.plugin :email
18
18
  Hoe.plugin :gemspec
19
- #Hoe.plugin :gem_prelude_sucks
20
- Hoe.plugins.delete :git
19
+ # Hoe.plugin :gem_prelude_sucks
20
+ # Hoe.plugins.delete :git
21
21
  #Hoe.plugin :git
22
22
  Hoe.plugin :history
23
23
  Hoe.plugin :highline
24
- #Hoe.plugin :inline
24
+ # Hoe.plugin :inline
25
25
  Hoe.plugin :manns
26
26
  Hoe.plugin :packaging
27
27
  # Hoe.plugin :mercurial
@@ -50,14 +50,12 @@ Hoe.spec 'hoe-packaging' do
50
50
  self.history_file = 'History.rdoc'
51
51
  self.readme_file = 'README.rdoc'
52
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'
53
+ self.post_install_message = '*** Extend your hoerc: http://bit.ly/1jj5Quw *** Please file bugreports and feature requests on: https://gitlab.com/saigkill/hoe-packaging/issues'
54
54
 
55
55
  dependency 'bundler', '~> 1.10'
56
- dependency 'setup', '~> 5.2'
57
56
  dependency 'fpm', '~> 1.4'
58
- dependency 'fpm-cookery', '~> 0.30.1'
57
+ dependency 'fpm-cookery', '~> 0.30'
59
58
 
60
- extra_dev_deps << ['coveralls', '~> 0.8']
61
59
  extra_dev_deps << ['gem-release', '~> 0.7']
62
60
  extra_dev_deps << ['hoe-bundler', '~> 1.2']
63
61
  extra_dev_deps << ['hoe-deveiate', '~> 0.7']
@@ -74,28 +72,14 @@ Hoe.spec 'hoe-packaging' do
74
72
  extra_dev_deps << ['hoe-travis', '~> 1.2']
75
73
  extra_dev_deps << ['hoe-version', '~> 1.2']
76
74
  extra_dev_deps << ['hoe-yard', '~> 0.1']
77
- extra_dev_deps << ['indexer', '~> 0.3']
78
75
  extra_dev_deps << ['minitest', '~> 5.8.1']
79
76
  extra_dev_deps << ['rake', '~> 10.0']
80
77
  extra_dev_deps << ['reek', '~> 3.3']
81
78
  extra_dev_deps << ['rspec', '~> 3.3']
82
79
  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
80
  end
91
81
 
92
82
  ##################################################SETUP ZONE############################################################
93
83
 
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
84
 
101
85
  # vim: syntax=ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 1.1.0
data/docs/index.md ADDED
@@ -0,0 +1,66 @@
1
+ # Introduction
2
+ This hoe plugin provides two new rake tasks:
3
+ * create_packages
4
+ * deploy_packages
5
+
6
+ ## Config
7
+ hoe-packaging uses the official ~/.hoerc. So you have to add that lines to your hoerc:
8
+
9
+ ```
10
+ deploy:
11
+ username: youruser
12
+ apikey: 123456789
13
+ ```
14
+
15
+ ## Create packages
16
+ The "create_packages" workaround looks like:
17
+
18
+ ``` ruby
19
+ def create_packages_method
20
+ FileUtils.cd('recipes') do
21
+ puts 'Creating the deb package'.colour(:yellow)
22
+ system('fpm-cook -t deb')
23
+ puts 'deb creating done'.colour(:green)
24
+ puts 'Creating the rpm package'.colour(:yellow)
25
+ system('fpm-cook -t rpm')
26
+ puts 'rpm creating done'.colour(:green)
27
+ end
28
+ end
29
+ ```
30
+ As you can see, it expects in your project root directory a directory called "recipes" and inside them a "recipe.rb". The recipe.rb contains some metadata and looks like:
31
+ ``` ruby
32
+ class HoePackagingRubyGem < FPM::Cookery::RubyGemRecipe
33
+ name 'hoe-packaging'
34
+ version '1.1.0'
35
+ maintainer 'Sascha Manns <samannsml@directbox.com>'
36
+ end
37
+ ```
38
+ fpm-cook starts and tries (with that recipe above) to download the gem "hoe-packaging" in version "1.1.0". This gem will now converted into the rpm and deb package format. The produced packages are now available in "recipes/pkg".
39
+
40
+ ## Deploy packages
41
+ The "deploy_packages" workaround looks like:
42
+ ``` ruby
43
+ def deploy_bintray_method
44
+ project = get_projectname
45
+ config = ParseConfig.new(File.join("#{Dir.home}/.hoe-packaging/hoe-packaging.cfg"))
46
+ user = config['bintray_user'].to_s
47
+ apikey = config['bintray_api_key'].to_s
48
+ version = File.open(*Dir.glob('VERSION')) { |f| f.readline }
49
+ puts 'Deploying packages to bintray'.colour(:yellow)
50
+ puts project
51
+ FileUtils.cd('recipes/pkg') do
52
+ filerpm = Dir.glob('*.rpm')
53
+ filedeb = Dir.glob('*.deb')
54
+ rpm = filerpm.first.to_s
55
+ deb = filedeb.first.to_s
56
+ puts deb
57
+ puts rpm
58
+ system("curl -T #{rpm} -u#{user}:#{apikey} https://api.bintray.com/content/#{user}/rpm/#{project}/v#{version}/pool/main/r/;publish=1")
59
+ 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'")
60
+ end
61
+ puts 'Deploying succeeded'.colour(:green)
62
+ end
63
+ ```
64
+ After you installed hoe-packaging with "rake setup" a new configfile is created in $HOME/.hoe-packaging/hoe-packaging.cfg. This file serves as holder for your bintray username and your bintray apikey. This information gets that method above. For getting the version it expects a file called "VERSION" just with the version number included. Maybe this is not the best solution, but atm i don't know another. If you, dear reader, knows a better solution, i'm happy about a merge request.
65
+ Now it changes the directory into "recipes/pkg" and pushs both files to bintray.
66
+ ATTENTION: You must already have setup the packages and repositories in bintray. Otherwise curl doesn't know, where to store it.
data/lib/hoe/packaging.rb CHANGED
@@ -10,11 +10,9 @@
10
10
 
11
11
 
12
12
  # Main module for hoe-packaging
13
- class Hoe; end
14
-
15
- # main
16
13
  module Hoe::Packaging
17
- VERSION = '1.0.0'
14
+ # Versionizing
15
+ VERSION = '1.1.0'
18
16
  attr_accessor :create_packages
19
17
  attr_accessor :deploy_packages
20
18
 
@@ -24,6 +22,7 @@ module Hoe::Packaging
24
22
  require 'parseconfig'
25
23
  require 'rainbow/ext/string'
26
24
  require 'fpm'
25
+ require 'yaml'
27
26
  end
28
27
 
29
28
  def define_packaging_tasks
@@ -41,6 +40,7 @@ module Hoe::Packaging
41
40
  end
42
41
 
43
42
  # Method for creating deb and rpm packages
43
+ # @return [String] true or false
44
44
  def create_packages_method
45
45
  FileUtils.cd('recipes') do
46
46
  puts 'Creating the deb package'.colour(:yellow)
@@ -53,31 +53,59 @@ module Hoe::Packaging
53
53
  end
54
54
 
55
55
  # Method for deploying to bintray
56
+ # @return [String] true or false
56
57
  def deploy_bintray_method
57
58
  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 }
59
+ user, apikey = get_bintray_config
60
+ version = get_version
61
+ path = 'pool/main/r'
62
+ debadd = ';deb_distribution=ubuntu;deb_component=main;deb_architecture=i386,amd64'
63
+ publish = ';publish=1'
62
64
  puts 'Deploying packages to bintray'.colour(:yellow)
63
- puts project
65
+
64
66
  FileUtils.cd('recipes/pkg') do
65
67
  filerpm = Dir.glob('*.rpm')
66
68
  filedeb = Dir.glob('*.deb')
67
69
  rpm = filerpm.first.to_s
68
70
  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'")
71
+
72
+ rpmup = system("curl -T #{rpm} -u#{user}:#{apikey} https://api.bintray.com/content/#{user}/rpm/#{project}/v#{version}/#{path}/#{publish}")
73
+ begin
74
+ rpmup["message"] == "success"
75
+ rescue NoMethodError
76
+ false
77
+ end
78
+ debup = system("curl -T #{deb} -u#{user}:#{apikey} 'https://api.bintray.com/content/#{user}/deb/#{project}/v#{version}/#{path}/#{deb}#{debadd}#{publish}'")
79
+ begin
80
+ debup["message"] == "success"
81
+ rescue
82
+ NoMethodError
83
+ false
84
+ end
73
85
  end
74
86
  puts 'Deploying succeeded'.colour(:green)
75
87
  end
76
88
 
77
89
  # Method for getting the project name
90
+ # @return [String] project Returns project name
78
91
  def get_projectname
79
92
  pnameraw = File.open(*Dir.glob('README.*')) { |f| f.readline }
80
93
  project = pnameraw.gsub(/[^0-9A-Za-z_-]/, '')
81
- return project
94
+ end
95
+
96
+ # Method for getting the bintray config
97
+ # @return [Array] user apikey
98
+ def get_bintray_config
99
+ config = YAML.load(File.read("#{Dir.home}/.hoerc"))
100
+ user = config['deploy']['username'].to_s
101
+ apikey = config['deploy']['apikey'].to_s
102
+ [user, apikey]
103
+ end
104
+
105
+ # Method for getting version
106
+ # @return [String] version
107
+ def get_version
108
+ version = File.open(*Dir.glob('VERSION')) { |f| f.readline }
109
+ version.chomp.to_s
82
110
  end
83
111
  end
data/recipes/recipe.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # Recipe class
2
2
  class HoePackagingRubyGem < FPM::Cookery::RubyGemRecipe
3
3
  name 'hoe-packaging'
4
- version '1.1.0'
4
+ version '1.0.0'
5
5
  maintainer 'Sascha Manns <samannsml@directbox.com>'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe-packaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sascha Manns
@@ -30,7 +30,7 @@ cert_chain:
30
30
  cEuJ8AWKUjdkdt1Nba7qmareRtc2+pEiITV5ANv24b8vsmq9/8nbxQckdO7+NQRP
31
31
  pTQZhJ4mX28Qe1F9IE4F4UDeo8gQSPHJOttZA33sRLC19sH67dLq4pM=
32
32
  -----END CERTIFICATE-----
33
- date: 2015-10-08 00:00:00.000000000 Z
33
+ date: 2015-10-13 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: bundler
@@ -46,20 +46,6 @@ dependencies:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: '1.10'
49
- - !ruby/object:Gem::Dependency
50
- name: setup
51
- requirement: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '5.2'
56
- type: :runtime
57
- prerelease: false
58
- version_requirements: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '5.2'
63
49
  - !ruby/object:Gem::Dependency
64
50
  name: fpm
65
51
  requirement: !ruby/object:Gem::Requirement
@@ -80,14 +66,14 @@ dependencies:
80
66
  requirements:
81
67
  - - "~>"
82
68
  - !ruby/object:Gem::Version
83
- version: 0.30.1
69
+ version: '0.30'
84
70
  type: :runtime
85
71
  prerelease: false
86
72
  version_requirements: !ruby/object:Gem::Requirement
87
73
  requirements:
88
74
  - - "~>"
89
75
  - !ruby/object:Gem::Version
90
- version: 0.30.1
76
+ version: '0.30'
91
77
  - !ruby/object:Gem::Dependency
92
78
  name: hoe-highline
93
79
  requirement: !ruby/object:Gem::Requirement
@@ -116,20 +102,6 @@ dependencies:
116
102
  - - ">="
117
103
  - !ruby/object:Gem::Version
118
104
  version: 0.1.2
119
- - !ruby/object:Gem::Dependency
120
- name: coveralls
121
- requirement: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - "~>"
124
- - !ruby/object:Gem::Version
125
- version: '0.8'
126
- type: :development
127
- prerelease: false
128
- version_requirements: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '0.8'
133
105
  - !ruby/object:Gem::Dependency
134
106
  name: gem-release
135
107
  requirement: !ruby/object:Gem::Requirement
@@ -326,20 +298,6 @@ dependencies:
326
298
  - - "~>"
327
299
  - !ruby/object:Gem::Version
328
300
  version: '1.2'
329
- - !ruby/object:Gem::Dependency
330
- name: indexer
331
- requirement: !ruby/object:Gem::Requirement
332
- requirements:
333
- - - "~>"
334
- - !ruby/object:Gem::Version
335
- version: '0.3'
336
- type: :development
337
- prerelease: false
338
- version_requirements: !ruby/object:Gem::Requirement
339
- requirements:
340
- - - "~>"
341
- - !ruby/object:Gem::Version
342
- version: '0.3'
343
301
  - !ruby/object:Gem::Dependency
344
302
  name: minitest
345
303
  requirement: !ruby/object:Gem::Requirement
@@ -410,90 +368,6 @@ dependencies:
410
368
  - - "~>"
411
369
  - !ruby/object:Gem::Version
412
370
  version: '0.34'
413
- - !ruby/object:Gem::Dependency
414
- name: simplecov
415
- requirement: !ruby/object:Gem::Requirement
416
- requirements:
417
- - - "~>"
418
- - !ruby/object:Gem::Version
419
- version: '0.10'
420
- type: :development
421
- prerelease: false
422
- version_requirements: !ruby/object:Gem::Requirement
423
- requirements:
424
- - - "~>"
425
- - !ruby/object:Gem::Version
426
- version: '0.10'
427
- - !ruby/object:Gem::Dependency
428
- name: test
429
- requirement: !ruby/object:Gem::Requirement
430
- requirements:
431
- - - "~>"
432
- - !ruby/object:Gem::Version
433
- version: 1.0.0
434
- type: :development
435
- prerelease: false
436
- version_requirements: !ruby/object:Gem::Requirement
437
- requirements:
438
- - - "~>"
439
- - !ruby/object:Gem::Version
440
- version: 1.0.0
441
- - !ruby/object:Gem::Dependency
442
- name: test-unit
443
- requirement: !ruby/object:Gem::Requirement
444
- requirements:
445
- - - "~>"
446
- - !ruby/object:Gem::Version
447
- version: 3.1.4
448
- type: :development
449
- prerelease: false
450
- version_requirements: !ruby/object:Gem::Requirement
451
- requirements:
452
- - - "~>"
453
- - !ruby/object:Gem::Version
454
- version: 3.1.4
455
- - !ruby/object:Gem::Dependency
456
- name: ZenTest
457
- requirement: !ruby/object:Gem::Requirement
458
- requirements:
459
- - - "~>"
460
- - !ruby/object:Gem::Version
461
- version: '4.11'
462
- type: :development
463
- prerelease: false
464
- version_requirements: !ruby/object:Gem::Requirement
465
- requirements:
466
- - - "~>"
467
- - !ruby/object:Gem::Version
468
- version: '4.11'
469
- - !ruby/object:Gem::Dependency
470
- name: bundler-audit
471
- requirement: !ruby/object:Gem::Requirement
472
- requirements:
473
- - - "~>"
474
- - !ruby/object:Gem::Version
475
- version: 0.4.0
476
- type: :development
477
- prerelease: false
478
- version_requirements: !ruby/object:Gem::Requirement
479
- requirements:
480
- - - "~>"
481
- - !ruby/object:Gem::Version
482
- version: 0.4.0
483
- - !ruby/object:Gem::Dependency
484
- name: manns_shared
485
- requirement: !ruby/object:Gem::Requirement
486
- requirements:
487
- - - "~>"
488
- - !ruby/object:Gem::Version
489
- version: 1.0.0
490
- type: :development
491
- prerelease: false
492
- version_requirements: !ruby/object:Gem::Requirement
493
- requirements:
494
- - - "~>"
495
- - !ruby/object:Gem::Version
496
- version: 1.0.0
497
371
  - !ruby/object:Gem::Dependency
498
372
  name: hoe
499
373
  requirement: !ruby/object:Gem::Requirement
@@ -523,11 +397,13 @@ extra_rdoc_files:
523
397
  - MAINTENANCE.md
524
398
  - Manifest.txt
525
399
  - README.rdoc
400
+ - docs/index.md
526
401
  files:
527
402
  - ".autotest"
528
403
  - ".codeclimate.yml"
529
404
  - ".coveralls.yml"
530
405
  - ".gemnasium.yml"
406
+ - ".index"
531
407
  - ".rspec"
532
408
  - ".rubocop.yml"
533
409
  - ".scrutinizer.yml"
@@ -544,16 +420,15 @@ files:
544
420
  - Rakefile
545
421
  - VERSION
546
422
  - config.reek
547
- - etc/hoe-packaging.cfg
423
+ - docs/index.md
548
424
  - lib/hoe/packaging.rb
549
- - post-commit
550
425
  - recipes/recipe.rb
551
426
  - test/hoe/test_packaging.rb
552
427
  homepage: http://saigkill.github.io
553
428
  licenses:
554
429
  - MIT
555
430
  metadata: {}
556
- post_install_message: "*** Run rake setup to finish the installation *** Please file
431
+ post_install_message: "*** Extend your hoerc: http://bit.ly/1jj5Quw *** Please file
557
432
  bugreports and feature requests on: https://gitlab.com/saigkill/hoe-packaging/issues"
558
433
  rdoc_options:
559
434
  - "--title"
metadata.gz.sig CHANGED
Binary file
@@ -1,2 +0,0 @@
1
- bintray_user = "anyone"
2
- bintray_api_key = "1234567890"
data/post-commit DELETED
@@ -1 +0,0 @@
1
- curl -X POST https://readthedocs.org/build/hoe-manns