Skip to content

Request for username change shashi1028 to shashikant_chauhan #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 203 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
5c0aa61
Removed auto commit from build.sh
lauriii Nov 20, 2014
c5a2e59
Changed build.sh branch
lauriii Nov 20, 2014
a11849b
Moved time out of footer and in to header
lewisnyman Nov 20, 2014
c8d3ffb
Moved html out into separate template file
lewisnyman Nov 20, 2014
feab1dd
Merge pull request #2 from lewisnyman/html-template
lauriii Nov 20, 2014
54620ff
Removed "Publisher with" text from footer
lauriii Nov 20, 2014
b33e330
Changed github link to lauriii's github
lauriii Nov 20, 2014
91304ca
Added a few known name mappings
lewisnyman Nov 21, 2014
6e755be
Added a Gemfile for required Ruby dependancies
lewisnyman Nov 21, 2014
c7ceb5f
Added nokogiri to Gemfile
lewisnyman Nov 21, 2014
ddb9f08
Fixes #10 - Moves companies info into separate tempalte
lewisnyman Nov 21, 2014
b461a09
Updated urls in readme
lewisnyman Nov 21, 2014
1c0e554
Added FAQ to readme
lewisnyman Nov 21, 2014
881aeea
#9 rewrote company parsing script so it works. Still a few bug with f…
lewisnyman Nov 22, 2014
46a964e
Issue #9: Fixed syntax error
lauriii Nov 23, 2014
266630a
Removed Gemfile.lock from git
lauriii Nov 23, 2014
3bcb653
Issue #12: Added pages as submodule
lauriii Nov 23, 2014
6243d39
Removed pages from build.sh
lauriii Nov 23, 2014
9779549
Moved templates into templates folder
lewisnyman Nov 24, 2014
9146a55
Fixed #9 Rewrote companies.rb to find the company names in more varie…
lewisnyman Nov 26, 2014
cad5746
Added a few more name mappings
lewisnyman Nov 27, 2014
5f3169a
Removed gabors name mapping and a few more
lewisnyman Nov 27, 2014
cb03989
Moved time updated above the table
lewisnyman Nov 27, 2014
e7f03e9
Move folder structure - lauriii/drupalcores#12
lewisnyman Nov 30, 2014
c37d5f4
Moved assets from dist to app
lewisnyman Nov 30, 2014
2aad2da
Gulp tasks to copy images/js/scss
lewisnyman Nov 30, 2014
bbad990
Implemented header and footer template partials for index.html.erb la…
lewisnyman Dec 7, 2014
b8e33c6
Add partials to companies.html.erb lauriii/drupalcores#16
lewisnyman Dec 7, 2014
3dd3318
Whoops! missing companies.html.erb
lewisnyman Dec 7, 2014
1950197
Added jquery as a bower dependacy, added a usemin task to concatenate…
lewisnyman Dec 8, 2014
b7306fe
Ignore bower components directory
lewisnyman Dec 8, 2014
a00f2bf
Minify CSS
lewisnyman Dec 8, 2014
5ffdf75
Moved JS into all pages
lewisnyman Dec 8, 2014
b31413f
Added bower.json. Whoops!
lewisnyman Dec 8, 2014
058ad03
Removed old jquery lib
lewisnyman Dec 8, 2014
735699b
Changed timestamp to 'time ago' lauriii/drupalcores#7
lewisnyman Dec 8, 2014
6d9e9e8
Removed unused JS
lewisnyman Dec 8, 2014
a990135
Improve build process, add bower install step
lewisnyman Dec 8, 2014
9ceb795
Added git clone and pull to build process. Slowly removing build.sh
lewisnyman Dec 8, 2014
6879365
Added contributors and json build tasks. We can now kill build.sh xD
lewisnyman Dec 8, 2014
f06c804
Added companies task. Not added to default tasks yet because it's tak…
lewisnyman Dec 8, 2014
ed1bc37
What the hell, add companies task to default task
lewisnyman Dec 8, 2014
0855c19
Added minify HTML task
lewisnyman Dec 8, 2014
cce41ff
Added company info and uncss tasks
lewisnyman Dec 8, 2014
80cd5a8
Merge branch 'lewisnyman-new-folder-structure'
lauriii Dec 9, 2014
ed27d98
Merge branch 'master' of github.com:lauriii/drupalcores into build-tasks
lewisnyman Dec 9, 2014
f1806af
Fixed all the indentings to use 2 spaces on gulpfile.js
lauriii Dec 11, 2014
d620693
Fixes #24
lewisnyman Dec 12, 2014
375ec62
Added mapping to javier.alejandro.castro
lewisnyman Dec 12, 2014
b353dcd
Write company data files to /app/data
lewisnyman Dec 12, 2014
74f6574
Untrack company data files
lewisnyman Dec 12, 2014
a4bc800
Ignore data files
lewisnyman Dec 12, 2014
38c3c6e
Only update the data files for companyinfo, then we don't need to run…
lewisnyman Dec 12, 2014
f19eb03
Removed IDs
Dec 13, 2014
1072fc1
Removed unused download styling
Dec 13, 2014
667ccf1
Changed forkme id to class
Dec 13, 2014
52f3d42
Fixed header class
lewisnyman Dec 13, 2014
6b43369
Added dotfiles
lewisnyman Dec 15, 2014
30b1c63
Added jshint gulp task
lewisnyman Dec 15, 2014
da1b9fb
Configured the jshint task properly
lewisnyman Dec 15, 2014
c9e4f49
Fixed everything
lewisnyman Dec 15, 2014
c1e2e88
Fixed incorrect indentation
lewisnyman Dec 15, 2014
ff0341f
Merge pull request #29 from lewisnyman/dotfiles
lewisnyman Dec 22, 2014
93859e2
Hotfix: Fixed broken gulp process because of missing js files from
lauriii Dec 22, 2014
cbbfd84
Added a task that doesn't run gulp companies because it can take ages
lewisnyman Dec 23, 2014
9ae7cee
Moved id attributes to table rows
lewisnyman Dec 23, 2014
b338ca1
Added tr:target styling
lewisnyman Dec 23, 2014
8447bc7
Fixed the default gulp task
lewisnyman Dec 23, 2014
b5d4df7
Fixed #33 improved layout of company employees
lewisnyman Dec 23, 2014
fbae25a
Merged in master
lewisnyman Dec 23, 2014
1152c78
Merge pull request #31 from lewisnyman/target-styling
lewisnyman Dec 23, 2014
9374a2f
Removed extra >
lewisnyman Dec 23, 2014
058d8fd
Moved most of cores.rb into json.rb, cores.rb now reads json data #19
lewisnyman Dec 28, 2014
2fd3768
Companies.rb now reads from the same json data as cores.rb. Fixes #19
lewisnyman Dec 28, 2014
5dd7a5c
Link to d.o user url #34
lewisnyman Dec 30, 2014
a0b89e6
Contributor search now goes directly to the drupal.org url instead of…
lewisnyman Dec 30, 2014
ff8a8bb
Added drupalcores to submodules
lewisnyman Dec 30, 2014
5c7d5e8
Attempt to run gulp on build
lewisnyman Dec 30, 2014
b4b40a1
Node v0.10.x only
lewisnyman Dec 30, 2014
7009fb4
Removed pages from submodules
lewisnyman Dec 30, 2014
6eefb47
Revert "Removed pages from submodules"
lewisnyman Dec 30, 2014
258f600
Add submodule update to travis steps
lewisnyman Dec 30, 2014
ec8d34c
Fixed build logic that assumes dist exists. Move submodule update to …
lewisnyman Dec 30, 2014
e5ed8e8
Bundler. Duh.
lewisnyman Dec 30, 2014
3531e2b
Removed assumption that company data files exist. Fixes lauriii/drupa…
lewisnyman Dec 30, 2014
8077c00
Added travis_wait because companies takes a long time
lewisnyman Dec 30, 2014
633b0d5
Switched to 'gulp contributors' because gulp companies takes too long…
lewisnyman Dec 30, 2014
f208699
Update name_mappings.yml
penyaskito Feb 19, 2015
4937fc7
Remove usage of dollar sign
Feb 21, 2015
1a1907a
Merge pull request #40 from pcambra/dollar_sign
lewisnyman Feb 21, 2015
773f0c2
Revert "Remove usage of dollar sign"
lewisnyman Feb 21, 2015
0aadd1d
Merge pull request #42 from lauriii/revert-40-dollar_sign
lewisnyman Feb 21, 2015
a098587
Removed assumption that company data files exist. Fixes #27 Fixes #41
lewisnyman Feb 21, 2015
18a807d
Fixed warning on repo missing on package.json
Feb 22, 2015
c48357a
Modified the drupalcore process to not clone Drupal repo if it alread…
Feb 22, 2015
33473d0
Merge pull request #39 from penyaskito/patch-2
lewisnyman Feb 23, 2015
707aff2
Removed use of globals in companies.rb
Feb 23, 2015
350f0d2
Merge pull request #43 from pcambra/fix_package_json
lewisnyman Feb 23, 2015
3e885d7
Merge pull request #44 from pcambra/not_clone_if_folder_exists
lewisnyman Feb 24, 2015
3046f5c
Merge pull request #47 from pcambra/remove_use_of_globals
lewisnyman Feb 24, 2015
c97d52a
Update name_mappings.yml
penyaskito Feb 24, 2015
b9b422e
Merge pull request #48 from penyaskito/patch-3
lewisnyman Feb 27, 2015
99b763b
Merge branch 'automated-testing' of https://github.com/lewisnyman/dru…
lauriii Feb 28, 2015
cbf9c18
Removed unnecessary .gitmodules file generated by merge
lauriii Feb 28, 2015
269ff20
Aded pages to .gitmodules
lauriii Feb 28, 2015
6ba3d85
Merge pull request #50 from lauriii/lewisnyman-automated-testing
lauriii Feb 28, 2015
d54d5f5
Added Travis CI status to readme
lauriii Feb 28, 2015
d13e708
Merge pull request #51 from lauriii/travis-ci-status
lauriii Feb 28, 2015
a70896f
Improve targeting of reverted commits
nlisgo Mar 11, 2015
0a4d2b4
Pin gulp-minify-html to 0.1.7 because jonathanepollack/gulp-minify-ht…
lewisnyman Mar 20, 2015
41ee6f3
Merge pull request #53 from nlisgo/hotfix/improve-targeting-reverts
lewisnyman Mar 20, 2015
86d375a
Remove the clean command so the site doesn't go down during a build. …
lewisnyman May 9, 2015
a47834f
Merge pull request #57 from lewisnyman/fix-403-on-build
lauriii May 10, 2015
88b4706
Revert "Remove the clean command so the site doesn't go down during a…
lewisnyman May 11, 2015
502cabf
Merge pull request #59 from lauriii/revert-57-fix-403-on-build
lewisnyman May 11, 2015
ec23772
by Dom. : map former username to new username.
dclause Jul 6, 2015
90a090d
Merge pull request #67 from dclause/master
lewisnyman Jul 6, 2015
17d86c1
Avoid downtime by generating the next version of the HTML & JSON in a…
wimleers Aug 6, 2015
fe251f5
Merge pull request #69 from wimleers/avoid-downtime
lauriii Aug 6, 2015
cab6699
Added a countries page
lewisnyman Oct 9, 2015
a8d2bed
Pin usemin and css-minify to working versions. See https://github.com…
lewisnyman Oct 9, 2015
bb681c9
typo
lewisnyman Oct 9, 2015
ab89a2c
Merge pull request #73 from lewisnyman/commits-per-country
lauriii Oct 11, 2015
8f6514f
Link from number of mentions to cgit list of those mentions.
jcnventura Oct 12, 2015
d878fbb
Fix #46: create data dir if it does not exist.
jcnventura Oct 12, 2015
d1f4297
Merge pull request #78 from jcnventura/data_dir
lauriii Oct 13, 2015
a997f24
Add name mapping from juampy to juampynr
Oct 20, 2015
3e28bf3
Merge pull request #79 from juampy72/patch-1
lauriii Oct 20, 2015
30063f9
Merge pull request #77 from jcnventura/contributor2cgit
lewisnyman Oct 30, 2015
5d8e999
Update name_mappings.yml
chx Dec 12, 2014
baa44ee
WIP
lewisnyman May 26, 2015
3ad8c54
Fixed paths and order of tasks.
lewisnyman Jun 8, 2015
638ad92
Fixed buildjson running multiple times
lewisnyman Nov 12, 2015
45958ea
Fix countries information being output to the wrong folder
lewisnyman Nov 12, 2015
64fcea8
Add a gulp test command that uses test data. Should run in under 10 m…
lewisnyman Nov 20, 2015
1115868
Containers R kuul
lewisnyman Nov 20, 2015
d7e7b77
Fixed path in countries.rb, this should run a lot faster now
lewisnyman Nov 20, 2015
d855620
Merge pull request #65 from lewisnyman/fix-403-on-build
lauriii Nov 24, 2015
a2b266e
Use 8.1.x branch as source log
alvar0hurtad0 Dec 13, 2015
654efb8
Merge pull request #1 from alvar0hurtad0/alvar0hurtad0-patch-1
alvar0hurtad0 Dec 13, 2015
bd4bad6
Merge pull request #81 from alvar0hurtad0/master
lauriii Dec 17, 2015
e71b10b
Update build.sh
alvar0hurtad0 Dec 17, 2015
6ca7f1b
Merge pull request #82 from alvar0hurtad0/patch-1
lauriii Dec 17, 2015
8cc8732
Update name_mappings.yml
dkgndec Feb 27, 2016
dcd4fc6
Merge pull request #83 from dkgndec/master
lauriii Feb 29, 2016
2a0199b
Use 8.2.x as the default branch
xjm Apr 20, 2016
1f3f823
Merge pull request #84 from xjm/patch-5
lauriii Apr 21, 2016
e0d9983
Update build.sh
alvar0hurtad0 Apr 25, 2016
11d7a0c
Merge pull request #85 from alvar0hurtad0/patch-2
lauriii Apr 25, 2016
a9d3a3f
Closes #86 Checkout the 8.2.x branch if the repo already exists
pwolanin Apr 26, 2016
80a25b2
Merge username
Nesta Apr 26, 2016
2954a63
Merge pull request #87 from Nesta/patch-1
lauriii Apr 26, 2016
7c1b9d4
Merge username
JuanmaMR May 10, 2016
156cf5a
Merge pull request #88 from JuanmaMR/patch-2
lauriii May 11, 2016
df4e7b2
Now the development is made at 8.3.x and then backported to 8.2.x
gnuget Sep 28, 2016
2676dbc
gnuget name mapping
gnuget Sep 28, 2016
2aef6c8
Merge pull request #89 from gnuget/8.3.x
lauriii Sep 28, 2016
7a99bb2
Merge pull request #90 from gnuget/gnuget
lauriii Sep 28, 2016
c2e9b21
Change the branch in the gulp file
gnuget Sep 29, 2016
52442ae
update username :: shashi1028: shashikant_chauhan
shashi1028 Sep 29, 2016
cdcd2c1
Merge pull request #91 from gnuget/fix-gulpfile
lauriii Sep 30, 2016
a6bdfb6
Merge pull request #93 from shashi1028/patch-1
lauriii Oct 4, 2016
028bd8e
Name mapping developermitesh: miteshmap
miteshmap Feb 2, 2016
e49b0aa
Merge pull request #92 from miteshmap/name-mapping-developermitesh
lauriii Oct 5, 2016
0680b75
Development branch is now 8.4.x
claudiu-cristea Feb 8, 2017
4d648f1
Merge pull request #96 from claudiu-cristea/branch-8.4.x
lauriii Feb 21, 2017
480bee5
Fetch remote before git checkout & log.
claudiu-cristea Feb 23, 2017
831f108
Fetch remote before git checkout & log.
claudiu-cristea Feb 23, 2017
d87faba
Merge pull request #97 from claudiu-cristea/fetch-before
lauriii Feb 23, 2017
b06578e
Remove chx from the list
lauriii Mar 16, 2017
73e3b6a
Don't try to fetch Not specified user
lauriii Mar 16, 2017
82c9430
Merge pull request #100 from lauriii/remove-chx
lauriii Mar 16, 2017
9a67dfa
Fixed countries and companies rendering
lauriii Mar 20, 2017
c477293
#101 - Add budler details in README.md
vijaycs85 Apr 8, 2017
1db5f1e
Allow @ symbol in usernames in commit messages.
mcdruid Jun 26, 2017
69427ea
change 'mark conroy' to 'markconroy'
Jul 31, 2017
af3d462
Merge pull request #102 from vijaycs85/101
lauriii Dec 11, 2017
5af6917
Upgrade node version + gulp-shell + run-sequence
borisson Feb 18, 2018
a189cfa
Merge pull request #111 from borisson/upgrade-travis
lauriii Feb 19, 2018
a450ad0
Add license field (MIT) to package.json
fuzzbomb Feb 5, 2018
992d545
Build stats from Drupal origin/HEAD
fuzzbomb Dec 9, 2017
b428b71
Merge pull request #107 from fuzzbomb/build-stats-from-drupal-origin-…
lauriii Mar 9, 2018
79fd322
Merge pull request #112 from fuzzbomb/add-npm-license-field
lauriii Mar 9, 2018
0c81f00
Ensure origin/HEAD is pointing to the correct branch
alexpott Mar 10, 2018
5cd1ac4
Merge pull request #113 from alexpott/fix-origin-head
lauriii Mar 15, 2018
4944d38
Merge pull request #104 from markconroy/master
alexpott Mar 15, 2018
7793a20
change 'yogesh pawar' to 'yogeshmpawar'
yogeshmpawar Jul 9, 2018
827fa9b
Merge pull request #115 from yogeshmpawar/master
lauriii Jul 9, 2018
d4c3200
Merge pull request #103 from mcdruid/allow_at_char_in_usernames
lauriii Sep 24, 2018
978b6ac
#119: Use the Drupal.org API to bypass user page access restrictions.
jcnventura Oct 15, 2018
3b5d465
#119: Explicitly indicate why a given company is assigned the contrib…
jcnventura Oct 15, 2018
9018302
Merge pull request #120 from jcnventura/use-d7-api
lauriii Oct 16, 2018
46446db
Add name mappings for Sam152.
Nov 1, 2018
38b7aee
drpal fix
matthewgrill Jan 28, 2019
5357104
Merge pull request #124 from mattgrill/drpal-fix
lauriii Jan 28, 2019
00c3f85
Add name mappings for naveenvalecha.
naveenvalecha Apr 12, 2019
3ca1a8b
Update name_mappings.yml
johncook Jun 20, 2019
2904541
Merge pull request #123 from Sam152/sam-mapping
alexpott Oct 29, 2020
9b80b31
Merge pull request #128 from johncook/patch-1
alexpott Oct 29, 2020
1b75a69
Merge pull request #126 from naveenvalecha/naveenvalecha-mapping
alexpott Oct 29, 2020
98361cd
Update build.sh
alexpott Oct 29, 2020
d5338ee
Update cores.rb
alexpott Oct 29, 2020
20b7250
Change name mapping of chx from not specified to charlie-chx-negyesi …
drupal-daffie Oct 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "app/js/libs"
}
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@
*.egg
*.egg-info
dist
data
build
eggs
parts
sdist
develop-eggs
.installed.cfg
Gemfile.lock
node_modules/
app/js/libs/

