kyanite 0.5.10 → 0.5.11
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.
- data/Rakefile.rb +53 -27
- data/lib/kyanite.rb +1 -1
- metadata +1 -1
data/Rakefile.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# ruby encoding: utf-8
|
2
2
|
|
3
|
+
$github_username = 'bklippstein'
|
4
|
+
$projectname = File.dirname(__FILE__).split("/")[-1].strip # Name des Projekt-Stammverzeichnisses
|
5
|
+
|
6
|
+
|
3
7
|
require 'rubygems'
|
4
8
|
require 'hoe'
|
5
9
|
require 'rake'
|
6
|
-
require File.dirname(__FILE__) +
|
10
|
+
require File.dirname(__FILE__) + "/lib/#{$projectname}" # Hauptdatei der Library
|
7
11
|
require 'kyanite/rake'
|
8
12
|
require 'rdoc/task'
|
9
13
|
|
@@ -14,13 +18,13 @@ require 'rdoc/task'
|
|
14
18
|
#
|
15
19
|
# http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe
|
16
20
|
#
|
17
|
-
$hoe = Hoe.spec
|
21
|
+
$hoe = Hoe.spec $projectname do
|
18
22
|
|
19
23
|
# self.rubyforge_name = 'yourgemx' # if different than 'yourgem'
|
20
24
|
|
21
25
|
developer('Bjoern Klippstein', 'klippstein@klippstein.com')
|
22
26
|
summary = 'General toolbox like Facets or ActiveSupport.'
|
23
|
-
urls << [
|
27
|
+
urls << ["http://#{$github_username}.github.com/#{$projectname}/"]
|
24
28
|
remote_rdoc_dir = '' # Release to root only one project
|
25
29
|
extra_deps << ['activesupport', '>= 3.2.8']
|
26
30
|
extra_deps << ['facets', '>= 2.9.3']
|
@@ -30,6 +34,9 @@ $hoe = Hoe.spec 'kyanite' do
|
|
30
34
|
|
31
35
|
end
|
32
36
|
|
37
|
+
# require 'pp'
|
38
|
+
# pp $hoe
|
39
|
+
|
33
40
|
|
34
41
|
# -------------------------------------------------------------------------------------------------------
|
35
42
|
# publish
|
@@ -54,11 +61,13 @@ end
|
|
54
61
|
desc ':git_add, :git_commit, :git_push'
|
55
62
|
task :git_publish => [ :git_add, :git_commit, :git_push ] do
|
56
63
|
puts
|
57
|
-
puts
|
64
|
+
puts '------------------------------------------------------------------------------------'
|
65
|
+
puts ':git_publish publish project to github '
|
66
|
+
puts
|
58
67
|
if Hoe::WINDOZE
|
59
|
-
sh "start https://github.com
|
68
|
+
sh "start https://github.com/#{$github_username}/#{$projectname} "
|
60
69
|
else
|
61
|
-
puts
|
70
|
+
puts "done. Visit https://github.com/#{$github_username}/#{$projectname} "
|
62
71
|
end
|
63
72
|
end
|
64
73
|
|
@@ -101,14 +110,18 @@ end
|
|
101
110
|
|
102
111
|
# git_publish_docs
|
103
112
|
#
|
104
|
-
desc '
|
113
|
+
desc 'publish docs to github'
|
105
114
|
task :git_publish_docs do
|
115
|
+
puts
|
116
|
+
puts '------------------------------------------------------------------------------------'
|
117
|
+
puts ':git_publish_docs publish docs to github '
|
118
|
+
puts
|
106
119
|
|
107
120
|
# Repository erstellen, wenn nötig
|
108
121
|
Dir.chdir '/tmp' do
|
109
|
-
sh
|
122
|
+
sh "git clone https://github.com/#{$github_username}/#{$projectname} " do |ok,res|
|
110
123
|
if ok
|
111
|
-
Dir.chdir
|
124
|
+
Dir.chdir "/tmp/#{$projectname}" do
|
112
125
|
sh 'git checkout --orphan gh-pages '
|
113
126
|
end
|
114
127
|
end
|
@@ -116,25 +129,25 @@ end
|
|
116
129
|
end
|
117
130
|
|
118
131
|
# alles löschen
|
119
|
-
Dir.chdir
|
132
|
+
Dir.chdir "/tmp/#{$projectname}" do
|
120
133
|
sh 'git rm -rf --ignore-unmatch . '
|
121
134
|
end
|
122
135
|
|
123
136
|
# doc rüberkopieren
|
124
137
|
Dir.chdir 'doc' do
|
125
|
-
sh
|
138
|
+
sh "xcopy /E *.* \tmp\#{$projectname} "
|
126
139
|
end
|
127
140
|
|
128
141
|
# publish
|
129
|
-
Dir.chdir
|
142
|
+
Dir.chdir "/tmp/#{$projectname}" do
|
130
143
|
sh 'git add -A '
|
131
144
|
sh "git commit " + ' -m "---" --allow-empty'
|
132
145
|
sh 'git push origin +gh-pages ' # C:\Users\Klippstein\_netrc enthält die Login-Daten
|
133
146
|
|
134
147
|
if Hoe::WINDOZE
|
135
|
-
sh "start http
|
148
|
+
sh "start http://#{$github_username}.github.com/#{$projectname} "
|
136
149
|
else
|
137
|
-
puts
|
150
|
+
puts "done. Visit http://#{$github_username}.github.com/#{$projectname} "
|
138
151
|
end # if
|
139
152
|
|
140
153
|
end # do chdir
|
@@ -152,9 +165,13 @@ end
|
|
152
165
|
|
153
166
|
# Task :rubygems_publish
|
154
167
|
#
|
155
|
-
desc 'release actual version'
|
168
|
+
desc 'release actual version to rubygems'
|
156
169
|
task :rubygems_publish do
|
157
|
-
|
170
|
+
puts
|
171
|
+
puts '------------------------------------------------------------------------------------'
|
172
|
+
puts ':rubygems_publish release actual version to rubygems'
|
173
|
+
puts
|
174
|
+
ENV["VERSION"] = $projectname.to_class.const_get('VERSION')
|
158
175
|
Rake::Task[:release].invoke
|
159
176
|
|
160
177
|
end
|
@@ -163,18 +180,26 @@ end
|
|
163
180
|
|
164
181
|
# Task :gem_uninstall
|
165
182
|
#
|
166
|
-
desc '
|
183
|
+
desc 'uninstall old gem'
|
167
184
|
task :gem_uninstall do
|
168
|
-
|
185
|
+
puts
|
186
|
+
puts '------------------------------------------------------------------------------------'
|
187
|
+
puts ':gem_uninstall uninstall old gem'
|
188
|
+
puts
|
189
|
+
sh "#{'sudo ' unless Hoe::WINDOZE }gem uninstall #{$projectname} --a --ignore-dependencies "
|
169
190
|
end
|
170
191
|
|
171
192
|
|
172
193
|
|
173
194
|
# Task :gem_install
|
174
195
|
#
|
175
|
-
desc '
|
196
|
+
desc 'install gem from rubygems'
|
176
197
|
task :gem_install do
|
177
|
-
|
198
|
+
puts
|
199
|
+
puts '------------------------------------------------------------------------------------'
|
200
|
+
puts ':gem_install install gem from rubygems'
|
201
|
+
puts
|
202
|
+
sh "#{'sudo ' unless Hoe::WINDOZE }gem install #{$projectname} "
|
178
203
|
end
|
179
204
|
|
180
205
|
|
@@ -189,23 +214,24 @@ end
|
|
189
214
|
|
190
215
|
remove_task 'docs'
|
191
216
|
|
192
|
-
desc "
|
217
|
+
desc "generate RDoc documentation"
|
193
218
|
Rake::RDocTask.new(:docs) do |rd|
|
194
|
-
|
219
|
+
|
220
|
+
# puts
|
221
|
+
# puts '------------------------------------------------------------------------------------'
|
222
|
+
# puts ':docs generate RDoc documentation'
|
223
|
+
# puts
|
224
|
+
rd.title = "#{$projectname.capitalize} #{$projectname.to_class.const_get('VERSION')}"
|
195
225
|
|
196
226
|
rd.rdoc_dir = 'doc'
|
197
227
|
rd.rdoc_files.include('lib/**/*.rb')
|
198
228
|
rd.rdoc_files.include('test/**/test_*.rb')
|
199
|
-
rd.rdoc_files.include('README.txt', 'License.txt', 'Div')
|
229
|
+
rd.rdoc_files.include('README.txt', 'License.txt', 'History.txt', 'Div')
|
200
230
|
|
201
231
|
rd.rdoc_files.exclude('lib/kyanite/array/array2')
|
202
232
|
rd.rdoc_files.exclude('lib/kyanite/array/matrix2')
|
203
233
|
rd.rdoc_files.exclude('lib/kyanite/operation/call_tracker')
|
204
|
-
#rd.rdoc_files.exclude('lib/kyanite.rb')
|
205
|
-
|
206
|
-
#rd.main = 'README.txt'
|
207
234
|
|
208
|
-
|
209
235
|
rd.options += [
|
210
236
|
'--tab-width', '4',
|
211
237
|
'--main', 'README.txt',
|
data/lib/kyanite.rb
CHANGED