GitHub PullRequestReviewCommentEvent at 2014-08-21 19:53:28
Repository: weby
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/cercomp/weby/pulls/comments/16563338","id":16563338,"diff_hunk":"@@ -0,0 +1,1109 @@\n+#! /usr/bin/env ruby\n+# coding: UTF-8\n+#\n+# Script de migração da base de dados This para Weby.\n+#\n+require 'rubygems'\n+require 'pg'\n+require 'yaml'\n+require 'cgi'\n+require 'htmlentities'\n+#require 'iconv'\n+require 'pp'\n+require 'mime/types'\n+require 'csv'\n+ \n+# Classe par migração do banco\n+class Migrate_this2weby\n+  def initialize(verbose=true)\n+    # Coneção com os dois bancos\n+    if not File.exist?(\"config-migrate.yml\")\n+      puts \"É necessário criar o arquivo config-migrate.yml com as diretivas de conexão.\"\n+      print \"Exemplo:\\nthis:\\n  adapter: postgresql\\n  host: localhost\\n  database: this\\n  username: this\\n  password: senha_this\\n\\nweby:\\n  adapter: postgresql\\n  host: localhost\\n  database: weby\\n  username: weby\\n  password: senha_weby\\n\"\n+      exit\n+    end\n+    @config = YAML::load(File.open(\"config-migrate.yml\"))\n+    \n+    @con_this = PGconn.connect(@config['this']['host'],nil,nil,nil,@config['this']['database'],@config['this']['username'],@config['this']['password'])\n+    @con_weby = PGconn.connect(@config['weby']['host'],nil,nil,nil,@config['weby']['database'],@config['weby']['username'],@config['weby']['password'])\n+    @verbose = verbose\n+    #@param = \"WHERE site_id=68\"\n+\n+    count_sites = @con_weby.exec(\"SELECT count(*) FROM sites\")\n+    if File.exists?(\"./convar.yml\") and count_sites[0]['count'].to_i > 0\n+      @convar = YAML::load(File.open(\"./convar.yml\"))\n+    else\n+      @convar = {} # Variável de conversão\n+    end\n+  end\n+\n+  def migrate_this\n+    puts \"Migrando tabela this.sites para weby.sites...\\n\" if @verbose\n+    select_sites = \"SELECT * FROM sites #{@param} ORDER BY site_id\"\n+    this_sites = @con_this.exec(select_sites)\n+\n+    \n+    ## pegar os id's das tabelas que serão atualizadas depois, para atualizar só o que inserir\n+    select_menu_items = \"SELECT max(id) FROM menu_items\"\n+    id_weby_menu_items = @con_weby.exec(select_menu_items)\n+\n+    select_menu_items = \"SELECT max(id)FROM menu_item_i18ns\"\n+    id_weby_menu_items_i18ns = @con_weby.exec(select_menu_items)\n+\n+    select_pages = \"SELECT max(id) FROM pages\"\n+    id_weby_pages = @con_weby.exec(select_pages)\n+\n+    select_pages = \"SELECT max(id) FROM page_i18ns\"\n+    id_weby_pages_i18ns = @con_weby.exec(select_pages)\n+\n+    select_menu_items = \"\"\n+    select_pages = \"\"\n+            \n+    puts \"ID's: #{id_weby_menu_items[0]['max']}, #{id_weby_menu_items_i18ns[0]['max']}, #{id_weby_pages[0]['max']}, #{id_weby_pages_i18ns[0]['max']} \"\n+    \n+\t\t# Inserindo o que futuramente seria o site da UFG\n+    #insert_UFG = \"INSERT INTO sites (name,url,description,footer,body_width,menu_dropdown,theme) VALUES ('ufg','www.ufg.br','Portal UFG','','960',true,'this2')\"\n+    #@con_weby.exec(insert_UFG)\n+\n+    arquivo = 'dominios.txt'\n+    dominios = {}\n+    CSV.foreach(arquivo) do |linha|\n+      dominios[linha[1]] = linha[0]\n+    end\n+\n+    # Laço de repetição\n+    this_sites.each do |this_site|\n+\n+      if not dominios[\"#{this_site['site_id']}\"]\n+        next\n+      end\n+\n+      # Gerando o nome do site\n+      site_name = /http:\\/\\/www.([a-z\\-]+).*\\/([a-z\\-]+)/.match(\"#{this_site['caminho_http']}\")\n+      \n+      if not site_name.nil?\n+        site_name = \"#{site_name[1]}_#{site_name[2]}\"\n+      else\n+        site_name = /http:\\/\\/www.([a-z\\-]+).*/.match(\"#{this_site['caminho_http']}\")\n+        if not site_name.nil?\n+          site_name = \"#{site_name[1]}\"\n+        end\n+      end\n+      site_name ||= this_site['site_id']\n+      puts \"Migrando #{site_name} :: #{dominios[\"#{this_site['site_id']}\"]}\"\n+\n+      # Criando estrutura da variável de conversão\n+      @convar[\"#{this_site['site_id']}\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"usuarios\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"menus_superior\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"menus_inferior\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"menus_direito\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"menus_esquerdo\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"informativos\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"eventos\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"paginas\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"paginas_menus\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"noticias\"] ||= {}\n+      @convar[\"#{this_site['site_id']}\"][\"weby_name\"] = \"#{site_name}\"\n+\n+      select_rodape = \"SELECT endereco,telefone FROM rodape WHERE site_id='#{this_site['site_id']}'\"\n+      puts \"\\tSELECIONANDO o ropapé do site #{this_site['site_id']}\" if @verbose\n+      rodape = @con_this.exec(select_rodape)\n+      rodape_text = \"#{pre_treat(rodape.first['endereco'])} #{pre_treat(rodape.first['telefone'])}\" unless rodape.first.nil?\n+#      rodape_text = rodape_text.force_encoding(\"UTF-8\").valid_encoding? ? rodape_text : \"\" if rodape_text\n+\n+      if @convar[\"#{this_site['site_id']}\"][\"weby\"].nil?\n+        use_menu_dropdown = this_site['drop_down_esquerdo'].to_i == 1 ? true : false\n+        insert_site = \"INSERT INTO sites (name,url,description,title,footer,body_width,menu_dropdown,theme,created_at,updated_at) VALUES ('#{pre_treat(site_name)}','#{pre_treat(this_site['caminho_http'])}','#{pre_treat(this_site['nm_site'])}','#{pre_treat(this_site['nm_site'])[0..49]}','#{rodape_text}','900','#{use_menu_dropdown}','this2', '#{Time.now}', '#{Time.now}') RETURNING id\"\n+        site = @con_weby.exec(insert_site)\n+        puts \"\\t\\tINSERINDO (#{site[0]['id']}) #{site_name} - #{this_site['nm_site']} \\n\" if @verbose\n+        puts \"\\t\\t\\tMenu Dropdown: #{use_menu_dropdown}\"\n+        # Criando objeto de conversão\n+        @convar[\"#{this_site['site_id']}\"][\"weby\"] = site[0]['id']\n+      end\n+      \n+      # Inserindo componentes por omissão para portais vindos do This\n+      puts \"\\tINSERINDO estruturação de componentes...\\n\"\n+      banner_site = ''\n+      \n+      if this_site['banner'].to_s != ''\n+        banner_site = \"INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'home','{}','image',1,true,'#{Time.now}','#{Time.now}');\"\n+        front_news = \"INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'home','{:quant => \\\"5\\\"}','front_news',2,true,'#{Time.now}','#{Time.now}');\"\n+        if this_site['banner2'].to_s != ''\n+          banner_site_inferior = \"INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'home','{}','image',3,true,'#{Time.now}','#{Time.now}');\"\n+        end\n+        news_list = \"INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'home','{:quant => \\\"5\\\"}','news_list',3,true,'#{Time.now}','#{Time.now}');\"\n+      else\n+        front_news = \"INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'home','{:quant => \\\"5\\\"}','front_news',1,true,'#{Time.now}','#{Time.now}');\"\n+        news_list = \"INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'home','{:quant => \\\"5\\\"}','news_list',2,true,'#{Time.now}','#{Time.now}');\"\n+      end\n+      insert_site_comp = <<EOF\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'first_place','{:background => \"#7f7f7f\"}','gov_bar',1,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'first_place','{}','institutional_bar',2,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'top','{}','image',1,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'top','{}','menu',2,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'top','{}','menu_accessibility',3,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'right','{}','search_box',1,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'right','{}','menu',2,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'right','{:category => \\\"dir\\\", :orientation => \\\"vertical\\\"}','banner_list',3,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'bottom','{}','menu',1,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'bottom','{:body => {\\\"pt-BR\\\" => \\\"#{rodape_text}\\\"}, :html_class => \\\"footer\\\"}','text',2,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'bottom','{}','feedback',3,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'left','{}','menu',1,true,'#{Time.now}','#{Time.now}');\n+        INSERT INTO site_components (site_id,place_holder,settings,name,position,publish,created_at,updated_at)values(#{site[0]['id']},'left','{:category => \\\"esq\\\", :orientation => \\\"vertical\\\"}','banner_list',2,true,'#{Time.now}','#{Time.now}');\n+        #{banner_site}\n+        #{front_news}\n+        #{banner_site_inferior}\n+        #{news_list}\n+EOF\n+      @con_weby.exec(insert_site_comp)\n+\n+      # Inserindo extensões por omissão para portais vindos do This\n+      puts \"\\tINSERINDO estruturação de extensões...\\n\"\n+      insert_site_extensao = \"INSERT INTO extension_sites (site_id,name,created_at,updated_at)values(#{site[0]['id']},'feedback','#{Time.now}','#{Time.now}');\"\n+\n+      @con_weby.exec(insert_site_extensao)\n+      \n+\t\t\t# Migrando estilos\n+      puts \"\\tSELECIONANDO todos os estilos\" if @verbose\n+      select_estilo = \"SELECT * FROM estilo WHERE id='#{this_site['id_estilo']}'\"\n+      this_estilo = @con_this.exec(select_estilo)\n+\n+      if not this_estilo.first.nil?# and site[0]['id'].to_i != 70\n+weby_estilo = <<EOF\n+/* Fundo do site */\n+html{ background: #{pre_treat(this_estilo.first['body_background'])}; }\n+\n+/* Borda dos menus */ \n+header nav menu li,\n+footer nav menu li { border:1px solid #{pre_treat(this_estilo.first['body_background'])}; }\n+/* Cor da letra do rodape */ \n+footer section#info { color: #{pre_treat(this_estilo.first['cor_letra_rodape'])}; }\n+\n+/* Fundo tabela frontal das páginas */ \n+#news_list table,\n+#news_list table th,\n+#news_list table td { border-color: #{pre_treat(this_estilo.first['cor_borda_noticias'])}; }\n+#news_list table th { background-color: #{pre_treat(this_estilo.first['cor_borda_noticias'])}; }\n+#news_list table th { color: #{pre_treat(this_estilo.first['cor_letra_topo_noticias'])}; }\n+#news_list table td a { color: #{pre_treat(this_estilo.first['cor_letra_link_noticias_out'])}; }\n+#news_list table td a:hover { color: #{pre_treat(this_estilo.first['cor_letra_link_noticias_over'])}; }\n+#news_list table td { color: #{pre_treat(this_estilo.first['cor_letra_noticias_resumos'])}; }\n+\n+/* Menus */\n+aside menu.dropdown li:hover { background-color: #{pre_treat(this_estilo.first['cor_mouseover'])}; }\n+/* Menu Esquerdo */\n+aside.left menu li { background-color: #{pre_treat(this_estilo.first['cor_mouseout'])}; }\n+aside.left menu li a { color: #{pre_treat(this_estilo.first['cor_letra_out'])}; background-color: #{pre_treat(this_estilo.first['cor_mouseout'])}; }\n+/* aside.left menu li:hover { background-color: #{pre_treat(this_estilo.first['cor_mouseover'])}; } */\n+aside.left menu li a:hover { color: #{pre_treat(this_estilo.first['cor_letra_hover'])}; }\n+aside.left menu li.sub > a { color: #{pre_treat(this_estilo.first['cor_letra_subitem_out'])}; }\n+aside.left menu li.sub > a:hover { color: #{pre_treat(this_estilo.first['cor_letra_subitem_out'])}; }\n+\n+/* Menu Direito */\n+aside.right menu li { background-color: #{this_estilo.first['cor_mouseout2']}; }        \n+aside.right menu li:hover { background-color: #{this_estilo.first['cor_mouseover2']}; }\n+aside.right menu li a { color: #{this_estilo.first['cor_letra_out2']}; background-color: #{this_estilo.first['cor_mouseout2']}; }\n+aside.right menu li a:hover { background-color: #{this_estilo.first['cor_mouseover2']}; }\n+aside.right menu li.sub > a { color: #{this_estilo.first['cor_letra_subitem_out2']}; }\n+aside.right menu li.sub > a:hover { color: #{this_estilo.first['cor_letra_subitem_out2']}; }\n+\n+/* Menu Superior */\n+header nav menu li { background-color: #{this_estilo.first['cor_mouseout3']}; }\n+header nav menu li:hover { background-color: #{this_estilo.first['cor_mouseover3']}; }\n+header nav menu li a { color: #{this_estilo.first['cor_letra_out3']}; background-color: #{this_estilo.first['cor_mouseout3']}; }\n+header nav menu li a:hover { color: #{this_estilo.first['cor_letra_hover3']}; background-color: #{this_estilo.first['cor_mouseover3']}; }\n+\n+header nav menu li.sub > a { color: #191970; }\n+header nav menu li.sub > a:hover { color: #191970; }\n+header nav menu li a:hover { color: #B0C4DE; }\n+header nav menu li.sub > a { background-color: #B0C4DE; }\n+header nav menu li.sub:hover { background-color: #FFFFFF; }\n+header nav menu li.sub:hover > a { background-color: #FFFFFF; }\n+\n+/* Menu Inferior */\n+footer nav menu li { background-color: #{this_estilo.first['cor_mouseout4']}; }\n+footer nav menu li:hover { background-color: #{this_estilo.first['cor_mouseover3']}; }\n+footer nav menu li a { color: #{this_estilo.first['cor_letra_out4']}; background-color: #{this_estilo.first['cor_mouseout4']}; }\n+footer nav menu li a:hover { color: #{this_estilo.first['cor_letra_hover4']}; background-color: #{this_estilo.first['cor_mouseover3']}; }\n+\n+/* Estilo das páginas */\n+section#content article > p,\n+section#content article > summary { color: #{pre_treat(this_estilo.first['cor_letra_paragrafos'])}; }\n+section#content article > p a { color: #{pre_treat(this_estilo.first['cor_letra_links_out'])}; }\n+section#content article > p a:hover { color: #{pre_treat(this_estilo.first['cor_letra_links_over'])}; }\n+section#content article header h1,\n+section#content article header h2 {color: #{pre_treat(this_estilo.first['cor_letra_subtitulos'])}; }\n+section#content article header,\n+section#content article header summary { color: #{pre_treat(this_estilo.first['cor_letra_titulos'])}; }\n+\n+/* Outros */\n+#{pre_treat(treat(this_estilo.first['avancado']))}\n+EOF\n+      end\n+      insert_css = \"INSERT INTO styles (name,css,owner_id,created_at,updated_at) VALUES ('#{site_name}','#{pre_treat(weby_estilo)}','#{site[0]['id']}','#{Time.now}','#{Time.now}') RETURNING id\"\n+      #puts insert_css\n+      css = @con_weby.exec(insert_css)\n+      # puts \"\\t\\tINSERINDO styles: (#{css[0]['id']})\\n\" if @verbose\n+      # insert_sites_csses = \"INSERT INTO sites_csses (site_id,css_id,publish,owner) VALUES ('#{@convar[\"#{this_site['site_id']}\"]['weby']}','#{css[0]['id']}',true,true)\"\n+      # site_css = @con_weby.exec(insert_sites_csses)\n+\n+      # Atualizando os estilos estáticos pré-elaborados.\n+\t\t\tdir_css = '/data/css_changed'\n+\t\t\tcss_file = \"#{dir_css}/#{@convar[\"#{this_site['site_id']}\"]['weby']}_#{site_name}.css\"\n+\t\t\tif File.file?(css_file)\n+\t\t\t\tputs \"ATUALIZANDO estilo alterando manualmente...\"\n+\t\t\t\tcss_new = IO.read(css_file)\n+\t      update_sites_styles = \"UPDATE styles set css='#{pre_treat(css_new)}' WHERE id='#{css[0]['id']}'\"\n+  \t    @con_weby.exec(update_sites_styles)\n+\t\t\tend\n+\n+      @rap = YAML::load(File.open(\"../db/seed/roles.yml\"))\n+      \n+\t\t\tputs \"\\tINSERINDO papel Gerente.\\n\"\n+      insert_gerente = \"INSERT INTO roles (name,site_id,permissions,created_at,updated_at) VALUES ('Gerente',#{site[0]['id']},'#{@rap[\"Gerente\"][\"permissions\"]}','#{Time.now}','#{Time.now}') RETURNING id\"\n+      id_gerente = @con_weby.exec(insert_gerente)\n+\t\t\tputs \"\\tINSERINDO papel Editor Chefe.\\n\"\n+      insert_editor = \"INSERT INTO roles (name,site_id,permissions,created_at,updated_at) VALUES ('Editor-Chefe',#{site[0]['id']},'#{@rap[\"Editor-Chefe\"][\"permissions\"]}','#{Time.now}','#{Time.now}') RETURNING id\"\n+      id_editor = @con_weby.exec(insert_editor)\n+\t\t\tputs \"\\tINSERINDO papel Redator.\\n\"\n+      insert_redator = \"INSERT INTO roles (name,site_id,permissions,created_at,updated_at) VALUES ('Redator',#{site[0]['id']},'#{@rap[\"Redator\"][\"permissions\"]}','#{Time.now}','#{Time.now}') RETURNING id\"\n+      id_redator = @con_weby.exec(insert_redator)\n+\n+      puts \"\\tINSERINDO idiomas por site...\\n\"\n+      insert_locales_sites = <<EOF\n+\t\t\t\tinsert into locales_sites (locale_id,site_id)values(1,#{site[0]['id']});\n+\t\t\t\tinsert into locales_sites (locale_id,site_id)values(2,#{site[0]['id']});\n+EOF\n+      @con_weby.exec(insert_locales_sites)\n+\n+      param_aux = \"#{@param} AND \" if @param\n+      param_aux = \"WHERE\" if not @param\n+      select_usuarios = \"SELECT * FROM usuarios #{param_aux} site_id='#{this_site['site_id']}' ORDER BY id\"\n+      puts \"\\tSELECIONANDO todos os usuários do site: #{this_site['site_id']}\\n\" if @verbose\n+      this_users = @con_this.exec(select_usuarios)\n+      # Laço de repetição\n+      this_users.each do |this_user|\n+        if @convar[\"#{this_site['site_id']}\"][\"usuarios\"][\"#{this_user['id']}\"].nil? and this_user['login_name'] != 'admin'\n+          # Separa o primeiro nome do resto\n+          first_name,last_name = this_user['nome'].split(\" \",0)\n+          # Verificando se o usuário exite na base do Weby\n+          select_user_weby = \"SELECT id FROM users WHERE email='#{this_user['email']}'\"\n+          user = @con_weby.exec(select_user_weby)\n+          if user.first.nil?\n+            # Populando weby.users\n+            insert_usuario = \"INSERT INTO users (register,first_name,last_name,login,crypted_password,email,phone,mobile,status,password_salt,persistence_token,single_access_token,perishable_token,created_at,updated_at) VALUES ('#{this_user['matricula']}','#{pre_treat(first_name)}','#{pre_treat(last_name)}','#{this_user['login_name']}','#{this_user['senha']}','#{this_user['email']}','#{this_user['telefone']}','#{this_user['celular']}','#{this_user['status']}','','','','','#{Time.now}','#{Time.now}') RETURNING id\"\n+            puts \"\\t\\tINSERINDO usuário: #{this_user['login_name']}\\n\" if @verbose\n+            user = @con_weby.exec(insert_usuario)\n+          end\n+\t\t\t\t\t# Relacionando usuário com papel\n+\t\t\t\t\t# A = Gerente, C = Editor-Chefe, R = Redator\n+          puts \"\\t\\tRELACIONANDO com seu devido cargo\\n\" if @verbose\t\n+\t\t\t\t\tcase this_user['grupo']\n+\t\t\t\t\t\twhen 'A'\n+              select_role_user = \"SELECT * FROM roles_users WHERE role_id='#{id_gerente[0]['id']}' AND user_id='#{user[0]['id']}'\"\n+              insert_role_user = @con_weby.exec(select_role_user)\n+              if insert_role_user.first.nil?\n+    \t\t\t\t\t\tinsert_role_user = \"INSERT INTO roles_users (role_id,user_id)VALUES(#{id_gerente[0]['id']},#{user[0]['id']})\"\n+                @con_weby.exec(insert_role_user)\n+              end\n+\t\t\t\t\t\twhen 'C'\n+              select_role_user = \"SELECT * FROM roles_users WHERE role_id='#{id_editor[0]['id']}' AND user_id='#{user[0]['id']}'\"\n+              insert_role_user = @con_weby.exec(select_role_user)\n+              if insert_role_user.first.nil?\n+  \t\t\t\t\t\t\tinsert_role_user = \"INSERT INTO roles_users (role_id,user_id)VALUES(#{id_editor[0]['id']},#{user[0]['id']})\"\n+                @con_weby.exec(insert_role_user)\n+              end\n+\t\t\t\t\t\twhen 'R'\n+              select_role_user = \"SELECT * FROM roles_users WHERE role_id='#{id_redator[0]['id']}' AND user_id='#{user[0]['id']}'\"\n+              insert_role_user = @con_weby.exec(select_role_user)\n+              if insert_role_user.first.nil?\n+\t\t\t\t\t\t\t  insert_role_user = \"INSERT INTO roles_users (role_id,user_id)VALUES(#{id_redator[0]['id']},#{user[0]['id']})\"\n+                @con_weby.exec(insert_role_user)\n+              end\n+\t\t\t\t\tend \n+          # Relacionando usuários na variável de conversão\n+          @convar[\"#{this_site['site_id']}\"][\"usuarios\"][\"#{this_user['id']}\"] = user[0]['id']\n+        end\n+      end\n+      this_users.clear()\n+\n+      # Migrando Tabela: this.[noticias,eventos,informativos] => weby.pages\n+      select_noticias = \"SELECT * FROM noticias WHERE site_id='#{this_site['site_id']}' ORDER BY id\"\n+      puts \"\\t\\tSELECIONANDO todas as notícias do site: #{this_site['site_id']}\\n\" if @verbose\n+      this_noticias = @con_this.exec(select_noticias)\n+      this_noticias.each do |noticia|\n+        if @convar[\"#{this_site['site_id']}\"][\"noticias\"][\"#{noticia['id']}\"].nil?\n+          #capa = noticia['capa'] != false ? true : false\n+          position = noticia['capa'] != 'f' ? noticia['capa'] : 'NULL'\n+\t\t\t\t\tposition = 'NULL' if position.to_i == 0\n+          capa = position != 'NULL' ? true : false\n+          dt_cadastro = ((noticia['dt_cadastro'].nil?) || (/([-]+)/.match(\"#{noticia['dt_cadastro']}\").nil?)) ? Time.now : noticia['dt_cadastro']\n+          dt_inicio = ((noticia['dt_inicio'].nil?) || (/([-]+)/.match(\"#{noticia['dt_inicio']}\").nil?)) ? Time.now : noticia['dt_inicio']\n+          dt_fim = ((noticia['dt_fim'].nil?) || (/([-]+)/.match(\"#{noticia['dt_fim']}\").nil?)) ? Time.now + 30000000 : noticia['dt_fim']\n+          status = noticia['status'] == 'P' ? true : false\n+          autor = @convar[\"#{this_site['site_id']}\"]['usuarios'][noticia['autor']]\n+          autor ||= 1\n+          insert_pages = \"INSERT INTO pages (created_at,updated_at,date_begin_at,date_end_at,site_id,author_id,url,source,publish,front,type,position) VALUES ('#{dt_cadastro}','#{dt_cadastro}','#{dt_inicio}','#{dt_fim}','#{@convar[\"#{this_site['site_id']}\"]['weby']}','#{autor}','#{pre_treat(noticia['url'])}','#{pre_treat(noticia['fonte'])}',#{status},#{capa},'News',#{position}) RETURNING id\"\n+          page = @con_weby.exec(insert_pages)\n+          insert_pages_i18n = \"INSERT INTO page_i18ns (page_id,locale_id,text,title,summary,created_at,updated_at) VALUES ('#{page[0]['id']}',1,'#{pre_treat(noticia['texto'])}','#{pre_treat(noticia['titulo'])}','#{pre_treat(noticia['resumo'])}','#{dt_cadastro}','#{dt_cadastro}')\"\n+          @con_weby.exec(insert_pages_i18n)\n+          puts \"\\t\\t\\tINSERINDO (notícias) página: (#{page[0]['id']}) no weby\\n\" if @verbose\n+          insert_sites_pages = \"INSERT INTO sites_pages (site_id,page_id,created_at,updated_at) VALUES ('#{@convar[\"#{this_site['site_id']}\"]['weby']}','#{page[0]['id']}','#{dt_cadastro}','#{dt_cadastro}')\"\n+          site_page = @con_weby.exec(insert_sites_pages)\n+\n+          if (not noticia['assunto'].nil?) and (noticia['assunto'].size > 3)\n+            tags_cadastrada = \"SELECT * FROM tags WHERE name = '#{pre_treat(noticia['assunto'])}'\"\n+            tags_existentes = @con_weby.exec(tags_cadastrada)\n+            if tags_existentes.first.nil?\n+              puts \"inserindo tag notícia #{noticia['id']} : '#{noticia['assunto']}'\"\n+              insert_tag = \"INSERT INTO tags (name) VALUES ('#{pre_treat(noticia['assunto'])}') RETURNING id\"\n+              tag = @con_weby.exec(insert_tag)\n+              insert_taggings = \"INSERT INTO taggings (tag_id,taggable_id,taggable_type,context,created_at) VALUES (#{tag[0]['id']},#{page[0]['id']},'Page','categories','#{Time.now}')\"\n+              @con_weby.exec(insert_taggings)\n+            else\n+              insert_taggings = \"INSERT INTO taggings (tag_id,taggable_id,taggable_type,context,created_at) VALUES (#{tags_existentes[0]['id']},#{page[0]['id']},'Page','categories','#{Time.now}')\"\n+              @con_weby.exec(insert_taggings)\n+            end\n+          end\n+          # Relacionando notícias na variável de conversão\n+          @convar[\"#{this_site['site_id']}\"][\"noticias\"][\"#{noticia['id']}\"] = page[0]['id']\n+        #else\n+        #  puts \"\\t\\t\\tRE-INSERINDO página: (#{@convar[\"#{this_site['site_id']}\"][\"noticias\"][\"#{noticia['id']}\"]})\\n\" if @verbose\n+        #  insert_sites_pages = \"INSERT INTO sites_pages (site_id,page_id) VALUES ('#{@convar[\"#{this_site['site_id']}\"]['weby']}','#{@convar[\"#{this_site['site_id']}\"][\"noticias\"][\"#{noticia['id']}\"]}')\"\n+        #  site_page = @con_weby.exec(insert_sites_pages)\n+        end\n+      end\n+      this_noticias.clear()\n+\n+      select_paginas = \"SELECT * FROM paginas WHERE site_id='#{this_site['site_id']}'\"\n+      puts \"\\t\\tSELECIONANDO todas as páginas do site: #{this_site['site_id']}\\n\" if @verbose\n+      this_paginas = @con_this.exec(select_paginas)\n+      this_paginas.each do |pagina|\n+        if @convar[\"#{this_site['site_id']}\"][\"paginas\"][\"#{pagina['id']}\"].nil?\n+          data_publica = ((pagina['dt_publica'].nil?) || (/([-]+)/.match(\"#{pagina['dt_publica']}\").nil?)) ? Time.now + 30000000 : pagina['dt_publica']\n+          autor = @convar[\"#{this_site['site_id']}\"]['usuarios'][pagina['autor']]\n+          autor ||= 1\n+          insert_pages = \"INSERT INTO pages (created_at,updated_at,date_begin_at,date_end_at,site_id,author_id,publish,front,type) VALUES ('#{Time.now}','#{Time.now}','#{Time.now}','#{data_publica}','#{@convar[\"#{this_site['site_id']}\"]['weby']}','#{autor}',false,false,'News') RETURNING id\"\n+          page = @con_weby.exec(insert_pages)\n+          insert_pages_i18n = \"INSERT INTO page_i18ns (created_at,updated_at,page_id,locale_id,title,text) VALUES ('#{Time.now}','#{Time.now}','#{page[0]['id']}',1,'#{pre_treat(pagina['titulo'])}','#{pre_treat(pagina['texto'])}')\"\n+          @con_weby.exec(insert_pages_i18n)\n+          puts \"\\t\\t\\tINSERINDO (avulsa) página: (#{page[0]['id']}) no weby\\n\" if @verbose\n+          insert_sites_pages = \"INSERT INTO sites_pages (created_at,updated_at,site_id,page_id) VALUES ('#{Time.now}','#{Time.now}','#{@convar[\"#{this_site['site_id']}\"]['weby']}','#{page[0]['id']}')\"\n+          site_page = @con_weby.exec(insert_sites_pages)\n+          # Relacionando notícias na variável de conversão\n+          @convar[\"#{this_site['site_id']}\"][\"paginas\"][\"#{pagina['id']}\"] = page[0]['id']\n+        #else\n+        #  puts \"\\t\\t\\tRE-INSERINDO página (#{@convar[\"#{this_site['site_id']}\"][\"paginas\"][\"#{pagina['id']}\"]}) no weby\\n\" if @verbose\n+        #  insert_sites_pages = \"INSERT INTO sites_pages (site_id,page_id) VALUES ('#{@convar[\"#{this_site['site_id']}\"]['weby']}','#{@convar[\"#{this_site['site_id']}\"][\"paginas\"][\"#{pagina['id']}\"]}')\"\n+        #  site_page = @con_weby.exec(insert_sites_pages)\n+        end\n+      end\n+      this_paginas.clear()\n+\n+      select_eventos = \"SELECT * FROM eventos WHERE site_id='#{this_site['site_id']}'\"\n+      puts \"\\t\\tSELECIONANDO todos os eventos do site: #{this_site['site_id']}\\n\" if @verbose\n+      this_eventos = @con_this.exec(select_eventos)\n+      # Conversão de tipo de evento\n+      kind_list = {\"U\" => \"regional\", \"N\" => \"nacional\", \"I\" => \"internacional\"}\n+      this_eventos.each do |evento|\n+        if @convar[\"#{this_site['site_id']}\"][\"eventos\"][\"#{evento['id']}\"].nil?          \n+          position = evento['capa'] != 'f' ? evento['capa'] : 'NULL'\n+\t\t\t\t\tposition = 'NULL' if position.to_i == 0","path":"lib/weby/scripts/migrate_This2Weby.rb","position":412,"original_position":412,"commit_id":"27c6355a1bc932473867e094d5b922611f2cd56a","original_commit_id":"27c6355a1bc932473867e094d5b922611f2cd56a","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=2","gravatar_id":"38d9cefd9971a05bf447f07c6cd332cc","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Inconsistent indentation detected.<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.<br>Tab detected.","created_at":"2014-08-21T19:53:28Z","updated_at":"2014-08-21T19:53:28Z","html_url":"https://github.com/cercomp/weby/pull/165#discussion_r16563338","pull_request_url":"https://api.github.com/repos/cercomp/weby/pulls/165","_links":{"self":{"href":"https://api.github.com/repos/cercomp/weby/pulls/comments/16563338"},"html":{"href":"https://github.com/cercomp/weby/pull/165#discussion_r16563338"},"pull_request":{"href":"https://api.github.com/repos/cercomp/weby/pulls/165"}}},"pull_request":{"url":"https://api.github.com/repos/cercomp/weby/pulls/165","id":20130795,"html_url":"https://github.com/cercomp/weby/pull/165","diff_url":"https://github.com/cercomp/weby/pull/165.diff","patch_url":"https://github.com/cercomp/weby/pull/165.patch","issue_url":"https://api.github.com/repos/cercomp/weby/issues/165","number":165,"state":"open","locked":false,"title":"8 global repo","user":{"login":"robeiro","id":3718968,"avatar_url":"https://avatars.githubusercontent.com/u/3718968?v=2","gravatar_id":"7c726ef612d226455152042bc9fa94f5","url":"https://api.github.com/users/robeiro","html_url":"https://github.com/robeiro","followers_url":"https://api.github.com/users/robeiro/followers","following_url":"https://api.github.com/users/robeiro/following{/other_user}","gists_url":"https://api.github.com/users/robeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/robeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robeiro/subscriptions","organizations_url":"https://api.github.com/users/robeiro/orgs","repos_url":"https://api.github.com/users/robeiro/repos","events_url":"https://api.github.com/users/robeiro/events{/privacy}","received_events_url":"https://api.github.com/users/robeiro/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-21T19:11:51Z","updated_at":"2014-08-21T19:53:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb7cf666dd600e0662f1d0c1fd7d2ade1f3fade9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cercomp/weby/pulls/165/commits","review_comments_url":"https://api.github.com/repos/cercomp/weby/pulls/165/comments","review_comment_url":"https://api.github.com/repos/cercomp/weby/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cercomp/weby/issues/165/comments","statuses_url":"https://api.github.com/repos/cercomp/weby/statuses/27c6355a1bc932473867e094d5b922611f2cd56a","head":{"label":"cercomp:8_global_repo","ref":"8_global_repo","sha":"27c6355a1bc932473867e094d5b922611f2cd56a","user":{"login":"cercomp","id":1348125,"avatar_url":"https://avatars.githubusercontent.com/u/1348125?v=2","gravatar_id":"7e22d9173e73f539062dc4c1813a24d7","url":"https://api.github.com/users/cercomp","html_url":"https://github.com/cercomp","followers_url":"https://api.github.com/users/cercomp/followers","following_url":"https://api.github.com/users/cercomp/following{/other_user}","gists_url":"https://api.github.com/users/cercomp/gists{/gist_id}","starred_url":"https://api.github.com/users/cercomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cercomp/subscriptions","organizations_url":"https://api.github.com/users/cercomp/orgs","repos_url":"https://api.github.com/users/cercomp/repos","events_url":"https://api.github.com/users/cercomp/events{/privacy}","received_events_url":"https://api.github.com/users/cercomp/received_events","type":"Organization","site_admin":false},"repo":{"id":15479907,"name":"weby","full_name":"cercomp/weby","owner":{"login":"cercomp","id":1348125,"avatar_url":"https://avatars.githubusercontent.com/u/1348125?v=2","gravatar_id":"7e22d9173e73f539062dc4c1813a24d7","url":"https://api.github.com/users/cercomp","html_url":"https://github.com/cercomp","followers_url":"https://api.github.com/users/cercomp/followers","following_url":"https://api.github.com/users/cercomp/following{/other_user}","gists_url":"https://api.github.com/users/cercomp/gists{/gist_id}","starred_url":"https://api.github.com/users/cercomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cercomp/subscriptions","organizations_url":"https://api.github.com/users/cercomp/orgs","repos_url":"https://api.github.com/users/cercomp/repos","events_url":"https://api.github.com/users/cercomp/events{/privacy}","received_events_url":"https://api.github.com/users/cercomp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cercomp/weby","description":"CMS - Content Management System in Ruby on Rails","fork":false,"url":"https://api.github.com/repos/cercomp/weby","forks_url":"https://api.github.com/repos/cercomp/weby/forks","keys_url":"https://api.github.com/repos/cercomp/weby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cercomp/weby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cercomp/weby/teams","hooks_url":"https://api.github.com/repos/cercomp/weby/hooks","issue_events_url":"https://api.github.com/repos/cercomp/weby/issues/events{/number}","events_url":"https://api.github.com/repos/cercomp/weby/events","assignees_url":"https://api.github.com/repos/cercomp/weby/assignees{/user}","branches_url":"https://api.github.com/repos/cercomp/weby/branches{/branch}","tags_url":"https://api.github.com/repos/cercomp/weby/tags","blobs_url":"https://api.github.com/repos/cercomp/weby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cercomp/weby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cercomp/weby/git/refs{/sha}","trees_url":"https://api.github.com/repos/cercomp/weby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cercomp/weby/statuses/{sha}","languages_url":"https://api.github.com/repos/cercomp/weby/languages","stargazers_url":"https://api.github.com/repos/cercomp/weby/stargazers","contributors_url":"https://api.github.com/repos/cercomp/weby/contributors","subscribers_url":"https://api.github.com/repos/cercomp/weby/subscribers","subscription_url":"https://api.github.com/repos/cercomp/weby/subscription","commits_url":"https://api.github.com/repos/cercomp/weby/commits{/sha}","git_commits_url":"https://api.github.com/repos/cercomp/weby/git/commits{/sha}","comments_url":"https://api.github.com/repos/cercomp/weby/comments{/number}","issue_comment_url":"https://api.github.com/repos/cercomp/weby/issues/comments/{number}","contents_url":"https://api.github.com/repos/cercomp/weby/contents/{+path}","compare_url":"https://api.github.com/repos/cercomp/weby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cercomp/weby/merges","archive_url":"https://api.github.com/repos/cercomp/weby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cercomp/weby/downloads","issues_url":"https://api.github.com/repos/cercomp/weby/issues{/number}","pulls_url":"https://api.github.com/repos/cercomp/weby/pulls{/number}","milestones_url":"https://api.github.com/repos/cercomp/weby/milestones{/number}","notifications_url":"https://api.github.com/repos/cercomp/weby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cercomp/weby/labels{/name}","releases_url":"https://api.github.com/repos/cercomp/weby/releases{/id}","created_at":"2013-12-27T18:56:13Z","updated_at":"2014-08-19T19:51:01Z","pushed_at":"2014-08-21T19:52:59Z","git_url":"git://github.com/cercomp/weby.git","ssh_url":"git@github.com:cercomp/weby.git","clone_url":"https://github.com/cercomp/weby.git","svn_url":"https://github.com/cercomp/weby","homepage":"http://weby.cercomp.ufg.br","size":35787,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":4,"mirror_url":null,"open_issues_count":32,"forks":4,"open_issues":32,"watchers":15,"default_branch":"master"}},"base":{"label":"cercomp:master","ref":"master","sha":"77d2785b2ba1e0ba06855b6ef53c7a35442ad23d","user":{"login":"cercomp","id":1348125,"avatar_url":"https://avatars.githubusercontent.com/u/1348125?v=2","gravatar_id":"7e22d9173e73f539062dc4c1813a24d7","url":"https://api.github.com/users/cercomp","html_url":"https://github.com/cercomp","followers_url":"https://api.github.com/users/cercomp/followers","following_url":"https://api.github.com/users/cercomp/following{/other_user}","gists_url":"https://api.github.com/users/cercomp/gists{/gist_id}","starred_url":"https://api.github.com/users/cercomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cercomp/subscriptions","organizations_url":"https://api.github.com/users/cercomp/orgs","repos_url":"https://api.github.com/users/cercomp/repos","events_url":"https://api.github.com/users/cercomp/events{/privacy}","received_events_url":"https://api.github.com/users/cercomp/received_events","type":"Organization","site_admin":false},"repo":{"id":15479907,"name":"weby","full_name":"cercomp/weby","owner":{"login":"cercomp","id":1348125,"avatar_url":"https://avatars.githubusercontent.com/u/1348125?v=2","gravatar_id":"7e22d9173e73f539062dc4c1813a24d7","url":"https://api.github.com/users/cercomp","html_url":"https://github.com/cercomp","followers_url":"https://api.github.com/users/cercomp/followers","following_url":"https://api.github.com/users/cercomp/following{/other_user}","gists_url":"https://api.github.com/users/cercomp/gists{/gist_id}","starred_url":"https://api.github.com/users/cercomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cercomp/subscriptions","organizations_url":"https://api.github.com/users/cercomp/orgs","repos_url":"https://api.github.com/users/cercomp/repos","events_url":"https://api.github.com/users/cercomp/events{/privacy}","received_events_url":"https://api.github.com/users/cercomp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cercomp/weby","description":"CMS - Content Management System in Ruby on Rails","fork":false,"url":"https://api.github.com/repos/cercomp/weby","forks_url":"https://api.github.com/repos/cercomp/weby/forks","keys_url":"https://api.github.com/repos/cercomp/weby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cercomp/weby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cercomp/weby/teams","hooks_url":"https://api.github.com/repos/cercomp/weby/hooks","issue_events_url":"https://api.github.com/repos/cercomp/weby/issues/events{/number}","events_url":"https://api.github.com/repos/cercomp/weby/events","assignees_url":"https://api.github.com/repos/cercomp/weby/assignees{/user}","branches_url":"https://api.github.com/repos/cercomp/weby/branches{/branch}","tags_url":"https://api.github.com/repos/cercomp/weby/tags","blobs_url":"https://api.github.com/repos/cercomp/weby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cercomp/weby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cercomp/weby/git/refs{/sha}","trees_url":"https://api.github.com/repos/cercomp/weby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cercomp/weby/statuses/{sha}","languages_url":"https://api.github.com/repos/cercomp/weby/languages","stargazers_url":"https://api.github.com/repos/cercomp/weby/stargazers","contributors_url":"https://api.github.com/repos/cercomp/weby/contributors","subscribers_url":"https://api.github.com/repos/cercomp/weby/subscribers","subscription_url":"https://api.github.com/repos/cercomp/weby/subscription","commits_url":"https://api.github.com/repos/cercomp/weby/commits{/sha}","git_commits_url":"https://api.github.com/repos/cercomp/weby/git/commits{/sha}","comments_url":"https://api.github.com/repos/cercomp/weby/comments{/number}","issue_comment_url":"https://api.github.com/repos/cercomp/weby/issues/comments/{number}","contents_url":"https://api.github.com/repos/cercomp/weby/contents/{+path}","compare_url":"https://api.github.com/repos/cercomp/weby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cercomp/weby/merges","archive_url":"https://api.github.com/repos/cercomp/weby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cercomp/weby/downloads","issues_url":"https://api.github.com/repos/cercomp/weby/issues{/number}","pulls_url":"https://api.github.com/repos/cercomp/weby/pulls{/number}","milestones_url":"https://api.github.com/repos/cercomp/weby/milestones{/number}","notifications_url":"https://api.github.com/repos/cercomp/weby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cercomp/weby/labels{/name}","releases_url":"https://api.github.com/repos/cercomp/weby/releases{/id}","created_at":"2013-12-27T18:56:13Z","updated_at":"2014-08-19T19:51:01Z","pushed_at":"2014-08-21T19:52:59Z","git_url":"git://github.com/cercomp/weby.git","ssh_url":"git@github.com:cercomp/weby.git","clone_url":"https://github.com/cercomp/weby.git","svn_url":"https://github.com/cercomp/weby","homepage":"http://weby.cercomp.ufg.br","size":35787,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":4,"mirror_url":null,"open_issues_count":32,"forks":4,"open_issues":32,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cercomp/weby/pulls/165"},"html":{"href":"https://github.com/cercomp/weby/pull/165"},"issue":{"href":"https://api.github.com/repos/cercomp/weby/issues/165"},"comments":{"href":"https://api.github.com/repos/cercomp/weby/issues/165/comments"},"review_comments":{"href":"https://api.github.com/repos/cercomp/weby/pulls/165/comments"},"review_comment":{"href":"https://api.github.com/repos/cercomp/weby/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cercomp/weby/pulls/165/commits"},"statuses":{"href":"https://api.github.com/repos/cercomp/weby/statuses/27c6355a1bc932473867e094d5b922611f2cd56a"}}}}