# Installer logs
pip-log.txt

# git repo that we parsing
drupal/
pages/

cores.db
app/data/company_infos.yml
app/data/company_mapping.yml
app/drupalcore
tmp/
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "pages"]
path = dist
url = https://github.com/lauriii/drupalcores.git
branch = gh-pages
56 changes: 56 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
/*
* ENVIRONMENTS
* =================
*/

// Define globals exposed by modern browsers.
"browser": true,

// Define globals exposed by jQuery.
"jquery": true,

// Define globals exposed by Node.js.
"node": true,

/*
* ENFORCING OPTIONS
* =================
*/

// Force all variable names to use either camelCase style or UPPER_CASE
// with underscores.
"camelcase": true,

// Prohibit use of == and != in favor of === and !==.
"eqeqeq": true,

// Enforce tab width of 2 spaces.
"indent": 2,

// Prohibit use of a variable before it is defined.
"latedef": true,

// Require capitalized names for constructor functions.
"newcap": true,

// Enforce use of single quotation marks for strings.
"quotmark": "single",

// Enforce placing 'use strict' at the top function scope
"strict": true,

// Prohibit use of explicitly undeclared variables.
"undef": true,

// Warn when variables are defined but never used.
"unused": true,

/*
* RELAXING OPTIONS
* =================
*/

