2 # This file is part of SMR.
4 # SMR is free software: you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the Free Software
6 # Foundation, either version 3 of the License, or (at your option) any later
9 # SMR is distributed in the hope that it will be useful, but WITHOUT ANY
10 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along with
14 # SMR. If not, see <http://www.gnu.org/licenses/>.
18 if not Organization.where(:id=>Smr::ID_UNIVERSE_ORGANIZATION).first then
20 :id=>Smr::ID_UNIVERSE_ORGANIZATION, :name=>'Universe',
21 :description=>'This is where you live in. And everything else. The totality of existence.'
25 # FIXME: to be tested + create random password
27 # :login=>'admin', :id=>1, :is_admin=>1, :fullname=>'SMR Admin',
28 # :password=>'admin', :password_auth_token=>'657096b5f9583acaebbf6001d434cd7090d3d8ee',
29 # :email=>'root@localhost.localdomain',:comment=>'Default Administrative Account.'
32 # this "Stock" is used to represent Cash Positions
33 # - the symbols is fake as long as currencies are not supported
34 # - id=1 is important as this is used by the code to find this security!
35 # - NOTE: use save! for debugging
36 if not Security.where(:id=>Smr::ID_CASH_SECURITY).first then
38 :id=>Smr::ID_CASH_SECURITY,
39 :id_organization=>Smr::ID_UNIVERSE_ORGANIZATION,
40 :type=>:cash, :fetch_quote=>0, :symbol=>'EUR',
41 :brief=>'Cash Balance',
42 :description=>'Cash Balance on a Broker Account'
45 cash_quote = Quote.new(
46 :last=>1, :id_security=>Smr::ID_CASH_SECURITY, :date_last=>Time.new(2000,1,1).to_i