kyanite 0.5.10 → 0.5.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile.rb +53 -27
  2. data/lib/kyanite.rb +1 -1
  3. 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__) + '/lib/kyanite'
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 'kyanite' do
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 << ['http://bklippstein.github.com/kyanite/']
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/bklippstein/kyanite "
68
+ sh "start https://github.com/#{$github_username}/#{$projectname} "
60
69
  else
61
- puts 'done. Visit https://github.com/bklippstein/kyanite'
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 'Update gh-pages branch'
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 'git clone https://github.com/bklippstein/kyanite ' do |ok,res|
122
+ sh "git clone https://github.com/#{$github_username}/#{$projectname} " do |ok,res|
110
123
  if ok
111
- Dir.chdir '/tmp/kyanite' do
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 '/tmp/kyanite' do
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 'xcopy /E *.* \tmp\kyanite '
138
+ sh "xcopy /E *.* \tmp\#{$projectname} "
126
139
  end
127
140
 
128
141
  # publish
129
- Dir.chdir '/tmp/kyanite' do
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://bklippstein.github.com/kyanite "
148
+ sh "start http://#{$github_username}.github.com/#{$projectname} "
136
149
  else
137
- puts 'done. Visit http://bklippstein.github.com/kyanite '
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
- ENV["VERSION"] = Kyanite::VERSION
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 'Uninstall gem'
183
+ desc 'uninstall old gem'
167
184
  task :gem_uninstall do
168
- sh "#{'sudo ' unless Hoe::WINDOZE }gem uninstall kyanite --a --ignore-dependencies "
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 'Install gem from remote'
196
+ desc 'install gem from rubygems'
176
197
  task :gem_install do
177
- sh "#{'sudo ' unless Hoe::WINDOZE }gem install kyanite "
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 "Generate RDoc documentation for Kyanite"
217
+ desc "generate RDoc documentation"
193
218
  Rake::RDocTask.new(:docs) do |rd|
194
- rd.title = "Kyanite #{Kyanite::VERSION}"
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
@@ -15,7 +15,7 @@ end
15
15
 
16
16
 
17
17
  module Kyanite #:nodoc
18
- VERSION = '0.5.10'
18
+ VERSION = '0.5.11'
19
19
  end
20
20
 
21
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kyanite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.10
4
+ version: 0.5.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: