Commit be039a524f60cb80a732ce13b6fcdbd1a73f6e8e
1 parent
1a511c6c
Exists in
add_sisp_to_chef
Adds sisp:prepare Task to noosfero recipe
- Set up admin for sisp environment from config.yml Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
Showing
2 changed files
with
8 additions
and
2 deletions
Show diff stats
cookbooks/noosfero/recipes/default.rb
| ... | ... | @@ -87,6 +87,12 @@ plugins_spb.each do |plugin| |
| 87 | 87 | end |
| 88 | 88 | end |
| 89 | 89 | |
| 90 | +execute 'sisp:environment:prepare' do | |
| 91 | + command "RAILS_ENV=production bundle exec rake sisp:prepare ADMINUSER=#{node['config']['admins'].first[1]} DOMAIN=#{node['config']['sisp_external_hostname']}" | |
| 92 | + cwd '/usr/lib/noosfero' | |
| 93 | + user 'noosfero' | |
| 94 | +end | |
| 95 | + | |
| 90 | 96 | execute 'plugins:activate' do |
| 91 | 97 | command "RAILS_ENV=production bundle exec rake noosfero:plugins:enable_all" |
| 92 | 98 | cwd '/usr/lib/noosfero' | ... | ... |
src/noosfero-spb/software_communities/lib/tasks/import_sisp_software.rake
| ... | ... | @@ -32,7 +32,7 @@ namespace :sisp do |
| 32 | 32 | create_link_blocks env |
| 33 | 33 | env.save |
| 34 | 34 | |
| 35 | - user = Environment.default.users.find_by_login(ENV["ADMINUSER"]) | |
| 35 | + user = Environment.default.users.find_by_email(ENV["ADMINUSER"]) | |
| 36 | 36 | if user.present? |
| 37 | 37 | password = SecureRandom.base64 |
| 38 | 38 | sisp_user = env.users.find_by_login(user.login) |
| ... | ... | @@ -249,7 +249,7 @@ def create_institution sisp_hash |
| 249 | 249 | institution = PublicInstitution.find_or_initialize_by_name(name) |
| 250 | 250 | institution_community.name = name |
| 251 | 251 | institution_community.country = "BR" |
| 252 | - institution_community.state = "DF" | |
| 252 | + institution_community.state = "Distrito Federal" | |
| 253 | 253 | institution_community.city = "Unknown" |
| 254 | 254 | institution_community.environment = $env |
| 255 | 255 | institution_community.save! | ... | ... |