// Suppress warnings about == null comparisons.
"eqnull": true
}
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sudo: false
language: node_js
node_js:
- "8"
install:
- npm install gulp -g
- npm install
- bundle install
script: gulp test
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

gem 'open_uri_redirections'
gem 'nokogiri', '~> 1.6.4.1'
22 changes: 22 additions & 0 deletions app/bin/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

git pull

echo "Updating Sub Repos"

if [ ! -d "./app/drupalcore" ]; then
git clone https://git.drupalcode.org/project/drupal.git ./app/drupalcore
else
cd ./app/drupalcore
git remote update
git remote set-head origin -a
git checkout origin/HEAD
cd ../bin
fi

./cores.rb > ../../dist/next.html
./json.rb > ../../dist/next.json

cd ../../dist
mv next.html index.html
mv next.json index.json
163 changes: 163 additions & 0 deletions app/bin/companies.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
#!/usr/bin/env ruby

Encoding.default_external = Encoding::UTF_8
require 'erb'
require 'yaml'
require 'open_uri_redirections'
require 'time'
require 'net/http'
require 'json'

COMPANY_NOT_FOUND='not_found'
COMPANY_NOT_DEFINED='not_defined'
COMPANY_NOT_SPECIFIED='Not specified'
UPDATE_NONE=0
UPDATE_NOT_FOUND=1
UPDATE_ALL=2

