forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor contributors list to dynamically read from file (MarkUsProje…
- Loading branch information
Showing
4 changed files
with
34 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,213 +1 @@ | ||
<% | ||
# Generated by | ||
# $ sort RAILS_ROOT/doc/markus-contributors.txt | sed 's/ \+$//g' | uniq | sed 's/$/,/g' >> _markus_contributors.html.erb | ||
# | ||
%> | ||
Aaron Lee, | ||
Abdelhamid Benmouffok, | ||
Adam Goucher, | ||
Aimen Khan, | ||
Alan Rosenthal, | ||
Alessio Di Sandro, | ||
Alex Clarke, | ||
Alex Grenier, | ||
Alex Inman, | ||
Alex Krassikov, | ||
Alex Shih, | ||
Alexander Kittelberger, | ||
Alexandre Lissy, | ||
Alexandre Vaillancourt, | ||
Alysha Kwok, | ||
Amanda Manarin, | ||
Amr Sharaf, | ||
Andrew Hernandez, | ||
Andrew Louis, | ||
Andrey Kulakevich, | ||
Angelo Maralit, | ||
Anis Singh, | ||
Ante Zheng, | ||
Anthony Labaere, | ||
Anthony Le Jallé, | ||
Anton Braverman, | ||
Anushiya Antony, | ||
Arianne Dee, | ||
Augustin Doury, | ||
Benjamin Thorent, | ||
Benjamin Vialle, | ||
Bertan Guven, | ||
Binuri Walpitagamage, | ||
Bo Zhou, | ||
Brenda Huang, | ||
Brent Simmons, | ||
Brian Bo, | ||
Brian Xu, | ||
Bryan Muscedere, | ||
Bryan Shen, | ||
Camille Guérin, | ||
Catherine Fawcett, | ||
Chris Kellendonk, | ||
Christian Garcia Salguero, | ||
Christian Jacques, | ||
Christian Millar, | ||
Christine Murad, | ||
Christine Yu, | ||
Christopher Jonathan, | ||
Christopher Koehler, | ||
Claire Mayer, | ||
Clément Delafargue, | ||
Clément Schiano, | ||
Danesh Dadachanji, | ||
Daniel Dervishi, | ||
Daniel St. Jules, | ||
Daniyal Liaqat, | ||
Daryn Lam, | ||
David Das, | ||
David Liu, | ||
Derek Dowling, | ||
Dhairya Khara, | ||
Diane Tam, | ||
Dina Sabie, | ||
Dmitry Khabarov, | ||
Donny Wong, | ||
Dylan Runkel, | ||
Ealona Shmoel, | ||
Egor Philippov, | ||
Emerik Morency, | ||
Erik Traikov, | ||
Eugene Cheung, | ||
Evan Browning, | ||
Farah Juma, | ||
Fernando Garces, | ||
François Neber, | ||
Gabriel Anover, | ||
Gabriel Roy-Lortie, | ||
Gaëtan Girin, | ||
Geoffrey Flores, | ||
Ghislain Guiot, | ||
Gillian Chesnais, | ||
Hannah Li, | ||
Hanson Wu, | ||
Haohan David Jiang, | ||
Heyu Wang, | ||
Horatiu Halmaghi, | ||
Huiyu Sun, | ||
Ian Smith, | ||
Ibrahim Shahin, | ||
Ido Ben Haim, | ||
Ignas Panero Armoska, | ||
Irene Fung, | ||
Isabelle Chan, | ||
Ishan Thukral, | ||
Jakub Subczynski, | ||
Jason Mai, | ||
Jay Parekh, | ||
Jeffrey Ling, | ||
Jenna Choi, | ||
Jeremy Goh, | ||
Jeremy Merkur, | ||
Jeremy Winter, | ||
Jesse Riemann, | ||
Jiahui Xu, | ||
Joel Burford, | ||
Joey Perry, | ||
Jonathan Chen, | ||
Jordan Saleh, | ||
Joseph Mate, | ||
Joseph Maté, | ||
Joshua Dyck, | ||
Joshua Smith, | ||
Julien Starozinski, | ||
Junghwan Tom Choi, | ||
Justin Foong, | ||
Jérôme Gazel, | ||
Karel Kahula, | ||
Kevin MacPhee, | ||
Kira McCoan, | ||
Kitiya Srisukvatananan, | ||
Kristian Lejao, | ||
Kuanju Chiu, | ||
Kurtis Schmidt, | ||
Lawrence Wu, | ||
Loïc Labagnara, | ||
Luke Kysow, | ||
Marc Bodmer, | ||
Marc Palermo, | ||
Mark Kazakevich, | ||
Mark Rada, | ||
Maryna Moskalenko, | ||
Matthew Austin, | ||
Melissa Neubert, | ||
Michael Ing, | ||
Michael Lumbroso, | ||
Michael Margel, | ||
Mike Conley, | ||
Mike Gunderloy, | ||
Mike Kang, | ||
Mike Stewart, | ||
Mike Wu, | ||
Mina Almasry, | ||
Misa Sakamoto, | ||
Misha Schwartz, | ||
Mélanie Gaudet, | ||
Nathan ChowNeha Kumar, | ||
Neha Kumar, | ||
Nelle Varoquaux, | ||
Nicholas Maraston, | ||
Nick Lee, | ||
Nicolas Bouillon, | ||
Nicolas Carougeau, | ||
Nikhi Bhambra, | ||
Nina Huang, | ||
Noé Bedetti, | ||
Oloruntobi Ogunbiyi, | ||
Ope Akanji, | ||
Oussama Ben Amar, | ||
Parker Hutcheson, | ||
Partoo Vafaeikia, | ||
Paymahn Moghadasian, | ||
Peter Guanjie Zhao, | ||
Rafael Padilha, | ||
Rathusshan Kuganesan, | ||
Razvan Vlaicu, | ||
Rebecca Frailich, | ||
Rhys Rustad-Elliott, | ||
Robert Burke, | ||
Robert Tan, | ||
Ryan Spring, | ||
Samuel Gougeon, | ||
Samuel Maldonado, | ||
Samuel Weiss, | ||
Sean Budning, | ||
Seung Hoon Lee, | ||
Severin Gehwolf, | ||
Shaughn Finnerty, | ||
Shenglong Gao, | ||
Shion Kashimura, | ||
Simon Lavigne-Giroux, | ||
Stephen Tsimicalis, | ||
Su Zhang, | ||
Tanveer Gill, | ||
Tara Clark, | ||
Thomas Hayes, | ||
Tiago Chedraoui Silva, | ||
Tianhai Hu, | ||
Tianji Zhang, | ||
Tudor Brindus, | ||
Tyler Han, | ||
Valentin Roger, | ||
Veronica Wong, | ||
Victor Ivri, | ||
Victoria Mui, | ||
Victoria Verlysdonk, | ||
Vijay Bala, | ||
Vivien Suen, | ||
William Kwan, | ||
William Roy, | ||
Wilson Chiang, | ||
Xiang Yu, | ||
Yansong Zang, | ||
Yiqi Zhu, | ||
Yujin Cho, | ||
Yusi Fan, | ||
Zachary Munro-Cape, | ||
Ziyuan (Jerry) Zhang | ||
<%= Rails.configuration.markus_contributors %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class Contributors | ||
def self.read_contributors | ||
contributors_file = Rails.root.join('doc/markus-contributors.txt') | ||
if File.exist?(contributors_file) | ||
contributors_array = File.read(contributors_file).split("\n") | ||
contributors_array.join(', ') | ||
else | ||
'' | ||
end | ||
end | ||
end | ||
|
||
Rails.configuration.markus_contributors = Contributors.read_contributors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
describe Contributors | ||
describe '.read_contributors' do | ||
subject { Contributors.read_contributors } | ||
|
||
let(:contributors) { ['David Liu', 'Pranav Rao', 'Ivan Chepelev', 'Omid Hemmati'] } | ||
|
||
it 'should return an empty string if the contributors file does not exist' do | ||
allow(File).to receive(:exist?).and_return(false) | ||
expect(subject).to eq('') | ||
end | ||
|
||
it 'should return the contributors if the contributors file exists' do | ||
allow(File).to receive_messages( | ||
exist?: true, | ||
read: contributors.join("\n") | ||
) | ||
expect(subject).to eq(contributors.join(', ')) | ||
end | ||
end |