Git Product home page Git Product logo

blackducksoftware / ohloh-ui Goto Github PK

View Code? Open in Web Editor NEW
102.0 17.0 52.0 22.78 MB

Web Application for the OpenHub Stack.

Home Page: https://www.openhub.net

License: Other

Ruby 55.62% CoffeeScript 1.96% JavaScript 7.51% HTML 0.49% CSS 0.50% Puppet 0.25% Shell 0.02% PLpgSQL 13.55% Gherkin 0.05% Dockerfile 0.01% NASL 0.08% Sass 6.92% Haml 13.03% C++ 0.01%
ohloh ui ror ruby-on-rails ruby database oss analysis

ohloh-ui's Introduction

OhlohUI

Dependencies:

  • OhlohUI uses the ruby version 2.5.3. Please install ruby '> 2.5'.
  • OhlohUI uses the postgresql database. Please install postgresql and create a new user on it.

Getting Started:

$ git clone [email protected]:blackducksoftware/ohloh-ui.git
$ cd ohloh-ui
$ gem install bundler
$ bundle install

The OhlohUI data is split between two databases in production. The development setup needs to reflect the same. The database names are configured in a file specific to each environment. For development, create a file env.development, with the following contents.

DB_ENCODING = 'UTF-8'

DB_HOST = localhost
DB_NAME =
DB_USERNAME =
DB_PASSWORD =

The default DB encoding was set to SQL_ASCII to support data encoded by older ruby. For new data, the UTF-8 encoding should work fine. The *_USERNAME and *_PASSWORD entries need to reflect the user created in postgresql. The *DB_NAME entries should be new database names. These will be created during our setup.

$ rake db:create
$ rake db:structure:load
$ rake db:second_base:structure:load

This might throw a bunch of errors about relations and constraints already existing. Please ignore them and proceed.

Setup a default admin user. The arguments are optional. By default a user with the login admin_user, password admin_password and email [email protected] will be created.

$ ruby script/setup_default_admin.rb <login> <passsword> <email>
$ rails s

Visit localhost:3000 to checkout the site.

Tests:

Add the following to the .env.development file. Fill in the blank values appropriately. Modify .env.test to reflect the values that were added here.

TEST_DB_HOST = localhost
TEST_DB_NAME =
TEST_DB_USERNAME =
TEST_DB_PASSWORD =

Then run the following:

$ rake db:test:prepare
$ rake test

Integration Tests:

The following packages need to be installed to make the feature specs work:

Mac OSX

$ brew install brew-cask
$ brew cask install google-chrome
$ brew install chromedriver

Ubuntu 18.04

$ sudo apt-get install chromium-browser
$ sudo apt-get install chromium-chromedriver
$ sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver

Recording/fixing VCR cassettes for Fisbot API:

Define an alias for vcr.localhost.org in /etc/hosts:

127.0.0.1 vcrlocalhost.org

Start the fisbot server(test environment) at localhost:4004. Manually clean the fisbot tables after each recording.

Pull Request Builder:

The OhlohUI CI uses the following task to verify PR compatibility.

$ rake ci:all_tasks

This runs:

  • rubocop
  • haml-lint
  • brakeman
  • bundle audit
  • teaspoon
  • rake test
  • spinach

ohloh-ui's People

Contributors

alebruck avatar alex-sig avatar aruncsengr avatar bdsdeployer avatar blackduckdave avatar bobofraggins avatar bostonpops avatar dependabot[bot] avatar drubio1989 avatar hyxnat avatar jebingeosil avatar johnson-imaginea avatar marclaporte avatar niharika1117 avatar notalex avatar pdegenportnoy avatar philj56 avatar priya5 avatar rapbhan avatar rettakjak avatar santhanakarthikeyan avatar sig-krasnick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ohloh-ui's Issues

Commits counts not working

I noticed that the commit count is currently not working.

The most visible example is https://www.openhub.net, on the "Most Active Contributors" section you can clearly see that these numbers are not accurate as they would have thousands of commits not just two.

Also, on profile pages, the total count does not reflect the same amount of commits reflected at the graph below.

Password Reset - OpenHub: function not working

I tried to reset my OpenHub password (my account is dating back to Ohloh times). I enter my email address into the reset form and submit it,

You will receive an email within the next few minutes. It contains instructions for changing your password.

I then get an email (some seconds later), I click on the link within the email, right under

Someone, hopefully you, requested we send you a link to change your password:

I get to another web page, where I see the error message