name_variants = Hash.new(0)
Dir.mkdir('../data') unless Dir.exist?('../data')
if File.exists? ('../data/company_infos.yml')
companies_info = YAML::load_file('../data/company_infos.yml')
else
companies_info = Hash.new(0)
end
if File.exists? ('../data/company_mapping.yml')
company_mapping = YAML::load_file('../data/company_mapping.yml') || Hash.new(0)
else
company_mapping = Hash.new(0)
end
update=UPDATE_NONE
if ARGV.length == 1
if ARGV[0] == '--update-all'
update=UPDATE_ALL
else
if ARGV[0] == '--update-not-found'
update=UPDATE_NOT_FOUND
end
end
end

i = 1;
lastOrder = -1;
lastMentions = 0;
file = file = File.read('../../tmp/data.json')
data = JSON.parse(file)
contributors = data['contributors']
companies = Hash.new(0)

def ensure_company(companies, companies_info, key, title, link, id)
unless companies.key? key
companies[key] = Hash.new(0)
companies[key]['contributors'] = Hash.new(0)
if companies_info.key? key
companies[key]['title'] = companies_info[key]['title']
companies[key]['link'] = companies_info[key]['link']
companies[key]['id'] = companies_info[key]['id']
else
companies[key]['title'] = title
companies[key]['link'] = link
companies[key]['id'] = id
end
end
end

