<< Masa.20101215-update-bbmb-ch | 2010 | Masa.20101213-update-export_fachinfo_yaml >>
spreadsheet gem package is now updated!!
masa@masa ~ $ gem search spreadsheet -r *** REMOTE GEMS *** spreadsheet (0.6.5.0)
Davatz-san's mail latest spreadsheet 0.6.5.0 gem is out
rake release VERSION=0.6.5.0 --trace
Reference
Announcement to ruby-list
Error
masa@masa ~/ywesee/spreadsheet $ rake post_news --trace (in /home/masa/ywesee/spreadsheet) Hoe.new {...} deprecated. Switch to Hoe.spec. WARNING: HOE DEPRECATION: Add '>= 0' to the 'ruby-ole' dependency. ** Invoke post_news (first_time) ** Execute post_news Posted to rubyforge
If I change Hoe.new to Hoe.spec, then
masa@masa ~/ywesee/spreadsheet $ rake post_news --trace (in /home/masa/ywesee/spreadsheet) rake aborted! wrong number of arguments (2 for 1) /home/masa/ywesee/spreadsheet/Rakefile:12:in `spec' /home/masa/ywesee/spreadsheet/Rakefile:12 /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /usr/lib64/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19
But it looks working
Experiment
masa@masa ~/ywesee/spreadsheet $ cat Rakefile # -*- ruby -*- $: << File.expand_path("./lib", File.dirname(__FILE__)) require 'rubygems' require 'hoe' require './lib/spreadsheet.rb' ENV['RDOCOPT'] = '-c utf8' #Hoe.new('spreadsheet', Spreadsheet::VERSION) do |p| Hoe.spec('spreadsheet') do |p| # p.rubyforge_name = 'spreadsheetx' # if different than lowercase project name p.developer('Masaomi Hatakeyama, Zeno R.R. Davatz','mhatakeyama@ywesee.com, zdavatz@ywesee.com') p.remote_rdoc_dir = '' #p.extra_deps << 'ruby-ole' p.extra_deps << ['ruby-ole', '>=1.0'] end # vim: syntax=Ruby
Result
masa@masa ~/ywesee/spreadsheet $ rake gem (in /home/masa/ywesee/spreadsheet)
Commit
Memo (How to create Rakefile)
sow first_project
Rakefile
# -*- ruby -*- require 'rubygems' require 'hoe' # Hoe.plugin :compiler # Hoe.plugin :gem_prelude_sucks # Hoe.plugin :inline # Hoe.plugin :inline # Hoe.plugin :racc # Hoe.plugin :rubyforge # Hoe.plugin :rubyforge Hoe.spec 'swissmedic_diff' do # HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then # you'll never have to touch them again! # (delete this comment too, of course) # developer('FIX', 'FIX@example.com') # self.rubyforge_name = 'swissmedic_diffx' # if different than # 'swissmedic_diff' end # vim: syntax=ruby
Link
Last update
I forgot my password locally
Reset the password
1. Run bbmb.ch/bin/bbmbd
2. Check hash code
src/model/user.rb
def recognizes? session #puts "#{session[:email].inspect} <=> #{@attributes[:email].inspect}" #puts "#{session[:pass].inspect} <=> #{@attributes[:pass_hash].inspect}" return false unless session[:email] && session[:pass] print "session[:pass]=" p session[:pass] print "@attributes[:pass_hash]=" print @attributes[:pass_hash] print "session[:email]=" p session[:email] print "@attributes[:email]=" p @attributes[:email]
3. rewrite the root password
src/model/root.rb
INITIAL_VALUES = { #:email => "hwyss@ywesee.com", :email => "mhatakeyama@ywesee.com", #:pass_hash => "eb5b821092e2f46b27c06a613d7a51dc", :pass_hash => "c4efd5020cb49b9d3257ffa0fbccc0ae" }
4. Confirm login
Access to http://masapharm.bbmb.ch/
Result
Commit
Memo
120 :update_stock, 121 :update_suppliers, 122 :update_users, 123 :update_user_access, 124 :update_group_access,
Note
Commit
I got an error when I pulled on the bbmb server.
$ git pull remote: Counting objects: 13, done. remote: Compressing objects: 100% (7/7), done. remote: Total 7 (delta 6), reused 0 (delta 0) Unpacking objects: 100% (7/7), done. From git+ssh://192.168.0.36/home/ywesee/git/bbmb.ch/ 964a381..e68c022 master -> origin Updating 964a381..e68c022 error: Your local changes to 'src/custom/behavior.rb' would be overwritten by merge. Aborting. Please, commit your changes or stash them before you can merge.
Note
git status on bbmb.ch server
$ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: bin/bbmbd # modified: doc/index.rbx # modified: src/custom/behavior.rb # modified: src/util/bbmbconfig.rb # modified: src/view/favorites.rb # modified: src/view/format.rb # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .gitignore # KD504106_1254299648.dat # behavior.patch # bin/bbmbd.rej # data/ # doc/favicon.ico # doc/resources/dojo.diff # doc/resources/dojo/ # doc/resources/nightly.tgz # doc/robots.txt # src/custom/behavior.rb.orig no changes added to commit (use "git add" and/or "git commit -a")
diff between behavior.rb on bbmb.ch server and the latest behavior.rb on git server
masa@masa ~/work $ diff behavior_bbmb.ch.rb behavior_local.rb 181,182c181,182 < MAIL_RECIPIENTS_CC = ['it@globopharm.com','zdavatz@ywesee.com','hwyss@ywesee.com'] < MAIL_INJECT_RECIPIENTS = ['hwyss@ywesee.com'] --- > MAIL_RECIPIENTS_CC = ['it@globopharm.com','zdavatz@ywesee.com','mhatakeyama@ywesee.com'] > MAIL_INJECT_RECIPIENTS = ['mhatakeyama@ywesee.com'] 184c184 < MAIL_PDF_RECIPIENTS_CC = ['zdavatz@ywesee.com','hwyss@ywesee.com'] --- > MAIL_PDF_RECIPIENTS_CC = ['zdavatz@ywesee.com','mhatakeyama@ywesee.com'] 186c186 < #MAIL_RECIPIENTS = ['hwyss@ywesee.com'] --- > #MAIL_RECIPIENTS = ['mhatakeyama@ywesee.com'] 188c188 < #MAIL_PDF_RECIPIENTS = ['hwyss@ywesee.com'] --- > #MAIL_PDF_RECIPIENTS = ['mhatakeyama@ywesee.com'] 193c193 < :update => '/YWESEE/Out', --- > :update => '/ywesee/Out', 356c356 < error.to = 'hwyss@ywesee.com' --- > error.to = 'mhatakeyama@ywesee.com' 480,492c480,482 < if(flavor == 'vetoquinol') < require 'fileutils' < dir = '/var/www/bbmb.ch/data/vetoquinol/' < FileUtils.mkdir_p(dir) < path = File.join(dir, name) < File.open(path, 'w') { |fh| < fh.puts(transmission_format(user, order)) < } < else < remote_file(:transmit_order, name).open("w") { |file| < file.puts(transmission_format(user, order)) < } < end --- > remote_file(:transmit_order, name).open("w") { |file| > file.puts(transmission_format(user, order)) > }
Note
Question
Next
git status on bbmb.ch
/var/www/bbmb.ch $ git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: bin/bbmbd # modified: doc/index.rbx # modified: src/custom/behavior.rb # modified: src/util/bbmbconfig.rb # modified: src/view/favorites.rb # modified: src/view/format.rb # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .gitignore # KD504106_1254299648.dat # behavior.patch # bin/bbmbd.rej # data/ # doc/favicon.ico # doc/resources/dojo.diff # doc/resources/dojo/ # doc/resources/nightly.tgz # doc/robots.txt # src/custom/.behavior.rb.swp # src/custom/behavior.rb.orig no changes added to commit (use "git add" and/or "git commit -a")
masa@masa ~/work $ diff bbmb.ch_server/bbmbd local/bin/bbmbd 6d5 < require 'fastthread'
masa@masa ~/work $ diff bbmb.ch_server/index.rbx local/doc/index.rbx 8,11c8,9 < $: << File.expand_path('../src', File.dirname(__FILE__)) < require 'util/bbmbconfig' < #load(File.expand_path('../src/util/bbmbconfig.rb', < # File.dirname(__FILE__))) --- > load(File.expand_path('../src/util/bbmbconfig.rb', > File.dirname(__FILE__)))
masa@masa ~/work $ diff bbmb.ch_server/behavior.rb local/src/custom/behavior.rb 181,182c181,182 < MAIL_RECIPIENTS_CC = ['it@globopharm.com','zdavatz@ywesee.com','hwyss@ywesee.com'] < MAIL_INJECT_RECIPIENTS = ['hwyss@ywesee.com'] --- > MAIL_RECIPIENTS_CC = ['it@globopharm.com','zdavatz@ywesee.com','mhatakeyama@ywesee.com'] > MAIL_INJECT_RECIPIENTS = ['mhatakeyama@ywesee.com'] 184c184 < MAIL_PDF_RECIPIENTS_CC = ['zdavatz@ywesee.com','hwyss@ywesee.com'] --- > MAIL_PDF_RECIPIENTS_CC = ['zdavatz@ywesee.com','mhatakeyama@ywesee.com'] 186c186 < #MAIL_RECIPIENTS = ['hwyss@ywesee.com'] --- > #MAIL_RECIPIENTS = ['mhatakeyama@ywesee.com'] 188c188 < #MAIL_PDF_RECIPIENTS = ['hwyss@ywesee.com'] --- > #MAIL_PDF_RECIPIENTS = ['mhatakeyama@ywesee.com'] 356c356 < error.to = 'hwyss@ywesee.com' --- > error.to = 'mhatakeyama@ywesee.com' 480,492c480,482 < if(flavor == 'vetoquinol') < require 'fileutils' < dir = '/var/www/bbmb.ch/data/vetoquinol/' < FileUtils.mkdir_p(dir) < path = File.join(dir, name) < File.open(path, 'w') { |fh| < fh.puts(transmission_format(user, order)) < } < else < remote_file(:transmit_order, name).open("w") { |file| < file.puts(transmission_format(user, order)) < } < end --- > remote_file(:transmit_order, name).open("w") { |file| > file.puts(transmission_format(user, order)) > }
masa@masa ~/work $ diff bbmb.ch_server/bbmbconfig.rb local/src/util/bbmbconfig.rb 6c6 < SERVER_URI = ["druby://localhost:9999"]#, "druby://192.168.0.35:9876"] --- > SERVER_URI = ["druby://localhost:9999", "druby://192.168.0.35:9876"]
masa@masa ~/work $ diff bbmb.ch_server/favorites.rb local/src/view/favorites.rb 58c58 < [9,0,3] => 'info', --- > [8,0,3] => 'info',
masa@masa ~/work $ diff bbmb.ch_server/format.rb local/src/view/format.rb 39c39 < if(comment.to_s.empty?) --- > if(comment.empty?)
Memo
Next