Your password reset URL has expired. Please try again!

under that the known form

To be emailed a link to reset your password, please enter your email address.

this repeats probably endlessly. I stopped after the 3rd try.

per-user commits not analyzed since 2023-07-23

In the "account" page of many developers, no commit histogram is visible for the period after June 23, 2023.

For example, in https://openhub.net/accounts/thesamesam or https://openhub.net/accounts/meyering,

  1. you can read "Analyzed 25 days ago",
  2. the "Commits by Project" bar for July 2023 has only half the size as the one of previous months, and the bar for August 2023 is entirely empty.

Previously, the analysis was performed at least once a week (or maybe once a day? I don't remember).

Catching user entered RecordNotFound errors

The problem:
We need to be able to differentiate between the RecordNotFound errors caused by user input and the other RecordNotFound errors.

Here are some of the solutions we could come up with:

  1. Use a custom method wherever we want an error raised.
# app/controllers/permissions_controller.rb
def find_model
   @permission = Permission.find_or_raise(params[:id])
end

# app/models/permission.rb
include ErrorFinders

# app/models/concerns/error_finders.rb
def find_or_raise(params)
  find(params[:id])
rescue ActiveRecord::RecordNotFound
   raise UserEnteredRecordNotFound
end

# app/controllers/application_controller.rb
rescue_from UserEnteredRecordNotFound do
    do_something_different
end
  1. All of our finder methods acting on user entered urls would be inside a find_model or set_model method. We could easily read the backtrace to find where the exception was raised and separate out the ones raised from finder methods in controller.
# app/controllers/application_controller.rb
rescue_from ActiveRecord::RecordNotFound do |exception|
   if exception.backtrace.any? { |msg| msg.match(/_controller.rb.+find_/ }
      do_something_different

Access to openhub.net blocked by Cloudflare

Since yesterday, I cannot access https://openhub.net/ : I get a screen "Sorry, you have been blocked" by Cloudflare.

So, I installed Tor, and am accessing https://openhub.net/ through a Tor exit node. That worked yesterday. But today, I get the same "Sorry, you have been blocked" screen.
Cloudflare Ray ID: 81e39f9ccea9c270

If it continues like this, the entire world will be blocked from accessing your site.

By the way, I'm not doing anything exaggerated. Just a few accesses per day, in order to get insights about projects, people, and programming languages. Which is precisely what openhub.net is designed for.

Support mobile view

Openhub doesn't render well on smartphones.
But thank you for this nice project, really helpful!

Login buttons do not work with Firefox

I am unable to log in using Firefox Developer Edition 73.0b9, on neither Linux nor macOS. But this is not specific to the Firefox version, this issue has been occuring for a bit already. Also tested with a clean Firefox profile with no extensions.

I can get to the page https://www.openhub.net/sessions/new, but from there on the "Sign in with [...]" buttons do not go anywhere.

Nor does the "Agree" button on the cookie notice do anything.

Project Summary Factiods: NLG word "only" in conflict with the numbers

Expected: No conflict between the natural language suggestions and the numbers.

Got: Across all [...] 12% [...] [here] this figure is only 30% [...] among top 10%

Problem: "only" implies the number is low compared to others, but it is high.

Speculation / possibile fix:
I guess the "only" got into it because 30% is a "low" number by itself. So either:

  • Check percentile not the figure itself. "percentile < threshold percentage" (i.e. if better than 40% of projects)
  • Check relation to average not the figure itself. "figure < average"

Full output:
https://www.openhub.net/p/awesome/factoids#FactoidCommentsVeryHigh

Very well-commented source code

awesome is written mostly in Lua.

Across all Lua projects on Open Hub, 12% of all source code lines are comments.
For awesome, this figure is only 30%.

This very impressive number of comments puts awesome among the top 10% of all Lua projects on Open Hub.

A high number of comments might indicate that the code is well-documented and organized, and could be a sign of a helpful > and disciplined development team.

(edit:)
more examples:
https://www.openhub.net/p/bat-rs/factoids#FactoidCommentsVeryLow (no "only" here)
https://www.openhub.net/p/naev/factoids#FactoidCommentsHigh ("only" here)

line count is incorrect

e.g. openoffice. But it seems like every project is giving graphs that don’t make sense.

This is unfortunate because if i want to share a link to openhub when trying to make point (e.g. that a project is developing rapidly) I can’t do it. If the line count is incorrect that would cause doubt about the reliability of other stats (like commit/contributor stats).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.