contributors.sort_by {|k, v| v }.reverse.each do |name,mentions|
next if name == COMPANY_NOT_SPECIFIED

if company_mapping.key? name
if update == UPDATE_NONE or (update == UPDATE_NOT_FOUND and company_mapping[name] != COMPANY_NOT_FOUND)
ensure_company(companies, companies_info, company_mapping[name], 'should be filled via company infos', 'should be filled via company infos', 0)
companies[company_mapping[name]]['mentions'] += mentions
companies[company_mapping[name]]['contributors'][name] = mentions
next
end
end
if name_variants.key? name
urlname = name_variants[name]
else
urlname = name
end
url = URI::encode("https://www.drupal.org/api-d7/user.json?name=#{urlname}")
uri = URI(url)
begin
response = Net::HTTP.get(uri)
user = JSON.parse(response)
rescue
next
end
found = false
if user['list'].count > 0
found = true
end
unless found
ensure_company(companies, companies_info, COMPANY_NOT_FOUND, 'Users not found', 'Users not found', 0)
companies[COMPANY_NOT_FOUND]['mentions'] += mentions
companies[COMPANY_NOT_FOUND]['contributors'][name] = mentions
else
found = false
organization = ''
for organization in user['list'][0]['field_organizations']
organization_uri = URI(organization['uri'].concat('.json'));
begin
organization_response = Net::HTTP.get(organization_uri)
organization = JSON.parse(organization_response)
if organization['field_current']
found = true
break
end
rescue
next
end
end
if found
company = organization['field_organization_name']
if company.nil?
company = COMPANY_NOT_SPECIFIED
end
if organization['field_organization_reference'].nil?
company_id = 0;
else
company_id = organization['field_organization_reference']['id'].to_i
end
else
company = COMPANY_NOT_SPECIFIED
company_id = 0
end
company_key = company.downcase
ensure_company(companies, companies_info, company_key, company, company, company_id)
companies[company_key]['mentions'] += mentions
companies[company_key]['contributors'][name] = mentions
end
end

companies = companies.sort_by {|k, v| v['mentions'] }.reverse
companies.each do |k, values|
unless companies_info.key? k
companies_info[k] = Hash.new(0)
companies_info[k]['title'] = values['title']
companies_info[k]['link'] = values['link']
companies_info[k]['id'] = values['id']
end
values['contributors'].each do |name, mentions|
company_mapping[name] = k
end
if values['contributors'].length == 0
companies_info.delete(k)
end
end
File.open('../data/company_infos.yml', 'w') { |f| YAML.dump(companies_info, f) }
File.open('../data/company_mapping.yml', 'w') { |f| YAML.dump(company_mapping, f) }

sum = contributors.values.reduce(:+).to_f
puts ERB.new(DATA.readlines.join, 0, '>').result

time = Time.now()
description = "A simple table of all contributors to Drupal 8 core"
header = ERB.new(File.new("../templates/partials/header.html.erb").read).result(binding)
footer = ERB.new(File.new("../templates/partials/footer.html.erb").read).result(binding)
companies_template = File.open("../templates/companies.html.erb", 'r').read
renderer = ERB.new(companies_template)
puts output = renderer.result()

__END__
27 changes: 27 additions & 0 deletions app/bin/cores.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby

Encoding.default_external = Encoding::UTF_8
require 'erb'
require 'yaml'
require 'time'
require 'json'

i = 1;
lastOrder = -1;
lastMentions = 0;

file = file = File.read('../../tmp/data.json')
data = JSON.parse(file)
contributors = data['contributors']
sum = contributors.values.reduce(:+).to_f
puts ERB.new(DATA.readlines.join, 0, '>').result

time = Time.now()
description = "A very basic table of all contributors to Drupal 9 Core"
header = ERB.new(File.new("../templates/partials/header.html.erb").read).result(binding)
footer = ERB.new(File.new("../templates/partials/footer.html.erb").read).result(binding)
index_template = File.open("../templates/index.html.erb", 'r').read
renderer = ERB.new(index_template)
puts output = renderer.result()

__END__
Loading