commit
stringlengths
40
40
old_file
stringlengths
4
184
new_file
stringlengths
4
184
old_contents
stringlengths
1
3.6k
new_contents
stringlengths
5
3.38k
subject
stringlengths
15
778
message
stringlengths
16
6.74k
lang
stringclasses
201 values
license
stringclasses
13 values
repos
stringlengths
6
116k
config
stringclasses
201 values
content
stringlengths
137
7.24k
diff
stringlengths
26
5.55k
diff_length
int64
1
123
relative_diff_length
float64
0.01
89
n_lines_added
int64
0
108
n_lines_deleted
int64
0
106
413d3b3a88e6bed99c7651a8bf8c6c9fed0b158a
src/Sylius/Bundle/UserBundle/Context/CustomerContext.php
src/Sylius/Bundle/UserBundle/Context/CustomerContext.php
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Bundle\UserBundle\Context; use Sylius\Component\User\Context\CustomerContextInterface; use Sylius\Component\User\Model\CustomerInterface; use Symfony\Component\Security\Core\SecurityContextInterface; /** * @author Michał Marcinkowski <michal.marcinkowski@lakion.com> */ class CustomerContext implements CustomerContextInterface { /** * @var SecurityContextInterface */ private $securityContext; /** * @param SecurityContextInterface $securityContext */ public function __construct(SecurityContextInterface $securityContext) { $this->securityContext = $securityContext; } /** * Gets customer based on currently logged user. * * @return CustomerInterface|null */ public function getCustomer() { if ($this->securityContext->getToken() && $this->securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') && $this->securityContext->getToken()->getUser() ) { return $this->securityContext->getToken()->getUser()->getCustomer(); } return null; } }
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Bundle\UserBundle\Context; use Sylius\Component\User\Context\CustomerContextInterface; use Sylius\Component\User\Model\CustomerInterface; use Sylius\Component\User\Model\UserInterface; use Symfony\Component\Security\Core\SecurityContextInterface; /** * @author Michał Marcinkowski <michal.marcinkowski@lakion.com> */ class CustomerContext implements CustomerContextInterface { /** * @var SecurityContextInterface */ private $securityContext; /** * @param SecurityContextInterface $securityContext */ public function __construct(SecurityContextInterface $securityContext) { $this->securityContext = $securityContext; } /** * Gets customer based on currently logged user. * * @return CustomerInterface|null */ public function getCustomer() { if ($this->securityContext->getToken() && $this->securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') && $this->securityContext->getToken()->getUser() instanceof UserInterface ) { return $this->securityContext->getToken()->getUser()->getCustomer(); } return null; } }
Add check to customer context
Add check to customer context | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Fixed tickets | | License | MIT | Doc PR | In one part of our site we don't need sylius autentication, just basic http with a generic username and password (which by default uses a Symfony user), so the Customer context fails when calling `->getCustomer()`. Adding this check allows us to use basic http autentication.
PHP
mit
Pitoune/Sylius,davalb/Sylius,psren/Sylius,SyliusBot/Sylius,xrowkristina/sylius,Rvanlaak/Sylius,Mozan/Sylius,gorkalaucirica/Sylius,ktzouno/Sylius,pamil/Sylius,TheMadeleine/Sylius,tuka217/Sylius,lchrusciel/Sylius,juramy/Sylius,joshuataylor/Sylius,artkonekt/Sylius,psren/Sylius,Ejobs/Sylius,PyRowMan/Sylius,Rvanlaak/Sylius,xrowkristina/sylius,davalb/Sylius,adamelso/Sylius,patrick-mcdougle/Sylius,ktzouno/Sylius,bitbager/Sylius,Shine-neko/Sylius,regnisolbap/Sylius,xrowgmbh/Sylius,polisys/Sylius,dragosprotung/Sylius,ravaj-group/Sylius,axelvnk/Sylius,NeverResponse/Sylius,jjanvier/Sylius,tonicospinelli/Sylius,Joypricecorp/Sylius,pjedrzejewski/Sylius,TheMadeleine/Sylius,itinance/Sylius,kongqingfu/Sylius,itinance/Sylius,jvahldick/Sylius,inssein/Sylius,artkonekt/Sylius,sweoggy/Sylius,pfwd/Sylius,lchrusciel/Sylius,peteward/Sylius,polisys/Sylius,mbabker/Sylius,gabiudrescu/Sylius,Sylius/Sylius,NeverResponse/Sylius,xrowgmbh/Sylius,ekyna/Sylius,starspire/eventmanager,DorianCMore/Sylius,psyray/Sylius,xantrix/Sylius,Mozan/Sylius,foobarflies/Sylius,tonicospinelli/Sylius,Zales0123/Sylius,antonioperic/Sylius,davalb/Sylius,juramy/Sylius,jverdeyen-forks/Sylius,martijngastkemper/Sylius,DorianCMore/Sylius,mhujer/Sylius,mhujer/Sylius,ravaj-group/Sylius,bretto36/Sylius,michalmarcinkowski/Sylius,jjanvier/Sylius,gorkalaucirica/Sylius,ezecosystem/Sylius,ReissClothing/Sylius,gruberro/Sylius,bitbager/Sylius,cngroupdk/Sylius,itinance/Sylius,starspire/eventmanager,tonicospinelli/Sylius,xantrix/Sylius,juramy/Sylius,CoderMaggie/Sylius,ravaj-group/Sylius,juramy/Sylius,kongqingfu/Sylius,joshuataylor/Sylius,steffenbrem/Sylius,Shine-neko/Sylius,ravaj-group/Sylius,patrick-mcdougle/Sylius,gabiudrescu/Sylius,mkilmanas/Sylius,Ma27/Sylius,sjonkeesse/Sylius,PWalkow/Sylius,StoreFactory/Sylius,pfwd/Sylius,CoderMaggie/Sylius,TeamNovatek/Sylius,peteward/Sylius,foobarflies/Sylius,dragosprotung/Sylius,PWalkow/Sylius,Lakion/Sylius,Pitoune/Sylius,okwinza/Sylius,Lakion/Sylius,ezecosystem/Sylius,Ma27/Sylius,Joypricecorp/Sylius,davalb/Sylius,mbabker/Sylius,Arminek/Sylius,vihuvac/Sylius,jverdeyen/Sylius,fredcollet/Sylius,Lakion/Sylius,martijngastkemper/Sylius,Ma27/Sylius,jvahldick/Sylius,pjedrzejewski/Sylius,MichaelKubovic/Sylius,loic425/Sylius,coudenysj/Sylius,ReissClothing/Sylius,psren/Sylius,cdaguerre/Sylius,torinaki/Sylius,Zales0123/Sylius,Ejobs/Sylius,MichaelKubovic/Sylius,polisys/Sylius,nakashu/Sylius,sweoggy/Sylius,ylastapis/Sylius,jverdeyen-forks/Sylius,tuka217/Sylius,SyliusBot/Sylius,Shine-neko/Sylius,ktzouno/Sylius,jverdeyen-forks/Sylius,steffenbrem/Sylius,GSadee/Sylius,mhujer/Sylius,sjonkeesse/Sylius,steffenbrem/Sylius,ezecosystem/Sylius,martijngastkemper/Sylius,Ma27/Sylius,gmoigneu/platformsh-integrations,wwojcik/Sylius,mbabker/Sylius,mkilmanas/Sylius,wwojcik/Sylius,Brille24/Sylius,Shine-neko/Sylius,diimpp/Sylius,foobarflies/Sylius,videni/Sylius,StoreFactory/Sylius,michalmarcinkowski/Sylius,jverdeyen/Sylius,jverdeyen-forks/Sylius,xrowkristina/sylius,tuka217/Sylius,foobarflies/Sylius,mheki/Sylius,tonicospinelli/Sylius,fredcollet/Sylius,nakashu/Sylius,antonioperic/Sylius,bretto36/Sylius,Joypricecorp/Sylius,gorkalaucirica/Sylius,psyray/Sylius,wwojcik/Sylius,gmoigneu/platformsh-integrations,DorianCMore/Sylius,TeamNovatek/Sylius,starspire/eventmanager,gabiudrescu/Sylius,artkonekt/Sylius,pjedrzejewski/Sylius,Sylius/Sylius,SyliusBot/Sylius,Rvanlaak/Sylius,axelvnk/Sylius,vihuvac/Sylius,adamelso/Sylius,ekyna/Sylius,peteward/Sylius,adamelso/Sylius,adamelso/Sylius,MichaelKubovic/Sylius,kongqingfu/Sylius,regnisolbap/Sylius,Mozan/Sylius,ReissClothing/Sylius,danut007ro/Sylius,Niiko/Sylius,TeamNovatek/Sylius,kayue/Sylius,gmoigneu/platformsh-integrations,gruberro/Sylius,Niiko/Sylius,coudenysj/Sylius,danut007ro/Sylius,sjonkeesse/Sylius,PWalkow/Sylius,rpg600/Sylius,TheMadeleine/Sylius,diimpp/Sylius,cngroupdk/Sylius,itinance/Sylius,101medialab/Sylius,Mozan/Sylius,mheki/Sylius,Rvanlaak/Sylius,diimpp/Sylius,axelvnk/Sylius,jvahldick/Sylius,videni/Sylius,wwojcik/Sylius,PyRowMan/Sylius,Brille24/Sylius,xantrix/Sylius,venyii/Sylius,xrowgmbh/Sylius,vihuvac/Sylius,mhujer/Sylius,cngroupdk/Sylius,mbabker/Sylius,StoreFactory/Sylius,wwojcik/Sylius,jverdeyen/Sylius,bitbager/Sylius,CoderMaggie/Sylius,Niiko/Sylius,bretto36/Sylius,fredcollet/Sylius,Brille24/Sylius,tonicospinelli/Sylius,Arminek/Sylius,axelvnk/Sylius,jverdeyen-forks/Sylius,MichaelKubovic/Sylius,TeamNovatek/Sylius,antonioperic/Sylius,Brille24/Sylius,TeamNovatek/Sylius,sjonkeesse/Sylius,NeverResponse/Sylius,peteward/Sylius,steffenbrem/Sylius,Ma27/Sylius,fredcollet/Sylius,loic425/Sylius,jjanvier/Sylius,okwinza/Sylius,jvahldick/Sylius,patrick-mcdougle/Sylius,ReissClothing/Sylius,cngroupdk/Sylius,nakashu/Sylius,CoderMaggie/Sylius,PWalkow/Sylius,artkonekt/Sylius,dragosprotung/Sylius,cdaguerre/Sylius,StoreFactory/Sylius,psyray/Sylius,Lowlo/Sylius,Arminek/Sylius,Lakion/Sylius,rpg600/Sylius,rpg600/Sylius,tuka217/Sylius,jjanvier/Sylius,ezecosystem/Sylius,cngroupdk/Sylius,ekyna/Sylius,joshuataylor/Sylius,vihuvac/Sylius,sweoggy/Sylius,Ejobs/Sylius,jverdeyen/Sylius,peteward/Sylius,videni/Sylius,bitbager/Sylius,polisys/Sylius,nakashu/Sylius,adamelso/Sylius,Lakion/Sylius,gorkalaucirica/Sylius,ekyna/Sylius,tuka217/Sylius,101medialab/Sylius,patrick-mcdougle/Sylius,venyii/Sylius,okwinza/Sylius,Mozan/Sylius,psren/Sylius,StoreFactory/Sylius,cdaguerre/Sylius,regnisolbap/Sylius,torinaki/Sylius,kongqingfu/Sylius,gseidel/Sylius,sjonkeesse/Sylius,inssein/Sylius,kayue/Sylius,okwinza/Sylius,inssein/Sylius,pamil/Sylius,mheki/Sylius,Joypricecorp/Sylius,ylastapis/Sylius,xrowkristina/sylius,Sylius/Sylius,Lowlo/Sylius,torinaki/Sylius,pfwd/Sylius,xrowkristina/sylius,Lowlo/Sylius,okwinza/Sylius,Lowlo/Sylius,mkilmanas/Sylius,danut007ro/Sylius,xrowgmbh/Sylius,torinaki/Sylius,Pitoune/Sylius,ravaj-group/Sylius,TheMadeleine/Sylius,Rvanlaak/Sylius,coudenysj/Sylius,PWalkow/Sylius,fredcollet/Sylius,xrowgmbh/Sylius,Niiko/Sylius,gabiudrescu/Sylius,Pitoune/Sylius,ktzouno/Sylius,starspire/eventmanager,polisys/Sylius,GSadee/Sylius,gmoigneu/platformsh-integrations,Ejobs/Sylius,rpg600/Sylius,bretto36/Sylius,sweoggy/Sylius,xantrix/Sylius,pamil/Sylius,michalmarcinkowski/Sylius,Shine-neko/Sylius,ekyna/Sylius,venyii/Sylius,loic425/Sylius,dragosprotung/Sylius,ReissClothing/Sylius,gseidel/Sylius,patrick-mcdougle/Sylius,gseidel/Sylius,juramy/Sylius,videni/Sylius,mhujer/Sylius,martijngastkemper/Sylius,lchrusciel/Sylius,Zales0123/Sylius,cdaguerre/Sylius,martijngastkemper/Sylius,ylastapis/Sylius,jverdeyen/Sylius,michalmarcinkowski/Sylius,axelvnk/Sylius,pjedrzejewski/Sylius,xantrix/Sylius,coudenysj/Sylius,pfwd/Sylius,pfwd/Sylius,PyRowMan/Sylius,venyii/Sylius,mheki/Sylius,DorianCMore/Sylius,starspire/eventmanager,gruberro/Sylius,psyray/Sylius,kayue/Sylius,PyRowMan/Sylius,danut007ro/Sylius,kongqingfu/Sylius,joshuataylor/Sylius,101medialab/Sylius,cdaguerre/Sylius,joshuataylor/Sylius,GSadee/Sylius,coudenysj/Sylius,gruberro/Sylius,Ejobs/Sylius,steffenbrem/Sylius,davalb/Sylius,ylastapis/Sylius,gseidel/Sylius,mkilmanas/Sylius,inssein/Sylius,jjanvier/Sylius,psyray/Sylius,artkonekt/Sylius,NeverResponse/Sylius,regnisolbap/Sylius,rpg600/Sylius
php
## Code Before: <?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Bundle\UserBundle\Context; use Sylius\Component\User\Context\CustomerContextInterface; use Sylius\Component\User\Model\CustomerInterface; use Symfony\Component\Security\Core\SecurityContextInterface; /** * @author Michał Marcinkowski <michal.marcinkowski@lakion.com> */ class CustomerContext implements CustomerContextInterface { /** * @var SecurityContextInterface */ private $securityContext; /** * @param SecurityContextInterface $securityContext */ public function __construct(SecurityContextInterface $securityContext) { $this->securityContext = $securityContext; } /** * Gets customer based on currently logged user. * * @return CustomerInterface|null */ public function getCustomer() { if ($this->securityContext->getToken() && $this->securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') && $this->securityContext->getToken()->getUser() ) { return $this->securityContext->getToken()->getUser()->getCustomer(); } return null; } } ## Instruction: Add check to customer context | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Fixed tickets | | License | MIT | Doc PR | In one part of our site we don't need sylius autentication, just basic http with a generic username and password (which by default uses a Symfony user), so the Customer context fails when calling `->getCustomer()`. Adding this check allows us to use basic http autentication. ## Code After: <?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Bundle\UserBundle\Context; use Sylius\Component\User\Context\CustomerContextInterface; use Sylius\Component\User\Model\CustomerInterface; use Sylius\Component\User\Model\UserInterface; use Symfony\Component\Security\Core\SecurityContextInterface; /** * @author Michał Marcinkowski <michal.marcinkowski@lakion.com> */ class CustomerContext implements CustomerContextInterface { /** * @var SecurityContextInterface */ private $securityContext; /** * @param SecurityContextInterface $securityContext */ public function __construct(SecurityContextInterface $securityContext) { $this->securityContext = $securityContext; } /** * Gets customer based on currently logged user. * * @return CustomerInterface|null */ public function getCustomer() { if ($this->securityContext->getToken() && $this->securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') && $this->securityContext->getToken()->getUser() instanceof UserInterface ) { return $this->securityContext->getToken()->getUser()->getCustomer(); } return null; } }
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Bundle\UserBundle\Context; use Sylius\Component\User\Context\CustomerContextInterface; use Sylius\Component\User\Model\CustomerInterface; + use Sylius\Component\User\Model\UserInterface; use Symfony\Component\Security\Core\SecurityContextInterface; /** * @author Michał Marcinkowski <michal.marcinkowski@lakion.com> */ class CustomerContext implements CustomerContextInterface { /** * @var SecurityContextInterface */ private $securityContext; /** * @param SecurityContextInterface $securityContext */ public function __construct(SecurityContextInterface $securityContext) { $this->securityContext = $securityContext; } /** * Gets customer based on currently logged user. * * @return CustomerInterface|null */ public function getCustomer() { if ($this->securityContext->getToken() && $this->securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') - && $this->securityContext->getToken()->getUser() + && $this->securityContext->getToken()->getUser() instanceof UserInterface ? +++++++++++++++++++++++++ ) { return $this->securityContext->getToken()->getUser()->getCustomer(); } return null; } }
3
0.058824
2
1
f1754acb58fe9088e90692f5200babff3fa49bdf
src/zeit/cms/tests/test_celery.py
src/zeit/cms/tests/test_celery.py
import datetime import zeit.cms.celery import zeit.cms.testing @zeit.cms.celery.CELERY.task() def task(context, datetime): pass class CeleryTaskTest(zeit.cms.testing.ZeitCmsTestCase): def test_registering_task_without_json_serializable_arguments_raises(self): now = datetime.datetime.now() with self.assertRaises(TypeError): task.delay(self.repository['testcontent'], datetime=now) with self.assertRaises(TypeError): task.apply_async( (self.repository['testcontent'],), {'datetime': now}, task_id=now, countdown=now) def test_registering_task_with_json_serializable_argument_passes(self): with self.assertNothingRaised(): task.delay('http://xml.zeit.de/testcontent', datetime='2016-01-01 12:00:00') task.apply_async( ('http://xml.zeit.de/testcontent',), {'datetime': '2016-01-01 12:00:00'}, task_id=1, countdown=30)
import datetime import zeit.cms.celery import zeit.cms.testing @zeit.cms.celery.CELERY.task() def dummy_task(context, datetime): """Dummy task to test our framework.""" class CeleryTaskTest(zeit.cms.testing.ZeitCmsTestCase): """Testing ..celery.TransactionAwareTask.""" def test_registering_task_without_json_serializable_arguments_raises(self): now = datetime.datetime.now() with self.assertRaises(TypeError): dummy_task.delay(self.repository['testcontent'], datetime=now) with self.assertRaises(TypeError): dummy_task.apply_async( (self.repository['testcontent'],), {'datetime': now}, task_id=now, countdown=now) def test_registering_task_with_json_serializable_argument_passes(self): with self.assertNothingRaised(): dummy_task.delay('http://xml.zeit.de/testcontent', datetime='2016-01-01 12:00:00') dummy_task.apply_async( ('http://xml.zeit.de/testcontent',), {'datetime': '2016-01-01 12:00:00'}, task_id=1, countdown=30)
Improve naming and add docstrings.
ZON-3409: Improve naming and add docstrings.
Python
bsd-3-clause
ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms
python
## Code Before: import datetime import zeit.cms.celery import zeit.cms.testing @zeit.cms.celery.CELERY.task() def task(context, datetime): pass class CeleryTaskTest(zeit.cms.testing.ZeitCmsTestCase): def test_registering_task_without_json_serializable_arguments_raises(self): now = datetime.datetime.now() with self.assertRaises(TypeError): task.delay(self.repository['testcontent'], datetime=now) with self.assertRaises(TypeError): task.apply_async( (self.repository['testcontent'],), {'datetime': now}, task_id=now, countdown=now) def test_registering_task_with_json_serializable_argument_passes(self): with self.assertNothingRaised(): task.delay('http://xml.zeit.de/testcontent', datetime='2016-01-01 12:00:00') task.apply_async( ('http://xml.zeit.de/testcontent',), {'datetime': '2016-01-01 12:00:00'}, task_id=1, countdown=30) ## Instruction: ZON-3409: Improve naming and add docstrings. ## Code After: import datetime import zeit.cms.celery import zeit.cms.testing @zeit.cms.celery.CELERY.task() def dummy_task(context, datetime): """Dummy task to test our framework.""" class CeleryTaskTest(zeit.cms.testing.ZeitCmsTestCase): """Testing ..celery.TransactionAwareTask.""" def test_registering_task_without_json_serializable_arguments_raises(self): now = datetime.datetime.now() with self.assertRaises(TypeError): dummy_task.delay(self.repository['testcontent'], datetime=now) with self.assertRaises(TypeError): dummy_task.apply_async( (self.repository['testcontent'],), {'datetime': now}, task_id=now, countdown=now) def test_registering_task_with_json_serializable_argument_passes(self): with self.assertNothingRaised(): dummy_task.delay('http://xml.zeit.de/testcontent', datetime='2016-01-01 12:00:00') dummy_task.apply_async( ('http://xml.zeit.de/testcontent',), {'datetime': '2016-01-01 12:00:00'}, task_id=1, countdown=30)
import datetime import zeit.cms.celery import zeit.cms.testing @zeit.cms.celery.CELERY.task() - def task(context, datetime): + def dummy_task(context, datetime): ? ++++++ - pass + """Dummy task to test our framework.""" class CeleryTaskTest(zeit.cms.testing.ZeitCmsTestCase): + """Testing ..celery.TransactionAwareTask.""" def test_registering_task_without_json_serializable_arguments_raises(self): now = datetime.datetime.now() with self.assertRaises(TypeError): - task.delay(self.repository['testcontent'], datetime=now) + dummy_task.delay(self.repository['testcontent'], datetime=now) ? ++++++ with self.assertRaises(TypeError): - task.apply_async( + dummy_task.apply_async( ? ++++++ (self.repository['testcontent'],), {'datetime': now}, task_id=now, countdown=now) def test_registering_task_with_json_serializable_argument_passes(self): with self.assertNothingRaised(): - task.delay('http://xml.zeit.de/testcontent', + dummy_task.delay('http://xml.zeit.de/testcontent', ? ++++++ - datetime='2016-01-01 12:00:00') + datetime='2016-01-01 12:00:00') ? ++++++ - task.apply_async( + dummy_task.apply_async( ? ++++++ ('http://xml.zeit.de/testcontent',), {'datetime': '2016-01-01 12:00:00'}, task_id=1, countdown=30)
15
0.517241
8
7
28786f30be37bb43a175262f96b618fc440d5ace
send-email.py
send-email.py
import datetime import os import sys import smtplib from email.mime.text import MIMEText def timeString(): return str(datetime.datetime.now()) if not os.path.exists('email-list'): print(timeString(), ':\tERROR: email-list not found.', sep='') quit(1) if not os.path.exists('credentials'): print(timeString(), ':\tERROR: credentials not found.', sep='') quit(1) with open('credentials', 'r') as _file: _lines = [str(e).strip('\n') for e in _file] server = _lines[0] port = _lines[1] username = _lines[2] password = _lines[3] with open('new-products.html', 'r') as _file: _message = _file.read() with open('email-list', 'r') as _file: recipients = [e.strip('\n') for e in _file] session=smtplib.SMTP(server, port) session.ehlo() session.starttls() session.login(username, password) for message_to in recipients: msg = MIMEText(_message, 'html') msg['To'] = message_to msg['From'] = username msg['Subject'] = 'ALERT: New Cymbals detected on mycymbal.com' msg = msg.as_string() session.sendmail(username, message_to, msg) print(timeString(), ':\tEmailed ', message_to, sep='') session.quit()
import datetime import os import sys import smtplib from email.mime.text import MIMEText def timeString(): return str(datetime.datetime.now()) if not os.path.exists('email-list'): print(timeString(), ':\tERROR: email-list not found.', sep='') quit(1) if not os.path.exists('credentials'): print(timeString(), ':\tERROR: credentials not found.', sep='') quit(1) with open('credentials', 'r') as _file: _lines = [str(e).strip('\n') for e in _file] server = _lines[0] port = _lines[1] username = _lines[2] password = _lines[3] with open('new-products.html', 'r') as _file: _message = _file.read() with open('email-list', 'r') as _file: recipients = [e.strip('\n') for e in _file] session=smtplib.SMTP(server, port) session.ehlo() session.starttls() session.login(username, password) for message_to in recipients: msg = MIMEText(_message, 'html') msg['To'] = message_to msg['From'] = username msg['Subject'] = 'MyCymbal Digest' msg = msg.as_string() session.sendmail(username, message_to, msg) print(timeString(), ':\tEmailed ', message_to, sep='') session.quit()
Change email subject. Not much of an ALERT if it happens every day.
Change email subject. Not much of an ALERT if it happens every day.
Python
unlicense
nerflad/mds-new-products,nerflad/mds-new-products,nerflad/mds-new-products
python
## Code Before: import datetime import os import sys import smtplib from email.mime.text import MIMEText def timeString(): return str(datetime.datetime.now()) if not os.path.exists('email-list'): print(timeString(), ':\tERROR: email-list not found.', sep='') quit(1) if not os.path.exists('credentials'): print(timeString(), ':\tERROR: credentials not found.', sep='') quit(1) with open('credentials', 'r') as _file: _lines = [str(e).strip('\n') for e in _file] server = _lines[0] port = _lines[1] username = _lines[2] password = _lines[3] with open('new-products.html', 'r') as _file: _message = _file.read() with open('email-list', 'r') as _file: recipients = [e.strip('\n') for e in _file] session=smtplib.SMTP(server, port) session.ehlo() session.starttls() session.login(username, password) for message_to in recipients: msg = MIMEText(_message, 'html') msg['To'] = message_to msg['From'] = username msg['Subject'] = 'ALERT: New Cymbals detected on mycymbal.com' msg = msg.as_string() session.sendmail(username, message_to, msg) print(timeString(), ':\tEmailed ', message_to, sep='') session.quit() ## Instruction: Change email subject. Not much of an ALERT if it happens every day. ## Code After: import datetime import os import sys import smtplib from email.mime.text import MIMEText def timeString(): return str(datetime.datetime.now()) if not os.path.exists('email-list'): print(timeString(), ':\tERROR: email-list not found.', sep='') quit(1) if not os.path.exists('credentials'): print(timeString(), ':\tERROR: credentials not found.', sep='') quit(1) with open('credentials', 'r') as _file: _lines = [str(e).strip('\n') for e in _file] server = _lines[0] port = _lines[1] username = _lines[2] password = _lines[3] with open('new-products.html', 'r') as _file: _message = _file.read() with open('email-list', 'r') as _file: recipients = [e.strip('\n') for e in _file] session=smtplib.SMTP(server, port) session.ehlo() session.starttls() session.login(username, password) for message_to in recipients: msg = MIMEText(_message, 'html') msg['To'] = message_to msg['From'] = username msg['Subject'] = 'MyCymbal Digest' msg = msg.as_string() session.sendmail(username, message_to, msg) print(timeString(), ':\tEmailed ', message_to, sep='') session.quit()
import datetime import os import sys import smtplib from email.mime.text import MIMEText def timeString(): return str(datetime.datetime.now()) if not os.path.exists('email-list'): print(timeString(), ':\tERROR: email-list not found.', sep='') quit(1) if not os.path.exists('credentials'): print(timeString(), ':\tERROR: credentials not found.', sep='') quit(1) with open('credentials', 'r') as _file: _lines = [str(e).strip('\n') for e in _file] server = _lines[0] port = _lines[1] username = _lines[2] password = _lines[3] with open('new-products.html', 'r') as _file: _message = _file.read() with open('email-list', 'r') as _file: recipients = [e.strip('\n') for e in _file] session=smtplib.SMTP(server, port) session.ehlo() session.starttls() session.login(username, password) for message_to in recipients: msg = MIMEText(_message, 'html') msg['To'] = message_to msg['From'] = username - msg['Subject'] = 'ALERT: New Cymbals detected on mycymbal.com' + msg['Subject'] = 'MyCymbal Digest' msg = msg.as_string() session.sendmail(username, message_to, msg) print(timeString(), ':\tEmailed ', message_to, sep='') session.quit()
2
0.043478
1
1
5d14dc18b971478ad7367583ac7fe1b843d5348a
app/controllers/about_sections_controller.rb
app/controllers/about_sections_controller.rb
class AboutSectionsController < ApplicationController def index @section = SiteSection.where(section: "about").first @sections = AboutSection.order(:position) @users = User.regular_staff.with_category.order(:first_name) @categories = @users.map(&:position_category).uniq @vacancies = Vacancy.published @board_members = User.board_members.order(:last_name) @affiliates = User.affiliates.order(:last_name) @programmes = Activity.programmes @annual_reports = Publication.published.joins(:content_type). where(content_types: {title: ContentType::ANNUAL_REPORT}). order(content_date: :desc, title: :asc) not_in = [] not_in << "vacancies" unless @vacancies.any? not_in << "board" unless @board_members.any? not_in << "honorary-affiliate" unless @affiliates.any? not_in << "annual-reports" unless @annual_reports.any? @sections = @sections. where.not(category: not_in) unless not_in.empty? end def disclaimer end end
class AboutSectionsController < ApplicationController def index @section = SiteSection.where(section: "about").first @sections = AboutSection.order(:position) @users = User.regular_staff.with_category.order(:first_name) @categories = @users.map(&:position_category).uniq @vacancies = Vacancy.published.order(:title) @board_members = User.board_members.order(:last_name) @affiliates = User.affiliates.order(:last_name) @programmes = Activity.programmes @annual_reports = Publication.published.joins(:content_type). where(content_types: {title: ContentType::ANNUAL_REPORT}). order(content_date: :desc, title: :asc) not_in = [] not_in << "vacancies" unless @vacancies.any? not_in << "board" unless @board_members.any? not_in << "honorary-affiliate" unless @affiliates.any? not_in << "annual-reports" unless @annual_reports.any? @sections = @sections. where.not(category: not_in) unless not_in.empty? end def disclaimer end end
Sort vacancies on about page
Sort vacancies on about page
Ruby
mit
Vizzuality/grid-arendal,Vizzuality/grid-arendal,Vizzuality/grid-arendal
ruby
## Code Before: class AboutSectionsController < ApplicationController def index @section = SiteSection.where(section: "about").first @sections = AboutSection.order(:position) @users = User.regular_staff.with_category.order(:first_name) @categories = @users.map(&:position_category).uniq @vacancies = Vacancy.published @board_members = User.board_members.order(:last_name) @affiliates = User.affiliates.order(:last_name) @programmes = Activity.programmes @annual_reports = Publication.published.joins(:content_type). where(content_types: {title: ContentType::ANNUAL_REPORT}). order(content_date: :desc, title: :asc) not_in = [] not_in << "vacancies" unless @vacancies.any? not_in << "board" unless @board_members.any? not_in << "honorary-affiliate" unless @affiliates.any? not_in << "annual-reports" unless @annual_reports.any? @sections = @sections. where.not(category: not_in) unless not_in.empty? end def disclaimer end end ## Instruction: Sort vacancies on about page ## Code After: class AboutSectionsController < ApplicationController def index @section = SiteSection.where(section: "about").first @sections = AboutSection.order(:position) @users = User.regular_staff.with_category.order(:first_name) @categories = @users.map(&:position_category).uniq @vacancies = Vacancy.published.order(:title) @board_members = User.board_members.order(:last_name) @affiliates = User.affiliates.order(:last_name) @programmes = Activity.programmes @annual_reports = Publication.published.joins(:content_type). where(content_types: {title: ContentType::ANNUAL_REPORT}). order(content_date: :desc, title: :asc) not_in = [] not_in << "vacancies" unless @vacancies.any? not_in << "board" unless @board_members.any? not_in << "honorary-affiliate" unless @affiliates.any? not_in << "annual-reports" unless @annual_reports.any? @sections = @sections. where.not(category: not_in) unless not_in.empty? end def disclaimer end end
class AboutSectionsController < ApplicationController def index @section = SiteSection.where(section: "about").first @sections = AboutSection.order(:position) @users = User.regular_staff.with_category.order(:first_name) @categories = @users.map(&:position_category).uniq - @vacancies = Vacancy.published + @vacancies = Vacancy.published.order(:title) ? ++++++++++++++ @board_members = User.board_members.order(:last_name) @affiliates = User.affiliates.order(:last_name) @programmes = Activity.programmes @annual_reports = Publication.published.joins(:content_type). where(content_types: {title: ContentType::ANNUAL_REPORT}). order(content_date: :desc, title: :asc) not_in = [] not_in << "vacancies" unless @vacancies.any? not_in << "board" unless @board_members.any? not_in << "honorary-affiliate" unless @affiliates.any? not_in << "annual-reports" unless @annual_reports.any? @sections = @sections. where.not(category: not_in) unless not_in.empty? end def disclaimer end end
2
0.074074
1
1
eaea595bb0310b19f41d1b2eece7fbe4d5dbf14e
src/trusted/service_runtime/nacl_syscall_asm_symbols.h
src/trusted/service_runtime/nacl_syscall_asm_symbols.h
/* * Copyright 2008 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can * be found in the LICENSE file. */ #ifndef SERVICE_RUNTIME_NACL_SYSCALL_H__ #define SERVICE_RUNTIME_NACL_SYSCALL_H__ #if !NACL_MACOSX || defined(NACL_STANDALONE) extern int NaClSyscallSeg(); #else // This declaration is used only on Mac OSX for Chrome build extern int NaClSyscallSeg() __attribute__((weak_import)); #endif #endif
/* * Copyright 2008 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can * be found in the LICENSE file. */ #ifndef SERVICE_RUNTIME_NACL_SYSCALL_H__ #define SERVICE_RUNTIME_NACL_SYSCALL_H__ extern int NaClSyscallSeg(); #endif
Remove unused special case for Mac OS X
Tidy: Remove unused special case for Mac OS X The special case was dead code anyway because it tested the wrong preprocessor symbol (NACL_MACOSX instead of NACL_OSX). Review URL: http://codereview.chromium.org/1051001 git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@1792 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
C
bsd-3-clause
sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client,nacl-webkit/native_client,nacl-webkit/native_client,nacl-webkit/native_client
c
## Code Before: /* * Copyright 2008 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can * be found in the LICENSE file. */ #ifndef SERVICE_RUNTIME_NACL_SYSCALL_H__ #define SERVICE_RUNTIME_NACL_SYSCALL_H__ #if !NACL_MACOSX || defined(NACL_STANDALONE) extern int NaClSyscallSeg(); #else // This declaration is used only on Mac OSX for Chrome build extern int NaClSyscallSeg() __attribute__((weak_import)); #endif #endif ## Instruction: Tidy: Remove unused special case for Mac OS X The special case was dead code anyway because it tested the wrong preprocessor symbol (NACL_MACOSX instead of NACL_OSX). Review URL: http://codereview.chromium.org/1051001 git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@1792 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2 ## Code After: /* * Copyright 2008 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can * be found in the LICENSE file. */ #ifndef SERVICE_RUNTIME_NACL_SYSCALL_H__ #define SERVICE_RUNTIME_NACL_SYSCALL_H__ extern int NaClSyscallSeg(); #endif
/* * Copyright 2008 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can * be found in the LICENSE file. */ #ifndef SERVICE_RUNTIME_NACL_SYSCALL_H__ #define SERVICE_RUNTIME_NACL_SYSCALL_H__ - #if !NACL_MACOSX || defined(NACL_STANDALONE) extern int NaClSyscallSeg(); + - #else - // This declaration is used only on Mac OSX for Chrome build - extern int NaClSyscallSeg() __attribute__((weak_import)); #endif - #endif
6
0.352941
1
5
d04e3b38baeee81a4d100c7eaf083321250cb4c8
README.md
README.md
![Yelp Beans](yelp-beans.png) # Beans Beans is an internal networking tool to help employees connect with each other at work. Every week Beans helps match and schedule a short 30-minute 1:1 meeting for two employees at the office. ## System Dependencies * [Node.js](https://nodejs.org/en/) * [Python2.7](https://www.python.org/downloads/) * [Google Cloud SDK](https://cloud.google.com/sdk/docs) * [Python Component](https://cloud.google.com/sdk/docs/managing-components) `gcloud components install app-engine-python` * [GoogleAppEngineLauncher](https://cloud.google.com/appengine/docs/python/download) scroll and click `Or, you can download the original App Engine SDK for Python.` ## Please take a look at the wiki for more information: * [Yelp Beans Wiki](https://github.com/Yelp/beans/wiki) ## Original Contributors * Clare Curtis * Matt Grounds * Alex Levin * Xi Li * Aaron Loo * Bryan Marty * [Andrew Mason](https://github.com/ajm188) * Wolfe Styke * Amy Tsai * Davis Wang * Haotian Wang * Stanley Wang * Kent Wills ## LICENSE Yelp Beans is licensed under the [MIT license](LICENSE).
![Yelp Beans](yelp-beans.png) # Beans [![Build Status](https://travis-ci.org/Yelp/beans.svg?branch=master)](https://travis-ci.org/Yelp/beans) Beans is an internal networking tool to help employees connect with each other at work. Every week Beans helps match and schedule a short 30-minute 1:1 meeting for two employees at the office. ## System Dependencies * [Node.js](https://nodejs.org/en/) * [Python2.7](https://www.python.org/downloads/) * [Google Cloud SDK](https://cloud.google.com/sdk/docs) * [Python Component](https://cloud.google.com/sdk/docs/managing-components) `gcloud components install app-engine-python` * [GoogleAppEngineLauncher](https://cloud.google.com/appengine/docs/python/download) scroll and click `Or, you can download the original App Engine SDK for Python.` ## Please take a look at the wiki for more information: * [Yelp Beans Wiki](https://github.com/Yelp/beans/wiki) ## Original Contributors * Clare Curtis * Matt Grounds * Alex Levin * Xi Li * Aaron Loo * [Bryan Marty](https://github.com/bxm156) * [Andrew Mason](https://github.com/ajm188) * Wolfe Styke * Amy Tsai * Davis Wang * Haotian Wang * Stanley Wang * Kent Wills ## LICENSE Yelp Beans is licensed under the [MIT license](LICENSE).
Add bxm156 profile link and Travis badge
Add bxm156 profile link and Travis badge
Markdown
mit
Yelp/beans,Teddochi/beans,Teddochi/beans,Yelp/beans,Yelp/beans,Teddochi/beans
markdown
## Code Before: ![Yelp Beans](yelp-beans.png) # Beans Beans is an internal networking tool to help employees connect with each other at work. Every week Beans helps match and schedule a short 30-minute 1:1 meeting for two employees at the office. ## System Dependencies * [Node.js](https://nodejs.org/en/) * [Python2.7](https://www.python.org/downloads/) * [Google Cloud SDK](https://cloud.google.com/sdk/docs) * [Python Component](https://cloud.google.com/sdk/docs/managing-components) `gcloud components install app-engine-python` * [GoogleAppEngineLauncher](https://cloud.google.com/appengine/docs/python/download) scroll and click `Or, you can download the original App Engine SDK for Python.` ## Please take a look at the wiki for more information: * [Yelp Beans Wiki](https://github.com/Yelp/beans/wiki) ## Original Contributors * Clare Curtis * Matt Grounds * Alex Levin * Xi Li * Aaron Loo * Bryan Marty * [Andrew Mason](https://github.com/ajm188) * Wolfe Styke * Amy Tsai * Davis Wang * Haotian Wang * Stanley Wang * Kent Wills ## LICENSE Yelp Beans is licensed under the [MIT license](LICENSE). ## Instruction: Add bxm156 profile link and Travis badge ## Code After: ![Yelp Beans](yelp-beans.png) # Beans [![Build Status](https://travis-ci.org/Yelp/beans.svg?branch=master)](https://travis-ci.org/Yelp/beans) Beans is an internal networking tool to help employees connect with each other at work. Every week Beans helps match and schedule a short 30-minute 1:1 meeting for two employees at the office. ## System Dependencies * [Node.js](https://nodejs.org/en/) * [Python2.7](https://www.python.org/downloads/) * [Google Cloud SDK](https://cloud.google.com/sdk/docs) * [Python Component](https://cloud.google.com/sdk/docs/managing-components) `gcloud components install app-engine-python` * [GoogleAppEngineLauncher](https://cloud.google.com/appengine/docs/python/download) scroll and click `Or, you can download the original App Engine SDK for Python.` ## Please take a look at the wiki for more information: * [Yelp Beans Wiki](https://github.com/Yelp/beans/wiki) ## Original Contributors * Clare Curtis * Matt Grounds * Alex Levin * Xi Li * Aaron Loo * [Bryan Marty](https://github.com/bxm156) * [Andrew Mason](https://github.com/ajm188) * Wolfe Styke * Amy Tsai * Davis Wang * Haotian Wang * Stanley Wang * Kent Wills ## LICENSE Yelp Beans is licensed under the [MIT license](LICENSE).
![Yelp Beans](yelp-beans.png) # Beans + + [![Build Status](https://travis-ci.org/Yelp/beans.svg?branch=master)](https://travis-ci.org/Yelp/beans) + Beans is an internal networking tool to help employees connect with each other at work. Every week Beans helps match and schedule a short 30-minute 1:1 meeting for two employees at the office. ## System Dependencies * [Node.js](https://nodejs.org/en/) * [Python2.7](https://www.python.org/downloads/) * [Google Cloud SDK](https://cloud.google.com/sdk/docs) * [Python Component](https://cloud.google.com/sdk/docs/managing-components) `gcloud components install app-engine-python` * [GoogleAppEngineLauncher](https://cloud.google.com/appengine/docs/python/download) scroll and click `Or, you can download the original App Engine SDK for Python.` ## Please take a look at the wiki for more information: * [Yelp Beans Wiki](https://github.com/Yelp/beans/wiki) ## Original Contributors * Clare Curtis * Matt Grounds * Alex Levin * Xi Li * Aaron Loo - * Bryan Marty + * [Bryan Marty](https://github.com/bxm156) * [Andrew Mason](https://github.com/ajm188) * Wolfe Styke * Amy Tsai * Davis Wang * Haotian Wang * Stanley Wang * Kent Wills ## LICENSE Yelp Beans is licensed under the [MIT license](LICENSE).
5
0.15625
4
1
93b14bd7f73d617ba00fdbf2cecfb9be046e476b
layouts/partials/general-title.html
layouts/partials/general-title.html
{{ $.Scratch.Set "generalTitle" .Title }} {{ if and (.IsNode) (eq .Data.Plural "categories") }} {{ if ne .Data.Plural (lower .Title) }} {{ $.Scratch.Add "generalTitle" " Posts - " }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ $.Scratch.Add "generalTitle" .Site.Title }}
{{ $.Scratch.Set "generalTitle" .Title }} {{ if eq ($.Scratch.Get "generalTitle") "Blogs" }} {{ $.Scratch.Set "generalTitle" "Blog" }} {{ end }} {{ if and (.IsNode) (eq .Data.Plural "categories") }} {{ if ne .Data.Plural (lower .Title) }} {{ $.Scratch.Add "generalTitle" " Posts - " }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ $.Scratch.Add "generalTitle" .Site.Title }}
Change Blogs to Blog in generalTitle
Change Blogs to Blog in generalTitle
HTML
mit
jpescador/hugo-future-imperfect,statnmap/hugo-future-imperfect,pacollins/hugo-future-imperfect,Hodgy/hugo-future-imperfect,jpescador/hugo-future-imperfect,statnmap/hugo-future-imperfect,Hodgy/hugo-future-imperfect,pacollins/hugo-future-imperfect
html
## Code Before: {{ $.Scratch.Set "generalTitle" .Title }} {{ if and (.IsNode) (eq .Data.Plural "categories") }} {{ if ne .Data.Plural (lower .Title) }} {{ $.Scratch.Add "generalTitle" " Posts - " }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ $.Scratch.Add "generalTitle" .Site.Title }} ## Instruction: Change Blogs to Blog in generalTitle ## Code After: {{ $.Scratch.Set "generalTitle" .Title }} {{ if eq ($.Scratch.Get "generalTitle") "Blogs" }} {{ $.Scratch.Set "generalTitle" "Blog" }} {{ end }} {{ if and (.IsNode) (eq .Data.Plural "categories") }} {{ if ne .Data.Plural (lower .Title) }} {{ $.Scratch.Add "generalTitle" " Posts - " }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ $.Scratch.Add "generalTitle" .Site.Title }}
{{ $.Scratch.Set "generalTitle" .Title }} + {{ if eq ($.Scratch.Get "generalTitle") "Blogs" }} + {{ $.Scratch.Set "generalTitle" "Blog" }} + {{ end }} {{ if and (.IsNode) (eq .Data.Plural "categories") }} {{ if ne .Data.Plural (lower .Title) }} {{ $.Scratch.Add "generalTitle" " Posts - " }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ else }} {{ $.Scratch.Add "generalTitle" " - " }} {{ end }} {{ $.Scratch.Add "generalTitle" .Site.Title }}
3
0.272727
3
0
fbe7f51f4ba2f66396b32702288d433b8ffe469d
config/webpack.prod.js
config/webpack.prod.js
var webpack = require('webpack'); var webpackMerge = require('webpack-merge'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var commonConfig = require('./webpack.common.js'); var helpers = require('./helpers'); const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', output: { path: helpers.root('dist'), publicPath: '/', filename: '[name].[hash].js', chunkFilename: '[id].[hash].chunk.js' }, plugins: [ new webpack.NoEmitOnErrorsPlugin(), new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 mangle: { keep_fnames: true } }), new ExtractTextPlugin('[name].[hash].css'), new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }), new webpack.LoaderOptionsPlugin({ htmlLoader: { minimize: false // workaround for ng2 } }) ] });
var webpack = require('webpack'); var webpackMerge = require('webpack-merge'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var commonConfig = require('./webpack.common.js'); var helpers = require('./helpers'); var version = require('../package.json').version; const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', output: { path: helpers.root('dist'), publicPath: '/', filename: `[name].js?${version}`, chunkFilename: `[id].chunk.js?${version}` }, plugins: [ new webpack.NoEmitOnErrorsPlugin(), new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 mangle: { keep_fnames: true } }), new ExtractTextPlugin(`[name].css?${version}`), new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }), new webpack.LoaderOptionsPlugin({ htmlLoader: { minimize: false // workaround for ng2 } }) ] });
Use version query string to cache bust instead of webpack hash
Use version query string to cache bust instead of webpack hash
JavaScript
unlicense
codechaotic/lizard-love-ui,codechaotic/lizard-love-ui,codechaotic/lizard-love-ui
javascript
## Code Before: var webpack = require('webpack'); var webpackMerge = require('webpack-merge'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var commonConfig = require('./webpack.common.js'); var helpers = require('./helpers'); const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', output: { path: helpers.root('dist'), publicPath: '/', filename: '[name].[hash].js', chunkFilename: '[id].[hash].chunk.js' }, plugins: [ new webpack.NoEmitOnErrorsPlugin(), new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 mangle: { keep_fnames: true } }), new ExtractTextPlugin('[name].[hash].css'), new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }), new webpack.LoaderOptionsPlugin({ htmlLoader: { minimize: false // workaround for ng2 } }) ] }); ## Instruction: Use version query string to cache bust instead of webpack hash ## Code After: var webpack = require('webpack'); var webpackMerge = require('webpack-merge'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var commonConfig = require('./webpack.common.js'); var helpers = require('./helpers'); var version = require('../package.json').version; const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', output: { path: helpers.root('dist'), publicPath: '/', filename: `[name].js?${version}`, chunkFilename: `[id].chunk.js?${version}` }, plugins: [ new webpack.NoEmitOnErrorsPlugin(), new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 mangle: { keep_fnames: true } }), new ExtractTextPlugin(`[name].css?${version}`), new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }), new webpack.LoaderOptionsPlugin({ htmlLoader: { minimize: false // workaround for ng2 } }) ] });
var webpack = require('webpack'); var webpackMerge = require('webpack-merge'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var commonConfig = require('./webpack.common.js'); var helpers = require('./helpers'); + var version = require('../package.json').version; const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; module.exports = webpackMerge(commonConfig, { devtool: 'source-map', output: { path: helpers.root('dist'), publicPath: '/', - filename: '[name].[hash].js', - chunkFilename: '[id].[hash].chunk.js' + filename: `[name].js?${version}`, + chunkFilename: `[id].chunk.js?${version}` }, plugins: [ new webpack.NoEmitOnErrorsPlugin(), new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 mangle: { keep_fnames: true } }), - new ExtractTextPlugin('[name].[hash].css'), ? ^ ------- ^ + new ExtractTextPlugin(`[name].css?${version}`), ? ^ ^^^^^^^^^^^^ new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }), new webpack.LoaderOptionsPlugin({ htmlLoader: { minimize: false // workaround for ng2 } }) ] });
7
0.184211
4
3
1352b5314111742d85c0d4c3ced79f83828304ca
vagrant_base/neo4j-server/attributes/tarball.rb
vagrant_base/neo4j-server/attributes/tarball.rb
default[:neo4j][:server] = { :version => "1.6.M02", :installation_dir => "/usr/local/neo4j-server", :tarball => { :url => "http://dist.neo4j.org/neo4j-community-1.6.M02-unix.tar.gz", :md5 => "d90e08da7de51d3c56b56688a731fc7a" }, :user => "neo4j", :jvm => { :xms => 32, :xmx => 512 }, :limits => { :memlock => 'unlimited', :nofile => 48000 }, # needed only to recursively change permissions. Don't forget to update this # when you change :data_dir location! :lib_dir => "/var/lib/neo4j-server/", :data_dir => "/var/lib/neo4j-server/data/graph.db", :conf_dir => "/usr/local/neo4j-server/conf", :lock_path => "/var/run/neo4j-server.lock", :pid_path => "/var/run/neo4j-server.pid", :http => { :port => 7474 } }
neo4j_version = "1.6.M03" default[:neo4j][:server] = { :version => neo4j_version, :installation_dir => "/usr/local/neo4j-server", :tarball => { :url => "http://dist.neo4j.org/neo4j-community-#{neo4j_version}-unix.tar.gz", :md5 => "dd53734691da8a1a6518b0d12d283996" }, :user => "neo4j", :jvm => { :xms => 32, :xmx => 512 }, :limits => { :memlock => 'unlimited', :nofile => 48000 }, # needed only to recursively change permissions. Don't forget to update this # when you change :data_dir location! :lib_dir => "/var/lib/neo4j-server/", :data_dir => "/var/lib/neo4j-server/data/graph.db", :conf_dir => "/usr/local/neo4j-server/conf", :lock_path => "/var/run/neo4j-server.lock", :pid_path => "/var/run/neo4j-server.pid", :http => { :port => 7474 } }
Update Neo4J Server to 1.6.M03
Update Neo4J Server to 1.6.M03
Ruby
mit
spurti-chopra/travis-cookbooks,ardock/travis-cookbooks,bd808/travis-cookbooks,tianon/travis-cookbooks,Acidburn0zzz/travis-cookbooks,DanielG/travis-cookbooks,Zarthus/travis-cookbooks,tianon/travis-cookbooks,gavioto/travis-cookbooks,spurti-chopra/travis-cookbooks,bd808/travis-cookbooks,dstufft/travis-cookbooks,travis-ci/travis-cookbooks,gavioto/travis-cookbooks,johanneswuerbach/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,gavioto/travis-cookbooks,Zarthus/travis-cookbooks,Distelli/travis-cookbooks,Acidburn0zzz/travis-cookbooks,DanielG/travis-cookbooks,tianon/travis-cookbooks,alex/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,ljharb/travis-cookbooks,0xCCD/travis-cookbooks,dracos/travis-cookbooks,Zarthus/travis-cookbooks,tianon/travis-cookbooks,ardock/travis-cookbooks,Acidburn0zzz/travis-cookbooks,DanielG/travis-cookbooks,chef/travis-cookbooks,Zarthus/travis-cookbooks,bd808/travis-cookbooks,travis-ci/travis-cookbooks,gavioto/travis-cookbooks,travis-ci/travis-cookbooks,chef/travis-cookbooks,DanielG/travis-cookbooks,Distelli/travis-cookbooks,spurti-chopra/travis-cookbooks,tianon/travis-cookbooks,alex/travis-cookbooks,ljharb/travis-cookbooks,ardock/travis-cookbooks,ljharb/travis-cookbooks,dstufft/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,Distelli/travis-cookbooks,dracos/travis-cookbooks,Acidburn0zzz/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,Distelli/travis-cookbooks,dracos/travis-cookbooks,ardock/travis-cookbooks,vinaykaradia/travis-cookbook-cloned,dracos/travis-cookbooks,0xCCD/travis-cookbooks,johanneswuerbach/travis-cookbooks,johanneswuerbach/travis-cookbooks
ruby
## Code Before: default[:neo4j][:server] = { :version => "1.6.M02", :installation_dir => "/usr/local/neo4j-server", :tarball => { :url => "http://dist.neo4j.org/neo4j-community-1.6.M02-unix.tar.gz", :md5 => "d90e08da7de51d3c56b56688a731fc7a" }, :user => "neo4j", :jvm => { :xms => 32, :xmx => 512 }, :limits => { :memlock => 'unlimited', :nofile => 48000 }, # needed only to recursively change permissions. Don't forget to update this # when you change :data_dir location! :lib_dir => "/var/lib/neo4j-server/", :data_dir => "/var/lib/neo4j-server/data/graph.db", :conf_dir => "/usr/local/neo4j-server/conf", :lock_path => "/var/run/neo4j-server.lock", :pid_path => "/var/run/neo4j-server.pid", :http => { :port => 7474 } } ## Instruction: Update Neo4J Server to 1.6.M03 ## Code After: neo4j_version = "1.6.M03" default[:neo4j][:server] = { :version => neo4j_version, :installation_dir => "/usr/local/neo4j-server", :tarball => { :url => "http://dist.neo4j.org/neo4j-community-#{neo4j_version}-unix.tar.gz", :md5 => "dd53734691da8a1a6518b0d12d283996" }, :user => "neo4j", :jvm => { :xms => 32, :xmx => 512 }, :limits => { :memlock => 'unlimited', :nofile => 48000 }, # needed only to recursively change permissions. Don't forget to update this # when you change :data_dir location! :lib_dir => "/var/lib/neo4j-server/", :data_dir => "/var/lib/neo4j-server/data/graph.db", :conf_dir => "/usr/local/neo4j-server/conf", :lock_path => "/var/run/neo4j-server.lock", :pid_path => "/var/run/neo4j-server.pid", :http => { :port => 7474 } }
+ neo4j_version = "1.6.M03" + default[:neo4j][:server] = { - :version => "1.6.M02", + :version => neo4j_version, :installation_dir => "/usr/local/neo4j-server", :tarball => { - :url => "http://dist.neo4j.org/neo4j-community-1.6.M02-unix.tar.gz", ? ^^^^^^^ + :url => "http://dist.neo4j.org/neo4j-community-#{neo4j_version}-unix.tar.gz", ? ^^^^^^^^^^^^^^^^ - :md5 => "d90e08da7de51d3c56b56688a731fc7a" + :md5 => "dd53734691da8a1a6518b0d12d283996" }, :user => "neo4j", :jvm => { :xms => 32, :xmx => 512 }, :limits => { :memlock => 'unlimited', :nofile => 48000 }, # needed only to recursively change permissions. Don't forget to update this # when you change :data_dir location! :lib_dir => "/var/lib/neo4j-server/", :data_dir => "/var/lib/neo4j-server/data/graph.db", :conf_dir => "/usr/local/neo4j-server/conf", :lock_path => "/var/run/neo4j-server.lock", :pid_path => "/var/run/neo4j-server.pid", :http => { :port => 7474 } }
8
0.296296
5
3
5057d4a7d096949561e2f043824130fa5d8f5016
.travis.yml
.travis.yml
language: generic services: - docker env: matrix: - VERSION=5.6 - VERSION=7.0 - VERSION=7.1 - VERSION=7.2 before_install: - sudo apt-get -qq update - sudo apt-get install libfcgi0ldbl # cgi-fcgi binary used in tests install: - curl -fsSL https://get.docksal.io | sh - fin version - fin sysinfo script: - cd ${VERSION} - travis_retry make && make test # Retry builds, as pecl.php.net tends to time out often after_failure: - make logs
language: generic services: - docker env: global: - REPO=docksal/cli - LATEST_VERSION=7.2 matrix: - VERSION=5.6 - VERSION=7.0 - VERSION=7.1 - VERSION=7.2 before_install: - sudo apt-get -qq update - sudo apt-get install libfcgi0ldbl # cgi-fcgi binary used in tests install: - curl -fsSL https://get.docksal.io | sh - fin version - fin sysinfo script: - cd ${VERSION} - travis_retry make && make test # Retry builds, as pecl.php.net tends to time out often after_success: | if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then [[ "${TRAVIS_BRANCH}" == "develop" ]] && TAG="edge-php${VERSION}" [[ "${TRAVIS_BRANCH}" == "master" ]] && TAG="php${VERSION}" [[ "${TRAVIS_TAG}" != "" ]] && TAG="${TRAVIS_TAG:1:3}-php${VERSION}" if [[ "$TAG" != "" ]]; then docker login -u "${DOCKER_USER}" -p "${DOCKER_PASS}" # Push edge, stable and release tags docker push ${REPO}:${TAG} # Push "latest" tag [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${VERSION}" == "${LATEST_VERSION}" ]] && docker push ${REPO}:latest fi fi after_failure: - make logs
Use TravisCI to push images to Docker Hub
Use TravisCI to push images to Docker Hub
YAML
mit
docksal/service-cli,docksal/service-cli
yaml
## Code Before: language: generic services: - docker env: matrix: - VERSION=5.6 - VERSION=7.0 - VERSION=7.1 - VERSION=7.2 before_install: - sudo apt-get -qq update - sudo apt-get install libfcgi0ldbl # cgi-fcgi binary used in tests install: - curl -fsSL https://get.docksal.io | sh - fin version - fin sysinfo script: - cd ${VERSION} - travis_retry make && make test # Retry builds, as pecl.php.net tends to time out often after_failure: - make logs ## Instruction: Use TravisCI to push images to Docker Hub ## Code After: language: generic services: - docker env: global: - REPO=docksal/cli - LATEST_VERSION=7.2 matrix: - VERSION=5.6 - VERSION=7.0 - VERSION=7.1 - VERSION=7.2 before_install: - sudo apt-get -qq update - sudo apt-get install libfcgi0ldbl # cgi-fcgi binary used in tests install: - curl -fsSL https://get.docksal.io | sh - fin version - fin sysinfo script: - cd ${VERSION} - travis_retry make && make test # Retry builds, as pecl.php.net tends to time out often after_success: | if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then [[ "${TRAVIS_BRANCH}" == "develop" ]] && TAG="edge-php${VERSION}" [[ "${TRAVIS_BRANCH}" == "master" ]] && TAG="php${VERSION}" [[ "${TRAVIS_TAG}" != "" ]] && TAG="${TRAVIS_TAG:1:3}-php${VERSION}" if [[ "$TAG" != "" ]]; then docker login -u "${DOCKER_USER}" -p "${DOCKER_PASS}" # Push edge, stable and release tags docker push ${REPO}:${TAG} # Push "latest" tag [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${VERSION}" == "${LATEST_VERSION}" ]] && docker push ${REPO}:latest fi fi after_failure: - make logs
language: generic services: - docker env: + global: + - REPO=docksal/cli + - LATEST_VERSION=7.2 matrix: - VERSION=5.6 - VERSION=7.0 - VERSION=7.1 - VERSION=7.2 before_install: - sudo apt-get -qq update - sudo apt-get install libfcgi0ldbl # cgi-fcgi binary used in tests install: - curl -fsSL https://get.docksal.io | sh - fin version - fin sysinfo script: - cd ${VERSION} - travis_retry make && make test # Retry builds, as pecl.php.net tends to time out often + after_success: | + if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then + [[ "${TRAVIS_BRANCH}" == "develop" ]] && TAG="edge-php${VERSION}" + [[ "${TRAVIS_BRANCH}" == "master" ]] && TAG="php${VERSION}" + [[ "${TRAVIS_TAG}" != "" ]] && TAG="${TRAVIS_TAG:1:3}-php${VERSION}" + + if [[ "$TAG" != "" ]]; then + docker login -u "${DOCKER_USER}" -p "${DOCKER_PASS}" + # Push edge, stable and release tags + docker push ${REPO}:${TAG} + + # Push "latest" tag + [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${VERSION}" == "${LATEST_VERSION}" ]] && docker push ${REPO}:latest + fi + fi + after_failure: - make logs
19
0.703704
19
0
e7ed1a9bc83bed17178860d4957f2c1f1cc8efd4
js/admin/chosen/chosenImage.jquery.js
js/admin/chosen/chosenImage.jquery.js
/* * Chosen jQuery plugin to add an image to the dropdown items. */ (function($) { $.fn.chosenImage = function(options) { return this.each(function() { var $select = $(this); var imgMap = {}; // 1. Retrieve img-src from data attribute and build object of image sources for each list item. $select.find('option').filter(function(){ return $(this).text(); }).each(function(i) { imgMap[i] = $(this).attr('data-img-src'); }); // 2. Execute chosen plugin and get the newly created chosen container. $select.chosen(options); var $chosen = $select.next('.chosen-container').addClass('chosenImage-container'); // 3. Style lis with image sources. $chosen.mousedown(function(event) { $chosen.find('.chosen-results li').each(function(i) { $(this).css(cssObj(imgMap[i])); }); }); // 4. Change image on chosen selected element when form changes. $select.change(function() { var imgSrc = $select.find('option:selected').attr('data-img-src') || ''; $chosen.find('.chosen-single span').css(cssObj(imgSrc)); }); $select.trigger('change'); // Utilties function cssObj(imgSrc) { var bgImg = (imgSrc) ? 'url(' + imgSrc + ')' : 'none'; return { 'background-image' : bgImg }; } }); }; })(jQuery);
/* * Chosen jQuery plugin to add an image to the dropdown items. */ (function($) { $.fn.chosenImage = function(options) { return this.each(function() { var $select = $(this); var imgMap = {}; // 1. Retrieve img-src from data attribute and build object of image sources for each list item. $select.find('option').filter(function(){ return $(this).text(); }).each(function(i) { imgMap[i] = $(this).attr('data-img-src'); }); // 2. Execute chosen plugin and get the newly created chosen container. $select.chosen(options); var $chosen = $select.next('.chosen-container').addClass('chosenImage-container'); // 3. Style lis with image sources. $chosen.on('mousedown.chosen, keyup.chosen', function(event){ $chosen.find('.chosen-results li').each(function() { var imgIndex = $(this).attr('data-option-array-index'); $(this).css(cssObj(imgMap[imgIndex])); }); }); // 4. Change image on chosen selected element when form changes. $select.change(function() { var imgSrc = $select.find('option:selected').attr('data-img-src') || ''; $chosen.find('.chosen-single span').css(cssObj(imgSrc)); }); $select.trigger('change'); // Utilties function cssObj(imgSrc) { var bgImg = (imgSrc) ? 'url(' + imgSrc + ')' : 'none'; return { 'background-image' : bgImg }; } }); }; })(jQuery);
Make use of the events provided by chosen. Make it work when using the search field.
Make use of the events provided by chosen. Make it work when using the search field.
JavaScript
mit
noplanman/podlove-publisher,podlove/podlove-publisher,noplanman/podlove-publisher,katrinleinweber/podlove-publisher,katrinleinweber/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher,podlove/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher,noplanman/podlove-publisher,podlove/podlove-publisher,noplanman/podlove-publisher,noplanman/podlove-publisher,katrinleinweber/podlove-publisher,podlove/podlove-publisher
javascript
## Code Before: /* * Chosen jQuery plugin to add an image to the dropdown items. */ (function($) { $.fn.chosenImage = function(options) { return this.each(function() { var $select = $(this); var imgMap = {}; // 1. Retrieve img-src from data attribute and build object of image sources for each list item. $select.find('option').filter(function(){ return $(this).text(); }).each(function(i) { imgMap[i] = $(this).attr('data-img-src'); }); // 2. Execute chosen plugin and get the newly created chosen container. $select.chosen(options); var $chosen = $select.next('.chosen-container').addClass('chosenImage-container'); // 3. Style lis with image sources. $chosen.mousedown(function(event) { $chosen.find('.chosen-results li').each(function(i) { $(this).css(cssObj(imgMap[i])); }); }); // 4. Change image on chosen selected element when form changes. $select.change(function() { var imgSrc = $select.find('option:selected').attr('data-img-src') || ''; $chosen.find('.chosen-single span').css(cssObj(imgSrc)); }); $select.trigger('change'); // Utilties function cssObj(imgSrc) { var bgImg = (imgSrc) ? 'url(' + imgSrc + ')' : 'none'; return { 'background-image' : bgImg }; } }); }; })(jQuery); ## Instruction: Make use of the events provided by chosen. Make it work when using the search field. ## Code After: /* * Chosen jQuery plugin to add an image to the dropdown items. */ (function($) { $.fn.chosenImage = function(options) { return this.each(function() { var $select = $(this); var imgMap = {}; // 1. Retrieve img-src from data attribute and build object of image sources for each list item. $select.find('option').filter(function(){ return $(this).text(); }).each(function(i) { imgMap[i] = $(this).attr('data-img-src'); }); // 2. Execute chosen plugin and get the newly created chosen container. $select.chosen(options); var $chosen = $select.next('.chosen-container').addClass('chosenImage-container'); // 3. Style lis with image sources. $chosen.on('mousedown.chosen, keyup.chosen', function(event){ $chosen.find('.chosen-results li').each(function() { var imgIndex = $(this).attr('data-option-array-index'); $(this).css(cssObj(imgMap[imgIndex])); }); }); // 4. Change image on chosen selected element when form changes. $select.change(function() { var imgSrc = $select.find('option:selected').attr('data-img-src') || ''; $chosen.find('.chosen-single span').css(cssObj(imgSrc)); }); $select.trigger('change'); // Utilties function cssObj(imgSrc) { var bgImg = (imgSrc) ? 'url(' + imgSrc + ')' : 'none'; return { 'background-image' : bgImg }; } }); }; })(jQuery);
/* * Chosen jQuery plugin to add an image to the dropdown items. */ (function($) { $.fn.chosenImage = function(options) { return this.each(function() { var $select = $(this); var imgMap = {}; // 1. Retrieve img-src from data attribute and build object of image sources for each list item. $select.find('option').filter(function(){ return $(this).text(); }).each(function(i) { imgMap[i] = $(this).attr('data-img-src'); }); // 2. Execute chosen plugin and get the newly created chosen container. $select.chosen(options); var $chosen = $select.next('.chosen-container').addClass('chosenImage-container'); // 3. Style lis with image sources. - $chosen.mousedown(function(event) { ? ^ - + $chosen.on('mousedown.chosen, keyup.chosen', function(event){ ? ++++ ^^^^^^^^^^^^^^^^^^^^^^^^ - $chosen.find('.chosen-results li').each(function(i) { ? - + $chosen.find('.chosen-results li').each(function() { + var imgIndex = $(this).attr('data-option-array-index'); - $(this).css(cssObj(imgMap[i])); + $(this).css(cssObj(imgMap[imgIndex])); ? +++++++ }); }); // 4. Change image on chosen selected element when form changes. $select.change(function() { var imgSrc = $select.find('option:selected').attr('data-img-src') || ''; $chosen.find('.chosen-single span').css(cssObj(imgSrc)); }); $select.trigger('change'); // Utilties function cssObj(imgSrc) { var bgImg = (imgSrc) ? 'url(' + imgSrc + ')' : 'none'; return { 'background-image' : bgImg }; } }); }; })(jQuery);
7
0.166667
4
3
e43981d77ec1c5e78698a77ea4e2ba2f5387221b
app/views/renalware/navigation/_main.html.slim
app/views/renalware/navigation/_main.html.slim
nav.top-bar(data-topbar role="navigation") ul.title-area li.name.has-dropdown.active h1 = link_to "RW2.0", patients_path, title: "Home" - if user_signed_in? section.top-bar-section = render partial: 'renalware/navigation/patient_search' ul.right.large-2.columns = render partial: 'renalware/navigation/patients_admin' li.divider = render partial: 'renalware/navigation/renalware_admin' li.divider = render partial: 'renalware/navigation/user_admin' = render partial: 'renalware/navigation/sign_out' li.divider = render partial: 'renalware/navigation/help_items'
.sticky nav.top-bar(data-topbar role="navigation") ul.title-area li.name.has-dropdown.active h1 = link_to "RW2.0", patients_path, title: "Home" - if user_signed_in? section.top-bar-section = render partial: 'renalware/navigation/patient_search' ul.right.large-2.columns = render partial: 'renalware/navigation/patients_admin' li.divider = render partial: 'renalware/navigation/renalware_admin' li.divider = render partial: 'renalware/navigation/user_admin' = render partial: 'renalware/navigation/sign_out' li.divider = render partial: 'renalware/navigation/help_items'
Make the top bar sticky
Make the top bar sticky Just to see what it makes sense
Slim
mit
airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core
slim
## Code Before: nav.top-bar(data-topbar role="navigation") ul.title-area li.name.has-dropdown.active h1 = link_to "RW2.0", patients_path, title: "Home" - if user_signed_in? section.top-bar-section = render partial: 'renalware/navigation/patient_search' ul.right.large-2.columns = render partial: 'renalware/navigation/patients_admin' li.divider = render partial: 'renalware/navigation/renalware_admin' li.divider = render partial: 'renalware/navigation/user_admin' = render partial: 'renalware/navigation/sign_out' li.divider = render partial: 'renalware/navigation/help_items' ## Instruction: Make the top bar sticky Just to see what it makes sense ## Code After: .sticky nav.top-bar(data-topbar role="navigation") ul.title-area li.name.has-dropdown.active h1 = link_to "RW2.0", patients_path, title: "Home" - if user_signed_in? section.top-bar-section = render partial: 'renalware/navigation/patient_search' ul.right.large-2.columns = render partial: 'renalware/navigation/patients_admin' li.divider = render partial: 'renalware/navigation/renalware_admin' li.divider = render partial: 'renalware/navigation/user_admin' = render partial: 'renalware/navigation/sign_out' li.divider = render partial: 'renalware/navigation/help_items'
+ .sticky - nav.top-bar(data-topbar role="navigation") + nav.top-bar(data-topbar role="navigation") ? ++ - ul.title-area + ul.title-area ? ++ - li.name.has-dropdown.active + li.name.has-dropdown.active ? ++ - h1 + h1 ? ++ - = link_to "RW2.0", patients_path, title: "Home" + = link_to "RW2.0", patients_path, title: "Home" ? ++ - - if user_signed_in? + - if user_signed_in? ? ++ - section.top-bar-section + section.top-bar-section ? ++ - = render partial: 'renalware/navigation/patient_search' + = render partial: 'renalware/navigation/patient_search' ? ++ - ul.right.large-2.columns + ul.right.large-2.columns ? ++ - = render partial: 'renalware/navigation/patients_admin' + = render partial: 'renalware/navigation/patients_admin' ? ++ - li.divider + li.divider ? ++ - = render partial: 'renalware/navigation/renalware_admin' + = render partial: 'renalware/navigation/renalware_admin' ? ++ - li.divider + li.divider ? ++ - = render partial: 'renalware/navigation/user_admin' + = render partial: 'renalware/navigation/user_admin' ? ++ - = render partial: 'renalware/navigation/sign_out' + = render partial: 'renalware/navigation/sign_out' ? ++ - li.divider + li.divider ? ++ - = render partial: 'renalware/navigation/help_items' + = render partial: 'renalware/navigation/help_items' ? ++
35
1.842105
18
17
54e59129e24881522641d97fb548803ccb199ec0
lib/action_tracker.rb
lib/action_tracker.rb
require 'action_tracker/version' require 'action_tracker/nil_resource' require 'action_tracker/concerns/tracker' require 'action_tracker/helpers/render' require 'action_tracker/base' require 'action_tracker/configuration' # nodoc module ActionTracker if defined?(Rails) require 'action_tracker/engine' ActiveSupport.on_load(:action_controller) { include ActionTracker::Concerns::Tracker } end end
require 'action_tracker/version' require 'action_tracker/nil_resource' require 'action_tracker/concerns/tracker' require 'action_tracker/helpers/render' require 'action_tracker/base' require 'action_tracker/configuration' # nodoc module ActionTracker if defined?(Rails) require 'action_tracker/engine' ActiveSupport.on_load(:action_controller) { ::ActionController::Base.include ActionTracker::Concerns::Tracker } end end
Change to work on rails 5.0
Change to work on rails 5.0
Ruby
mit
appprova/action_tracker,appprova/action_tracker,appprova/action_tracker
ruby
## Code Before: require 'action_tracker/version' require 'action_tracker/nil_resource' require 'action_tracker/concerns/tracker' require 'action_tracker/helpers/render' require 'action_tracker/base' require 'action_tracker/configuration' # nodoc module ActionTracker if defined?(Rails) require 'action_tracker/engine' ActiveSupport.on_load(:action_controller) { include ActionTracker::Concerns::Tracker } end end ## Instruction: Change to work on rails 5.0 ## Code After: require 'action_tracker/version' require 'action_tracker/nil_resource' require 'action_tracker/concerns/tracker' require 'action_tracker/helpers/render' require 'action_tracker/base' require 'action_tracker/configuration' # nodoc module ActionTracker if defined?(Rails) require 'action_tracker/engine' ActiveSupport.on_load(:action_controller) { ::ActionController::Base.include ActionTracker::Concerns::Tracker } end end
require 'action_tracker/version' require 'action_tracker/nil_resource' require 'action_tracker/concerns/tracker' require 'action_tracker/helpers/render' require 'action_tracker/base' require 'action_tracker/configuration' # nodoc module ActionTracker if defined?(Rails) require 'action_tracker/engine' - ActiveSupport.on_load(:action_controller) { include ActionTracker::Concerns::Tracker } + ActiveSupport.on_load(:action_controller) { ::ActionController::Base.include ActionTracker::Concerns::Tracker } ? +++++++++++++++++++++++++ end end
2
0.142857
1
1
0a41448bd52c48ed1793d9a4f38999e31c17ad6b
tsconfig.json
tsconfig.json
{ "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": true, "declarationMap": true, "sourceMap": true, "rootDir": ".", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "moduleResolution": "node", "esModuleInterop": true, "stripInternal": true }, "include": [ "def", "gen", "lib", "script", "test", "types", "types.ts", "fork.ts", "main.ts" ], "exclude": [ "test/data" ] }
{ "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": true, "declarationMap": true, "sourceMap": true, "rootDir": ".", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "moduleResolution": "node", "esModuleInterop": true, "stripInternal": true }, "exclude": [ "test/data" ] }
Include all TS files, but test/data
Include all TS files, but test/data
JSON
mit
benjamn/ast-types,benjamn/ast-types,benjamn/ast-types
json
## Code Before: { "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": true, "declarationMap": true, "sourceMap": true, "rootDir": ".", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "moduleResolution": "node", "esModuleInterop": true, "stripInternal": true }, "include": [ "def", "gen", "lib", "script", "test", "types", "types.ts", "fork.ts", "main.ts" ], "exclude": [ "test/data" ] } ## Instruction: Include all TS files, but test/data ## Code After: { "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": true, "declarationMap": true, "sourceMap": true, "rootDir": ".", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "moduleResolution": "node", "esModuleInterop": true, "stripInternal": true }, "exclude": [ "test/data" ] }
{ "compilerOptions": { "target": "es5", "module": "commonjs", "declaration": true, "declarationMap": true, "sourceMap": true, "rootDir": ".", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "moduleResolution": "node", "esModuleInterop": true, "stripInternal": true }, - "include": [ - "def", - "gen", - "lib", - "script", - "test", - "types", - "types.ts", - "fork.ts", - "main.ts" - ], "exclude": [ "test/data" ] }
11
0.354839
0
11
d3bbe088cda6d2e2bb4e8f2664906ca0cf6fdd67
start-cluster.sh
start-cluster.sh
set -e if sudo docker ps | grep "$USER/zookeeper" >/dev/null; then echo "" echo "It looks like you already have some containers running." echo "Please take them down before attempting to bring up another" echo "cluster with the following command:" echo "" echo " make stop-cluster" echo "" exit 1 fi for index in `seq 3`; do ./start-node.sh $index done echo "" echo "Testing Connection to Zookeeper Nodes" echo "-------------------------------------" for index in `seq 3`; do echo "ruok" | netcat -q 2 "10.0.10.$index" 2181; echo " from node $index!" done echo "" docker run --name=zookeeper.ui -d -p 9090:9090 $USER/zookeeper-ui > /dev/null ./what-is-ui-url.sh
set -e if sudo docker ps | grep "$USER/zookeeper" >/dev/null; then echo "" echo "It looks like you already have some containers running." echo "Please take them down before attempting to bring up another" echo "cluster with the following command:" echo "" echo " make stop-cluster" echo "" exit 1 fi for index in `seq 3`; do ./start-node.sh $index done echo "Waiting 30 seconds for bridge network to settle." sleep 30 echo "" echo "Testing Connection to Zookeeper Nodes" echo "-------------------------------------" for index in `seq 3`; do echo "ruok" | netcat -q 2 "10.0.10.$index" 2181; echo " from node $index!" done echo "" docker run --name=zookeeper.ui -d -p 9090:9090 $USER/zookeeper-ui > /dev/null ./what-is-ui-url.sh
Add sleep 30 to allow bridge to connect.
Add sleep 30 to allow bridge to connect.
Shell
mit
medined/docker-zookeeper
shell
## Code Before: set -e if sudo docker ps | grep "$USER/zookeeper" >/dev/null; then echo "" echo "It looks like you already have some containers running." echo "Please take them down before attempting to bring up another" echo "cluster with the following command:" echo "" echo " make stop-cluster" echo "" exit 1 fi for index in `seq 3`; do ./start-node.sh $index done echo "" echo "Testing Connection to Zookeeper Nodes" echo "-------------------------------------" for index in `seq 3`; do echo "ruok" | netcat -q 2 "10.0.10.$index" 2181; echo " from node $index!" done echo "" docker run --name=zookeeper.ui -d -p 9090:9090 $USER/zookeeper-ui > /dev/null ./what-is-ui-url.sh ## Instruction: Add sleep 30 to allow bridge to connect. ## Code After: set -e if sudo docker ps | grep "$USER/zookeeper" >/dev/null; then echo "" echo "It looks like you already have some containers running." echo "Please take them down before attempting to bring up another" echo "cluster with the following command:" echo "" echo " make stop-cluster" echo "" exit 1 fi for index in `seq 3`; do ./start-node.sh $index done echo "Waiting 30 seconds for bridge network to settle." sleep 30 echo "" echo "Testing Connection to Zookeeper Nodes" echo "-------------------------------------" for index in `seq 3`; do echo "ruok" | netcat -q 2 "10.0.10.$index" 2181; echo " from node $index!" done echo "" docker run --name=zookeeper.ui -d -p 9090:9090 $USER/zookeeper-ui > /dev/null ./what-is-ui-url.sh
set -e if sudo docker ps | grep "$USER/zookeeper" >/dev/null; then echo "" echo "It looks like you already have some containers running." echo "Please take them down before attempting to bring up another" echo "cluster with the following command:" echo "" echo " make stop-cluster" echo "" exit 1 fi for index in `seq 3`; do ./start-node.sh $index done + echo "Waiting 30 seconds for bridge network to settle." + sleep 30 + echo "" echo "Testing Connection to Zookeeper Nodes" echo "-------------------------------------" for index in `seq 3`; do echo "ruok" | netcat -q 2 "10.0.10.$index" 2181; echo " from node $index!" done echo "" docker run --name=zookeeper.ui -d -p 9090:9090 $USER/zookeeper-ui > /dev/null ./what-is-ui-url.sh
3
0.096774
3
0
91ac8590836620b62ba5ff08b06dea33da7a677d
lib/expgen.rb
lib/expgen.rb
require "parslet" require "expgen/version" require "expgen/parser" require "expgen/transform" require "expgen/randomizer" module Expgen def self.gen(exp) Randomizer.randomize(Transform.new.apply((Parser.new.parse(exp.source)))) end end
require "parslet" require "expgen/version" require "expgen/parser" require "expgen/transform" require "expgen/randomizer" module Expgen def self.cache @cache ||= {} end def self.clear_cache @cache = nil end def self.gen(exp) cache[exp.source] ||= Transform.new.apply((Parser.new.parse(exp.source))) Randomizer.randomize(cache[exp.source]) end end
Add cache for crazy speed boost
Add cache for crazy speed boost
Ruby
mit
jnicklas/expgen
ruby
## Code Before: require "parslet" require "expgen/version" require "expgen/parser" require "expgen/transform" require "expgen/randomizer" module Expgen def self.gen(exp) Randomizer.randomize(Transform.new.apply((Parser.new.parse(exp.source)))) end end ## Instruction: Add cache for crazy speed boost ## Code After: require "parslet" require "expgen/version" require "expgen/parser" require "expgen/transform" require "expgen/randomizer" module Expgen def self.cache @cache ||= {} end def self.clear_cache @cache = nil end def self.gen(exp) cache[exp.source] ||= Transform.new.apply((Parser.new.parse(exp.source))) Randomizer.randomize(cache[exp.source]) end end
require "parslet" require "expgen/version" require "expgen/parser" require "expgen/transform" require "expgen/randomizer" module Expgen + def self.cache + @cache ||= {} + end + + def self.clear_cache + @cache = nil + end + def self.gen(exp) - Randomizer.randomize(Transform.new.apply((Parser.new.parse(exp.source)))) ? ^ ^^ ^^^ ^^^^^^^^^^^^ - + cache[exp.source] ||= Transform.new.apply((Parser.new.parse(exp.source))) ? ^ ^^^^^^^^^ ^^^ ^^^^^^ + Randomizer.randomize(cache[exp.source]) end end
11
1
10
1
64f6f40366376ffa3b8be083f6a3538b279d75f9
.travis.yml
.travis.yml
sudo: false language: php php: - 5.5 - 5.6 env: - MONGO_VERSION=1.5.8 PREFER_LOWEST="" - MONGO_VERSION=stable PREFER_LOWEST="" - MONGO_VERSION=stable PREFER_LOWEST="--prefer-lowest" services: mongodb before_script: - yes '' | pecl -q install -f mongo-${MONGO_VERSION} - php --ri mongo - composer self-update - composer update --dev --no-interaction --prefer-source $PREFER_LOWEST script: - ./vendor/bin/phpunit
sudo: false language: php php: - 5.5 - 5.6 env: - MONGO_VERSION=1.5.8 - MONGO_VERSION=stable - MONGO_VERSION=stable PREFER_LOWEST="--prefer-lowest" matrix: include: - php: 7.0 env: ADAPTER_VERSION="^1.0.0" MONGODB_VERSION=stable services: mongodb before_script: - if [ "x${MONGO_VERSION}" != "x" ]; then yes '' | pecl -q install -f mongo-${MONGO_VERSION}; fi - if [ "x${MONGO_VERSION}" != "x" ]; then php --ri mongo; fi - composer self-update - if [ "x${MONGODB_VERSION}" != "x" ]; then pecl install -f mongodb-${MONGODB_VERSION}; fi - if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}"; fi - composer update --dev --no-interaction --prefer-source $PREFER_LOWEST script: - ./vendor/bin/phpunit
Add PHP 7 to the build matrix
Add PHP 7 to the build matrix
YAML
mit
doctrine/mongodb,alcaeus/mongodb
yaml
## Code Before: sudo: false language: php php: - 5.5 - 5.6 env: - MONGO_VERSION=1.5.8 PREFER_LOWEST="" - MONGO_VERSION=stable PREFER_LOWEST="" - MONGO_VERSION=stable PREFER_LOWEST="--prefer-lowest" services: mongodb before_script: - yes '' | pecl -q install -f mongo-${MONGO_VERSION} - php --ri mongo - composer self-update - composer update --dev --no-interaction --prefer-source $PREFER_LOWEST script: - ./vendor/bin/phpunit ## Instruction: Add PHP 7 to the build matrix ## Code After: sudo: false language: php php: - 5.5 - 5.6 env: - MONGO_VERSION=1.5.8 - MONGO_VERSION=stable - MONGO_VERSION=stable PREFER_LOWEST="--prefer-lowest" matrix: include: - php: 7.0 env: ADAPTER_VERSION="^1.0.0" MONGODB_VERSION=stable services: mongodb before_script: - if [ "x${MONGO_VERSION}" != "x" ]; then yes '' | pecl -q install -f mongo-${MONGO_VERSION}; fi - if [ "x${MONGO_VERSION}" != "x" ]; then php --ri mongo; fi - composer self-update - if [ "x${MONGODB_VERSION}" != "x" ]; then pecl install -f mongodb-${MONGODB_VERSION}; fi - if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}"; fi - composer update --dev --no-interaction --prefer-source $PREFER_LOWEST script: - ./vendor/bin/phpunit
sudo: false language: php php: - 5.5 - 5.6 env: - - MONGO_VERSION=1.5.8 PREFER_LOWEST="" - - MONGO_VERSION=stable PREFER_LOWEST="" + - MONGO_VERSION=1.5.8 + - MONGO_VERSION=stable - MONGO_VERSION=stable PREFER_LOWEST="--prefer-lowest" + + matrix: + include: + - php: 7.0 + env: ADAPTER_VERSION="^1.0.0" MONGODB_VERSION=stable services: mongodb before_script: - - yes '' | pecl -q install -f mongo-${MONGO_VERSION} - - php --ri mongo + - if [ "x${MONGO_VERSION}" != "x" ]; then yes '' | pecl -q install -f mongo-${MONGO_VERSION}; fi + - if [ "x${MONGO_VERSION}" != "x" ]; then php --ri mongo; fi - composer self-update + - if [ "x${MONGODB_VERSION}" != "x" ]; then pecl install -f mongodb-${MONGODB_VERSION}; fi + - if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}"; fi - composer update --dev --no-interaction --prefer-source $PREFER_LOWEST script: - ./vendor/bin/phpunit
15
0.681818
11
4
06a48a5d911955fc92e5293f446be6e89216b914
lib/uploadie/utils.rb
lib/uploadie/utils.rb
require "open-uri" require "tempfile" class Uploadie module Utils module_function DOWNLOAD_ERRORS = [ SocketError, # domain not found OpenURI::HTTPError, # response status 4xx or 5xx RuntimeError, # redirection errors (e.g. redirection loop) ] def download(url) downloaded_file = URI(url).open # open-uri will return a StringIO instead of a Tempfile if the filesize # is less than 10 KB (ಠ_ಠ), so we patch this behaviour by converting it # into a Tempfile. if downloaded_file.is_a?(StringIO) stringio = downloaded_file downloaded_file = copy_to_tempfile("open-uri", downloaded_file) OpenURI::Meta.init downloaded_file, stringio end DownloadedFile.new(downloaded_file) rescue *DOWNLOAD_ERRORS => error raise Error, "download failed: #{error.message}" end def copy_to_tempfile(basename, io) tempfile = Tempfile.new(basename, binmode: true) IO.copy_stream(io, tempfile.path) tempfile end class DownloadedFile < DelegateClass(Tempfile) def original_filename path = __getobj__.base_uri.path File.basename(path) unless path.empty? end def content_type __getobj__.content_type end end end end
require "open-uri" require "tempfile" class Uploadie module Utils module_function DOWNLOAD_ERRORS = [ SocketError, # domain not found OpenURI::HTTPError, # response status 4xx or 5xx RuntimeError, # redirection errors (e.g. redirection loop) ] def download(url) downloaded_file = URI(url).open("User-Agent"=>"Uploadie/#{Uploadie.version.to_s}") # open-uri will return a StringIO instead of a Tempfile if the filesize # is less than 10 KB (ಠ_ಠ), so we patch this behaviour by converting it # into a Tempfile. if downloaded_file.is_a?(StringIO) stringio = downloaded_file downloaded_file = copy_to_tempfile("open-uri", downloaded_file) OpenURI::Meta.init downloaded_file, stringio end DownloadedFile.new(downloaded_file) rescue *DOWNLOAD_ERRORS => error raise Error, "download failed: #{error.message}" end def copy_to_tempfile(basename, io) tempfile = Tempfile.new(basename, binmode: true) IO.copy_stream(io, tempfile.path) tempfile end class DownloadedFile < DelegateClass(Tempfile) def original_filename path = __getobj__.base_uri.path File.basename(path) unless path.empty? end def content_type __getobj__.content_type end end end end
Set the User-Agent when downloading
Set the User-Agent when downloading Some websites will return 403 if there is no User-Agent in the request. open-uri sets "ruby", but some websites won't consider it a valid User-Agent (ironically, ruby-toolbox.com won't). See https://github.com/carrierwaveuploader/carrierwave/issues/1459.
Ruby
mit
janko-m/shrine,janko-m/shrine
ruby
## Code Before: require "open-uri" require "tempfile" class Uploadie module Utils module_function DOWNLOAD_ERRORS = [ SocketError, # domain not found OpenURI::HTTPError, # response status 4xx or 5xx RuntimeError, # redirection errors (e.g. redirection loop) ] def download(url) downloaded_file = URI(url).open # open-uri will return a StringIO instead of a Tempfile if the filesize # is less than 10 KB (ಠ_ಠ), so we patch this behaviour by converting it # into a Tempfile. if downloaded_file.is_a?(StringIO) stringio = downloaded_file downloaded_file = copy_to_tempfile("open-uri", downloaded_file) OpenURI::Meta.init downloaded_file, stringio end DownloadedFile.new(downloaded_file) rescue *DOWNLOAD_ERRORS => error raise Error, "download failed: #{error.message}" end def copy_to_tempfile(basename, io) tempfile = Tempfile.new(basename, binmode: true) IO.copy_stream(io, tempfile.path) tempfile end class DownloadedFile < DelegateClass(Tempfile) def original_filename path = __getobj__.base_uri.path File.basename(path) unless path.empty? end def content_type __getobj__.content_type end end end end ## Instruction: Set the User-Agent when downloading Some websites will return 403 if there is no User-Agent in the request. open-uri sets "ruby", but some websites won't consider it a valid User-Agent (ironically, ruby-toolbox.com won't). See https://github.com/carrierwaveuploader/carrierwave/issues/1459. ## Code After: require "open-uri" require "tempfile" class Uploadie module Utils module_function DOWNLOAD_ERRORS = [ SocketError, # domain not found OpenURI::HTTPError, # response status 4xx or 5xx RuntimeError, # redirection errors (e.g. redirection loop) ] def download(url) downloaded_file = URI(url).open("User-Agent"=>"Uploadie/#{Uploadie.version.to_s}") # open-uri will return a StringIO instead of a Tempfile if the filesize # is less than 10 KB (ಠ_ಠ), so we patch this behaviour by converting it # into a Tempfile. if downloaded_file.is_a?(StringIO) stringio = downloaded_file downloaded_file = copy_to_tempfile("open-uri", downloaded_file) OpenURI::Meta.init downloaded_file, stringio end DownloadedFile.new(downloaded_file) rescue *DOWNLOAD_ERRORS => error raise Error, "download failed: #{error.message}" end def copy_to_tempfile(basename, io) tempfile = Tempfile.new(basename, binmode: true) IO.copy_stream(io, tempfile.path) tempfile end class DownloadedFile < DelegateClass(Tempfile) def original_filename path = __getobj__.base_uri.path File.basename(path) unless path.empty? end def content_type __getobj__.content_type end end end end
require "open-uri" require "tempfile" class Uploadie module Utils module_function DOWNLOAD_ERRORS = [ SocketError, # domain not found OpenURI::HTTPError, # response status 4xx or 5xx RuntimeError, # redirection errors (e.g. redirection loop) ] def download(url) - downloaded_file = URI(url).open + downloaded_file = URI(url).open("User-Agent"=>"Uploadie/#{Uploadie.version.to_s}") # open-uri will return a StringIO instead of a Tempfile if the filesize # is less than 10 KB (ಠ_ಠ), so we patch this behaviour by converting it # into a Tempfile. if downloaded_file.is_a?(StringIO) stringio = downloaded_file downloaded_file = copy_to_tempfile("open-uri", downloaded_file) OpenURI::Meta.init downloaded_file, stringio end DownloadedFile.new(downloaded_file) rescue *DOWNLOAD_ERRORS => error raise Error, "download failed: #{error.message}" end def copy_to_tempfile(basename, io) tempfile = Tempfile.new(basename, binmode: true) IO.copy_stream(io, tempfile.path) tempfile end class DownloadedFile < DelegateClass(Tempfile) def original_filename path = __getobj__.base_uri.path File.basename(path) unless path.empty? end def content_type __getobj__.content_type end end end end
2
0.040816
1
1
ca412e87bf93d531f71510ae05fbc86f0e35c44e
assets/stylesheets/elements/_table.scss
assets/stylesheets/elements/_table.scss
@import "../settings/colours"; @import "../settings/layout"; @import "../tools/mixins/typography"; table { border-collapse: collapse; border-spacing: 0; margin: ($baseline-grid-unit * 4) 0 ($baseline-grid-unit * 8); width: 100%; caption { @include core-font(24); margin: 0 0 $baseline-grid-unit * 4; text-align: left; @include media(tablet) { margin-bottom: $baseline-grid-unit * 8; } } th, td { @include core-font(16); border-bottom: 1px solid $grey-2; padding: ($baseline-grid-unit * 2); vertical-align: top; } th { @include bold-font(16); text-align: left; } }
@import "../settings/colours"; @import "../settings/layout"; @import "../tools/mixins/typography"; table { border-collapse: collapse; border-spacing: 0; margin: ($baseline-grid-unit * 4) 0 ($baseline-grid-unit * 8); width: 100%; caption { @include core-font(24); margin: 0 0 $baseline-grid-unit * 4; text-align: left; @include media(tablet) { margin-bottom: $baseline-grid-unit * 8; } } th, td { @include core-font(16); border-bottom: 1px solid $grey-2; padding: ($baseline-grid-unit * 2); vertical-align: top; } th { @include bold-font(16); text-align: left; } [align="right"] { text-align: right; } }
Allow table cells to be right aligned
Allow table cells to be right aligned
SCSS
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2
scss
## Code Before: @import "../settings/colours"; @import "../settings/layout"; @import "../tools/mixins/typography"; table { border-collapse: collapse; border-spacing: 0; margin: ($baseline-grid-unit * 4) 0 ($baseline-grid-unit * 8); width: 100%; caption { @include core-font(24); margin: 0 0 $baseline-grid-unit * 4; text-align: left; @include media(tablet) { margin-bottom: $baseline-grid-unit * 8; } } th, td { @include core-font(16); border-bottom: 1px solid $grey-2; padding: ($baseline-grid-unit * 2); vertical-align: top; } th { @include bold-font(16); text-align: left; } } ## Instruction: Allow table cells to be right aligned ## Code After: @import "../settings/colours"; @import "../settings/layout"; @import "../tools/mixins/typography"; table { border-collapse: collapse; border-spacing: 0; margin: ($baseline-grid-unit * 4) 0 ($baseline-grid-unit * 8); width: 100%; caption { @include core-font(24); margin: 0 0 $baseline-grid-unit * 4; text-align: left; @include media(tablet) { margin-bottom: $baseline-grid-unit * 8; } } th, td { @include core-font(16); border-bottom: 1px solid $grey-2; padding: ($baseline-grid-unit * 2); vertical-align: top; } th { @include bold-font(16); text-align: left; } [align="right"] { text-align: right; } }
@import "../settings/colours"; @import "../settings/layout"; @import "../tools/mixins/typography"; table { border-collapse: collapse; border-spacing: 0; margin: ($baseline-grid-unit * 4) 0 ($baseline-grid-unit * 8); width: 100%; caption { @include core-font(24); margin: 0 0 $baseline-grid-unit * 4; text-align: left; @include media(tablet) { margin-bottom: $baseline-grid-unit * 8; } } th, td { @include core-font(16); border-bottom: 1px solid $grey-2; padding: ($baseline-grid-unit * 2); vertical-align: top; } th { @include bold-font(16); text-align: left; } + + [align="right"] { + text-align: right; + } }
4
0.121212
4
0
9a94e9e61a7bb1680265692eb7cdf926842aa766
streamline/__init__.py
streamline/__init__.py
from .base import RouteBase, NonIterableRouteBase from .template import TemplateRoute, XHRPartialRoute, ROCARoute from .forms import FormRoute, TemplateFormRoute, XHRPartialFormRoute __version__ = '1.0' __author__ = 'Outernet Inc' __all__ = ( RouteBase, NonIterableRouteBase, TemplateRoute, XHRPartialRoute, ROCARoute, FormRoute, TemplateFormRoute, XHRPartialFormRoute, )
from .base import RouteBase, NonIterableRouteBase from .template import TemplateRoute, XHRPartialRoute, ROCARoute from .forms import FormRoute, TemplateFormRoute, XHRPartialFormRoute __version__ = '1.0' __author__ = 'Outernet Inc' __all__ = ( 'RouteBase', 'NonIterableRouteBase', 'TemplateRoute', 'XHRPartialRoute', 'ROCARoute', 'FormRoute', 'TemplateFormRoute', 'XHRPartialFormRoute', )
Fix __all__ using objects instead of strings
Fix __all__ using objects instead of strings Signed-off-by: Branko Vukelic <26059cc39872530f89fec69552bb1050e1cc2caa@outernet.is>
Python
bsd-2-clause
Outernet-Project/bottle-streamline
python
## Code Before: from .base import RouteBase, NonIterableRouteBase from .template import TemplateRoute, XHRPartialRoute, ROCARoute from .forms import FormRoute, TemplateFormRoute, XHRPartialFormRoute __version__ = '1.0' __author__ = 'Outernet Inc' __all__ = ( RouteBase, NonIterableRouteBase, TemplateRoute, XHRPartialRoute, ROCARoute, FormRoute, TemplateFormRoute, XHRPartialFormRoute, ) ## Instruction: Fix __all__ using objects instead of strings Signed-off-by: Branko Vukelic <26059cc39872530f89fec69552bb1050e1cc2caa@outernet.is> ## Code After: from .base import RouteBase, NonIterableRouteBase from .template import TemplateRoute, XHRPartialRoute, ROCARoute from .forms import FormRoute, TemplateFormRoute, XHRPartialFormRoute __version__ = '1.0' __author__ = 'Outernet Inc' __all__ = ( 'RouteBase', 'NonIterableRouteBase', 'TemplateRoute', 'XHRPartialRoute', 'ROCARoute', 'FormRoute', 'TemplateFormRoute', 'XHRPartialFormRoute', )
from .base import RouteBase, NonIterableRouteBase from .template import TemplateRoute, XHRPartialRoute, ROCARoute from .forms import FormRoute, TemplateFormRoute, XHRPartialFormRoute __version__ = '1.0' __author__ = 'Outernet Inc' __all__ = ( - RouteBase, + 'RouteBase', ? + + - NonIterableRouteBase, + 'NonIterableRouteBase', ? + + - TemplateRoute, + 'TemplateRoute', ? + + - XHRPartialRoute, + 'XHRPartialRoute', ? + + - ROCARoute, + 'ROCARoute', ? + + - FormRoute, + 'FormRoute', ? + + - TemplateFormRoute, + 'TemplateFormRoute', ? + + - XHRPartialFormRoute, + 'XHRPartialFormRoute', ? + + )
16
0.941176
8
8
a29932d3292be7d6ac2b9bb53c2795fac669dcb5
lib/Interhack/Plugin/QuakeConsole.pm
lib/Interhack/Plugin/QuakeConsole.pm
package Interhack::Plugin::QuakeConsole; use Moose::Role; use Term::ReadLine; use Term::ReadKey; with "Interhack::Plugin::Util"; our $VERSION = '1.99_01'; # attributes {{{ # }}} # method modifiers {{{ around 'check_input' => sub { my $orig = shift; my ($self, $input) = @_; $input = $orig->($self, $input); return unless defined $input; return $input unless $self->expecting_command && $input =~ /^~/; ReadMode 0; for (1..12) { $self->print_row($_, "\e[K"); } for (14..24) { $self->restore_row($_, "\e[1;30m"); } $self->print_row(13, "\e[K\e[1;30m+" . ('-' x 78) . "+\e[m"); print "\e[1;12r\e[12;1H"; while (1) { print "\n> "; my $line = <>; last if !defined($line); print eval $line; warn $@ if $@; } print "\ec"; ReadMode 3; return "\cr"; }; # }}} # methods {{{ # }}} 1;
package Interhack::Plugin::QuakeConsole; use Moose::Role; use Term::ReadLine; use Term::ReadKey; with "Interhack::Plugin::Util"; our $VERSION = '1.99_01'; # attributes {{{ # }}} # method modifiers {{{ around 'check_input' => sub { my $orig = shift; my ($self, $input) = @_; $input = $orig->($self, $input); return unless defined $input; return $input unless $self->expecting_command && $input =~ /^~/; ReadMode 0; my ($x, $y) = ($self->vt->x, $self->vt->y); for (1..12) { $self->print_row($_, "\e[K"); } for (14..24) { $self->restore_row($_, "\e[1;30m"); } $self->print_row(13, "\e[K\e[1;30m+" . ('-' x 78) . "+\e[m"); print "\e[1;12r\e[12;1H"; while (1) { print "\n> "; my $line = <>; last if !defined($line); print eval $line; warn $@ if $@; } print "\ec"; ReadMode 3; for (1..24) { $self->restore_row($_); } $self->goto($x, $y); return; }; # }}} # methods {{{ # }}} 1;
Return to original x, y after console ends
Return to original x, y after console ends
Perl
bsd-3-clause
TAEB/Interhack2
perl
## Code Before: package Interhack::Plugin::QuakeConsole; use Moose::Role; use Term::ReadLine; use Term::ReadKey; with "Interhack::Plugin::Util"; our $VERSION = '1.99_01'; # attributes {{{ # }}} # method modifiers {{{ around 'check_input' => sub { my $orig = shift; my ($self, $input) = @_; $input = $orig->($self, $input); return unless defined $input; return $input unless $self->expecting_command && $input =~ /^~/; ReadMode 0; for (1..12) { $self->print_row($_, "\e[K"); } for (14..24) { $self->restore_row($_, "\e[1;30m"); } $self->print_row(13, "\e[K\e[1;30m+" . ('-' x 78) . "+\e[m"); print "\e[1;12r\e[12;1H"; while (1) { print "\n> "; my $line = <>; last if !defined($line); print eval $line; warn $@ if $@; } print "\ec"; ReadMode 3; return "\cr"; }; # }}} # methods {{{ # }}} 1; ## Instruction: Return to original x, y after console ends ## Code After: package Interhack::Plugin::QuakeConsole; use Moose::Role; use Term::ReadLine; use Term::ReadKey; with "Interhack::Plugin::Util"; our $VERSION = '1.99_01'; # attributes {{{ # }}} # method modifiers {{{ around 'check_input' => sub { my $orig = shift; my ($self, $input) = @_; $input = $orig->($self, $input); return unless defined $input; return $input unless $self->expecting_command && $input =~ /^~/; ReadMode 0; my ($x, $y) = ($self->vt->x, $self->vt->y); for (1..12) { $self->print_row($_, "\e[K"); } for (14..24) { $self->restore_row($_, "\e[1;30m"); } $self->print_row(13, "\e[K\e[1;30m+" . ('-' x 78) . "+\e[m"); print "\e[1;12r\e[12;1H"; while (1) { print "\n> "; my $line = <>; last if !defined($line); print eval $line; warn $@ if $@; } print "\ec"; ReadMode 3; for (1..24) { $self->restore_row($_); } $self->goto($x, $y); return; }; # }}} # methods {{{ # }}} 1;
package Interhack::Plugin::QuakeConsole; use Moose::Role; use Term::ReadLine; use Term::ReadKey; with "Interhack::Plugin::Util"; our $VERSION = '1.99_01'; # attributes {{{ # }}} # method modifiers {{{ around 'check_input' => sub { my $orig = shift; my ($self, $input) = @_; $input = $orig->($self, $input); return unless defined $input; return $input unless $self->expecting_command && $input =~ /^~/; ReadMode 0; + my ($x, $y) = ($self->vt->x, $self->vt->y); for (1..12) { $self->print_row($_, "\e[K"); } for (14..24) { $self->restore_row($_, "\e[1;30m"); } + $self->print_row(13, "\e[K\e[1;30m+" . ('-' x 78) . "+\e[m"); print "\e[1;12r\e[12;1H"; while (1) { print "\n> "; my $line = <>; last if !defined($line); print eval $line; warn $@ if $@; } print "\ec"; ReadMode 3; + for (1..24) + { + $self->restore_row($_); + } + $self->goto($x, $y); + - return "\cr"; ? ------ + return; }; # }}} # methods {{{ # }}} 1;
10
0.196078
9
1
8b48f237418ff9833cf7c9484ab760bdb535e219
src/main/java/com/bwssystems/HABridge/plugins/moziot/MozIotCommandDetail.java
src/main/java/com/bwssystems/HABridge/plugins/moziot/MozIotCommandDetail.java
package com.bwssystems.HABridge.plugins.moziot; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class MozIotCommandDetail { @SerializedName("on") @Expose private boolean on; @SerializedName("level") @Expose private String level; @SerializedName("color") @Expose private String color; public boolean isOn() { return on; } public void setOn(boolean on) { this.on = on; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getBody() { String theBody = ""; if(level != null && level != "") { theBody = "{\"level\":" + level + "}"; } else if(color != null && color != "") { theBody = "{\"color\":\"" + color + "\"}"; } else { theBody = "{\"on\":" + on + "}"; } return theBody; } }
package com.bwssystems.HABridge.plugins.moziot; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class MozIotCommandDetail { @SerializedName("on") @Expose private boolean on; @SerializedName("level") @Expose private String level; @SerializedName("color") @Expose private String color; public boolean isOn() { return on; } public void setOn(boolean on) { this.on = on; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getBody() { String theBody = ""; if(level != null && !"".equals(level)) { theBody = "{\"level\":" + level + "}"; } else if(color != null && !"".equals(color)) { theBody = "{\"color\":\"" + color + "\"}"; } else { theBody = "{\"on\":" + on + "}"; } return theBody; } }
Fix the bad practice "Comparison of String objects using == or !=".
Fix the bad practice "Comparison of String objects using == or !=".
Java
apache-2.0
bwssytems/ha-bridge,bwssytems/ha-bridge,bwssytems/amazon-echo-bridge-compact,bwssytems/amazon-echo-bridge-compact,bwssytems/ha-bridge,bwssytems/amazon-echo-bridge-compact
java
## Code Before: package com.bwssystems.HABridge.plugins.moziot; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class MozIotCommandDetail { @SerializedName("on") @Expose private boolean on; @SerializedName("level") @Expose private String level; @SerializedName("color") @Expose private String color; public boolean isOn() { return on; } public void setOn(boolean on) { this.on = on; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getBody() { String theBody = ""; if(level != null && level != "") { theBody = "{\"level\":" + level + "}"; } else if(color != null && color != "") { theBody = "{\"color\":\"" + color + "\"}"; } else { theBody = "{\"on\":" + on + "}"; } return theBody; } } ## Instruction: Fix the bad practice "Comparison of String objects using == or !=". ## Code After: package com.bwssystems.HABridge.plugins.moziot; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class MozIotCommandDetail { @SerializedName("on") @Expose private boolean on; @SerializedName("level") @Expose private String level; @SerializedName("color") @Expose private String color; public boolean isOn() { return on; } public void setOn(boolean on) { this.on = on; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getBody() { String theBody = ""; if(level != null && !"".equals(level)) { theBody = "{\"level\":" + level + "}"; } else if(color != null && !"".equals(color)) { theBody = "{\"color\":\"" + color + "\"}"; } else { theBody = "{\"on\":" + on + "}"; } return theBody; } }
package com.bwssystems.HABridge.plugins.moziot; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class MozIotCommandDetail { @SerializedName("on") @Expose private boolean on; @SerializedName("level") @Expose private String level; @SerializedName("color") @Expose private String color; public boolean isOn() { return on; } public void setOn(boolean on) { this.on = on; } public String getLevel() { return level; } public void setLevel(String level) { this.level = level; } public String getColor() { return color; } public void setColor(String color) { this.color = color; } public String getBody() { String theBody = ""; - if(level != null && level != "") { ? ^^^^^^ + if(level != null && !"".equals(level)) { ? +++++++++++ ^ theBody = "{\"level\":" + level + "}"; } - else if(color != null && color != "") { ? ^^^^^^ + else if(color != null && !"".equals(color)) { ? +++++++++++ ^ theBody = "{\"color\":\"" + color + "\"}"; } else { theBody = "{\"on\":" + on + "}"; } return theBody; } }
4
0.074074
2
2
a9560e349735f2bb2d8cb32bec0d4251ffc309e7
pkgs/development/compilers/nasm/default.nix
pkgs/development/compilers/nasm/default.nix
{ stdenv, fetchurl }: stdenv.mkDerivation rec { name = "nasm-${version}"; version = "2.11.06"; src = fetchurl { url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2"; sha256 = "0v1y1kx09nzmk8w4v79jxhn15fmi3g7l9nmgkn7ldjl1d5yxkdl7"; }; meta = { homepage = http://www.nasm.us/; description = "An 80x86 and x86-64 assembler designed for portability and modularity"; platforms = stdenv.lib.platforms.unix; }; }
{ stdenv, fetchurl }: stdenv.mkDerivation rec { name = "nasm-${version}"; version = "2.11.05"; src = fetchurl { url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2"; sha256 = "1sgspnascc0asmwlv3jm1mq4vzx653sa7vlg48z20pfybk7pnhaa"; }; meta = { homepage = http://www.nasm.us/; description = "An 80x86 and x86-64 assembler designed for portability and modularity"; platforms = stdenv.lib.platforms.unix; }; }
Revert "update from 2.11.05 to 2.11.06"
nasm: Revert "update from 2.11.05 to 2.11.06" This reverts commit bce477f8465bba5ac894e5a4fc11cf1590073675, which breaks syslinux.
Nix
mit
NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,triton/triton,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs
nix
## Code Before: { stdenv, fetchurl }: stdenv.mkDerivation rec { name = "nasm-${version}"; version = "2.11.06"; src = fetchurl { url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2"; sha256 = "0v1y1kx09nzmk8w4v79jxhn15fmi3g7l9nmgkn7ldjl1d5yxkdl7"; }; meta = { homepage = http://www.nasm.us/; description = "An 80x86 and x86-64 assembler designed for portability and modularity"; platforms = stdenv.lib.platforms.unix; }; } ## Instruction: nasm: Revert "update from 2.11.05 to 2.11.06" This reverts commit bce477f8465bba5ac894e5a4fc11cf1590073675, which breaks syslinux. ## Code After: { stdenv, fetchurl }: stdenv.mkDerivation rec { name = "nasm-${version}"; version = "2.11.05"; src = fetchurl { url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2"; sha256 = "1sgspnascc0asmwlv3jm1mq4vzx653sa7vlg48z20pfybk7pnhaa"; }; meta = { homepage = http://www.nasm.us/; description = "An 80x86 and x86-64 assembler designed for portability and modularity"; platforms = stdenv.lib.platforms.unix; }; }
{ stdenv, fetchurl }: stdenv.mkDerivation rec { name = "nasm-${version}"; - version = "2.11.06"; ? ^ + version = "2.11.05"; ? ^ src = fetchurl { url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2"; - sha256 = "0v1y1kx09nzmk8w4v79jxhn15fmi3g7l9nmgkn7ldjl1d5yxkdl7"; + sha256 = "1sgspnascc0asmwlv3jm1mq4vzx653sa7vlg48z20pfybk7pnhaa"; }; meta = { homepage = http://www.nasm.us/; description = "An 80x86 and x86-64 assembler designed for portability and modularity"; platforms = stdenv.lib.platforms.unix; }; }
4
0.235294
2
2
2a1471ec6b41ff0a9c13c1a3658bf43603180c57
CHANGELOG.md
CHANGELOG.md
- Added CHANGELOG file - Added offline caching - Improved whitespace detection ## 0.1 - 2016-11-19 - Added initial version [0.2]: https://github.com/GustavoFernandes/order-splitter/compare/v0.1...v0.2
- Bug fixes to offline caching - Simplified change log ## [0.2] - 2016-12-01 - Added CHANGELOG file - Added offline caching - Improved whitespace detection ## 0.1 - 2016-11-19 - Added initial version [Unreleased]: https://github.com/GustavoFernandes/order-splitter/compare/v0.2...HEAD [0.2]: https://github.com/GustavoFernandes/order-splitter/compare/v0.1...v0.2
Add unreleased items to change log
Add unreleased items to change log
Markdown
mit
MergeMyPullRequest/order-splitter,jonsmithers/order-splitter,MergeMyPullRequest/order-splitter,billy-hardy/order-splitter,jonsmithers/order-splitter,GustavoFernandes/order-splitter,GustavoFernandes/order-splitter,billy-hardy/order-splitter
markdown
## Code Before: - Added CHANGELOG file - Added offline caching - Improved whitespace detection ## 0.1 - 2016-11-19 - Added initial version [0.2]: https://github.com/GustavoFernandes/order-splitter/compare/v0.1...v0.2 ## Instruction: Add unreleased items to change log ## Code After: - Bug fixes to offline caching - Simplified change log ## [0.2] - 2016-12-01 - Added CHANGELOG file - Added offline caching - Improved whitespace detection ## 0.1 - 2016-11-19 - Added initial version [Unreleased]: https://github.com/GustavoFernandes/order-splitter/compare/v0.2...HEAD [0.2]: https://github.com/GustavoFernandes/order-splitter/compare/v0.1...v0.2
+ - Bug fixes to offline caching + - Simplified change log + + ## [0.2] - 2016-12-01 - Added CHANGELOG file - Added offline caching - Improved whitespace detection ## 0.1 - 2016-11-19 - Added initial version + [Unreleased]: https://github.com/GustavoFernandes/order-splitter/compare/v0.2...HEAD [0.2]: https://github.com/GustavoFernandes/order-splitter/compare/v0.1...v0.2
5
0.625
5
0
ed3ff21b1c8d3da7fa8cda32e9ee7ef252f77bd4
.travis.yml
.travis.yml
sudo: false language: rust env: global: - CRATE=twig matrix: allow_failures: - rust: nightly include: - rust: nightly env: DOC=true - rust: beta - rust: stable - rust: 1.1.0 - rust: 1.0.0 after_success: - /bin/bash export_doc.sh
sudo: false language: rust env: global: - CRATE=twig matrix: allow_failures: - rust: nightly include: - rust: nightly env: DOC=true - rust: beta - rust: stable - rust: 1.2.0 - rust: 1.1.0 - rust: 1.0.0 after_success: - /bin/bash export_doc.sh
Add Rust 1.2.0 to build matrix because stable will soon move to 1.3.0.
Add Rust 1.2.0 to build matrix because stable will soon move to 1.3.0.
YAML
bsd-3-clause
Nercury/twig-rs,Nercury/twig-rs,Nercury/twig-rs
yaml
## Code Before: sudo: false language: rust env: global: - CRATE=twig matrix: allow_failures: - rust: nightly include: - rust: nightly env: DOC=true - rust: beta - rust: stable - rust: 1.1.0 - rust: 1.0.0 after_success: - /bin/bash export_doc.sh ## Instruction: Add Rust 1.2.0 to build matrix because stable will soon move to 1.3.0. ## Code After: sudo: false language: rust env: global: - CRATE=twig matrix: allow_failures: - rust: nightly include: - rust: nightly env: DOC=true - rust: beta - rust: stable - rust: 1.2.0 - rust: 1.1.0 - rust: 1.0.0 after_success: - /bin/bash export_doc.sh
sudo: false language: rust env: global: - CRATE=twig matrix: allow_failures: - rust: nightly include: - rust: nightly env: DOC=true - rust: beta - rust: stable + - rust: 1.2.0 - rust: 1.1.0 - rust: 1.0.0 after_success: - /bin/bash export_doc.sh
1
0.05
1
0
d44d39eabd8e6157fa657f0d1d8457877b613a51
app/views/mappings/_mappings_table_header.html.erb
app/views/mappings/_mappings_table_header.html.erb
<tr class="table-header-secondary"> <td class="selectable-row"> <div class="relative"> <label> <input type="checkbox" class="js-toggle-all"/> </label> </div> </td> <td colspan="3"> <div class="pull-left"> <% unless footer %> <div class="if-js-hide"> <%= label_tag :http_status_redirect, class: 'radio inline table-header-radio' do %> <%= radio_button_tag(:http_status, '301', selected = true) %> Redirect <% end %> <%= label_tag :http_status_archive, class: 'radio inline table-header-radio add-right-margin' do %> <%= radio_button_tag(:http_status, '410') %> Archive <% end %> <%= submit_tag "Edit selected", class: 'btn bold' %> </div> <% end %> <div class="if-no-js-hide btn-group"> <a href="#redirect-selected" class="btn js-submit-form disabled" data-type="301" data-loading-text="Loading…">Redirect selected</a> <a href="#archive-selected" class="btn js-submit-form disabled" data-type="410" data-loading-text="Loading…">Archive selected</a> </div> </div> <div class="pull-right"> <%= render partial: 'add_button' %> </div> </td> </tr>
<tr class="table-header-secondary"> <td class="selectable-row"> <div class="relative if-no-js-hide"> <label> <input type="checkbox" class="js-toggle-all"/> </label> </div> </td> <td colspan="3"> <div class="pull-left"> <% unless footer %> <div class="if-js-hide"> <%= label_tag :http_status_301, class: 'radio inline table-header-radio' do %> <%= radio_button_tag(:http_status, '301', selected = true) %> Redirect <% end %> <%= label_tag :http_status_410, class: 'radio inline table-header-radio add-right-margin' do %> <%= radio_button_tag(:http_status, '410') %> Archive <% end %> <%= submit_tag "Edit selected", class: 'btn bold' %> </div> <% end %> <div class="if-no-js-hide btn-group"> <a href="#redirect-selected" class="btn js-submit-form disabled" data-type="301" data-loading-text="Loading…">Redirect selected</a> <a href="#archive-selected" class="btn js-submit-form disabled" data-type="410" data-loading-text="Loading…">Archive selected</a> </div> </div> <div class="pull-right"> <%= render partial: 'add_button' %> </div> </td> </tr>
Fix checkbox & radio non-javascript interactions
Fix checkbox & radio non-javascript interactions * Hide check-all checkbox when we aren’t using JavaScript, it won’t do anything * Update the label ‘for’ attribute so that labels are clickable again
HTML+ERB
mit
alphagov/transition,alphagov/transition,alphagov/transition
html+erb
## Code Before: <tr class="table-header-secondary"> <td class="selectable-row"> <div class="relative"> <label> <input type="checkbox" class="js-toggle-all"/> </label> </div> </td> <td colspan="3"> <div class="pull-left"> <% unless footer %> <div class="if-js-hide"> <%= label_tag :http_status_redirect, class: 'radio inline table-header-radio' do %> <%= radio_button_tag(:http_status, '301', selected = true) %> Redirect <% end %> <%= label_tag :http_status_archive, class: 'radio inline table-header-radio add-right-margin' do %> <%= radio_button_tag(:http_status, '410') %> Archive <% end %> <%= submit_tag "Edit selected", class: 'btn bold' %> </div> <% end %> <div class="if-no-js-hide btn-group"> <a href="#redirect-selected" class="btn js-submit-form disabled" data-type="301" data-loading-text="Loading…">Redirect selected</a> <a href="#archive-selected" class="btn js-submit-form disabled" data-type="410" data-loading-text="Loading…">Archive selected</a> </div> </div> <div class="pull-right"> <%= render partial: 'add_button' %> </div> </td> </tr> ## Instruction: Fix checkbox & radio non-javascript interactions * Hide check-all checkbox when we aren’t using JavaScript, it won’t do anything * Update the label ‘for’ attribute so that labels are clickable again ## Code After: <tr class="table-header-secondary"> <td class="selectable-row"> <div class="relative if-no-js-hide"> <label> <input type="checkbox" class="js-toggle-all"/> </label> </div> </td> <td colspan="3"> <div class="pull-left"> <% unless footer %> <div class="if-js-hide"> <%= label_tag :http_status_301, class: 'radio inline table-header-radio' do %> <%= radio_button_tag(:http_status, '301', selected = true) %> Redirect <% end %> <%= label_tag :http_status_410, class: 'radio inline table-header-radio add-right-margin' do %> <%= radio_button_tag(:http_status, '410') %> Archive <% end %> <%= submit_tag "Edit selected", class: 'btn bold' %> </div> <% end %> <div class="if-no-js-hide btn-group"> <a href="#redirect-selected" class="btn js-submit-form disabled" data-type="301" data-loading-text="Loading…">Redirect selected</a> <a href="#archive-selected" class="btn js-submit-form disabled" data-type="410" data-loading-text="Loading…">Archive selected</a> </div> </div> <div class="pull-right"> <%= render partial: 'add_button' %> </div> </td> </tr>
<tr class="table-header-secondary"> <td class="selectable-row"> - <div class="relative"> + <div class="relative if-no-js-hide"> ? ++++++++++++++ <label> <input type="checkbox" class="js-toggle-all"/> </label> </div> </td> <td colspan="3"> <div class="pull-left"> <% unless footer %> <div class="if-js-hide"> - <%= label_tag :http_status_redirect, class: 'radio inline table-header-radio' do %> ? ^^^^^^^^ + <%= label_tag :http_status_301, class: 'radio inline table-header-radio' do %> ? ^^^ <%= radio_button_tag(:http_status, '301', selected = true) %> Redirect <% end %> - <%= label_tag :http_status_archive, class: 'radio inline table-header-radio add-right-margin' do %> ? ^^^^^^^ + <%= label_tag :http_status_410, class: 'radio inline table-header-radio add-right-margin' do %> ? ^^^ <%= radio_button_tag(:http_status, '410') %> Archive <% end %> <%= submit_tag "Edit selected", class: 'btn bold' %> </div> <% end %> <div class="if-no-js-hide btn-group"> <a href="#redirect-selected" class="btn js-submit-form disabled" data-type="301" data-loading-text="Loading…">Redirect selected</a> <a href="#archive-selected" class="btn js-submit-form disabled" data-type="410" data-loading-text="Loading…">Archive selected</a> </div> </div> <div class="pull-right"> <%= render partial: 'add_button' %> </div> </td> </tr>
6
0.193548
3
3
faf3bc1eabc938b3ed9fa898b08ed8a9c47fb77e
project_config/lmic_project_config.h
project_config/lmic_project_config.h
// project-specific definitions for otaa sensor //#define CFG_eu868 1 //#define CFG_us915 1 //#define CFG_au921 1 #define CFG_as923 1 #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP //#define CFG_in866 1 #define CFG_sx1276_radio 1 //#define LMIC_USE_INTERRUPTS #define LMIC_DEBUG_LEVEL 2 #define LMIC_DEBUG_PRINTF_FN lmic_printf
// project-specific definitions for otaa sensor //#define CFG_eu868 1 #define CFG_us915 1 //#define CFG_au921 1 //#define CFG_as923 1 //#define CFG_in866 1 #define CFG_sx1276_radio 1 //#define LMIC_USE_INTERRUPTS
Set project_config back to defaults
Set project_config back to defaults
C
mit
mcci-catena/arduino-lmic,mcci-catena/arduino-lmic,mcci-catena/arduino-lmic
c
## Code Before: // project-specific definitions for otaa sensor //#define CFG_eu868 1 //#define CFG_us915 1 //#define CFG_au921 1 #define CFG_as923 1 #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP //#define CFG_in866 1 #define CFG_sx1276_radio 1 //#define LMIC_USE_INTERRUPTS #define LMIC_DEBUG_LEVEL 2 #define LMIC_DEBUG_PRINTF_FN lmic_printf ## Instruction: Set project_config back to defaults ## Code After: // project-specific definitions for otaa sensor //#define CFG_eu868 1 #define CFG_us915 1 //#define CFG_au921 1 //#define CFG_as923 1 //#define CFG_in866 1 #define CFG_sx1276_radio 1 //#define LMIC_USE_INTERRUPTS
// project-specific definitions for otaa sensor //#define CFG_eu868 1 - //#define CFG_us915 1 ? -- + #define CFG_us915 1 //#define CFG_au921 1 - #define CFG_as923 1 + //#define CFG_as923 1 ? ++ - #define LMIC_COUNTRY_CODE LMIC_COUNTRY_CODE_JP //#define CFG_in866 1 #define CFG_sx1276_radio 1 //#define LMIC_USE_INTERRUPTS - #define LMIC_DEBUG_LEVEL 2 - #define LMIC_DEBUG_PRINTF_FN lmic_printf
7
0.636364
2
5
dc634247b38ba65d9e5525e53a1e83d0f81665ce
tasks/pipeline-es.yml
tasks/pipeline-es.yml
--- - block: - name: "pipeline-es | Install elasticsearch-curator" pip: name: "elasticsearch-curator" version: "3.5.1" - name: "pipeline-es | Set Elasticsearch connection parameters" set_fact: es_host: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<host>') }}" es_port: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<port>') }}" - name: "pipeline-es | Reset Elasticsearch indexes" command: "curator --host={{ es_host }} --port={{ es_port }} delete indices --index='{{ item }}'" with_items: - "transfers" - "aips" when: "archivematica_src_reset_es|bool or archivematica_src_reset_am_all|bool"
--- - block: - name: "pipeline-es | Set Elasticsearch connection parameters" set_fact: es_host: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<host>') }}" es_port: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<port>') }}" - name: "pipeline-es | Reset Elasticsearch indexes" uri: url: "http://{{ es_host }}:{{es_port}}/{{ item }}" method: "DELETE" with_items: - "aips" - "transfers" - "transferfiles" - "aipfiles" ignore_errors: True when: "archivematica_src_reset_es|bool or archivematica_src_reset_am_all|bool"
Remove curator and delete indexes using ansible module
Remove curator and delete indexes using ansible module Due to the introduction of ES6 in AM 1.9, this removes the dependency on curator instead of updating it to work in ES6 Connects to https://github.com/artefactual/archivematica/issues/1171
YAML
agpl-3.0
artefactual-labs/ansible-archivematica-src
yaml
## Code Before: --- - block: - name: "pipeline-es | Install elasticsearch-curator" pip: name: "elasticsearch-curator" version: "3.5.1" - name: "pipeline-es | Set Elasticsearch connection parameters" set_fact: es_host: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<host>') }}" es_port: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<port>') }}" - name: "pipeline-es | Reset Elasticsearch indexes" command: "curator --host={{ es_host }} --port={{ es_port }} delete indices --index='{{ item }}'" with_items: - "transfers" - "aips" when: "archivematica_src_reset_es|bool or archivematica_src_reset_am_all|bool" ## Instruction: Remove curator and delete indexes using ansible module Due to the introduction of ES6 in AM 1.9, this removes the dependency on curator instead of updating it to work in ES6 Connects to https://github.com/artefactual/archivematica/issues/1171 ## Code After: --- - block: - name: "pipeline-es | Set Elasticsearch connection parameters" set_fact: es_host: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<host>') }}" es_port: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<port>') }}" - name: "pipeline-es | Reset Elasticsearch indexes" uri: url: "http://{{ es_host }}:{{es_port}}/{{ item }}" method: "DELETE" with_items: - "aips" - "transfers" - "transferfiles" - "aipfiles" ignore_errors: True when: "archivematica_src_reset_es|bool or archivematica_src_reset_am_all|bool"
--- - block: - - - name: "pipeline-es | Install elasticsearch-curator" - pip: - name: "elasticsearch-curator" - version: "3.5.1" - name: "pipeline-es | Set Elasticsearch connection parameters" set_fact: es_host: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<host>') }}" es_port: "{{ archivematica_src_am_dashboard_environment['ARCHIVEMATICA_DASHBOARD_DASHBOARD_ELASTICSEARCH_SERVER'] | regex_replace('^(?P<host>.+):(?P<port>\\d+)$', '\\g<port>') }}" - name: "pipeline-es | Reset Elasticsearch indexes" - command: "curator --host={{ es_host }} --port={{ es_port }} delete indices --index='{{ item }}'" + uri: + url: "http://{{ es_host }}:{{es_port}}/{{ item }}" + method: "DELETE" with_items: + - "aips" - "transfers" + - "transferfiles" - - "aips" + - "aipfiles" ? ++++ + ignore_errors: True when: "archivematica_src_reset_es|bool or archivematica_src_reset_am_all|bool"
14
0.666667
7
7
16d2dd8652ad4b3091f96fb718a7f0aeb3d9366c
drawing-tools/pinpoint.coffee
drawing-tools/pinpoint.coffee
BasePoint = require 'zooniverse-readymade/lib/drawing-tools/point' ToolControls = require './tool-controls' class Pinpoint extends BasePoint @Controls: ToolControls constructor: -> super @disc.attr 'class', 'pinpoint' rescale: (scale) -> super coords: (e) -> @markingSurface.screenPixelToScale @markingSurface.svg.pointerOffset e onMove: (e) => {x, y} = @coords e @mark.set {x, y} render: -> super @controls.moveTo x: @mark.x + 30 y: @mark.y module.exports = Pinpoint
BasePoint = require 'zooniverse-readymade/lib/drawing-tools/point' ToolControls = require './tool-controls' class Pinpoint extends BasePoint @Controls: ToolControls constructor: -> super @disc.attr 'class', 'pinpoint' rescale: (scale) -> super coords: (e) -> @markingSurface.screenPixelToScale @markingSurface.svg.pointerOffset e onMove: (e) => {x, y} = @coords e @mark.set {x, y} render: -> super offset = @radius / @markingSurface.magnification @controls.moveTo x: @mark.x + offset y: @mark.y module.exports = Pinpoint
Fix point tool controls offset when scaling image.
Fix point tool controls offset when scaling image.
CoffeeScript
apache-2.0
zooniverse/BHL
coffeescript
## Code Before: BasePoint = require 'zooniverse-readymade/lib/drawing-tools/point' ToolControls = require './tool-controls' class Pinpoint extends BasePoint @Controls: ToolControls constructor: -> super @disc.attr 'class', 'pinpoint' rescale: (scale) -> super coords: (e) -> @markingSurface.screenPixelToScale @markingSurface.svg.pointerOffset e onMove: (e) => {x, y} = @coords e @mark.set {x, y} render: -> super @controls.moveTo x: @mark.x + 30 y: @mark.y module.exports = Pinpoint ## Instruction: Fix point tool controls offset when scaling image. ## Code After: BasePoint = require 'zooniverse-readymade/lib/drawing-tools/point' ToolControls = require './tool-controls' class Pinpoint extends BasePoint @Controls: ToolControls constructor: -> super @disc.attr 'class', 'pinpoint' rescale: (scale) -> super coords: (e) -> @markingSurface.screenPixelToScale @markingSurface.svg.pointerOffset e onMove: (e) => {x, y} = @coords e @mark.set {x, y} render: -> super offset = @radius / @markingSurface.magnification @controls.moveTo x: @mark.x + offset y: @mark.y module.exports = Pinpoint
BasePoint = require 'zooniverse-readymade/lib/drawing-tools/point' ToolControls = require './tool-controls' class Pinpoint extends BasePoint @Controls: ToolControls constructor: -> super @disc.attr 'class', 'pinpoint' rescale: (scale) -> super coords: (e) -> @markingSurface.screenPixelToScale @markingSurface.svg.pointerOffset e onMove: (e) => {x, y} = @coords e @mark.set {x, y} render: -> super + offset = @radius / @markingSurface.magnification + @controls.moveTo - x: @mark.x + 30 ? ^^ + x: @mark.x + offset ? ^^^^^^ y: @mark.y module.exports = Pinpoint
4
0.142857
3
1
d4ee7e9e5242ecc73021a4905d4d9f8a0ecdddbe
ios/README.md
ios/README.md
> Coverit iOS SDK
> Coverit iOS SDK ## Usage ``` coverit [--help] <command> [<args>...] Options: -h, --help Basic commands build ``` ### Create a build $ coverit build create
Update cli usage of build
ios: Update cli usage of build
Markdown
apache-2.0
coverit/coverit,coverit/coverit,coverit/coverit,coverit/coverit
markdown
## Code Before: > Coverit iOS SDK ## Instruction: ios: Update cli usage of build ## Code After: > Coverit iOS SDK ## Usage ``` coverit [--help] <command> [<args>...] Options: -h, --help Basic commands build ``` ### Create a build $ coverit build create
> Coverit iOS SDK + + ## Usage + + ``` + coverit [--help] <command> [<args>...] + + Options: + -h, --help + + Basic commands + + build + ``` + + ### Create a build + + $ coverit build create + +
19
9.5
19
0
903a618cbde1f6d4c18a806e9bb8c3d17bc58b3b
flocker/control/test/test_script.py
flocker/control/test/test_script.py
from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor class ControlOptionsTests(): """ Tests for ``ControlOptions``. """ def test_default_port(self): """ The default port configured by ``ControlOptions`` is 4523. """ options = ControlOptions() options.parseOptions([]) self.assertEqual(options["port"], 4523) def test_custom_port(self): """ The ``--port`` command-line option allows configuring the port. """ options = ControlOptions() options.parseOptions(["--port", 1234]) self.assertEqual(options["port"], 1234) class ControlScriptTests(SynchronousTestCase): """ Tests for ``ControlScript``. """ def test_starts_http_api_server(self): """ ``ControlScript.main`` starts a HTTP server on the given port. """ reactor = MemoryCoreReactor() ControlScript().main(reactor, {"port": 8001}) server = reactor.tcpServers[0] port = server[0] factory = server[1].__class__ self.assertEqual((port, factory), (8001, Site))
from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor, StandardOptionsTestsMixin class ControlOptionsTests(StandardOptionsTestsMixin, SynchronousTestCase): """ Tests for ``ControlOptions``. """ options = ControlOptions def test_default_port(self): """ The default port configured by ``ControlOptions`` is 4523. """ options = ControlOptions() options.parseOptions([]) self.assertEqual(options["port"], 4523) def test_custom_port(self): """ The ``--port`` command-line option allows configuring the port. """ options = ControlOptions() options.parseOptions(["--port", 1234]) self.assertEqual(options["port"], 1234) class ControlScriptEffectsTests(SynchronousTestCase): """ Tests for effects ``ControlScript``. """ def test_starts_http_api_server(self): """ ``ControlScript.main`` starts a HTTP server on the given port. """ reactor = MemoryCoreReactor() ControlScript().main(reactor, {"port": 8001}) server = reactor.tcpServers[0] port = server[0] factory = server[1].__class__ self.assertEqual((port, factory), (8001, Site))
Make sure options tests run.
Make sure options tests run.
Python
apache-2.0
1d4Nf6/flocker,runcom/flocker,w4ngyi/flocker,lukemarsden/flocker,agonzalezro/flocker,w4ngyi/flocker,hackday-profilers/flocker,achanda/flocker,mbrukman/flocker,runcom/flocker,jml/flocker,1d4Nf6/flocker,achanda/flocker,adamtheturtle/flocker,agonzalezro/flocker,Azulinho/flocker,lukemarsden/flocker,moypray/flocker,1d4Nf6/flocker,LaynePeng/flocker,hackday-profilers/flocker,hackday-profilers/flocker,achanda/flocker,mbrukman/flocker,wallnerryan/flocker-profiles,Azulinho/flocker,agonzalezro/flocker,w4ngyi/flocker,LaynePeng/flocker,AndyHuu/flocker,jml/flocker,moypray/flocker,adamtheturtle/flocker,jml/flocker,Azulinho/flocker,LaynePeng/flocker,moypray/flocker,AndyHuu/flocker,wallnerryan/flocker-profiles,mbrukman/flocker,AndyHuu/flocker,runcom/flocker,wallnerryan/flocker-profiles,adamtheturtle/flocker,lukemarsden/flocker
python
## Code Before: from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor class ControlOptionsTests(): """ Tests for ``ControlOptions``. """ def test_default_port(self): """ The default port configured by ``ControlOptions`` is 4523. """ options = ControlOptions() options.parseOptions([]) self.assertEqual(options["port"], 4523) def test_custom_port(self): """ The ``--port`` command-line option allows configuring the port. """ options = ControlOptions() options.parseOptions(["--port", 1234]) self.assertEqual(options["port"], 1234) class ControlScriptTests(SynchronousTestCase): """ Tests for ``ControlScript``. """ def test_starts_http_api_server(self): """ ``ControlScript.main`` starts a HTTP server on the given port. """ reactor = MemoryCoreReactor() ControlScript().main(reactor, {"port": 8001}) server = reactor.tcpServers[0] port = server[0] factory = server[1].__class__ self.assertEqual((port, factory), (8001, Site)) ## Instruction: Make sure options tests run. ## Code After: from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript from ...testtools import MemoryCoreReactor, StandardOptionsTestsMixin class ControlOptionsTests(StandardOptionsTestsMixin, SynchronousTestCase): """ Tests for ``ControlOptions``. """ options = ControlOptions def test_default_port(self): """ The default port configured by ``ControlOptions`` is 4523. """ options = ControlOptions() options.parseOptions([]) self.assertEqual(options["port"], 4523) def test_custom_port(self): """ The ``--port`` command-line option allows configuring the port. """ options = ControlOptions() options.parseOptions(["--port", 1234]) self.assertEqual(options["port"], 1234) class ControlScriptEffectsTests(SynchronousTestCase): """ Tests for effects ``ControlScript``. """ def test_starts_http_api_server(self): """ ``ControlScript.main`` starts a HTTP server on the given port. """ reactor = MemoryCoreReactor() ControlScript().main(reactor, {"port": 8001}) server = reactor.tcpServers[0] port = server[0] factory = server[1].__class__ self.assertEqual((port, factory), (8001, Site))
from twisted.web.server import Site from twisted.trial.unittest import SynchronousTestCase from ..script import ControlOptions, ControlScript - from ...testtools import MemoryCoreReactor + from ...testtools import MemoryCoreReactor, StandardOptionsTestsMixin ? +++++++++++++++++++++++++++ - class ControlOptionsTests(): + class ControlOptionsTests(StandardOptionsTestsMixin, + SynchronousTestCase): """ Tests for ``ControlOptions``. """ + options = ControlOptions + def test_default_port(self): """ The default port configured by ``ControlOptions`` is 4523. """ options = ControlOptions() options.parseOptions([]) self.assertEqual(options["port"], 4523) def test_custom_port(self): """ The ``--port`` command-line option allows configuring the port. """ options = ControlOptions() options.parseOptions(["--port", 1234]) self.assertEqual(options["port"], 1234) - class ControlScriptTests(SynchronousTestCase): + class ControlScriptEffectsTests(SynchronousTestCase): ? +++++++ """ - Tests for ``ControlScript``. + Tests for effects ``ControlScript``. ? ++++++++ """ def test_starts_http_api_server(self): """ ``ControlScript.main`` starts a HTTP server on the given port. """ reactor = MemoryCoreReactor() ControlScript().main(reactor, {"port": 8001}) server = reactor.tcpServers[0] port = server[0] factory = server[1].__class__ self.assertEqual((port, factory), (8001, Site))
11
0.255814
7
4
93372d3f022c36282e4279011d79248b03c03021
src/index.jsx
src/index.jsx
/** @jsx createElement */ import {createElement} from 'elliptical' function suppressWhen (input) { return /^\+?\(?(\d[ ()/-]{0,2}){0,6}$/.test(input) } function filter (input) { return /^\+?\(?(\d[ ()/-]{0,2}){7,15}$/.test(input) } const defaultProps = { label: 'phone number' } function describe ({props}) { return ( <placeholder label={props.label} arguments={props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [props.label])} suppressWhen={suppressWhen}> <freetext filter={filter} splitOn={/[^0-9()+-]/} /> </placeholder> ) } export const PhoneNumber = {describe, defaultProps}
/** @jsx createElement */ import {createElement} from 'elliptical' function suppressWhen (input) { return /^\+?\(?(\d[ ()/-]{0,2}){0,6}$/.test(input) } function filter (input) { return /^\+?\(?(\d[ ()/-]{0,2}){7,15}$/.test(input) } const defaultProps = { label: 'phone number' } function describe ({props}) { return ( <placeholder label={props.label} arguments={props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [props.label])} suppressWhen={suppressWhen}> <freetext filter={filter} splitOn={/[^0-9()+-]/} /> </placeholder> ) } export const PhoneNumber = {describe, defaultProps, id: 'elliptical-phone:PhoneNumber'}
Add id to make extension in Lacona easier
Add id to make extension in Lacona easier
JSX
mit
lacona/lacona-phrase-phone-number,brandonhorst/lacona-phrase-phonenumber,lacona/lacona-phrase-phonenumber
jsx
## Code Before: /** @jsx createElement */ import {createElement} from 'elliptical' function suppressWhen (input) { return /^\+?\(?(\d[ ()/-]{0,2}){0,6}$/.test(input) } function filter (input) { return /^\+?\(?(\d[ ()/-]{0,2}){7,15}$/.test(input) } const defaultProps = { label: 'phone number' } function describe ({props}) { return ( <placeholder label={props.label} arguments={props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [props.label])} suppressWhen={suppressWhen}> <freetext filter={filter} splitOn={/[^0-9()+-]/} /> </placeholder> ) } export const PhoneNumber = {describe, defaultProps} ## Instruction: Add id to make extension in Lacona easier ## Code After: /** @jsx createElement */ import {createElement} from 'elliptical' function suppressWhen (input) { return /^\+?\(?(\d[ ()/-]{0,2}){0,6}$/.test(input) } function filter (input) { return /^\+?\(?(\d[ ()/-]{0,2}){7,15}$/.test(input) } const defaultProps = { label: 'phone number' } function describe ({props}) { return ( <placeholder label={props.label} arguments={props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [props.label])} suppressWhen={suppressWhen}> <freetext filter={filter} splitOn={/[^0-9()+-]/} /> </placeholder> ) } export const PhoneNumber = {describe, defaultProps, id: 'elliptical-phone:PhoneNumber'}
/** @jsx createElement */ import {createElement} from 'elliptical' function suppressWhen (input) { return /^\+?\(?(\d[ ()/-]{0,2}){0,6}$/.test(input) } function filter (input) { return /^\+?\(?(\d[ ()/-]{0,2}){7,15}$/.test(input) } const defaultProps = { label: 'phone number' } function describe ({props}) { return ( <placeholder label={props.label} arguments={props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [props.label])} suppressWhen={suppressWhen}> <freetext filter={filter} splitOn={/[^0-9()+-]/} /> </placeholder> ) } - export const PhoneNumber = {describe, defaultProps} + export const PhoneNumber = {describe, defaultProps, id: 'elliptical-phone:PhoneNumber'}
2
0.074074
1
1
f74d0221876b5e405c0b5b2fd30eb765812d80ce
main.go
main.go
package main func main() { ci, err := apiConn.allCommits() if err != nil { panic(err) } sortedMsg, _ := sortedChangeLogMessages(ci) //fmt.Printf("Sorted messages:\n%+v\n", sortedMsg) err = generateChangeLogHTML(sortedMsg, "ChangeLog.html") if err != nil { panic(err) } }
package main import "flag" func init() { flag.StringVar(&configInfo.ToSha, "ToSha", configInfo.ToSha, "Set commit hash up to which the change log should be generated") } func main() { flag.Parse() ci, err := apiConn.allCommits() if err != nil { panic(err) } sortedMsg, _ := sortedChangeLogMessages(ci) err = generateChangeLogHTML(sortedMsg, "ChangeLog.html") if err != nil { panic(err) } }
Enable to set the ToSha hash as a command line option.
Enable to set the ToSha hash as a command line option.
Go
apache-2.0
hheld/ChangeLogFromGitLab
go
## Code Before: package main func main() { ci, err := apiConn.allCommits() if err != nil { panic(err) } sortedMsg, _ := sortedChangeLogMessages(ci) //fmt.Printf("Sorted messages:\n%+v\n", sortedMsg) err = generateChangeLogHTML(sortedMsg, "ChangeLog.html") if err != nil { panic(err) } } ## Instruction: Enable to set the ToSha hash as a command line option. ## Code After: package main import "flag" func init() { flag.StringVar(&configInfo.ToSha, "ToSha", configInfo.ToSha, "Set commit hash up to which the change log should be generated") } func main() { flag.Parse() ci, err := apiConn.allCommits() if err != nil { panic(err) } sortedMsg, _ := sortedChangeLogMessages(ci) err = generateChangeLogHTML(sortedMsg, "ChangeLog.html") if err != nil { panic(err) } }
package main + import "flag" + + func init() { + flag.StringVar(&configInfo.ToSha, "ToSha", configInfo.ToSha, "Set commit hash up to which the change log should be generated") + } + func main() { + flag.Parse() + ci, err := apiConn.allCommits() if err != nil { panic(err) } sortedMsg, _ := sortedChangeLogMessages(ci) - //fmt.Printf("Sorted messages:\n%+v\n", sortedMsg) - err = generateChangeLogHTML(sortedMsg, "ChangeLog.html") if err != nil { panic(err) } }
10
0.526316
8
2
0ae21e512cf4b269d6ce1f2b4080e01fdd2aa55b
spec/controllers/webhook_controller_spec.rb
spec/controllers/webhook_controller_spec.rb
require 'rails_helper' require 'spec_helper' describe StripeEvent::WebhookController do def stub_event(identifier, status = 200) stub_request(:get, "https://api.stripe.com/v1/events/#{identifier}"). to_return(status: status, body: File.read("spec/support/fixtures/#{identifier}.json")) end def webhook(params) post :event, params.merge(use_route: :stripe_event) end before do @called = false StripeEvent.subscribe('charge.succeeded') { |evt| @called = true } end it "succeeds with valid event data" do stub_event('evt_charge_succeeded') webhook id: 'evt_charge_succeeded' expect(response.code).to eq '200' expect(@called).to be_true end it "denies access with invalid event data" do stub_event('evt_invalid_id', 404) webhook id: 'evt_invalid_id' expect(response.code).to eq '401' expect(@called).to be_false end it "ensures user-generated Stripe exceptions pass through" do StripeEvent.subscribe('charge.succeeded') { |evt| raise Stripe::StripeError } stub_event('evt_charge_succeeded') expect { webhook id: 'evt_charge_succeeded' }.to raise_error(Stripe::StripeError) end end
require 'rails_helper' require 'spec_helper' describe StripeEvent::WebhookController do def stub_event(identifier, status = 200) stub_request(:get, "https://api.stripe.com/v1/events/#{identifier}"). to_return(status: status, body: File.read("spec/support/fixtures/#{identifier}.json")) end def webhook(params) post :event, params.merge(use_route: :stripe_event) end it "succeeds with valid event data" do count = 0 StripeEvent.subscribe('charge.succeeded') { |evt| count += 1 } stub_event('evt_charge_succeeded') webhook id: 'evt_charge_succeeded' expect(response.code).to eq '200' expect(count).to eq 1 end it "denies access with invalid event data" do count = 0 StripeEvent.subscribe('charge.succeeded') { |evt| count += 1 } stub_event('evt_invalid_id', 404) webhook id: 'evt_invalid_id' expect(response.code).to eq '401' expect(count).to eq 0 end it "ensures user-generated Stripe exceptions pass through" do StripeEvent.subscribe('charge.succeeded') { |evt| raise Stripe::StripeError, "testing" } stub_event('evt_charge_succeeded') expect { webhook id: 'evt_charge_succeeded' }.to raise_error(Stripe::StripeError, /testing/) end end
Test that the subscribers are invoked the correct number of times
Test that the subscribers are invoked the correct number of times
Ruby
mit
integrallis/stripe_event,fullfabric/stripe_event,integrallis/stripe_event,thinkclay/stripe_event,fullfabric/stripe_event,thinkclay/stripe_event
ruby
## Code Before: require 'rails_helper' require 'spec_helper' describe StripeEvent::WebhookController do def stub_event(identifier, status = 200) stub_request(:get, "https://api.stripe.com/v1/events/#{identifier}"). to_return(status: status, body: File.read("spec/support/fixtures/#{identifier}.json")) end def webhook(params) post :event, params.merge(use_route: :stripe_event) end before do @called = false StripeEvent.subscribe('charge.succeeded') { |evt| @called = true } end it "succeeds with valid event data" do stub_event('evt_charge_succeeded') webhook id: 'evt_charge_succeeded' expect(response.code).to eq '200' expect(@called).to be_true end it "denies access with invalid event data" do stub_event('evt_invalid_id', 404) webhook id: 'evt_invalid_id' expect(response.code).to eq '401' expect(@called).to be_false end it "ensures user-generated Stripe exceptions pass through" do StripeEvent.subscribe('charge.succeeded') { |evt| raise Stripe::StripeError } stub_event('evt_charge_succeeded') expect { webhook id: 'evt_charge_succeeded' }.to raise_error(Stripe::StripeError) end end ## Instruction: Test that the subscribers are invoked the correct number of times ## Code After: require 'rails_helper' require 'spec_helper' describe StripeEvent::WebhookController do def stub_event(identifier, status = 200) stub_request(:get, "https://api.stripe.com/v1/events/#{identifier}"). to_return(status: status, body: File.read("spec/support/fixtures/#{identifier}.json")) end def webhook(params) post :event, params.merge(use_route: :stripe_event) end it "succeeds with valid event data" do count = 0 StripeEvent.subscribe('charge.succeeded') { |evt| count += 1 } stub_event('evt_charge_succeeded') webhook id: 'evt_charge_succeeded' expect(response.code).to eq '200' expect(count).to eq 1 end it "denies access with invalid event data" do count = 0 StripeEvent.subscribe('charge.succeeded') { |evt| count += 1 } stub_event('evt_invalid_id', 404) webhook id: 'evt_invalid_id' expect(response.code).to eq '401' expect(count).to eq 0 end it "ensures user-generated Stripe exceptions pass through" do StripeEvent.subscribe('charge.succeeded') { |evt| raise Stripe::StripeError, "testing" } stub_event('evt_charge_succeeded') expect { webhook id: 'evt_charge_succeeded' }.to raise_error(Stripe::StripeError, /testing/) end end
require 'rails_helper' require 'spec_helper' describe StripeEvent::WebhookController do def stub_event(identifier, status = 200) stub_request(:get, "https://api.stripe.com/v1/events/#{identifier}"). to_return(status: status, body: File.read("spec/support/fixtures/#{identifier}.json")) end def webhook(params) post :event, params.merge(use_route: :stripe_event) end - before do - @called = false - StripeEvent.subscribe('charge.succeeded') { |evt| @called = true } - end - it "succeeds with valid event data" do + count = 0 + StripeEvent.subscribe('charge.succeeded') { |evt| count += 1 } stub_event('evt_charge_succeeded') webhook id: 'evt_charge_succeeded' expect(response.code).to eq '200' - expect(@called).to be_true + expect(count).to eq 1 end it "denies access with invalid event data" do + count = 0 + StripeEvent.subscribe('charge.succeeded') { |evt| count += 1 } stub_event('evt_invalid_id', 404) webhook id: 'evt_invalid_id' expect(response.code).to eq '401' - expect(@called).to be_false + expect(count).to eq 0 end it "ensures user-generated Stripe exceptions pass through" do - StripeEvent.subscribe('charge.succeeded') { |evt| raise Stripe::StripeError } + StripeEvent.subscribe('charge.succeeded') { |evt| raise Stripe::StripeError, "testing" } ? +++++++++++ stub_event('evt_charge_succeeded') - expect { webhook id: 'evt_charge_succeeded' }.to raise_error(Stripe::StripeError) + expect { webhook id: 'evt_charge_succeeded' }.to raise_error(Stripe::StripeError, /testing/) ? +++++++++++ end end
17
0.395349
8
9
f2f9bd0db993fef4ef43ca18332c6c7557a14bc3
_config.yml
_config.yml
title: Naming is hard description: Thoughts from a web ops engineer meta_description: "Tech notes from a web operations engineer" markdown: redcarpet pygments: true paginate: 3 tz: Europe/London permalink: /:year/:month/:day/:title/ url: 'http://tech.mattbostock.com' author: 'Matt Bostock' email: 'matt@mattbostock.com' google_analytics: animated: false gems: - jekyll-mentions
title: Naming is hard description: Thoughts from a web ops engineer meta_description: "Tech notes from a web operations engineer" markdown: redcarpet highlighter: pygments paginate: 3 tz: Europe/London permalink: /:year/:month/:day/:title/ url: 'http://tech.mattbostock.com' author: 'Matt Bostock' email: 'matt@mattbostock.com' google_analytics: animated: false gems: - jekyll-mentions
Fix deprecation warning for `pygments` option
Fix deprecation warning for `pygments` option Using the `pygments` configuration option causes Jekyll to warn: Deprecation: The 'pygments' configuration option has been renamed to 'highlighter'. Please update your config file accordingly. The allowed values are 'rouge', 'pygments' or null. Fix it accordingly.
YAML
mit
mattbostock/mattbostock.github.io,mattbostock/mattbostock.github.io
yaml
## Code Before: title: Naming is hard description: Thoughts from a web ops engineer meta_description: "Tech notes from a web operations engineer" markdown: redcarpet pygments: true paginate: 3 tz: Europe/London permalink: /:year/:month/:day/:title/ url: 'http://tech.mattbostock.com' author: 'Matt Bostock' email: 'matt@mattbostock.com' google_analytics: animated: false gems: - jekyll-mentions ## Instruction: Fix deprecation warning for `pygments` option Using the `pygments` configuration option causes Jekyll to warn: Deprecation: The 'pygments' configuration option has been renamed to 'highlighter'. Please update your config file accordingly. The allowed values are 'rouge', 'pygments' or null. Fix it accordingly. ## Code After: title: Naming is hard description: Thoughts from a web ops engineer meta_description: "Tech notes from a web operations engineer" markdown: redcarpet highlighter: pygments paginate: 3 tz: Europe/London permalink: /:year/:month/:day/:title/ url: 'http://tech.mattbostock.com' author: 'Matt Bostock' email: 'matt@mattbostock.com' google_analytics: animated: false gems: - jekyll-mentions
title: Naming is hard description: Thoughts from a web ops engineer meta_description: "Tech notes from a web operations engineer" markdown: redcarpet - pygments: true + highlighter: pygments paginate: 3 tz: Europe/London permalink: /:year/:month/:day/:title/ url: 'http://tech.mattbostock.com' author: 'Matt Bostock' email: 'matt@mattbostock.com' google_analytics: animated: false gems: - jekyll-mentions
2
0.105263
1
1
a60d6f9f43a2ee9ca3758b06f4b21fb57f1efd8d
server/app/honor/RankingTop.scala
server/app/honor/RankingTop.scala
package honor import models.db.Admiral import ranking.common.{Ranking, RankingElement, RankingType} import scala.collection.breakOut /** * * @author ponkotuy * Date: 15/03/17. */ object RankingTop extends HonorCategory { override def category: Int = 3 override def approved(memberId: Long): List[String] = { val rankings: Map[Ranking, Seq[RankingElement]] = RankingType.Admiral.rankings.map(it => it -> it.rankingQuery(20))(breakOut) val admiralName = Admiral.find(memberId).map(_.nickname) val tops = rankings.filter { case (admiral, xs) => val top = xs.head.num xs.takeWhile(_.num == top).exists(x => admiralName.contains(x.name)) }.keys val ins = rankings.filter { case (_, xs) => xs.exists(x => admiralName.contains(x.name)) }.keys (tops.map(top => s"${top.title}トップ") ++ ins.map(in => s"${in.title}ランクイン")).toList } }
package honor import models.db.Admiral import ranking.common.{Ranking, RankingElement, RankingType} import scala.collection.breakOut /** * * @author ponkotuy * Date: 15/03/17. */ object RankingTop extends HonorCategory { override def category: Int = 3 override def approved(memberId: Long): List[String] = { val rankings: Map[Ranking, Seq[RankingElement]] = RankingType.Admiral.rankings.map(it => it -> it.rankingQuery(20))(breakOut) val admiralName = Admiral.find(memberId).map(_.nickname) val tops = rankings.filter { case (admiral, xs) => xs.headOption.exists(top => xs.takeWhile(_.num == top.num).exists(x => admiralName.contains(x.name))) }.keys val ins = rankings.filter { case (_, xs) => xs.exists(x => admiralName.contains(x.name)) }.keys (tops.map(top => s"${top.title}トップ") ++ ins.map(in => s"${in.title}ランクイン")).toList } }
Fix exception with empty ranking
Fix exception with empty ranking
Scala
mit
kxbmap/MyFleetGirls,ponkotuy/MyFleetGirls,b-wind/MyFleetGirls,nekoworkshop/MyFleetGirls,kxbmap/MyFleetGirls,nekoworkshop/MyFleetGirls,Moesugi/MFG,b-wind/MyFleetGirls,ttdoda/MyFleetGirls,ponkotuy/MyFleetGirls,Moesugi/MFG,nekoworkshop/MyFleetGirls,kxbmap/MyFleetGirls,ponkotuy/MyFleetGirls,Moesugi/MFG,kxbmap/MyFleetGirls,ttdoda/MyFleetGirls,nekoworkshop/MyFleetGirls,ttdoda/MyFleetGirls,ttdoda/MyFleetGirls,Moesugi/MFG,b-wind/MyFleetGirls,b-wind/MyFleetGirls,ponkotuy/MyFleetGirls
scala
## Code Before: package honor import models.db.Admiral import ranking.common.{Ranking, RankingElement, RankingType} import scala.collection.breakOut /** * * @author ponkotuy * Date: 15/03/17. */ object RankingTop extends HonorCategory { override def category: Int = 3 override def approved(memberId: Long): List[String] = { val rankings: Map[Ranking, Seq[RankingElement]] = RankingType.Admiral.rankings.map(it => it -> it.rankingQuery(20))(breakOut) val admiralName = Admiral.find(memberId).map(_.nickname) val tops = rankings.filter { case (admiral, xs) => val top = xs.head.num xs.takeWhile(_.num == top).exists(x => admiralName.contains(x.name)) }.keys val ins = rankings.filter { case (_, xs) => xs.exists(x => admiralName.contains(x.name)) }.keys (tops.map(top => s"${top.title}トップ") ++ ins.map(in => s"${in.title}ランクイン")).toList } } ## Instruction: Fix exception with empty ranking ## Code After: package honor import models.db.Admiral import ranking.common.{Ranking, RankingElement, RankingType} import scala.collection.breakOut /** * * @author ponkotuy * Date: 15/03/17. */ object RankingTop extends HonorCategory { override def category: Int = 3 override def approved(memberId: Long): List[String] = { val rankings: Map[Ranking, Seq[RankingElement]] = RankingType.Admiral.rankings.map(it => it -> it.rankingQuery(20))(breakOut) val admiralName = Admiral.find(memberId).map(_.nickname) val tops = rankings.filter { case (admiral, xs) => xs.headOption.exists(top => xs.takeWhile(_.num == top.num).exists(x => admiralName.contains(x.name))) }.keys val ins = rankings.filter { case (_, xs) => xs.exists(x => admiralName.contains(x.name)) }.keys (tops.map(top => s"${top.title}トップ") ++ ins.map(in => s"${in.title}ランクイン")).toList } }
package honor import models.db.Admiral import ranking.common.{Ranking, RankingElement, RankingType} import scala.collection.breakOut /** * * @author ponkotuy * Date: 15/03/17. */ object RankingTop extends HonorCategory { override def category: Int = 3 override def approved(memberId: Long): List[String] = { val rankings: Map[Ranking, Seq[RankingElement]] = RankingType.Admiral.rankings.map(it => it -> it.rankingQuery(20))(breakOut) val admiralName = Admiral.find(memberId).map(_.nickname) val tops = rankings.filter { case (admiral, xs) => - val top = xs.head.num - xs.takeWhile(_.num == top).exists(x => admiralName.contains(x.name)) + xs.headOption.exists(top => xs.takeWhile(_.num == top.num).exists(x => admiralName.contains(x.name))) ? ++++++++++++++++++++++++++++ ++++ + }.keys val ins = rankings.filter { case (_, xs) => xs.exists(x => admiralName.contains(x.name)) }.keys (tops.map(top => s"${top.title}トップ") ++ ins.map(in => s"${in.title}ランクイン")).toList } }
3
0.111111
1
2
dcfe6b7358341c21225aa22c6c981b0922cd123f
src/GameRuntime/Main.cpp
src/GameRuntime/Main.cpp
/************************************************************************ * * Flood Project (2008-201x) * Licensed under the simplified BSD license. All rights reserved. * ************************************************************************/ #include "GameRuntime/API.h" #include "GameRuntime/Game.h" //-----------------------------------// int main(int argc, char** argv) { Game gameInstance; game()->run(); return 0; }
/************************************************************************ * * Flood Project (2008-201x) * Licensed under the simplified BSD license. All rights reserved. * ************************************************************************/ #include "GameRuntime/API.h" #include "GameRuntime/Game.h" //-----------------------------------// int main(int argc, char** argv) { Game gameInstance; gameInstance.run(); return 0; }
Use the local variable instead of a global accessor.
Use the local variable instead of a global accessor.
C++
bsd-2-clause
FloodProject/flood,FloodProject/flood,FloodProject/flood
c++
## Code Before: /************************************************************************ * * Flood Project (2008-201x) * Licensed under the simplified BSD license. All rights reserved. * ************************************************************************/ #include "GameRuntime/API.h" #include "GameRuntime/Game.h" //-----------------------------------// int main(int argc, char** argv) { Game gameInstance; game()->run(); return 0; } ## Instruction: Use the local variable instead of a global accessor. ## Code After: /************************************************************************ * * Flood Project (2008-201x) * Licensed under the simplified BSD license. All rights reserved. * ************************************************************************/ #include "GameRuntime/API.h" #include "GameRuntime/Game.h" //-----------------------------------// int main(int argc, char** argv) { Game gameInstance; gameInstance.run(); return 0; }
/************************************************************************ * * Flood Project (2008-201x) * Licensed under the simplified BSD license. All rights reserved. * ************************************************************************/ #include "GameRuntime/API.h" #include "GameRuntime/Game.h" //-----------------------------------// int main(int argc, char** argv) { Game gameInstance; + gameInstance.run(); - - game()->run(); return 0; } - -
5
0.227273
1
4
53bbb9bfa6fdc1e946365e746b1acf4b03a0635e
regulations/templatetags/in_context.py
regulations/templatetags/in_context.py
from django import template register = template.Library() class InContextNode(template.Node): def __init__(self, nodelist, subcontext_names): self.nodelist = nodelist self.subcontext_names = subcontext_names def render(self, context): new_context = {} for field in self.subcontext_names: value = context.get(field, {}) if isinstance(value, dict): new_context.update(context.get(field, {})) else: new_context[field] = value return self.nodelist.render(template.Context(new_context)) @register.tag('begincontext') def in_context(parser, token): """ Replaces the context (inside of this block) for easy (and safe) inclusion of sub-content. For example, if the context is {'name': 'Kitty', 'sub': {'size': 5}} 1: {{ name }} {{ size }} {% begincontext sub %} 2: {{ name }} {{ size }} {% endcontext %} 3: {{ name }} {{ size }} Will print 1: Kitty 2: 5 3: Kitty Arguments which are not dictionaries will 'cascade' into the inner context. """ nodelist = parser.parse(('endcontext',)) parser.delete_first_token() return InContextNode(nodelist, token.split_contents()[1:])
from django import template register = template.Library() class InContextNode(template.Node): def __init__(self, nodelist, subcontext_names): self.nodelist = nodelist self.subcontext_names = subcontext_names def render(self, context): new_context = {} for field in self.subcontext_names: value = context.get(field, {}) if isinstance(value, dict): new_context.update(context.get(field, {})) else: new_context[field] = value new_context = context.new(new_context) return self.nodelist.render(new_context) @register.tag('begincontext') def in_context(parser, token): """ Replaces the context (inside of this block) for easy (and safe) inclusion of sub-content. For example, if the context is {'name': 'Kitty', 'sub': {'size': 5}} 1: {{ name }} {{ size }} {% begincontext sub %} 2: {{ name }} {{ size }} {% endcontext %} 3: {{ name }} {{ size }} Will print 1: Kitty 2: 5 3: Kitty Arguments which are not dictionaries will 'cascade' into the inner context. """ nodelist = parser.parse(('endcontext',)) parser.delete_first_token() return InContextNode(nodelist, token.split_contents()[1:])
Fix custom template tag to work with django 1.8
Fix custom template tag to work with django 1.8
Python
cc0-1.0
willbarton/regulations-site,grapesmoker/regulations-site,willbarton/regulations-site,willbarton/regulations-site,grapesmoker/regulations-site,willbarton/regulations-site,ascott1/regulations-site,ascott1/regulations-site,grapesmoker/regulations-site,ascott1/regulations-site,grapesmoker/regulations-site,ascott1/regulations-site
python
## Code Before: from django import template register = template.Library() class InContextNode(template.Node): def __init__(self, nodelist, subcontext_names): self.nodelist = nodelist self.subcontext_names = subcontext_names def render(self, context): new_context = {} for field in self.subcontext_names: value = context.get(field, {}) if isinstance(value, dict): new_context.update(context.get(field, {})) else: new_context[field] = value return self.nodelist.render(template.Context(new_context)) @register.tag('begincontext') def in_context(parser, token): """ Replaces the context (inside of this block) for easy (and safe) inclusion of sub-content. For example, if the context is {'name': 'Kitty', 'sub': {'size': 5}} 1: {{ name }} {{ size }} {% begincontext sub %} 2: {{ name }} {{ size }} {% endcontext %} 3: {{ name }} {{ size }} Will print 1: Kitty 2: 5 3: Kitty Arguments which are not dictionaries will 'cascade' into the inner context. """ nodelist = parser.parse(('endcontext',)) parser.delete_first_token() return InContextNode(nodelist, token.split_contents()[1:]) ## Instruction: Fix custom template tag to work with django 1.8 ## Code After: from django import template register = template.Library() class InContextNode(template.Node): def __init__(self, nodelist, subcontext_names): self.nodelist = nodelist self.subcontext_names = subcontext_names def render(self, context): new_context = {} for field in self.subcontext_names: value = context.get(field, {}) if isinstance(value, dict): new_context.update(context.get(field, {})) else: new_context[field] = value new_context = context.new(new_context) return self.nodelist.render(new_context) @register.tag('begincontext') def in_context(parser, token): """ Replaces the context (inside of this block) for easy (and safe) inclusion of sub-content. For example, if the context is {'name': 'Kitty', 'sub': {'size': 5}} 1: {{ name }} {{ size }} {% begincontext sub %} 2: {{ name }} {{ size }} {% endcontext %} 3: {{ name }} {{ size }} Will print 1: Kitty 2: 5 3: Kitty Arguments which are not dictionaries will 'cascade' into the inner context. """ nodelist = parser.parse(('endcontext',)) parser.delete_first_token() return InContextNode(nodelist, token.split_contents()[1:])
from django import template register = template.Library() class InContextNode(template.Node): def __init__(self, nodelist, subcontext_names): self.nodelist = nodelist self.subcontext_names = subcontext_names def render(self, context): new_context = {} for field in self.subcontext_names: value = context.get(field, {}) if isinstance(value, dict): new_context.update(context.get(field, {})) else: new_context[field] = value + new_context = context.new(new_context) - return self.nodelist.render(template.Context(new_context)) ? ----------------- - + return self.nodelist.render(new_context) @register.tag('begincontext') def in_context(parser, token): """ Replaces the context (inside of this block) for easy (and safe) inclusion of sub-content. For example, if the context is {'name': 'Kitty', 'sub': {'size': 5}} 1: {{ name }} {{ size }} {% begincontext sub %} 2: {{ name }} {{ size }} {% endcontext %} 3: {{ name }} {{ size }} Will print 1: Kitty 2: 5 3: Kitty Arguments which are not dictionaries will 'cascade' into the inner context. """ nodelist = parser.parse(('endcontext',)) parser.delete_first_token() return InContextNode(nodelist, token.split_contents()[1:])
3
0.065217
2
1
b9047f0bb98da9066cd8d443b28420f16f08b5fd
.appveyor.yml
.appveyor.yml
environment: matrix: - OS: unix - OS: win32 install: - "C:/cygwin/setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P git,make,gcc-core,mingw64-i686-gcc-core,libcrypt-devel,mingw64-i686-libgcrypt,tcl-tk-devel,mingw64-i686-tcl,mingw64-i686-tk,zip" build_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make" test_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make test"
environment: matrix: - OS: win32 install: - "C:/cygwin/setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P git,make,gcc-core,mingw64-i686-gcc-core,libcrypt-devel,mingw64-i686-libgcrypt,tcl-tk-devel,mingw64-i686-tcl,mingw64-i686-tk,zip" build_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make" test_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make test"
Remove Cygwin-unix build until it can be fixed.
Remove Cygwin-unix build until it can be fixed.
YAML
mit
AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog
yaml
## Code Before: environment: matrix: - OS: unix - OS: win32 install: - "C:/cygwin/setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P git,make,gcc-core,mingw64-i686-gcc-core,libcrypt-devel,mingw64-i686-libgcrypt,tcl-tk-devel,mingw64-i686-tcl,mingw64-i686-tk,zip" build_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make" test_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make test" ## Instruction: Remove Cygwin-unix build until it can be fixed. ## Code After: environment: matrix: - OS: win32 install: - "C:/cygwin/setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P git,make,gcc-core,mingw64-i686-gcc-core,libcrypt-devel,mingw64-i686-libgcrypt,tcl-tk-devel,mingw64-i686-tcl,mingw64-i686-tk,zip" build_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make" test_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make test"
environment: matrix: - - OS: unix - OS: win32 install: - "C:/cygwin/setup-x86.exe -qnNdO -R C:/cygwin -s http://cygwin.mirror.constant.com -l C:/cygwin/var/cache/setup -P git,make,gcc-core,mingw64-i686-gcc-core,libcrypt-devel,mingw64-i686-libgcrypt,tcl-tk-devel,mingw64-i686-tcl,mingw64-i686-tk,zip" build_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make" test_script: - C:\Cygwin\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER/%OS% && make test"
1
0.066667
0
1
8b66bf114356b1eb9d17f2ed53ee5c0e10b51d7f
js/common/modules/@arangodb/extend.js
js/common/modules/@arangodb/extend.js
'use strict'; const extend = require('underscore').extend; const deprecated = require('@arangodb/deprecated'); exports.extend = function (protoProps, staticProps) { deprecated('2.9', '"extend" is deprecated, use class syntax instead'); const init = protoProps.constructor; const Class = class extends this { constructor(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { super(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (init) { init.apply(this, arguments); } } }; extend(Class.prototype, protoProps); extend(Class, staticProps); return Class; };
'use strict'; const extend = require('underscore').extend; exports.extend = function (protoProps, staticProps) { const init = protoProps.constructor; const Class = class extends this { constructor(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { super(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (init) { init.apply(this, arguments); } } }; extend(Class.prototype, protoProps); extend(Class, staticProps); return Class; };
Extend will not be removed in 2.9
Extend will not be removed in 2.9
JavaScript
apache-2.0
fceller/arangodb,m0ppers/arangodb,arangodb/arangodb,thurt/arangodb,thurt/arangodb,baslr/ArangoDB,fceller/arangodb,graetzer/arangodb,m0ppers/arangodb,graetzer/arangodb,Simran-B/arangodb,hkernbach/arangodb,m0ppers/arangodb,thurt/arangodb,wiltonlazary/arangodb,hkernbach/arangodb,m0ppers/arangodb,graetzer/arangodb,graetzer/arangodb,Simran-B/arangodb,joerg84/arangodb,joerg84/arangodb,Simran-B/arangodb,arangodb/arangodb,thurt/arangodb,thurt/arangodb,baslr/ArangoDB,baslr/ArangoDB,graetzer/arangodb,graetzer/arangodb,thurt/arangodb,thurt/arangodb,hkernbach/arangodb,thurt/arangodb,joerg84/arangodb,joerg84/arangodb,fceller/arangodb,graetzer/arangodb,baslr/ArangoDB,hkernbach/arangodb,baslr/ArangoDB,arangodb/arangodb,baslr/ArangoDB,joerg84/arangodb,fceller/arangodb,thurt/arangodb,hkernbach/arangodb,fceller/arangodb,m0ppers/arangodb,fceller/arangodb,hkernbach/arangodb,graetzer/arangodb,wiltonlazary/arangodb,graetzer/arangodb,graetzer/arangodb,fceller/arangodb,arangodb/arangodb,wiltonlazary/arangodb,hkernbach/arangodb,arangodb/arangodb,joerg84/arangodb,hkernbach/arangodb,wiltonlazary/arangodb,thurt/arangodb,graetzer/arangodb,m0ppers/arangodb,m0ppers/arangodb,baslr/ArangoDB,m0ppers/arangodb,m0ppers/arangodb,joerg84/arangodb,baslr/ArangoDB,hkernbach/arangodb,Simran-B/arangodb,baslr/ArangoDB,hkernbach/arangodb,Simran-B/arangodb,hkernbach/arangodb,baslr/ArangoDB,m0ppers/arangodb,arangodb/arangodb,Simran-B/arangodb,m0ppers/arangodb,joerg84/arangodb,Simran-B/arangodb,graetzer/arangodb,m0ppers/arangodb,hkernbach/arangodb,arangodb/arangodb,Simran-B/arangodb,hkernbach/arangodb,joerg84/arangodb,joerg84/arangodb,hkernbach/arangodb,joerg84/arangodb,graetzer/arangodb,m0ppers/arangodb,baslr/ArangoDB,joerg84/arangodb,graetzer/arangodb,wiltonlazary/arangodb,joerg84/arangodb,arangodb/arangodb,Simran-B/arangodb,baslr/ArangoDB,joerg84/arangodb,fceller/arangodb,fceller/arangodb,wiltonlazary/arangodb,wiltonlazary/arangodb,wiltonlazary/arangodb,fceller/arangodb,baslr/ArangoDB,Simran-B/arangodb,baslr/ArangoDB
javascript
## Code Before: 'use strict'; const extend = require('underscore').extend; const deprecated = require('@arangodb/deprecated'); exports.extend = function (protoProps, staticProps) { deprecated('2.9', '"extend" is deprecated, use class syntax instead'); const init = protoProps.constructor; const Class = class extends this { constructor(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { super(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (init) { init.apply(this, arguments); } } }; extend(Class.prototype, protoProps); extend(Class, staticProps); return Class; }; ## Instruction: Extend will not be removed in 2.9 ## Code After: 'use strict'; const extend = require('underscore').extend; exports.extend = function (protoProps, staticProps) { const init = protoProps.constructor; const Class = class extends this { constructor(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { super(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (init) { init.apply(this, arguments); } } }; extend(Class.prototype, protoProps); extend(Class, staticProps); return Class; };
'use strict'; const extend = require('underscore').extend; - const deprecated = require('@arangodb/deprecated'); exports.extend = function (protoProps, staticProps) { - deprecated('2.9', '"extend" is deprecated, use class syntax instead'); const init = protoProps.constructor; const Class = class extends this { constructor(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { super(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); if (init) { init.apply(this, arguments); } } }; extend(Class.prototype, protoProps); extend(Class, staticProps); return Class; };
2
0.105263
0
2
ac93d6baae20b3f3007c76853df0431f00d2ee7f
README.md
README.md
Made with [Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate) # Thanks to [Electron](https://github.com/electron/electron) [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux) and a lot of React related packages [Nord](https://github.com/arcticicestudio/nord) (color palette) [Syno JS lib](https://github.com/kwent/syno) # Dev Clone the repository Run `yarn` (or `npm install`) ot install all dependencies. Run `npm run dev` to start the app with hot updates. [More info](https://github.com/chentsulin/electron-react-boilerplate#install)
Play all your tracks stored on your Synology NAS ![screen shot 2017-10-22 at 5 06 44 pm](https://user-images.githubusercontent.com/2750789/31867883-bd8cd7b0-b74b-11e7-997e-c6b06eb1e1c0.png) (your music must be all stored in AudioStation) # Thanks to * [Electron](https://github.com/electron/electron) * [Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate) * [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux) and a few of React related packages * [Syno JS lib](https://github.com/kwent/syno) for API access inspiration # Todo * Improve stylesheets (use SASS) * Add new design(s) * Handle errors properly * Better component splitting * Better credentials storage * Tests # Dev Clone the repository Run `yarn` (or `npm install`) ot install all dependencies. Run `npm run dev` to start the app with hot updates. [More info about Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate#install)
Add screenshot to readme and update notes
Add screenshot to readme and update notes
Markdown
mit
LouWii/syno-music-app,LouWii/syno-music-app
markdown
## Code Before: Made with [Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate) # Thanks to [Electron](https://github.com/electron/electron) [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux) and a lot of React related packages [Nord](https://github.com/arcticicestudio/nord) (color palette) [Syno JS lib](https://github.com/kwent/syno) # Dev Clone the repository Run `yarn` (or `npm install`) ot install all dependencies. Run `npm run dev` to start the app with hot updates. [More info](https://github.com/chentsulin/electron-react-boilerplate#install) ## Instruction: Add screenshot to readme and update notes ## Code After: Play all your tracks stored on your Synology NAS ![screen shot 2017-10-22 at 5 06 44 pm](https://user-images.githubusercontent.com/2750789/31867883-bd8cd7b0-b74b-11e7-997e-c6b06eb1e1c0.png) (your music must be all stored in AudioStation) # Thanks to * [Electron](https://github.com/electron/electron) * [Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate) * [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux) and a few of React related packages * [Syno JS lib](https://github.com/kwent/syno) for API access inspiration # Todo * Improve stylesheets (use SASS) * Add new design(s) * Handle errors properly * Better component splitting * Better credentials storage * Tests # Dev Clone the repository Run `yarn` (or `npm install`) ot install all dependencies. Run `npm run dev` to start the app with hot updates. [More info about Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate#install)
- Made with [Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate) + Play all your tracks stored on your Synology NAS + ![screen shot 2017-10-22 at 5 06 44 pm](https://user-images.githubusercontent.com/2750789/31867883-bd8cd7b0-b74b-11e7-997e-c6b06eb1e1c0.png) + (your music must be all stored in AudioStation) # Thanks to - [Electron](https://github.com/electron/electron) + * [Electron](https://github.com/electron/electron) ? ++ - [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) ? ^ ^^ ^^ + * [Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate) ? ++ ^ ^^ ^^ - [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux) and a lot of React related packages ? ^^^ + * [React](https://github.com/facebook/react), [Redux](https://github.com/reactjs/redux) and a few of React related packages ? ++ ^^^ - [Nord](https://github.com/arcticicestudio/nord) (color palette) - [Syno JS lib](https://github.com/kwent/syno) + * [Syno JS lib](https://github.com/kwent/syno) for API access inspiration ? ++ +++++++++++++++++++++++++++ + + # Todo + + * Improve stylesheets (use SASS) + * Add new design(s) + * Handle errors properly + * Better component splitting + * Better credentials storage + * Tests # Dev Clone the repository Run `yarn` (or `npm install`) ot install all dependencies. Run `npm run dev` to start the app with hot updates. - [More info](https://github.com/chentsulin/electron-react-boilerplate#install) + [More info about Electron React Boilerplate](https://github.com/chentsulin/electron-react-boilerplate#install) ? +++++++++++++++++++++++++++++++++
24
1.090909
17
7
ccc21c590977d9c30854c0f45f1a31021c8a1c25
.travis.yml
.travis.yml
language: node_js node_js: - "6" services: - postgresql before_script: - npm install -g sequelize-cli - psql -c 'create database postitdbtests;' -U postgres script: - npm install - npm run test - npm run coverage after_success: - npm run coveralls
language: node_js node_js: - "6" services: - postgresql before_script: - npm install -g sequelize-cli - psql -c 'create database postitdbtests;' -U postgres script: - npm install - npm run test - npm run coverage after_success: - npm run coveralls addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 env: - TRAVIS=traviz CXX=g++-4.8
Add settings to fix build error
Add settings to fix build error
YAML
mit
3m3kalionel/PostIt,3m3kalionel/PostIt
yaml
## Code Before: language: node_js node_js: - "6" services: - postgresql before_script: - npm install -g sequelize-cli - psql -c 'create database postitdbtests;' -U postgres script: - npm install - npm run test - npm run coverage after_success: - npm run coveralls ## Instruction: Add settings to fix build error ## Code After: language: node_js node_js: - "6" services: - postgresql before_script: - npm install -g sequelize-cli - psql -c 'create database postitdbtests;' -U postgres script: - npm install - npm run test - npm run coverage after_success: - npm run coveralls addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 env: - TRAVIS=traviz CXX=g++-4.8
language: node_js node_js: - "6" services: - postgresql before_script: - npm install -g sequelize-cli - psql -c 'create database postitdbtests;' -U postgres script: - npm install - npm run test - npm run coverage after_success: - npm run coveralls + + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + env: + - TRAVIS=traviz CXX=g++-4.8
10
0.666667
10
0
48b20a17617a40c8ac16b780aad53973a1e21aaf
locales/en_GB/copyright-snippet.properties
locales/en_GB/copyright-snippet.properties
Snippet_v1_copywrong=Copywrong or copyright? It’s time to reform outdated copyright laws to ensure the internet we know and love is protected. Learn more and sign the pledge. Snippet_v2_imagination=Imagination should be accelerated, not stunted. Join Mozilla in supporting copyright reform – and a better, brighter Web. Snippet_v3_remix=Parody, remix, homage. It should all be legal online. Learn 3 things we can do to support EU copyright reform. Snippet_v4_meme=TFW you realise the meme you posted is illegal because of outdated copyright laws. Join us in protecting creativity in the EU. Snippet_r2_v1_dontbreak=Don't break the Internet! EU copyright proposal risks undermining startups, coders, and creators. Learn three things you can do to help fix copyright and sign the petition. Snippet_r2_v2_whatschanged=You know what’s changed? Technology. You know what hasn’t? EU copyright law. Let’s fix that. Snippet_r2_v2_button=Learn more Snippet_r2_v3_internetlove=We <3 the Internet. That’s why we’re fighting for copyright laws that foster creativity and innovation online. Learn more and sign the petition.
Snippet_v1_copywrong=Copywrong or copyright? It’s time to reform outdated copyright laws to ensure the internet we know and love is protected. Learn more and sign the pledge. Snippet_v2_imagination=Imagination should be accelerated, not stunted. Join Mozilla in supporting copyright reform – and a better, brighter Web. Snippet_v3_remix=Parody, remix, homage. It should all be legal online. Learn 3 things we can do to support EU copyright reform. Snippet_v4_meme=TFW you realise the meme you posted is illegal because of outdated copyright laws. Join us in protecting creativity in the EU. Snippet_r2_v1_dontbreak=Don't break the Internet! EU copyright proposal risks undermining startups, coders, and creators. Learn three things you can do to help fix copyright and sign the petition. Snippet_r2_v2_whatschanged=You know what’s changed? Technology. You know what hasn’t? EU copyright law. Let’s fix that. Snippet_r2_v2_button=Learn more Snippet_r2_v3_internetlove=We <3 the Internet. That’s why we’re fighting for copyright laws that foster creativity and innovation online. Learn more and sign the petition. Snippet_r2_v4_icymi=ICYMI making memes isn’t allowed in many parts of Europe. That’s absurd. Learn more about 3 simple things we can do to reform copyright.
Update English (en-GB) localization of Mozilla Advocacy
Pontoon: Update English (en-GB) localization of Mozilla Advocacy Localization authors: - Ian Neal <iann_bugzilla@blueyonder.co.uk>
INI
mpl-2.0
mozilla/advocacy.mozilla.org
ini
## Code Before: Snippet_v1_copywrong=Copywrong or copyright? It’s time to reform outdated copyright laws to ensure the internet we know and love is protected. Learn more and sign the pledge. Snippet_v2_imagination=Imagination should be accelerated, not stunted. Join Mozilla in supporting copyright reform – and a better, brighter Web. Snippet_v3_remix=Parody, remix, homage. It should all be legal online. Learn 3 things we can do to support EU copyright reform. Snippet_v4_meme=TFW you realise the meme you posted is illegal because of outdated copyright laws. Join us in protecting creativity in the EU. Snippet_r2_v1_dontbreak=Don't break the Internet! EU copyright proposal risks undermining startups, coders, and creators. Learn three things you can do to help fix copyright and sign the petition. Snippet_r2_v2_whatschanged=You know what’s changed? Technology. You know what hasn’t? EU copyright law. Let’s fix that. Snippet_r2_v2_button=Learn more Snippet_r2_v3_internetlove=We <3 the Internet. That’s why we’re fighting for copyright laws that foster creativity and innovation online. Learn more and sign the petition. ## Instruction: Pontoon: Update English (en-GB) localization of Mozilla Advocacy Localization authors: - Ian Neal <iann_bugzilla@blueyonder.co.uk> ## Code After: Snippet_v1_copywrong=Copywrong or copyright? It’s time to reform outdated copyright laws to ensure the internet we know and love is protected. Learn more and sign the pledge. Snippet_v2_imagination=Imagination should be accelerated, not stunted. Join Mozilla in supporting copyright reform – and a better, brighter Web. Snippet_v3_remix=Parody, remix, homage. It should all be legal online. Learn 3 things we can do to support EU copyright reform. Snippet_v4_meme=TFW you realise the meme you posted is illegal because of outdated copyright laws. Join us in protecting creativity in the EU. Snippet_r2_v1_dontbreak=Don't break the Internet! EU copyright proposal risks undermining startups, coders, and creators. Learn three things you can do to help fix copyright and sign the petition. Snippet_r2_v2_whatschanged=You know what’s changed? Technology. You know what hasn’t? EU copyright law. Let’s fix that. Snippet_r2_v2_button=Learn more Snippet_r2_v3_internetlove=We <3 the Internet. That’s why we’re fighting for copyright laws that foster creativity and innovation online. Learn more and sign the petition. Snippet_r2_v4_icymi=ICYMI making memes isn’t allowed in many parts of Europe. That’s absurd. Learn more about 3 simple things we can do to reform copyright.
Snippet_v1_copywrong=Copywrong or copyright? It’s time to reform outdated copyright laws to ensure the internet we know and love is protected. Learn more and sign the pledge. Snippet_v2_imagination=Imagination should be accelerated, not stunted. Join Mozilla in supporting copyright reform – and a better, brighter Web. Snippet_v3_remix=Parody, remix, homage. It should all be legal online. Learn 3 things we can do to support EU copyright reform. Snippet_v4_meme=TFW you realise the meme you posted is illegal because of outdated copyright laws. Join us in protecting creativity in the EU. Snippet_r2_v1_dontbreak=Don't break the Internet! EU copyright proposal risks undermining startups, coders, and creators. Learn three things you can do to help fix copyright and sign the petition. Snippet_r2_v2_whatschanged=You know what’s changed? Technology. You know what hasn’t? EU copyright law. Let’s fix that. Snippet_r2_v2_button=Learn more Snippet_r2_v3_internetlove=We <3 the Internet. That’s why we’re fighting for copyright laws that foster creativity and innovation online. Learn more and sign the petition. + Snippet_r2_v4_icymi=ICYMI making memes isn’t allowed in many parts of Europe. That’s absurd. Learn more about 3 simple things we can do to reform copyright.
1
0.125
1
0
70d92906515b4c1ffa47f94d78ef8d57f6431fd0
lib/explore_mars/photo.rb
lib/explore_mars/photo.rb
module ExploreMars class Photo attr_reader :src, :sol, :camera def initialize(src, sol, camera) @src = src @sol = sol @camera = camera end def to_s @src end end end
module ExploreMars class Photo attr_reader :src, :sol, :camera LANDING_DATE = DateTime.new(2012,8,6,5,17,57) SOL_IN_SECONDS = 88775.244 def initialize(src, sol, camera) @src = src @sol = sol @camera = camera end def to_s @src end def earth_date date = LANDING_DATE + (@sol.to_i * SOL_IN_SECONDS).seconds date.strftime("%b %e, %Y") end end end
Add earth_date method to Photo class
Add earth_date method to Photo class
Ruby
mit
chrisccerami/explore_mars
ruby
## Code Before: module ExploreMars class Photo attr_reader :src, :sol, :camera def initialize(src, sol, camera) @src = src @sol = sol @camera = camera end def to_s @src end end end ## Instruction: Add earth_date method to Photo class ## Code After: module ExploreMars class Photo attr_reader :src, :sol, :camera LANDING_DATE = DateTime.new(2012,8,6,5,17,57) SOL_IN_SECONDS = 88775.244 def initialize(src, sol, camera) @src = src @sol = sol @camera = camera end def to_s @src end def earth_date date = LANDING_DATE + (@sol.to_i * SOL_IN_SECONDS).seconds date.strftime("%b %e, %Y") end end end
module ExploreMars class Photo attr_reader :src, :sol, :camera + + LANDING_DATE = DateTime.new(2012,8,6,5,17,57) + SOL_IN_SECONDS = 88775.244 def initialize(src, sol, camera) @src = src @sol = sol @camera = camera end def to_s @src end + + def earth_date + date = LANDING_DATE + (@sol.to_i * SOL_IN_SECONDS).seconds + date.strftime("%b %e, %Y") + end end end
8
0.533333
8
0
8ad2d4ca4e8dd3659cefa9a29b356d21faccadad
README.md
README.md
Exploring methods for merging mechanistic and statistical models to forecast epidemics.
[![Python tests](https://github.com/HopkinsIDD/EpiForecastStatMech/workflows/Python%20tests/badge.svg)](https://github.com/HopkinsIDD/EpiForecastStatMech/actions?query=workflow%3A%22Python+tests%22) Exploring methods for merging mechanistic and statistical models to forecast epidemics.
Add a badge to the readme for checking test results
Add a badge to the readme for checking test results
Markdown
apache-2.0
HopkinsIDD/EpiForecastStatMech,HopkinsIDD/EpiForecastStatMech
markdown
## Code Before: Exploring methods for merging mechanistic and statistical models to forecast epidemics. ## Instruction: Add a badge to the readme for checking test results ## Code After: [![Python tests](https://github.com/HopkinsIDD/EpiForecastStatMech/workflows/Python%20tests/badge.svg)](https://github.com/HopkinsIDD/EpiForecastStatMech/actions?query=workflow%3A%22Python+tests%22) Exploring methods for merging mechanistic and statistical models to forecast epidemics.
+ + [![Python tests](https://github.com/HopkinsIDD/EpiForecastStatMech/workflows/Python%20tests/badge.svg)](https://github.com/HopkinsIDD/EpiForecastStatMech/actions?query=workflow%3A%22Python+tests%22) + Exploring methods for merging mechanistic and statistical models to forecast epidemics.
3
3
3
0
06cd5933300ca1d26ba9874c42c41684b1c42548
CHANGELOG.txt
CHANGELOG.txt
0.13.0 Changes See [github releases](https://github.com/markstory/asset_compress/releases) for changelogs on previous releases.
0.13.0 Changes * Added per install `.local.ini` config files. This allows you to store the build file descriptions in one file, and put environment specific configuration like platform specific paths to nodejs in a separate configuration file. Thanks QTSdev * Added ClosureCompiler filter. This adds support for google's closure compiler webservice as a javascript minifier. Thanks jadb See [github releases](https://github.com/markstory/asset_compress/releases) for changelogs on previous releases.
Update changelog for new things.
Update changelog for new things.
Text
mit
markstory/asset_compress,markstory/mini-asset,markstory/asset_compress,markstory/asset_compress,markstory/mini-asset
text
## Code Before: 0.13.0 Changes See [github releases](https://github.com/markstory/asset_compress/releases) for changelogs on previous releases. ## Instruction: Update changelog for new things. ## Code After: 0.13.0 Changes * Added per install `.local.ini` config files. This allows you to store the build file descriptions in one file, and put environment specific configuration like platform specific paths to nodejs in a separate configuration file. Thanks QTSdev * Added ClosureCompiler filter. This adds support for google's closure compiler webservice as a javascript minifier. Thanks jadb See [github releases](https://github.com/markstory/asset_compress/releases) for changelogs on previous releases.
0.13.0 Changes + + * Added per install `.local.ini` config files. This allows you to store the + build file descriptions in one file, and put environment specific + configuration like platform specific paths to nodejs in a separate + configuration file. Thanks QTSdev + * Added ClosureCompiler filter. This adds support for google's closure + compiler webservice as a javascript minifier. Thanks jadb See [github releases](https://github.com/markstory/asset_compress/releases) for changelogs on previous releases.
7
1.75
7
0
14fc4787be591d9fee4b11f5c71aae7a18946b18
17-createWallOfWoolWithRandomColour.rb
17-createWallOfWoolWithRandomColour.rb
require_relative 'mcpi/minecraft' # import needed block defintiions require_relative 'mcpi/block' # Create a connection to the Minecraft game mc = Minecraft.create() # Get the player position playerPosition = mc.player.getTilePos() # define the position of the bottom left block of the wall blockXposn = playerPosition.x + 6 firstColumnX = blockXposn blockYposn = playerPosition.y + 1 blockZposn = playerPosition.z + 6 # Create a wall using nested for loops for row in 0...6 # increase the height of th current row to be built blockYposn += 1 blockXposn = firstColumnX for column in 0...10 #increase the distance along the row that the block is placed at blockXposn += 1 #Generate a random number within the allowed range of colours (0 to 15 inclusive) randomNumber = rand(16) puts("random number to be used = #{randomNumber}") puts("Creating block at (#{blockXposn}, #{blockYposn}, #{blockZposn})") # Create a block mc.setBlock(blockXposn, blockYposn, blockZposn, WOOL.withData(randomNumber)) sleep(0.5) end end
require_relative 'mcpi/minecraft' # import needed block defintiions require_relative 'mcpi/block' # create a function to create a random block of wool def getWoolBlockWithRandomColour() #Generate a random number within the allowed range of colours (0 to 15 inclusive) randomNumber = rand(16) puts("random number to be used = #{randomNumber}") block = WOOL.withData(randomNumber) return block end # Create a connection to the Minecraft game mc = Minecraft.create() # Get the player position playerPosition = mc.player.getTilePos() # define the position of the bottom left block of the wall blockXposn = playerPosition.x + 6 firstColumnX = blockXposn blockYposn = playerPosition.y + 1 blockZposn = playerPosition.z + 6 # Create a wall using nested for loops for row in 0...6 # increase the height of th current row to be built blockYposn += 1 blockXposn = firstColumnX for column in 0...10 #increase the distance along the row that the block is placed at blockXposn += 1 puts("Creating block at (#{blockXposn}, #{blockYposn}, #{blockZposn})") # Create a block mc.setBlock(blockXposn, blockYposn, blockZposn, getWoolBlockWithRandomColour()) sleep(0.5) end end
Use function for random block creation
Use function for random block creation Move random block creation out to separate function This shows how to use functions in own script
Ruby
bsd-3-clause
hashbangstudio/Ruby-Minecraft-Examples
ruby
## Code Before: require_relative 'mcpi/minecraft' # import needed block defintiions require_relative 'mcpi/block' # Create a connection to the Minecraft game mc = Minecraft.create() # Get the player position playerPosition = mc.player.getTilePos() # define the position of the bottom left block of the wall blockXposn = playerPosition.x + 6 firstColumnX = blockXposn blockYposn = playerPosition.y + 1 blockZposn = playerPosition.z + 6 # Create a wall using nested for loops for row in 0...6 # increase the height of th current row to be built blockYposn += 1 blockXposn = firstColumnX for column in 0...10 #increase the distance along the row that the block is placed at blockXposn += 1 #Generate a random number within the allowed range of colours (0 to 15 inclusive) randomNumber = rand(16) puts("random number to be used = #{randomNumber}") puts("Creating block at (#{blockXposn}, #{blockYposn}, #{blockZposn})") # Create a block mc.setBlock(blockXposn, blockYposn, blockZposn, WOOL.withData(randomNumber)) sleep(0.5) end end ## Instruction: Use function for random block creation Move random block creation out to separate function This shows how to use functions in own script ## Code After: require_relative 'mcpi/minecraft' # import needed block defintiions require_relative 'mcpi/block' # create a function to create a random block of wool def getWoolBlockWithRandomColour() #Generate a random number within the allowed range of colours (0 to 15 inclusive) randomNumber = rand(16) puts("random number to be used = #{randomNumber}") block = WOOL.withData(randomNumber) return block end # Create a connection to the Minecraft game mc = Minecraft.create() # Get the player position playerPosition = mc.player.getTilePos() # define the position of the bottom left block of the wall blockXposn = playerPosition.x + 6 firstColumnX = blockXposn blockYposn = playerPosition.y + 1 blockZposn = playerPosition.z + 6 # Create a wall using nested for loops for row in 0...6 # increase the height of th current row to be built blockYposn += 1 blockXposn = firstColumnX for column in 0...10 #increase the distance along the row that the block is placed at blockXposn += 1 puts("Creating block at (#{blockXposn}, #{blockYposn}, #{blockZposn})") # Create a block mc.setBlock(blockXposn, blockYposn, blockZposn, getWoolBlockWithRandomColour()) sleep(0.5) end end
require_relative 'mcpi/minecraft' # import needed block defintiions require_relative 'mcpi/block' + # create a function to create a random block of wool + def getWoolBlockWithRandomColour() + #Generate a random number within the allowed range of colours (0 to 15 inclusive) + randomNumber = rand(16) + puts("random number to be used = #{randomNumber}") + block = WOOL.withData(randomNumber) + return block + end # Create a connection to the Minecraft game mc = Minecraft.create() # Get the player position playerPosition = mc.player.getTilePos() # define the position of the bottom left block of the wall blockXposn = playerPosition.x + 6 firstColumnX = blockXposn blockYposn = playerPosition.y + 1 blockZposn = playerPosition.z + 6 # Create a wall using nested for loops for row in 0...6 # increase the height of th current row to be built blockYposn += 1 blockXposn = firstColumnX for column in 0...10 #increase the distance along the row that the block is placed at blockXposn += 1 - #Generate a random number within the allowed range of colours (0 to 15 inclusive) - randomNumber = rand(16) - puts("random number to be used = #{randomNumber}") puts("Creating block at (#{blockXposn}, #{blockYposn}, #{blockZposn})") # Create a block - mc.setBlock(blockXposn, blockYposn, blockZposn, WOOL.withData(randomNumber)) ? ^^^^^ ^^^^^^ ^ --- + mc.setBlock(blockXposn, blockYposn, blockZposn, getWoolBlockWithRandomColour()) ? +++ ^^^^^^^^^ ^ ^^^^ + sleep(0.5) end end
13
0.382353
9
4
2eabfffb808de5e18412cf70ddf0bb89b9a4fd87
roles/hosts/tasks/main.yml
roles/hosts/tasks/main.yml
--- - name: Set hosts lineinfile: dest=/etc/hosts line="{{ hosts_ip_address }} {{ item }}" unsafe_writes=yes with_items: - "static.vm.openconext.org" - "metadata.vm.openconext.org" - "serviceregistry.vm.openconext.org" - "engine.vm.openconext.org" - "profile.vm.openconext.org" - "mujina-sp.vm.openconext.org" - "mujina-idp.vm.openconext.org" - "authz.vm.openconext.org" - "authz-admin.vm.openconext.org" - "voot.vm.openconext.org" - "authz-playground.vm.openconext.org" - "lb.vm.openconext.org" - "apps.vm.openconext.org" - "db.vm.openconext.org" - "pdp.vm.openconext.org" - "engine-api.vm.openconext.org" - "aa.vm.openconext.org" - "link.vm.openconext.org" - "oidc.vm.openconext.org" - "teams.vm.openconext.org" - "manage.vm.openconext.org"
--- - name: Set hosts lineinfile: dest=/etc/hosts line="{{ hosts_ip_address }} {{ item }}" unsafe_writes=yes with_items: - "static.vm.openconext.org" - "metadata.vm.openconext.org" - "serviceregistry.vm.openconext.org" - "engine.vm.openconext.org" - "profile.vm.openconext.org" - "mujina-sp.vm.openconext.org" - "mujina-idp.vm.openconext.org" - "authz.vm.openconext.org" - "authz-admin.vm.openconext.org" - "voot.vm.openconext.org" - "authz-playground.vm.openconext.org" - "lb.vm.openconext.org" - "apps.vm.openconext.org" - "db.vm.openconext.org" - "pdp.vm.openconext.org" - "engine-api.vm.openconext.org" - "aa.vm.openconext.org" - "link.vm.openconext.org" - "oidc.vm.openconext.org" - "teams.vm.openconext.org" - "manage.vm.openconext.org" - name: Set logstash in hostsfile lineinfile: dest=/etc/hosts line="192.168.66.99 {{ item }}" unsafe_writes=yes with_items: - "logstash.vm.openconext.org"
Add hosts entry needed for logstash on the vm
Add hosts entry needed for logstash on the vm
YAML
apache-2.0
OpenConext/OpenConext-deploy,OpenConext/OpenConext-deploy,OpenConext/OpenConext-deploy,OpenConext/OpenConext-deploy,OpenConext/OpenConext-deploy
yaml
## Code Before: --- - name: Set hosts lineinfile: dest=/etc/hosts line="{{ hosts_ip_address }} {{ item }}" unsafe_writes=yes with_items: - "static.vm.openconext.org" - "metadata.vm.openconext.org" - "serviceregistry.vm.openconext.org" - "engine.vm.openconext.org" - "profile.vm.openconext.org" - "mujina-sp.vm.openconext.org" - "mujina-idp.vm.openconext.org" - "authz.vm.openconext.org" - "authz-admin.vm.openconext.org" - "voot.vm.openconext.org" - "authz-playground.vm.openconext.org" - "lb.vm.openconext.org" - "apps.vm.openconext.org" - "db.vm.openconext.org" - "pdp.vm.openconext.org" - "engine-api.vm.openconext.org" - "aa.vm.openconext.org" - "link.vm.openconext.org" - "oidc.vm.openconext.org" - "teams.vm.openconext.org" - "manage.vm.openconext.org" ## Instruction: Add hosts entry needed for logstash on the vm ## Code After: --- - name: Set hosts lineinfile: dest=/etc/hosts line="{{ hosts_ip_address }} {{ item }}" unsafe_writes=yes with_items: - "static.vm.openconext.org" - "metadata.vm.openconext.org" - "serviceregistry.vm.openconext.org" - "engine.vm.openconext.org" - "profile.vm.openconext.org" - "mujina-sp.vm.openconext.org" - "mujina-idp.vm.openconext.org" - "authz.vm.openconext.org" - "authz-admin.vm.openconext.org" - "voot.vm.openconext.org" - "authz-playground.vm.openconext.org" - "lb.vm.openconext.org" - "apps.vm.openconext.org" - "db.vm.openconext.org" - "pdp.vm.openconext.org" - "engine-api.vm.openconext.org" - "aa.vm.openconext.org" - "link.vm.openconext.org" - "oidc.vm.openconext.org" - "teams.vm.openconext.org" - "manage.vm.openconext.org" - name: Set logstash in hostsfile lineinfile: dest=/etc/hosts line="192.168.66.99 {{ item }}" unsafe_writes=yes with_items: - "logstash.vm.openconext.org"
--- - name: Set hosts lineinfile: dest=/etc/hosts line="{{ hosts_ip_address }} {{ item }}" unsafe_writes=yes with_items: - "static.vm.openconext.org" - "metadata.vm.openconext.org" - "serviceregistry.vm.openconext.org" - "engine.vm.openconext.org" - "profile.vm.openconext.org" - "mujina-sp.vm.openconext.org" - "mujina-idp.vm.openconext.org" - "authz.vm.openconext.org" - "authz-admin.vm.openconext.org" - "voot.vm.openconext.org" - "authz-playground.vm.openconext.org" - "lb.vm.openconext.org" - "apps.vm.openconext.org" - "db.vm.openconext.org" - "pdp.vm.openconext.org" - "engine-api.vm.openconext.org" - "aa.vm.openconext.org" - "link.vm.openconext.org" - "oidc.vm.openconext.org" - "teams.vm.openconext.org" - "manage.vm.openconext.org" + + - name: Set logstash in hostsfile + lineinfile: dest=/etc/hosts line="192.168.66.99 {{ item }}" unsafe_writes=yes + with_items: + - "logstash.vm.openconext.org"
5
0.2
5
0
c025d9457aa000d0f23252e07ce6f2e2c3c5d971
releaf-core/app/assets/config/releaf_core_manifest.js
releaf-core/app/assets/config/releaf_core_manifest.js
//= link_tree ../images //= link releaf/application.css //= link releaf/application.js
//= link_tree ../images //= link_tree ../javascripts/ckeditor //= link releaf/application.css //= link releaf/application.js
Fix releaf ckeditor assets copying
Fix releaf ckeditor assets copying
JavaScript
mit
cubesystems/releaf,cubesystems/releaf,cubesystems/releaf
javascript
## Code Before: //= link_tree ../images //= link releaf/application.css //= link releaf/application.js ## Instruction: Fix releaf ckeditor assets copying ## Code After: //= link_tree ../images //= link_tree ../javascripts/ckeditor //= link releaf/application.css //= link releaf/application.js
//= link_tree ../images + //= link_tree ../javascripts/ckeditor //= link releaf/application.css //= link releaf/application.js
1
0.333333
1
0
ffaa66d35a10f67944ca49027bb723aa28d97329
doc/release/release_notes.rst
doc/release/release_notes.rst
.. _release/release_notes: ************* Release Notes ************* .. release:: Upcoming .. change:: new Initial release.
.. _release/release_notes: ************* Release Notes ************* .. release:: 0.1.0 :date: 2016-05-25 .. change:: new Initial release for evaluation.
Update release notes for release.
Update release notes for release.
reStructuredText
apache-2.0
4degrees/sawmill,4degrees/mill
restructuredtext
## Code Before: .. _release/release_notes: ************* Release Notes ************* .. release:: Upcoming .. change:: new Initial release. ## Instruction: Update release notes for release. ## Code After: .. _release/release_notes: ************* Release Notes ************* .. release:: 0.1.0 :date: 2016-05-25 .. change:: new Initial release for evaluation.
.. _release/release_notes: ************* Release Notes ************* - .. release:: Upcoming - + .. release:: 0.1.0 + :date: 2016-05-25 + .. change:: new - Initial release. + Initial release for evaluation. ? +++++++++++++++
7
0.636364
4
3
f6f309ddcdac214ca935f6a2958fd9363e14ae64
.travis.yml
.travis.yml
language: ruby cache: bundler sudo: false rvm: - 2.3 - 2.4 - 2.5 - 2.6 notifications: email: false
language: ruby cache: bundler sudo: false rvm: - 2.3 - 2.4 - 2.5 - 2.6 before_install: - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - gem install bundler -v '< 2' notifications: email: false
Use Bundler 1.x on Travis CI
Use Bundler 1.x on Travis CI It is required by the gem, at least for the time being.
YAML
mit
bigcartel/dugway,bigcartel/dugway,bigcartel/dugway
yaml
## Code Before: language: ruby cache: bundler sudo: false rvm: - 2.3 - 2.4 - 2.5 - 2.6 notifications: email: false ## Instruction: Use Bundler 1.x on Travis CI It is required by the gem, at least for the time being. ## Code After: language: ruby cache: bundler sudo: false rvm: - 2.3 - 2.4 - 2.5 - 2.6 before_install: - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - gem install bundler -v '< 2' notifications: email: false
language: ruby cache: bundler sudo: false rvm: - 2.3 - 2.4 - 2.5 - 2.6 + before_install: + - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true + - gem install bundler -v '< 2' notifications: email: false
3
0.3
3
0
44b0313a8d498de16d3a2e06f3f2522ab1f6d3f8
app/presenters/feature_presenter.rb
app/presenters/feature_presenter.rb
class FeaturePresenter < Struct.new(:feature) include ActiveModel::Conversion include Rails.application.routes.url_helpers include PublicDocumentRoutesHelper include ActionView::Helpers include ActionView::Helpers::AssetTagHelper def self.model_name Feature.model_name end def persisted? true end def id feature.id end def document feature.document end def edition document.published_edition end def topical_event feature.topical_event end def image(size) feature.image.url(size || :s630) end def alt_text feature.alt_text end def time_stamp feature.document ? edition.public_timestamp : topical_event.start_date end def display_type_key edition.display_type_key end def public_path if topical_event topical_event_path(topical_event) else public_document_path(edition) end end def title if topical_event topical_event.name else edition.title end end def summary if topical_event topical_event.description else edition.summary end end end
class FeaturePresenter < Struct.new(:feature) include ActiveModel::Conversion include Rails.application.routes.url_helpers include PublicDocumentRoutesHelper def self.model_name Feature.model_name end def persisted? true end def id feature.id end def document feature.document end def edition document.published_edition end def topical_event feature.topical_event end def image(size) feature.image.url(size || :s630) end def alt_text feature.alt_text end def time_stamp feature.document ? edition.public_timestamp : topical_event.start_date end def display_type_key edition.display_type_key end def public_path if topical_event topical_event_path(topical_event) else public_document_path(edition) end end def title if topical_event topical_event.name else edition.title end end def summary if topical_event topical_event.description else edition.summary end end end
Remove these as we no longer call image_tag in the presenter
Remove these as we no longer call image_tag in the presenter
Ruby
mit
askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,askl56/whitehall,askl56/whitehall,ggoral/whitehall,alphagov/whitehall,ggoral/whitehall,YOTOV-LIMITED/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,hotvulcan/whitehall,alphagov/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,hotvulcan/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,ggoral/whitehall,robinwhittleton/whitehall,robinwhittleton/whitehall
ruby
## Code Before: class FeaturePresenter < Struct.new(:feature) include ActiveModel::Conversion include Rails.application.routes.url_helpers include PublicDocumentRoutesHelper include ActionView::Helpers include ActionView::Helpers::AssetTagHelper def self.model_name Feature.model_name end def persisted? true end def id feature.id end def document feature.document end def edition document.published_edition end def topical_event feature.topical_event end def image(size) feature.image.url(size || :s630) end def alt_text feature.alt_text end def time_stamp feature.document ? edition.public_timestamp : topical_event.start_date end def display_type_key edition.display_type_key end def public_path if topical_event topical_event_path(topical_event) else public_document_path(edition) end end def title if topical_event topical_event.name else edition.title end end def summary if topical_event topical_event.description else edition.summary end end end ## Instruction: Remove these as we no longer call image_tag in the presenter ## Code After: class FeaturePresenter < Struct.new(:feature) include ActiveModel::Conversion include Rails.application.routes.url_helpers include PublicDocumentRoutesHelper def self.model_name Feature.model_name end def persisted? true end def id feature.id end def document feature.document end def edition document.published_edition end def topical_event feature.topical_event end def image(size) feature.image.url(size || :s630) end def alt_text feature.alt_text end def time_stamp feature.document ? edition.public_timestamp : topical_event.start_date end def display_type_key edition.display_type_key end def public_path if topical_event topical_event_path(topical_event) else public_document_path(edition) end end def title if topical_event topical_event.name else edition.title end end def summary if topical_event topical_event.description else edition.summary end end end
class FeaturePresenter < Struct.new(:feature) include ActiveModel::Conversion include Rails.application.routes.url_helpers include PublicDocumentRoutesHelper - include ActionView::Helpers - include ActionView::Helpers::AssetTagHelper def self.model_name Feature.model_name end def persisted? true end def id feature.id end def document feature.document end def edition document.published_edition end def topical_event feature.topical_event end def image(size) feature.image.url(size || :s630) end def alt_text feature.alt_text end def time_stamp feature.document ? edition.public_timestamp : topical_event.start_date end def display_type_key edition.display_type_key end def public_path if topical_event topical_event_path(topical_event) else public_document_path(edition) end end def title if topical_event topical_event.name else edition.title end end def summary if topical_event topical_event.description else edition.summary end end end
2
0.027778
0
2
5326101a1a4e14eced6af37627cd7be7e7f8e89c
haxelib.json
haxelib.json
{ "name": "ufront", "license": "MIT", "classPath": "src", "tags": ["ufront","web","cli","shell","interactive","neko"], "description": "A command line tool to help you manage your ufront project.", "contributors": ["jason"], "releasenote": "Update for compatibility with ufront-mvc 1.0.0-beta.3.", "version": "1.0.0-beta.2", "url": "https://github.com/ufront/ufront-uftool", "dependencies": { "ufront-mvc": "", "ufront-orm": "", "ufront-easyauth": "", "ufront-clientds": "", "ufront-ufadmin": "", "ufront-uftasks": "", "compiletime": "" } }
{ "name": "ufront", "license": "MIT", "classPath": "src", "tags": ["ufront","web","cli","shell","interactive","neko"], "description": "A command line tool to help you manage your ufront project.", "contributors": ["jason"], "releasenote": "Update for compatibility with ufront-mvc 1.0.0-beta.3.", "version": "1.0.0-beta.2", "url": "https://github.com/ufront/ufront-uftool", "dependencies": { "ufront-mvc": "", "ufront-orm": "", "ufront-easyauth": "", "ufront-ufadmin": "", "ufront-uftasks": "", "compiletime": "" } }
Remove dependency on ufront-clientds until API has stabilised
Remove dependency on ufront-clientds until API has stabilised
JSON
mit
cesarmarinhorj/ufront,ufront/ufront
json
## Code Before: { "name": "ufront", "license": "MIT", "classPath": "src", "tags": ["ufront","web","cli","shell","interactive","neko"], "description": "A command line tool to help you manage your ufront project.", "contributors": ["jason"], "releasenote": "Update for compatibility with ufront-mvc 1.0.0-beta.3.", "version": "1.0.0-beta.2", "url": "https://github.com/ufront/ufront-uftool", "dependencies": { "ufront-mvc": "", "ufront-orm": "", "ufront-easyauth": "", "ufront-clientds": "", "ufront-ufadmin": "", "ufront-uftasks": "", "compiletime": "" } } ## Instruction: Remove dependency on ufront-clientds until API has stabilised ## Code After: { "name": "ufront", "license": "MIT", "classPath": "src", "tags": ["ufront","web","cli","shell","interactive","neko"], "description": "A command line tool to help you manage your ufront project.", "contributors": ["jason"], "releasenote": "Update for compatibility with ufront-mvc 1.0.0-beta.3.", "version": "1.0.0-beta.2", "url": "https://github.com/ufront/ufront-uftool", "dependencies": { "ufront-mvc": "", "ufront-orm": "", "ufront-easyauth": "", "ufront-ufadmin": "", "ufront-uftasks": "", "compiletime": "" } }
{ "name": "ufront", "license": "MIT", "classPath": "src", "tags": ["ufront","web","cli","shell","interactive","neko"], "description": "A command line tool to help you manage your ufront project.", "contributors": ["jason"], "releasenote": "Update for compatibility with ufront-mvc 1.0.0-beta.3.", "version": "1.0.0-beta.2", "url": "https://github.com/ufront/ufront-uftool", "dependencies": { "ufront-mvc": "", "ufront-orm": "", "ufront-easyauth": "", - "ufront-clientds": "", "ufront-ufadmin": "", "ufront-uftasks": "", "compiletime": "" } }
1
0.05
0
1
a17a5821396878713b85d4318c24628501d9f3e6
config/document_cloud.yml
config/document_cloud.yml
defaults: &defaults cloud_crowd_server: http://localhost:8080 server_root: localhost:1234 aws_zone: us-east-1c preconfigured_ami_id: ami-11a4b57801aae468 ssl_on: true development: <<: *defaults ssl_on: false asset_root: "//s3.amazonaws.com/dactyl-docs-dev" staging: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: 54.221.219.223 asset_root: "//s3.amazonaws.com/dactyl-docs-qa" production: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: 54.197.224.62 asset_root: "//s3.amazonaws.com/dactyl-docs" db_volume_id: vol-d4c305bd test: <<: *defaults
defaults: &defaults cloud_crowd_server: http://localhost:8080 server_root: localhost:1234 aws_zone: us-east-1c preconfigured_ami_id: ami-11a4b57801aae468 ssl_on: true development: <<: *defaults ssl_on: false asset_root: "//s3.amazonaws.com/dactyl-docs-dev" staging: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: https://dactyl-test.denney.ws asset_root: "//s3.amazonaws.com/dactyl-docs-qa" production: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: https://dactyl.denney.ws asset_root: "//s3.amazonaws.com/dactyl-docs" db_volume_id: vol-d4c305bd test: <<: *defaults
Update config with new URLs
Update config with new URLs
YAML
mit
roberttdev/dactyl4,roberttdev/dactyl4,roberttdev/dactyl4,roberttdev/dactyl4
yaml
## Code Before: defaults: &defaults cloud_crowd_server: http://localhost:8080 server_root: localhost:1234 aws_zone: us-east-1c preconfigured_ami_id: ami-11a4b57801aae468 ssl_on: true development: <<: *defaults ssl_on: false asset_root: "//s3.amazonaws.com/dactyl-docs-dev" staging: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: 54.221.219.223 asset_root: "//s3.amazonaws.com/dactyl-docs-qa" production: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: 54.197.224.62 asset_root: "//s3.amazonaws.com/dactyl-docs" db_volume_id: vol-d4c305bd test: <<: *defaults ## Instruction: Update config with new URLs ## Code After: defaults: &defaults cloud_crowd_server: http://localhost:8080 server_root: localhost:1234 aws_zone: us-east-1c preconfigured_ami_id: ami-11a4b57801aae468 ssl_on: true development: <<: *defaults ssl_on: false asset_root: "//s3.amazonaws.com/dactyl-docs-dev" staging: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: https://dactyl-test.denney.ws asset_root: "//s3.amazonaws.com/dactyl-docs-qa" production: <<: *defaults cloud_crowd_server: http://localhost:8080 server_root: https://dactyl.denney.ws asset_root: "//s3.amazonaws.com/dactyl-docs" db_volume_id: vol-d4c305bd test: <<: *defaults
defaults: &defaults cloud_crowd_server: http://localhost:8080 server_root: localhost:1234 aws_zone: us-east-1c preconfigured_ami_id: ami-11a4b57801aae468 ssl_on: true development: <<: *defaults ssl_on: false asset_root: "//s3.amazonaws.com/dactyl-docs-dev" staging: <<: *defaults cloud_crowd_server: http://localhost:8080 - server_root: 54.221.219.223 + server_root: https://dactyl-test.denney.ws asset_root: "//s3.amazonaws.com/dactyl-docs-qa" production: <<: *defaults cloud_crowd_server: http://localhost:8080 - server_root: 54.197.224.62 + server_root: https://dactyl.denney.ws asset_root: "//s3.amazonaws.com/dactyl-docs" db_volume_id: vol-d4c305bd test: <<: *defaults
4
0.148148
2
2
3e349e3e09a8d4377880a6aa6ae461b9819accf8
lib/rubocop/cop/lint/duplicate_case_condition.rb
lib/rubocop/cop/lint/duplicate_case_condition.rb
module RuboCop module Cop module Lint # This cop checks that there are no repeated conditions # used in case 'when' expressions. # # @example # # # bad # # case x # when 'first' # do_something # when 'first' # do_something_else # end # # @example # # # good # # case x # when 'first' # do_something # when 'second' # do_something_else # end class DuplicateCaseCondition < Base MSG = 'Duplicate `when` condition detected.' def on_case(case_node) case_node.when_branches.each_with_object([]) do |when_node, previous| when_node.each_condition do |condition| next unless repeated_condition?(previous, condition) add_offense(condition) end previous.push(when_node.conditions) end end private def repeated_condition?(previous, condition) previous.any? { |c| c.include?(condition) } end end end end end
module RuboCop module Cop module Lint # This cop checks that there are no repeated conditions # used in case 'when' expressions. # # @example # # # bad # # case x # when 'first' # do_something # when 'first' # do_something_else # end # # @example # # # good # # case x # when 'first' # do_something # when 'second' # do_something_else # end class DuplicateCaseCondition < Base MSG = 'Duplicate `when` condition detected.' def on_case(case_node) case_node.when_branches.each_with_object(Set.new) do |when_node, previous| when_node.each_condition do |condition| add_offense(condition) unless previous.add?(condition) end end end end end end end
Refactor Lint/DuplicateCaseCondition cop with Set
Refactor Lint/DuplicateCaseCondition cop with Set
Ruby
mit
bbatsov/rubocop,tdeo/rubocop,tejasbubane/rubocop,tdeo/rubocop,rrosenblum/rubocop,tdeo/rubocop,tejasbubane/rubocop,bbatsov/rubocop,maxjacobson/rubocop,maxjacobson/rubocop,maxjacobson/rubocop,rrosenblum/rubocop,rrosenblum/rubocop,tejasbubane/rubocop
ruby
## Code Before: module RuboCop module Cop module Lint # This cop checks that there are no repeated conditions # used in case 'when' expressions. # # @example # # # bad # # case x # when 'first' # do_something # when 'first' # do_something_else # end # # @example # # # good # # case x # when 'first' # do_something # when 'second' # do_something_else # end class DuplicateCaseCondition < Base MSG = 'Duplicate `when` condition detected.' def on_case(case_node) case_node.when_branches.each_with_object([]) do |when_node, previous| when_node.each_condition do |condition| next unless repeated_condition?(previous, condition) add_offense(condition) end previous.push(when_node.conditions) end end private def repeated_condition?(previous, condition) previous.any? { |c| c.include?(condition) } end end end end end ## Instruction: Refactor Lint/DuplicateCaseCondition cop with Set ## Code After: module RuboCop module Cop module Lint # This cop checks that there are no repeated conditions # used in case 'when' expressions. # # @example # # # bad # # case x # when 'first' # do_something # when 'first' # do_something_else # end # # @example # # # good # # case x # when 'first' # do_something # when 'second' # do_something_else # end class DuplicateCaseCondition < Base MSG = 'Duplicate `when` condition detected.' def on_case(case_node) case_node.when_branches.each_with_object(Set.new) do |when_node, previous| when_node.each_condition do |condition| add_offense(condition) unless previous.add?(condition) end end end end end end end
module RuboCop module Cop module Lint # This cop checks that there are no repeated conditions # used in case 'when' expressions. # # @example # # # bad # # case x # when 'first' # do_something # when 'first' # do_something_else # end # # @example # # # good # # case x # when 'first' # do_something # when 'second' # do_something_else # end class DuplicateCaseCondition < Base MSG = 'Duplicate `when` condition detected.' def on_case(case_node) - case_node.when_branches.each_with_object([]) do |when_node, previous| ? ^^ + case_node.when_branches.each_with_object(Set.new) do |when_node, previous| ? ^^^^^^^ when_node.each_condition do |condition| + add_offense(condition) unless previous.add?(condition) - next unless repeated_condition?(previous, condition) - - add_offense(condition) end - - previous.push(when_node.conditions) end - end - - private - - def repeated_condition?(previous, condition) - previous.any? { |c| c.include?(condition) } end end end end end
14
0.269231
2
12
60eb4891013dfc5a00fbecd98a79999a365c0839
example/article/admin.py
example/article/admin.py
from django.contrib import admin from django.forms import ModelForm from article.models import Article # The timezone support was introduced in Django 1.4, fallback to standard library for 1.3. try: from django.utils.timezone import now except ImportError: from datetime import datetime now = datetime.now class ArticleAdminForm(ModelForm): def __init__(self, *args, **kwargs): super(ArticleAdminForm, self).__init__(*args, **kwargs) self.fields['publication_date'].required = False # The admin's .save() method fills in a default. class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} form = ArticleAdminForm fieldsets = ( (None, { 'fields': ('title', 'slug',), }), ("Contents", { 'fields': ('content',), }), ("Publication settings", { 'fields': ('publication_date', 'enable_comments',), }), ) def save_model(self, request, obj, form, change): if not obj.publication_date: # auto_now_add makes the field uneditable. # a default in the model fills the field before the post is written (too early) obj.publication_date = now() obj.save() admin.site.register(Article, ArticleAdmin)
from django.contrib import admin from django.forms import ModelForm from django.utils.timezone import now from article.models import Article class ArticleAdminForm(ModelForm): def __init__(self, *args, **kwargs): super(ArticleAdminForm, self).__init__(*args, **kwargs) self.fields['publication_date'].required = False # The admin's .save() method fills in a default. class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} form = ArticleAdminForm fieldsets = ( (None, { 'fields': ('title', 'slug',), }), ("Contents", { 'fields': ('content',), }), ("Publication settings", { 'fields': ('publication_date', 'enable_comments',), }), ) def save_model(self, request, obj, form, change): if not obj.publication_date: # auto_now_add makes the field uneditable. # a default in the model fills the field before the post is written (too early) obj.publication_date = now() obj.save() admin.site.register(Article, ArticleAdmin)
Remove old Django compatibility code
Remove old Django compatibility code
Python
apache-2.0
django-fluent/django-fluent-comments,edoburu/django-fluent-comments,django-fluent/django-fluent-comments,edoburu/django-fluent-comments,edoburu/django-fluent-comments,django-fluent/django-fluent-comments,django-fluent/django-fluent-comments
python
## Code Before: from django.contrib import admin from django.forms import ModelForm from article.models import Article # The timezone support was introduced in Django 1.4, fallback to standard library for 1.3. try: from django.utils.timezone import now except ImportError: from datetime import datetime now = datetime.now class ArticleAdminForm(ModelForm): def __init__(self, *args, **kwargs): super(ArticleAdminForm, self).__init__(*args, **kwargs) self.fields['publication_date'].required = False # The admin's .save() method fills in a default. class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} form = ArticleAdminForm fieldsets = ( (None, { 'fields': ('title', 'slug',), }), ("Contents", { 'fields': ('content',), }), ("Publication settings", { 'fields': ('publication_date', 'enable_comments',), }), ) def save_model(self, request, obj, form, change): if not obj.publication_date: # auto_now_add makes the field uneditable. # a default in the model fills the field before the post is written (too early) obj.publication_date = now() obj.save() admin.site.register(Article, ArticleAdmin) ## Instruction: Remove old Django compatibility code ## Code After: from django.contrib import admin from django.forms import ModelForm from django.utils.timezone import now from article.models import Article class ArticleAdminForm(ModelForm): def __init__(self, *args, **kwargs): super(ArticleAdminForm, self).__init__(*args, **kwargs) self.fields['publication_date'].required = False # The admin's .save() method fills in a default. class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} form = ArticleAdminForm fieldsets = ( (None, { 'fields': ('title', 'slug',), }), ("Contents", { 'fields': ('content',), }), ("Publication settings", { 'fields': ('publication_date', 'enable_comments',), }), ) def save_model(self, request, obj, form, change): if not obj.publication_date: # auto_now_add makes the field uneditable. # a default in the model fills the field before the post is written (too early) obj.publication_date = now() obj.save() admin.site.register(Article, ArticleAdmin)
from django.contrib import admin from django.forms import ModelForm + from django.utils.timezone import now from article.models import Article - - # The timezone support was introduced in Django 1.4, fallback to standard library for 1.3. - try: - from django.utils.timezone import now - except ImportError: - from datetime import datetime - now = datetime.now class ArticleAdminForm(ModelForm): def __init__(self, *args, **kwargs): super(ArticleAdminForm, self).__init__(*args, **kwargs) self.fields['publication_date'].required = False # The admin's .save() method fills in a default. class ArticleAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} form = ArticleAdminForm fieldsets = ( (None, { 'fields': ('title', 'slug',), }), ("Contents", { 'fields': ('content',), }), ("Publication settings", { 'fields': ('publication_date', 'enable_comments',), }), ) def save_model(self, request, obj, form, change): if not obj.publication_date: # auto_now_add makes the field uneditable. # a default in the model fills the field before the post is written (too early) obj.publication_date = now() obj.save() admin.site.register(Article, ArticleAdmin)
8
0.181818
1
7
0cb83c5f629541838fdc5432fe6b3e5e48a06b77
src/scroll-listener.ts
src/scroll-listener.ts
import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/startWith'; import 'rxjs/add/operator/sampleTime'; import 'rxjs/add/operator/share'; import { Observable } from 'rxjs/Observable'; const scrollListeners = {}; // Only create one scroll listener per target and share the observable. // Typical, there will only be one observable export const getScrollListener = (scrollTarget): Observable<any> => { if (scrollTarget in scrollListeners) { return scrollListeners[scrollTarget]; } scrollListeners[scrollTarget] = Observable.fromEvent(scrollTarget, 'scroll') .sampleTime(100) .startWith('') .share(); return scrollListeners[scrollTarget]; };
import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/startWith'; import 'rxjs/add/operator/sampleTime'; import 'rxjs/add/operator/share'; import { Observable } from 'rxjs/Observable'; const scrollListeners = {}; // Only create one scroll listener per target and share the observable. // Typical, there will only be one observable export const getScrollListener = (scrollTarget): Observable<any> => { if (scrollTarget in scrollListeners) { return scrollListeners[scrollTarget]; } scrollListeners[scrollTarget] = Observable.fromEvent(scrollTarget, 'scroll') .sampleTime(100) .share() .startWith(''); return scrollListeners[scrollTarget]; };
Put a default value on all subscriptions
:bug: Put a default value on all subscriptions
TypeScript
mit
tjoskar/ng2-lazyload-image,tjoskar/ng-lazyload-image,tjoskar/ng-lazyload-image,tjoskar/ng2-lazyload-image,tjoskar/ng2-lazyload-image
typescript
## Code Before: import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/startWith'; import 'rxjs/add/operator/sampleTime'; import 'rxjs/add/operator/share'; import { Observable } from 'rxjs/Observable'; const scrollListeners = {}; // Only create one scroll listener per target and share the observable. // Typical, there will only be one observable export const getScrollListener = (scrollTarget): Observable<any> => { if (scrollTarget in scrollListeners) { return scrollListeners[scrollTarget]; } scrollListeners[scrollTarget] = Observable.fromEvent(scrollTarget, 'scroll') .sampleTime(100) .startWith('') .share(); return scrollListeners[scrollTarget]; }; ## Instruction: :bug: Put a default value on all subscriptions ## Code After: import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/startWith'; import 'rxjs/add/operator/sampleTime'; import 'rxjs/add/operator/share'; import { Observable } from 'rxjs/Observable'; const scrollListeners = {}; // Only create one scroll listener per target and share the observable. // Typical, there will only be one observable export const getScrollListener = (scrollTarget): Observable<any> => { if (scrollTarget in scrollListeners) { return scrollListeners[scrollTarget]; } scrollListeners[scrollTarget] = Observable.fromEvent(scrollTarget, 'scroll') .sampleTime(100) .share() .startWith(''); return scrollListeners[scrollTarget]; };
import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/operator/startWith'; import 'rxjs/add/operator/sampleTime'; import 'rxjs/add/operator/share'; import { Observable } from 'rxjs/Observable'; const scrollListeners = {}; // Only create one scroll listener per target and share the observable. // Typical, there will only be one observable export const getScrollListener = (scrollTarget): Observable<any> => { if (scrollTarget in scrollListeners) { return scrollListeners[scrollTarget]; } scrollListeners[scrollTarget] = Observable.fromEvent(scrollTarget, 'scroll') .sampleTime(100) + .share() - .startWith('') + .startWith(''); ? + - .share(); return scrollListeners[scrollTarget]; };
4
0.2
2
2
e812028de50245da9984aedc326093b0364332d1
libarchivist/archivist/cache.h
libarchivist/archivist/cache.h
typedef struct arch_cache_bucket { arch_uuid_t uuid; arch_record_t *record; struct arch_cache_bucket *next; } arch_cache_bucket_t; typedef struct arch_cache { struct arch_cache *old; size_t size, entries; arch_cache_bucket_t *slots[]; } arch_cache_t; arch_record_t *arch_cache_get(arch_cache_t *cache, arch_uuid_t uuid); bool arch_cache_set(arch_cache_t *cache, arch_record_t *record); #endif
typedef struct arch_cache_bucket { arch_uuid_t uuid; arch_record_t *record; struct arch_cache_bucket *next; } arch_cache_bucket_t; typedef struct arch_cache { struct arch_cache *old; size_t size, entries; arch_cache_bucket_t *slots[]; } arch_cache_t; #define ARCH_CACHE_BYTES(elts) (sizeof(arch_cache_t) + sizeof(arch_cache_bucket_t) * elts) arch_record_t *arch_cache_get(arch_cache_t *cache, arch_uuid_t uuid); bool arch_cache_set(arch_cache_t *cache, arch_record_t *record); #endif
Add allocation helper macro ARCH_CACHE_BYTES()
Add allocation helper macro ARCH_CACHE_BYTES()
C
bsd-2-clause
LambdaOS/Archivist
c
## Code Before: typedef struct arch_cache_bucket { arch_uuid_t uuid; arch_record_t *record; struct arch_cache_bucket *next; } arch_cache_bucket_t; typedef struct arch_cache { struct arch_cache *old; size_t size, entries; arch_cache_bucket_t *slots[]; } arch_cache_t; arch_record_t *arch_cache_get(arch_cache_t *cache, arch_uuid_t uuid); bool arch_cache_set(arch_cache_t *cache, arch_record_t *record); #endif ## Instruction: Add allocation helper macro ARCH_CACHE_BYTES() ## Code After: typedef struct arch_cache_bucket { arch_uuid_t uuid; arch_record_t *record; struct arch_cache_bucket *next; } arch_cache_bucket_t; typedef struct arch_cache { struct arch_cache *old; size_t size, entries; arch_cache_bucket_t *slots[]; } arch_cache_t; #define ARCH_CACHE_BYTES(elts) (sizeof(arch_cache_t) + sizeof(arch_cache_bucket_t) * elts) arch_record_t *arch_cache_get(arch_cache_t *cache, arch_uuid_t uuid); bool arch_cache_set(arch_cache_t *cache, arch_record_t *record); #endif
typedef struct arch_cache_bucket { arch_uuid_t uuid; arch_record_t *record; struct arch_cache_bucket *next; } arch_cache_bucket_t; typedef struct arch_cache { struct arch_cache *old; size_t size, entries; arch_cache_bucket_t *slots[]; } arch_cache_t; + #define ARCH_CACHE_BYTES(elts) (sizeof(arch_cache_t) + sizeof(arch_cache_bucket_t) * elts) arch_record_t *arch_cache_get(arch_cache_t *cache, arch_uuid_t uuid); bool arch_cache_set(arch_cache_t *cache, arch_record_t *record); #endif
1
0.0625
1
0
62513397441fd0af5614a18e4cb6037479b744f2
models/User.js
models/User.js
'use strict'; var bcrypt = require('bcrypt'); var mongoose = require('mongoose'); var Schema = mongoose.Schema; // export a mongoose model var userSchema = new Schema({ userName : String, passwordDigest : String }); userSchema.virtual('password').set(function(password) { var self = this; var saltPromise = new Promise(function saltExec(res, rej) { bcrypt.genSalt(16, function(err, salt) { if(err) { rej(err); return; } res(salt); }); }); var returnedPromise = saltPromise.then(function(salt) { return new Promise(function hashExec(res, rej) { bcrypt.hash(password, salt, function(err, digest) { if(err) { rej(err); return; } res(digest); }); }); }).then(function(digest) { self.passwordDigest = digest; }); return returnedPromise; }); module.exports = userSchema;
'use strict'; var bcrypt = require('bcrypt'); var mongoose = require('mongoose'); var Schema = mongoose.Schema; // export a mongoose model var userSchema = new Schema({ userName : String, passwordDigest : String }); userSchema.methods.setPassword = function(password) { var self = this; var saltPromise = new Promise(function saltExec(res, rej) { bcrypt.genSalt(16, function(err, salt) { if(err) { rej(err); return; } res(salt); }); }); var returnedPromise = saltPromise.then(function(salt) { return new Promise(function hashExec(res, rej) { bcrypt.hash(password, salt, function(err, digest) { if(err) { rej(err); return; } res(digest); }); }); }).then(function(digest) { self.passwordDigest = digest; return self.save(); }); return returnedPromise; }; module.exports = userSchema;
Change virtual prop to an instance method
Change virtual prop to an instance method
JavaScript
mit
dhuddell/teachers-lounge-back-end
javascript
## Code Before: 'use strict'; var bcrypt = require('bcrypt'); var mongoose = require('mongoose'); var Schema = mongoose.Schema; // export a mongoose model var userSchema = new Schema({ userName : String, passwordDigest : String }); userSchema.virtual('password').set(function(password) { var self = this; var saltPromise = new Promise(function saltExec(res, rej) { bcrypt.genSalt(16, function(err, salt) { if(err) { rej(err); return; } res(salt); }); }); var returnedPromise = saltPromise.then(function(salt) { return new Promise(function hashExec(res, rej) { bcrypt.hash(password, salt, function(err, digest) { if(err) { rej(err); return; } res(digest); }); }); }).then(function(digest) { self.passwordDigest = digest; }); return returnedPromise; }); module.exports = userSchema; ## Instruction: Change virtual prop to an instance method ## Code After: 'use strict'; var bcrypt = require('bcrypt'); var mongoose = require('mongoose'); var Schema = mongoose.Schema; // export a mongoose model var userSchema = new Schema({ userName : String, passwordDigest : String }); userSchema.methods.setPassword = function(password) { var self = this; var saltPromise = new Promise(function saltExec(res, rej) { bcrypt.genSalt(16, function(err, salt) { if(err) { rej(err); return; } res(salt); }); }); var returnedPromise = saltPromise.then(function(salt) { return new Promise(function hashExec(res, rej) { bcrypt.hash(password, salt, function(err, digest) { if(err) { rej(err); return; } res(digest); }); }); }).then(function(digest) { self.passwordDigest = digest; return self.save(); }); return returnedPromise; }; module.exports = userSchema;
'use strict'; var bcrypt = require('bcrypt'); var mongoose = require('mongoose'); var Schema = mongoose.Schema; // export a mongoose model var userSchema = new Schema({ userName : String, passwordDigest : String }); - userSchema.virtual('password').set(function(password) { + userSchema.methods.setPassword = function(password) { var self = this; var saltPromise = new Promise(function saltExec(res, rej) { bcrypt.genSalt(16, function(err, salt) { if(err) { rej(err); return; } res(salt); }); }); var returnedPromise = saltPromise.then(function(salt) { return new Promise(function hashExec(res, rej) { bcrypt.hash(password, salt, function(err, digest) { if(err) { rej(err); return; } res(digest); }); }); }).then(function(digest) { self.passwordDigest = digest; + return self.save(); }); return returnedPromise; - }); ? - + }; module.exports = userSchema;
5
0.111111
3
2
8b9090bd370797b326e3ed3b5574a8e1e0fd7993
packages/da/datetime.yaml
packages/da/datetime.yaml
homepage: http://github.com/esessoms/datetime changelog-type: '' hash: 7f4e22fcbb367d3881afe4ac88f9a5ec39076cbf266e1dd20e3f3e971b684c3e test-bench-deps: {} maintainer: nubgames@gmail.com synopsis: Utilities to make Data.Time.* easier to use. changelog: '' basic-deps: base: <5 time: ! '>=1.1.2.2' old-time: ! '>=1.0.0.1' old-locale: ! '>=1.0.0.1' QuickCheck: ! '>=2 && <3' all-versions: - '0.1' - '0.2' - '0.2.1' author: Eric Sessoms <nubgames@gmail.com> latest: '0.2.1' description-type: haddock description: ! 'Provides several utilities for easily converting among the various standard library Date and Time types, and for converting between these and standard external representations.' license-name: GPL
homepage: http://github.com/stackbuilders/datetime changelog-type: '' hash: 7e275bd0ce7a2f66445bedfa0006abaf4d41af4c2204c3f8004c17eab5480e74 test-bench-deps: test-framework-hunit: -any test-framework: -any base: ! '>=4.2 && <4.9' time: ! '>=1.1.2.2' test-framework-quickcheck2: -any HUnit: -any old-time: ! '>=1.0.0.1' old-locale: ! '>=1.0.0.1' QuickCheck: -any datetime: -any maintainer: hackage@stackbuilders.com synopsis: Utilities to make Data.Time.* easier to use changelog: '' basic-deps: base: <5 time: ! '>=1.1.2.2' old-time: ! '>=1.0.0.1' old-locale: ! '>=1.0.0.1' all-versions: - '0.1' - '0.2' - '0.2.1' - '0.3.0' - '0.3.1' author: Eric Sessoms <nubgames@gmail.com> latest: '0.3.1' description-type: haddock description: ! 'Provides several utilities for easily converting among the various standard library Date and Time types, and for converting between these and standard external representations.' license-name: GPL
Update from Hackage at 2015-07-20T22:39:06+0000
Update from Hackage at 2015-07-20T22:39:06+0000
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: http://github.com/esessoms/datetime changelog-type: '' hash: 7f4e22fcbb367d3881afe4ac88f9a5ec39076cbf266e1dd20e3f3e971b684c3e test-bench-deps: {} maintainer: nubgames@gmail.com synopsis: Utilities to make Data.Time.* easier to use. changelog: '' basic-deps: base: <5 time: ! '>=1.1.2.2' old-time: ! '>=1.0.0.1' old-locale: ! '>=1.0.0.1' QuickCheck: ! '>=2 && <3' all-versions: - '0.1' - '0.2' - '0.2.1' author: Eric Sessoms <nubgames@gmail.com> latest: '0.2.1' description-type: haddock description: ! 'Provides several utilities for easily converting among the various standard library Date and Time types, and for converting between these and standard external representations.' license-name: GPL ## Instruction: Update from Hackage at 2015-07-20T22:39:06+0000 ## Code After: homepage: http://github.com/stackbuilders/datetime changelog-type: '' hash: 7e275bd0ce7a2f66445bedfa0006abaf4d41af4c2204c3f8004c17eab5480e74 test-bench-deps: test-framework-hunit: -any test-framework: -any base: ! '>=4.2 && <4.9' time: ! '>=1.1.2.2' test-framework-quickcheck2: -any HUnit: -any old-time: ! '>=1.0.0.1' old-locale: ! '>=1.0.0.1' QuickCheck: -any datetime: -any maintainer: hackage@stackbuilders.com synopsis: Utilities to make Data.Time.* easier to use changelog: '' basic-deps: base: <5 time: ! '>=1.1.2.2' old-time: ! '>=1.0.0.1' old-locale: ! '>=1.0.0.1' all-versions: - '0.1' - '0.2' - '0.2.1' - '0.3.0' - '0.3.1' author: Eric Sessoms <nubgames@gmail.com> latest: '0.3.1' description-type: haddock description: ! 'Provides several utilities for easily converting among the various standard library Date and Time types, and for converting between these and standard external representations.' license-name: GPL
- homepage: http://github.com/esessoms/datetime ? ^^^^^^ + homepage: http://github.com/stackbuilders/datetime ? ++++++++++ ^ changelog-type: '' - hash: 7f4e22fcbb367d3881afe4ac88f9a5ec39076cbf266e1dd20e3f3e971b684c3e + hash: 7e275bd0ce7a2f66445bedfa0006abaf4d41af4c2204c3f8004c17eab5480e74 - test-bench-deps: {} ? --- + test-bench-deps: - maintainer: nubgames@gmail.com + test-framework-hunit: -any + test-framework: -any + base: ! '>=4.2 && <4.9' + time: ! '>=1.1.2.2' + test-framework-quickcheck2: -any + HUnit: -any + old-time: ! '>=1.0.0.1' + old-locale: ! '>=1.0.0.1' + QuickCheck: -any + datetime: -any + maintainer: hackage@stackbuilders.com - synopsis: Utilities to make Data.Time.* easier to use. ? - + synopsis: Utilities to make Data.Time.* easier to use changelog: '' basic-deps: base: <5 time: ! '>=1.1.2.2' old-time: ! '>=1.0.0.1' old-locale: ! '>=1.0.0.1' - QuickCheck: ! '>=2 && <3' all-versions: - '0.1' - '0.2' - '0.2.1' + - '0.3.0' + - '0.3.1' author: Eric Sessoms <nubgames@gmail.com> - latest: '0.2.1' ? ^ + latest: '0.3.1' ? ^ description-type: haddock description: ! 'Provides several utilities for easily converting among the various standard library Date and Time types, and for converting between these and standard external representations.' license-name: GPL
25
0.961538
18
7
3e1e750c29ee275c0a8a89cb5f21690127b00973
lib/pundit/matchers.rb
lib/pundit/matchers.rb
require 'rspec/core' require './lib/pundit/matchers/forbid_action' require './lib/pundit/matchers/forbid_actions' require './lib/pundit/matchers/forbid_edit_and_update_actions' require './lib/pundit/matchers/forbid_mass_assignment_of' require './lib/pundit/matchers/forbid_new_and_create_actions' require './lib/pundit/matchers/permit_action' require './lib/pundit/matchers/permit_actions' require './lib/pundit/matchers/permit_edit_and_update_actions' require './lib/pundit/matchers/permit_mass_assignment_of' require './lib/pundit/matchers/permit_new_and_create_actions' if defined?(Pundit) RSpec.configure do |config| config.include Pundit::Matchers end end
require 'rspec/core' require 'pundit/matchers/forbid_action' require 'pundit/matchers/forbid_actions' require 'pundit/matchers/forbid_edit_and_update_actions' require 'pundit/matchers/forbid_mass_assignment_of' require 'pundit/matchers/forbid_new_and_create_actions' require 'pundit/matchers/permit_action' require 'pundit/matchers/permit_actions' require 'pundit/matchers/permit_edit_and_update_actions' require 'pundit/matchers/permit_mass_assignment_of' require 'pundit/matchers/permit_new_and_create_actions' if defined?(Pundit) RSpec.configure do |config| config.include Pundit::Matchers end end
Remove ./lib/ from require statements
Remove ./lib/ from require statements
Ruby
mit
chrisalley/pundit-matchers
ruby
## Code Before: require 'rspec/core' require './lib/pundit/matchers/forbid_action' require './lib/pundit/matchers/forbid_actions' require './lib/pundit/matchers/forbid_edit_and_update_actions' require './lib/pundit/matchers/forbid_mass_assignment_of' require './lib/pundit/matchers/forbid_new_and_create_actions' require './lib/pundit/matchers/permit_action' require './lib/pundit/matchers/permit_actions' require './lib/pundit/matchers/permit_edit_and_update_actions' require './lib/pundit/matchers/permit_mass_assignment_of' require './lib/pundit/matchers/permit_new_and_create_actions' if defined?(Pundit) RSpec.configure do |config| config.include Pundit::Matchers end end ## Instruction: Remove ./lib/ from require statements ## Code After: require 'rspec/core' require 'pundit/matchers/forbid_action' require 'pundit/matchers/forbid_actions' require 'pundit/matchers/forbid_edit_and_update_actions' require 'pundit/matchers/forbid_mass_assignment_of' require 'pundit/matchers/forbid_new_and_create_actions' require 'pundit/matchers/permit_action' require 'pundit/matchers/permit_actions' require 'pundit/matchers/permit_edit_and_update_actions' require 'pundit/matchers/permit_mass_assignment_of' require 'pundit/matchers/permit_new_and_create_actions' if defined?(Pundit) RSpec.configure do |config| config.include Pundit::Matchers end end
require 'rspec/core' - require './lib/pundit/matchers/forbid_action' ? ------ + require 'pundit/matchers/forbid_action' - require './lib/pundit/matchers/forbid_actions' ? ------ + require 'pundit/matchers/forbid_actions' - require './lib/pundit/matchers/forbid_edit_and_update_actions' ? ------ + require 'pundit/matchers/forbid_edit_and_update_actions' - require './lib/pundit/matchers/forbid_mass_assignment_of' ? ------ + require 'pundit/matchers/forbid_mass_assignment_of' - require './lib/pundit/matchers/forbid_new_and_create_actions' ? ------ + require 'pundit/matchers/forbid_new_and_create_actions' - require './lib/pundit/matchers/permit_action' ? ------ + require 'pundit/matchers/permit_action' - require './lib/pundit/matchers/permit_actions' ? ------ + require 'pundit/matchers/permit_actions' - require './lib/pundit/matchers/permit_edit_and_update_actions' ? ------ + require 'pundit/matchers/permit_edit_and_update_actions' - require './lib/pundit/matchers/permit_mass_assignment_of' ? ------ + require 'pundit/matchers/permit_mass_assignment_of' - require './lib/pundit/matchers/permit_new_and_create_actions' ? ------ + require 'pundit/matchers/permit_new_and_create_actions' if defined?(Pundit) RSpec.configure do |config| config.include Pundit::Matchers end end
20
1.111111
10
10
3d970eeb97ccccdb355a3bba5be462e78e000645
package.js
package.js
Package.describe({ summary: "Adds basic support for Cordova/Phonegap\n"+ "\u001b[32mv0.0.8\n"+ "\u001b[33m-----------------------------------------\n"+ "\u001b[0m Adds basic support for Cordova/Phonegap \n"+ "\u001b[0m shell communication in iframe \n"+ "\u001b[33m-------------------------------------RaiX\n" }); Package.on_use(function (api) { api.use('ejson', 'client'); api.add_files('cordova.client.js', 'client'); api.add_files('cordova.client.notification.js', 'client'); api.export && api.export('Cordova', 'client'); }); Package.on_test(function(api) { api.use('cordova', ['client']); api.use('test-helpers', 'client'); api.use(['tinytest', 'underscore', 'ejson', 'ordered-dict', 'random', 'deps']); api.add_files([ 'plugin/meteor.cordova.js', 'meteor.cordova.tests.js', ], 'client'); });
Package.describe({ summary: "Adds basic support for Cordova/Phonegap\n"+ "\u001b[32mv0.0.8\n"+ "\u001b[33m-----------------------------------------\n"+ "\u001b[0m Adds basic support for Cordova/Phonegap \n"+ "\u001b[0m shell communication in iframe \n"+ "\u001b[33m-------------------------------------RaiX\n" }); Package.on_use(function (api) { api.use('deps','client'); api.use('ejson', 'client'); api.add_files('cordova.client.js', 'client'); api.add_files('cordova.client.notification.js', 'client'); api.export && api.export('Cordova', 'client'); }); Package.on_test(function(api) { api.use('cordova', ['client']); api.use('test-helpers', 'client'); api.use(['tinytest', 'underscore', 'ejson', 'ordered-dict', 'random', 'deps']); api.add_files([ 'plugin/meteor.cordova.js', 'meteor.cordova.tests.js', ], 'client'); });
Fix startup error in Meteor 0.8.3
Fix startup error in Meteor 0.8.3
JavaScript
mit
SpaceCapsule/Meteor-cordova,SpaceCapsule/Meteor-cordova
javascript
## Code Before: Package.describe({ summary: "Adds basic support for Cordova/Phonegap\n"+ "\u001b[32mv0.0.8\n"+ "\u001b[33m-----------------------------------------\n"+ "\u001b[0m Adds basic support for Cordova/Phonegap \n"+ "\u001b[0m shell communication in iframe \n"+ "\u001b[33m-------------------------------------RaiX\n" }); Package.on_use(function (api) { api.use('ejson', 'client'); api.add_files('cordova.client.js', 'client'); api.add_files('cordova.client.notification.js', 'client'); api.export && api.export('Cordova', 'client'); }); Package.on_test(function(api) { api.use('cordova', ['client']); api.use('test-helpers', 'client'); api.use(['tinytest', 'underscore', 'ejson', 'ordered-dict', 'random', 'deps']); api.add_files([ 'plugin/meteor.cordova.js', 'meteor.cordova.tests.js', ], 'client'); }); ## Instruction: Fix startup error in Meteor 0.8.3 ## Code After: Package.describe({ summary: "Adds basic support for Cordova/Phonegap\n"+ "\u001b[32mv0.0.8\n"+ "\u001b[33m-----------------------------------------\n"+ "\u001b[0m Adds basic support for Cordova/Phonegap \n"+ "\u001b[0m shell communication in iframe \n"+ "\u001b[33m-------------------------------------RaiX\n" }); Package.on_use(function (api) { api.use('deps','client'); api.use('ejson', 'client'); api.add_files('cordova.client.js', 'client'); api.add_files('cordova.client.notification.js', 'client'); api.export && api.export('Cordova', 'client'); }); Package.on_test(function(api) { api.use('cordova', ['client']); api.use('test-helpers', 'client'); api.use(['tinytest', 'underscore', 'ejson', 'ordered-dict', 'random', 'deps']); api.add_files([ 'plugin/meteor.cordova.js', 'meteor.cordova.tests.js', ], 'client'); });
Package.describe({ summary: "Adds basic support for Cordova/Phonegap\n"+ "\u001b[32mv0.0.8\n"+ "\u001b[33m-----------------------------------------\n"+ "\u001b[0m Adds basic support for Cordova/Phonegap \n"+ "\u001b[0m shell communication in iframe \n"+ "\u001b[33m-------------------------------------RaiX\n" }); Package.on_use(function (api) { + api.use('deps','client'); api.use('ejson', 'client'); api.add_files('cordova.client.js', 'client'); api.add_files('cordova.client.notification.js', 'client'); api.export && api.export('Cordova', 'client'); }); Package.on_test(function(api) { api.use('cordova', ['client']); api.use('test-helpers', 'client'); api.use(['tinytest', 'underscore', 'ejson', 'ordered-dict', 'random', 'deps']); api.add_files([ 'plugin/meteor.cordova.js', 'meteor.cordova.tests.js', ], 'client'); });
1
0.033333
1
0
4782c7aeb54d4c3d8278126e87d5517f6ebd32a4
README.md
README.md
[![Build Status](https://img.shields.io/travis/wheniwork/oauth1-intuit.svg)](https://travis-ci.org/wheniwork/oauth1-intuit) [![License](https://img.shields.io/packagist/l/wheniwork/oauth1-intuit.svg)](https://github.com/wheniwork/oauth1-intuit/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/wheniwork/oauth1-intuit.svg)](https://packagist.org/packages/wheniwork/oauth1-intuit) This package provides Intuit OAuth 1.0 support for the PHP League's [OAuth 1.0 Client](https://github.com/thephpleague/oauth1-client). ## Installation To install, use composer: ``` composer require wheniwork/oauth1-intuit ``` ## Usage Usage is the same as The League's OAuth client, using `Wheniwork\OAuth1\Client\Server\Intuit` as the provider. ```php $server = new Wheniwork\OAuth1\Client\Server\Intuit(array( 'identifier' => 'your-identifier', 'secret' => 'your-secret', 'callback_uri' => 'http://your-callback-uri/', )); ```
[![Build Status](https://img.shields.io/travis/wheniwork/oauth1-intuit.svg)](https://travis-ci.org/wheniwork/oauth1-intuit) [![Code Coverage](https://img.shields.io/coveralls/wheniwork/oauth1-intuit.svg)](https://coveralls.io/r/wheniwork/oauth1-intuit) [![Code Quality](https://img.shields.io/scrutinizer/g/wheniwork/oauth1-intuit.svg)](https://scrutinizer-ci.com/g/wheniwork/oauth1-intuit/) [![License](https://img.shields.io/packagist/l/wheniwork/oauth1-intuit.svg)](https://github.com/wheniwork/oauth1-intuit/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/wheniwork/oauth1-intuit.svg)](https://packagist.org/packages/wheniwork/oauth1-intuit) This package provides Intuit OAuth 1.0 support for the PHP League's [OAuth 1.0 Client](https://github.com/thephpleague/oauth1-client). ## Installation To install, use composer: ``` composer require wheniwork/oauth1-intuit ``` ## Usage Usage is the same as The League's OAuth client, using `Wheniwork\OAuth1\Client\Server\Intuit` as the provider. ```php $server = new Wheniwork\OAuth1\Client\Server\Intuit(array( 'identifier' => 'your-identifier', 'secret' => 'your-secret', 'callback_uri' => 'http://your-callback-uri/', )); ```
Add badges for Coveralls and Scrutinizer
Add badges for Coveralls and Scrutinizer
Markdown
mit
wheniwork/oauth1-intuit
markdown
## Code Before: [![Build Status](https://img.shields.io/travis/wheniwork/oauth1-intuit.svg)](https://travis-ci.org/wheniwork/oauth1-intuit) [![License](https://img.shields.io/packagist/l/wheniwork/oauth1-intuit.svg)](https://github.com/wheniwork/oauth1-intuit/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/wheniwork/oauth1-intuit.svg)](https://packagist.org/packages/wheniwork/oauth1-intuit) This package provides Intuit OAuth 1.0 support for the PHP League's [OAuth 1.0 Client](https://github.com/thephpleague/oauth1-client). ## Installation To install, use composer: ``` composer require wheniwork/oauth1-intuit ``` ## Usage Usage is the same as The League's OAuth client, using `Wheniwork\OAuth1\Client\Server\Intuit` as the provider. ```php $server = new Wheniwork\OAuth1\Client\Server\Intuit(array( 'identifier' => 'your-identifier', 'secret' => 'your-secret', 'callback_uri' => 'http://your-callback-uri/', )); ``` ## Instruction: Add badges for Coveralls and Scrutinizer ## Code After: [![Build Status](https://img.shields.io/travis/wheniwork/oauth1-intuit.svg)](https://travis-ci.org/wheniwork/oauth1-intuit) [![Code Coverage](https://img.shields.io/coveralls/wheniwork/oauth1-intuit.svg)](https://coveralls.io/r/wheniwork/oauth1-intuit) [![Code Quality](https://img.shields.io/scrutinizer/g/wheniwork/oauth1-intuit.svg)](https://scrutinizer-ci.com/g/wheniwork/oauth1-intuit/) [![License](https://img.shields.io/packagist/l/wheniwork/oauth1-intuit.svg)](https://github.com/wheniwork/oauth1-intuit/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/wheniwork/oauth1-intuit.svg)](https://packagist.org/packages/wheniwork/oauth1-intuit) This package provides Intuit OAuth 1.0 support for the PHP League's [OAuth 1.0 Client](https://github.com/thephpleague/oauth1-client). ## Installation To install, use composer: ``` composer require wheniwork/oauth1-intuit ``` ## Usage Usage is the same as The League's OAuth client, using `Wheniwork\OAuth1\Client\Server\Intuit` as the provider. ```php $server = new Wheniwork\OAuth1\Client\Server\Intuit(array( 'identifier' => 'your-identifier', 'secret' => 'your-secret', 'callback_uri' => 'http://your-callback-uri/', )); ```
[![Build Status](https://img.shields.io/travis/wheniwork/oauth1-intuit.svg)](https://travis-ci.org/wheniwork/oauth1-intuit) + [![Code Coverage](https://img.shields.io/coveralls/wheniwork/oauth1-intuit.svg)](https://coveralls.io/r/wheniwork/oauth1-intuit) + [![Code Quality](https://img.shields.io/scrutinizer/g/wheniwork/oauth1-intuit.svg)](https://scrutinizer-ci.com/g/wheniwork/oauth1-intuit/) [![License](https://img.shields.io/packagist/l/wheniwork/oauth1-intuit.svg)](https://github.com/wheniwork/oauth1-intuit/blob/master/LICENSE) [![Latest Stable Version](https://img.shields.io/packagist/v/wheniwork/oauth1-intuit.svg)](https://packagist.org/packages/wheniwork/oauth1-intuit) This package provides Intuit OAuth 1.0 support for the PHP League's [OAuth 1.0 Client](https://github.com/thephpleague/oauth1-client). ## Installation To install, use composer: ``` composer require wheniwork/oauth1-intuit ``` ## Usage Usage is the same as The League's OAuth client, using `Wheniwork\OAuth1\Client\Server\Intuit` as the provider. ```php $server = new Wheniwork\OAuth1\Client\Server\Intuit(array( 'identifier' => 'your-identifier', 'secret' => 'your-secret', 'callback_uri' => 'http://your-callback-uri/', )); ```
2
0.076923
2
0
96962b19518186b55c41a19d1cfdaae23eb899e3
eduid_signup_amp/__init__.py
eduid_signup_amp/__init__.py
from eduid_am.exceptions import UserDoesNotExist def attribute_fetcher(db, user_id): attributes = {} user = db.registered.find_one({'_id': user_id}) if user is None: raise UserDoesNotExist(user_id) else: # white list of valid attributes for security reasons for attr in ('email', 'date', 'verified'): value = user.get(attr, None) if value is not None: attributes[attr] = value return attributes
from eduid_am.exceptions import UserDoesNotExist def attribute_fetcher(db, user_id): attributes = {} user = db.registered.find_one({'_id': user_id}) if user is None: raise UserDoesNotExist("No user matching _id='%s'" % user_id) else: # white list of valid attributes for security reasons for attr in ('email', 'date', 'verified'): value = user.get(attr, None) if value is not None: attributes[attr] = value return attributes
Change to sync with latest changes in eduid_am related to Exceptions
Change to sync with latest changes in eduid_am related to Exceptions
Python
bsd-3-clause
SUNET/eduid-signup-amp
python
## Code Before: from eduid_am.exceptions import UserDoesNotExist def attribute_fetcher(db, user_id): attributes = {} user = db.registered.find_one({'_id': user_id}) if user is None: raise UserDoesNotExist(user_id) else: # white list of valid attributes for security reasons for attr in ('email', 'date', 'verified'): value = user.get(attr, None) if value is not None: attributes[attr] = value return attributes ## Instruction: Change to sync with latest changes in eduid_am related to Exceptions ## Code After: from eduid_am.exceptions import UserDoesNotExist def attribute_fetcher(db, user_id): attributes = {} user = db.registered.find_one({'_id': user_id}) if user is None: raise UserDoesNotExist("No user matching _id='%s'" % user_id) else: # white list of valid attributes for security reasons for attr in ('email', 'date', 'verified'): value = user.get(attr, None) if value is not None: attributes[attr] = value return attributes
from eduid_am.exceptions import UserDoesNotExist def attribute_fetcher(db, user_id): attributes = {} user = db.registered.find_one({'_id': user_id}) if user is None: - raise UserDoesNotExist(user_id) + raise UserDoesNotExist("No user matching _id='%s'" % user_id) else: # white list of valid attributes for security reasons for attr in ('email', 'date', 'verified'): value = user.get(attr, None) if value is not None: attributes[attr] = value return attributes
2
0.111111
1
1
31bc61791b4e14ca388aff414ee4a359e3341db7
app.json
app.json
{ "name":"Heroku Buildpack Ruby", "description":"The buildpack for Ruby", "environments": { "test": { "env": { "HATCHET_RETRIES": "3", "IS_RUNNING_ON_CI": "true", "HATCHET_APP_LIMIT": "80", "BUILDPACK_LOG_FILE": "tmp/buildpack.log" }, "formation": { "test": { "size": "performance-m", "quantity": 16 } }, "scripts": { "test-setup": "bundle exec rake hatchet:setup_ci", "test": "HATCHET_BUILDPACK_BRANCH=$HEROKU_TEST_RUN_BRANCH bundle exec rake knapsack:rspec" }, "buildpacks": [ { "url": "heroku/ruby" } ] } } }
{ "name":"Heroku Buildpack Ruby", "description":"The buildpack for Ruby", "environments": { "test": { "env": { "HATCHET_RETRIES": "3", "IS_RUNNING_ON_CI": "true", "HATCHET_APP_LIMIT": "80", "BUILDPACK_LOG_FILE": "tmp/buildpack.log" }, "formation": { "test": { "size": "performance-m", "quantity": 16 } }, "scripts": { "test-setup": "bundle exec rake hatchet:setup_ci", "test": "HATCHET_BUILDPACK_BRANCH=$HEROKU_TEST_RUN_BRANCH bundle exec rake knapsack:rspec" }, "buildpacks": [ { "url": "https://github.com/schneems/heroku-buildpack-git" }, { "url": "https://github.com/heroku/heroku-buildpack-cli.git" }, { "url": "heroku/ruby" } ] } } }
Install Git and heroku cli
Install Git and heroku cli
JSON
mit
instacart/heroku-buildpack-ruby,brightbytes/heroku-buildpack-ruby-without-assets-precompile,andycroll/heroku-buildpack-jekyll,pilotcreative/heroku-buildpack-ruby,orenyk/heroku-buildpack-ruby,pilotcreative/heroku-buildpack-ruby,mattmanning/heroku-buildpack-ruby-jekyll,Scalingo/ruby-buildpack,andycroll/heroku-buildpack-jekyll,orenyk/heroku-buildpack-ruby,zunda/heroku-buildpack-ruby,instacart/heroku-buildpack-ruby,Genius/heroku-buildpack-ruby,mattmanning/heroku-buildpack-ruby-jekyll,Scalingo/ruby-buildpack,heroku/heroku-buildpack-ruby,makifund/heroku-buildpack-ruby,heroku/heroku-buildpack-ruby,brightbytes/heroku-buildpack-ruby-without-assets-precompile,ericboehs/heroku-buildpack-ruby,Genius/heroku-buildpack-ruby,zunda/heroku-buildpack-ruby,ericboehs/heroku-buildpack-ruby,makifund/heroku-buildpack-ruby
json
## Code Before: { "name":"Heroku Buildpack Ruby", "description":"The buildpack for Ruby", "environments": { "test": { "env": { "HATCHET_RETRIES": "3", "IS_RUNNING_ON_CI": "true", "HATCHET_APP_LIMIT": "80", "BUILDPACK_LOG_FILE": "tmp/buildpack.log" }, "formation": { "test": { "size": "performance-m", "quantity": 16 } }, "scripts": { "test-setup": "bundle exec rake hatchet:setup_ci", "test": "HATCHET_BUILDPACK_BRANCH=$HEROKU_TEST_RUN_BRANCH bundle exec rake knapsack:rspec" }, "buildpacks": [ { "url": "heroku/ruby" } ] } } } ## Instruction: Install Git and heroku cli ## Code After: { "name":"Heroku Buildpack Ruby", "description":"The buildpack for Ruby", "environments": { "test": { "env": { "HATCHET_RETRIES": "3", "IS_RUNNING_ON_CI": "true", "HATCHET_APP_LIMIT": "80", "BUILDPACK_LOG_FILE": "tmp/buildpack.log" }, "formation": { "test": { "size": "performance-m", "quantity": 16 } }, "scripts": { "test-setup": "bundle exec rake hatchet:setup_ci", "test": "HATCHET_BUILDPACK_BRANCH=$HEROKU_TEST_RUN_BRANCH bundle exec rake knapsack:rspec" }, "buildpacks": [ { "url": "https://github.com/schneems/heroku-buildpack-git" }, { "url": "https://github.com/heroku/heroku-buildpack-cli.git" }, { "url": "heroku/ruby" } ] } } }
{ "name":"Heroku Buildpack Ruby", "description":"The buildpack for Ruby", "environments": { "test": { "env": { "HATCHET_RETRIES": "3", "IS_RUNNING_ON_CI": "true", "HATCHET_APP_LIMIT": "80", "BUILDPACK_LOG_FILE": "tmp/buildpack.log" }, "formation": { "test": { "size": "performance-m", "quantity": 16 } }, "scripts": { "test-setup": "bundle exec rake hatchet:setup_ci", "test": "HATCHET_BUILDPACK_BRANCH=$HEROKU_TEST_RUN_BRANCH bundle exec rake knapsack:rspec" }, "buildpacks": [ + { "url": "https://github.com/schneems/heroku-buildpack-git" }, + { "url": "https://github.com/heroku/heroku-buildpack-cli.git" }, { "url": "heroku/ruby" } ] } } }
2
0.074074
2
0
bd0053d9ef7b5cc3cdd3feec8c32e99fbb48fc11
templates/index_competitionseason.html
templates/index_competitionseason.html
{% extends "base.html" %} {% block title %}The Blue Alliance{% endblock %} {% block content %} <div class="container"> <div class="row"> <div class="col-xs-4"> {% include "index_lhc.html" %} </div> <div class="col-xs-8"> <h2>This Week's Events</h2> {% with events as events %} {% include "event_partials/event_table.html" %} {% endwith %} <div> <a class="btn" href="/webcasts"><span class="glyphicon glyphicon-info-sign"></span> Add Webcasts</a> <a class="btn" href="/contact"><span class="glyphicon glyphicon-upload"></span> Add YouTube Videos</a> </div> </div> </div> </div> {% endblock %}
{% extends "base.html" %} {% block title %}The Blue Alliance{% endblock %} {% block content %} <div class="container"> <div class="row"> <div class="col-xs-4"> {% include "index_lhc.html" %} </div> <div class="col-xs-8"> <h2>This Week's Events</h2> {% with events as events %} {% include "event_partials/event_table.html" %} {% endwith %} <div> <a class="btn btn-default" href="/webcasts"><span class="glyphicon glyphicon-info-sign"></span> Add Webcasts</a> <a class="btn btn-default" href="/contact"><span class="glyphicon glyphicon-upload"></span> Add YouTube Videos</a> </div> </div> </div> </div> {% endblock %}
Fix buttons on landing page
Fix buttons on landing page
HTML
mit
the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-alliance,verycumbersome/the-blue-alliance,bdaroz/the-blue-alliance,nwalters512/the-blue-alliance,nwalters512/the-blue-alliance,synth3tk/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,fangeugene/the-blue-alliance,synth3tk/the-blue-alliance,phil-lopreiato/the-blue-alliance,jaredhasenklein/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-alliance,fangeugene/the-blue-alliance,tsteward/the-blue-alliance,verycumbersome/the-blue-alliance,nwalters512/the-blue-alliance,tsteward/the-blue-alliance,jaredhasenklein/the-blue-alliance,1fish2/the-blue-alliance,synth3tk/the-blue-alliance,josephbisch/the-blue-alliance,1fish2/the-blue-alliance,verycumbersome/the-blue-alliance,fangeugene/the-blue-alliance,the-blue-alliance/the-blue-alliance,nwalters512/the-blue-alliance,phil-lopreiato/the-blue-alliance,fangeugene/the-blue-alliance,bdaroz/the-blue-alliance,1fish2/the-blue-alliance,josephbisch/the-blue-alliance,bdaroz/the-blue-alliance,fangeugene/the-blue-alliance,tsteward/the-blue-alliance,josephbisch/the-blue-alliance,tsteward/the-blue-alliance,phil-lopreiato/the-blue-alliance,synth3tk/the-blue-alliance,nwalters512/the-blue-alliance,fangeugene/the-blue-alliance,bvisness/the-blue-alliance,1fish2/the-blue-alliance,bvisness/the-blue-alliance,jaredhasenklein/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,tsteward/the-blue-alliance,the-blue-alliance/the-blue-alliance,bvisness/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance,verycumbersome/the-blue-alliance,jaredhasenklein/the-blue-alliance,synth3tk/the-blue-alliance,bdaroz/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,bvisness/the-blue-alliance,josephbisch/the-blue-alliance,verycumbersome/the-blue-alliance,bvisness/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,josephbisch/the-blue-alliance,phil-lopreiato/the-blue-alliance,bvisness/the-blue-alliance,1fish2/the-blue-alliance,josephbisch/the-blue-alliance,1fish2/the-blue-alliance
html
## Code Before: {% extends "base.html" %} {% block title %}The Blue Alliance{% endblock %} {% block content %} <div class="container"> <div class="row"> <div class="col-xs-4"> {% include "index_lhc.html" %} </div> <div class="col-xs-8"> <h2>This Week's Events</h2> {% with events as events %} {% include "event_partials/event_table.html" %} {% endwith %} <div> <a class="btn" href="/webcasts"><span class="glyphicon glyphicon-info-sign"></span> Add Webcasts</a> <a class="btn" href="/contact"><span class="glyphicon glyphicon-upload"></span> Add YouTube Videos</a> </div> </div> </div> </div> {% endblock %} ## Instruction: Fix buttons on landing page ## Code After: {% extends "base.html" %} {% block title %}The Blue Alliance{% endblock %} {% block content %} <div class="container"> <div class="row"> <div class="col-xs-4"> {% include "index_lhc.html" %} </div> <div class="col-xs-8"> <h2>This Week's Events</h2> {% with events as events %} {% include "event_partials/event_table.html" %} {% endwith %} <div> <a class="btn btn-default" href="/webcasts"><span class="glyphicon glyphicon-info-sign"></span> Add Webcasts</a> <a class="btn btn-default" href="/contact"><span class="glyphicon glyphicon-upload"></span> Add YouTube Videos</a> </div> </div> </div> </div> {% endblock %}
{% extends "base.html" %} {% block title %}The Blue Alliance{% endblock %} {% block content %} <div class="container"> <div class="row"> <div class="col-xs-4"> {% include "index_lhc.html" %} </div> <div class="col-xs-8"> <h2>This Week's Events</h2> {% with events as events %} {% include "event_partials/event_table.html" %} {% endwith %} <div> - <a class="btn" href="/webcasts"><span class="glyphicon glyphicon-info-sign"></span> Add Webcasts</a> + <a class="btn btn-default" href="/webcasts"><span class="glyphicon glyphicon-info-sign"></span> Add Webcasts</a> ? ++++++++++++ - <a class="btn" href="/contact"><span class="glyphicon glyphicon-upload"></span> Add YouTube Videos</a> + <a class="btn btn-default" href="/contact"><span class="glyphicon glyphicon-upload"></span> Add YouTube Videos</a> ? ++++++++++++ </div> </div> </div> </div> {% endblock %}
4
0.16
2
2
0ffe8a4e28b7724cae67fc6c7033c5f2f8c7d104
build.json
build.json
{ "source": "src", "spec": "test", "output": { "full": "lib", "partial": { "../vsdoc/amplify-vsdoc.js": "./lib" } }, "anvil.jshint": { "exclude": [ "amplify-vsdoc.js" ], "ignore": [ { "reason": "Expected a conditional expression and instead saw an assignment." }, { "reason": "Value of 'error' may be overwritten in IE." } ], "options": { "globals": { "jQuery": false }, "maxdepth": 5, "maxstatements": 35, "maxcomplexity": 15 } }, "anvil.uglify" : { "all": true }, "anvil.token": { "sourceData": { "hello": "world" } }, "anvil.headers": { "headers": { "amplify.core.*": "core-header.js", "amplify.request.*": "request-header.js", "amplify.store.*": "store-header.js" } }, "dependencies": [ "anvil.jshint", "anvil.uglify" ] }
{ "source": "src", "spec": "test", "output": { "full": "lib", "partial": { "../vsdoc/amplify-vsdoc.js": "./lib" } }, "anvil.jshint": { "exclude": [ "amplify-vsdoc.js" ], "ignore": [ { "reason": "Expected a conditional expression and instead saw an assignment." }, { "reason": "Value of 'error' may be overwritten in IE." }, { "file": "amplify-vsdoc.js", "reason": "Mixed spaces and tabs." } ], "options": { "globals": { "jQuery": false }, "maxdepth": 5, "maxstatements": 35, "maxcomplexity": 15 } }, "anvil.uglify" : { "all": true }, "anvil.token": { "sourceData": { "hello": "world" } }, "anvil.headers": { "headers": { "amplify.core.*": "core-header.js", "amplify.request.*": "request-header.js", "amplify.store.*": "store-header.js" } }, "dependencies": [ "anvil.jshint", "anvil.uglify" ] }
Add ignore for comment tab/space in vsdoc file
Add ignore for comment tab/space in vsdoc file
JSON
mit
mikehostetler/amplify
json
## Code Before: { "source": "src", "spec": "test", "output": { "full": "lib", "partial": { "../vsdoc/amplify-vsdoc.js": "./lib" } }, "anvil.jshint": { "exclude": [ "amplify-vsdoc.js" ], "ignore": [ { "reason": "Expected a conditional expression and instead saw an assignment." }, { "reason": "Value of 'error' may be overwritten in IE." } ], "options": { "globals": { "jQuery": false }, "maxdepth": 5, "maxstatements": 35, "maxcomplexity": 15 } }, "anvil.uglify" : { "all": true }, "anvil.token": { "sourceData": { "hello": "world" } }, "anvil.headers": { "headers": { "amplify.core.*": "core-header.js", "amplify.request.*": "request-header.js", "amplify.store.*": "store-header.js" } }, "dependencies": [ "anvil.jshint", "anvil.uglify" ] } ## Instruction: Add ignore for comment tab/space in vsdoc file ## Code After: { "source": "src", "spec": "test", "output": { "full": "lib", "partial": { "../vsdoc/amplify-vsdoc.js": "./lib" } }, "anvil.jshint": { "exclude": [ "amplify-vsdoc.js" ], "ignore": [ { "reason": "Expected a conditional expression and instead saw an assignment." }, { "reason": "Value of 'error' may be overwritten in IE." }, { "file": "amplify-vsdoc.js", "reason": "Mixed spaces and tabs." } ], "options": { "globals": { "jQuery": false }, "maxdepth": 5, "maxstatements": 35, "maxcomplexity": 15 } }, "anvil.uglify" : { "all": true }, "anvil.token": { "sourceData": { "hello": "world" } }, "anvil.headers": { "headers": { "amplify.core.*": "core-header.js", "amplify.request.*": "request-header.js", "amplify.store.*": "store-header.js" } }, "dependencies": [ "anvil.jshint", "anvil.uglify" ] }
{ "source": "src", "spec": "test", "output": { "full": "lib", "partial": { "../vsdoc/amplify-vsdoc.js": "./lib" } }, "anvil.jshint": { "exclude": [ "amplify-vsdoc.js" ], "ignore": [ { "reason": "Expected a conditional expression and instead saw an assignment." }, - { "reason": "Value of 'error' may be overwritten in IE." } + { "reason": "Value of 'error' may be overwritten in IE." }, ? + + { "file": "amplify-vsdoc.js", "reason": "Mixed spaces and tabs." } ], "options": { "globals": { "jQuery": false }, "maxdepth": 5, "maxstatements": 35, "maxcomplexity": 15 } }, "anvil.uglify" : { "all": true }, "anvil.token": { "sourceData": { "hello": "world" } }, "anvil.headers": { "headers": { "amplify.core.*": "core-header.js", "amplify.request.*": "request-header.js", "amplify.store.*": "store-header.js" } }, "dependencies": [ "anvil.jshint", "anvil.uglify" ] }
3
0.073171
2
1
31f07acd0a92f026e19f66d95b9d6fdd3272b20e
Config/LocalizationConfiguration.php
Config/LocalizationConfiguration.php
<?php /* * This file is part of the Panda framework. * * (c) Ioannis Papikas <papikas.ioan@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Panda\Localization\Config; use Panda\Config\SharedConfiguration; /** * Class LocalizationConfiguration * @package Panda\Localization\Config */ class LocalizationConfiguration extends SharedConfiguration { /** * @param string $basePath * * @return string */ public function getTranslationsPath($basePath = null) { return $basePath . DIRECTORY_SEPARATOR . $this->get('localization.base_dir'); } }
<?php /* * This file is part of the Panda Localization Package. * * (c) Ioannis Papikas <papikas.ioan@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Panda\Localization\Config; use Panda\Config\SharedConfiguration; /** * Class LocalizationConfiguration * @package Panda\Localization\Config */ class LocalizationConfiguration extends SharedConfiguration { /** * @param string $basePath * * @return string */ public function getTranslationsPath($basePath = null) { return $basePath . DIRECTORY_SEPARATOR . $this->get('localization.base_dir'); } }
Fix class signature in Config
[Localization] Fix class signature in Config
PHP
mit
PandaPlatform/panda-l10n
php
## Code Before: <?php /* * This file is part of the Panda framework. * * (c) Ioannis Papikas <papikas.ioan@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Panda\Localization\Config; use Panda\Config\SharedConfiguration; /** * Class LocalizationConfiguration * @package Panda\Localization\Config */ class LocalizationConfiguration extends SharedConfiguration { /** * @param string $basePath * * @return string */ public function getTranslationsPath($basePath = null) { return $basePath . DIRECTORY_SEPARATOR . $this->get('localization.base_dir'); } } ## Instruction: [Localization] Fix class signature in Config ## Code After: <?php /* * This file is part of the Panda Localization Package. * * (c) Ioannis Papikas <papikas.ioan@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Panda\Localization\Config; use Panda\Config\SharedConfiguration; /** * Class LocalizationConfiguration * @package Panda\Localization\Config */ class LocalizationConfiguration extends SharedConfiguration { /** * @param string $basePath * * @return string */ public function getTranslationsPath($basePath = null) { return $basePath . DIRECTORY_SEPARATOR . $this->get('localization.base_dir'); } }
<?php /* - * This file is part of the Panda framework. + * This file is part of the Panda Localization Package. * * (c) Ioannis Papikas <papikas.ioan@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Panda\Localization\Config; use Panda\Config\SharedConfiguration; /** * Class LocalizationConfiguration * @package Panda\Localization\Config */ class LocalizationConfiguration extends SharedConfiguration { /** * @param string $basePath * * @return string */ public function getTranslationsPath($basePath = null) { return $basePath . DIRECTORY_SEPARATOR . $this->get('localization.base_dir'); } }
2
0.064516
1
1
90ef58c5a31967bf1e172f792bdbff3fba9e7f4a
src/_assets/scripts/components/app/reddit.posts.js
src/_assets/scripts/components/app/reddit.posts.js
import React from 'react'; import { BaseViewComponent } from '../higher-order/index.js'; class RedditPosts extends BaseViewComponent { constructor(props) { super(props); } render() { return ( <div className="posts"> <div className="posts-fetch"> <p onClick={this.props.fetchPosts}>Fetch posts</p> </div> <div className="posts-list"> {this.props.posts.map(function renderPosts(post) { return ( <div key={post.id} className="posts"> <p>{post.title}</p> </div> ); })} </div> </div> ); } } RedditPosts.propTypes = { posts: React.PropTypes.array.isRequired, fetchPosts: React.PropTypes.func.isRequired }; export default RedditPosts;
import React from 'react'; import { Avatar, List, ListItem } from 'material-ui'; import { BaseViewComponent } from '../higher-order/index.js'; class RedditPosts extends BaseViewComponent { constructor(props) { super(props); } render() { return ( <div className="posts"> <div className="posts-fetch"> <p onClick={this.props.fetchPosts}>Fetch posts</p> </div> <div className="posts-list"> <List> {this.props.posts.map(function renderPosts(post) { let avatar = (<Avatar src={post.thumbnail} />); return ( <ListItem leftAvatar={avatar}> <div key={post.id} className="posts"> {post.title} </div> </ListItem> ); })} </List> </div> </div> ); } } RedditPosts.propTypes = { posts: React.PropTypes.array.isRequired, fetchPosts: React.PropTypes.func.isRequired }; export default RedditPosts;
Make songs-list a list of list-items
Make songs-list a list of list-items
JavaScript
mit
yanglinz/reddio,yanglinz/reddio
javascript
## Code Before: import React from 'react'; import { BaseViewComponent } from '../higher-order/index.js'; class RedditPosts extends BaseViewComponent { constructor(props) { super(props); } render() { return ( <div className="posts"> <div className="posts-fetch"> <p onClick={this.props.fetchPosts}>Fetch posts</p> </div> <div className="posts-list"> {this.props.posts.map(function renderPosts(post) { return ( <div key={post.id} className="posts"> <p>{post.title}</p> </div> ); })} </div> </div> ); } } RedditPosts.propTypes = { posts: React.PropTypes.array.isRequired, fetchPosts: React.PropTypes.func.isRequired }; export default RedditPosts; ## Instruction: Make songs-list a list of list-items ## Code After: import React from 'react'; import { Avatar, List, ListItem } from 'material-ui'; import { BaseViewComponent } from '../higher-order/index.js'; class RedditPosts extends BaseViewComponent { constructor(props) { super(props); } render() { return ( <div className="posts"> <div className="posts-fetch"> <p onClick={this.props.fetchPosts}>Fetch posts</p> </div> <div className="posts-list"> <List> {this.props.posts.map(function renderPosts(post) { let avatar = (<Avatar src={post.thumbnail} />); return ( <ListItem leftAvatar={avatar}> <div key={post.id} className="posts"> {post.title} </div> </ListItem> ); })} </List> </div> </div> ); } } RedditPosts.propTypes = { posts: React.PropTypes.array.isRequired, fetchPosts: React.PropTypes.func.isRequired }; export default RedditPosts;
import React from 'react'; + import { Avatar, List, ListItem } from 'material-ui'; import { BaseViewComponent } from '../higher-order/index.js'; class RedditPosts extends BaseViewComponent { constructor(props) { super(props); } render() { return ( <div className="posts"> <div className="posts-fetch"> <p onClick={this.props.fetchPosts}>Fetch posts</p> </div> <div className="posts-list"> + <List> {this.props.posts.map(function renderPosts(post) { + let avatar = (<Avatar src={post.thumbnail} />); return ( + <ListItem leftAvatar={avatar}> - <div key={post.id} className="posts"> + <div key={post.id} className="posts"> ? ++ - <p>{post.title}</p> ? ^^^ ---- + {post.title} ? ^^ - </div> + </div> ? ++ + </ListItem> ); })} + </List> </div> </div> ); } } RedditPosts.propTypes = { posts: React.PropTypes.array.isRequired, fetchPosts: React.PropTypes.func.isRequired }; export default RedditPosts;
12
0.333333
9
3
00477e772ca92bc64f9260608e9341d6eb24c4bf
jenkins/jobs/Bazel-Install.bat.tpl
jenkins/jobs/Bazel-Install.bat.tpl
@echo on mkdir c:\bazel_ci\installs copy "bazel-installer\JAVA_VERSION=1.8,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk8.exe copy "bazel-installer\JAVA_VERSION=1.7,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk7.exe
@echo on mkdir c:\bazel_ci\installs copy "bazel-installer\JAVA_VERSION=1.8,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk8.exe
Stop installing JDK7 version of Bazel for Windows
Stop installing JDK7 version of Bazel for Windows Change-Id: I9d218ffa6fa765816bcd6a37241b4590739e51f0
Smarty
apache-2.0
bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration,bazelbuild/continuous-integration
smarty
## Code Before: @echo on mkdir c:\bazel_ci\installs copy "bazel-installer\JAVA_VERSION=1.8,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk8.exe copy "bazel-installer\JAVA_VERSION=1.7,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk7.exe ## Instruction: Stop installing JDK7 version of Bazel for Windows Change-Id: I9d218ffa6fa765816bcd6a37241b4590739e51f0 ## Code After: @echo on mkdir c:\bazel_ci\installs copy "bazel-installer\JAVA_VERSION=1.8,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk8.exe
@echo on mkdir c:\bazel_ci\installs copy "bazel-installer\JAVA_VERSION=1.8,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk8.exe - copy "bazel-installer\JAVA_VERSION=1.7,PLATFORM_NAME=windows-x86_64\output\ci\bazel*.exe" c:\bazel_ci\installs\bazel-jdk7.exe
1
0.166667
0
1
c59ee270ad969ae60d34867583def088560f4bfb
app/views/taxons/show.html.erb
app/views/taxons/show.html.erb
<% content_for :title, taxon.title %> <% content_for :page_class, "taxon-page" %> <%= render partial: 'page_header', locals: { taxon: taxon, parent_taxon: taxon.parent_taxon } %> <% if taxon.has_grandchildren? %> <%= render partial: 'child_taxons_grid', locals: { child_taxons: taxon.child_taxons } %> <%= render partial: 'taxon_tagged_content', locals: { taxon: taxon, tagged_content: taxon.tagged_content } %> <% else %> <%= render partial: 'child_taxons_list', locals: { taxon: taxon, child_taxons: taxon.child_taxons, tagged_content: taxon.tagged_content } %> <% end %>
<% content_for :title, taxon.title %> <% content_for :page_class, "taxon-page" %> <%= render partial: 'page_header', locals: { taxon: taxon, parent_taxon: taxon.parent_taxon } %> <% content_for :breadcrumbs do %> <%= render partial: 'govuk_component/breadcrumbs', locals: @navigation_helpers.taxon_breadcrumbs %> <% end %> <% if taxon.has_grandchildren? %> <%= render partial: 'child_taxons_grid', locals: { child_taxons: taxon.child_taxons } %> <%= render partial: 'taxon_tagged_content', locals: { taxon: taxon, tagged_content: taxon.tagged_content } %> <% else %> <%= render partial: 'child_taxons_list', locals: { taxon: taxon, child_taxons: taxon.child_taxons, tagged_content: taxon.tagged_content } %> <% end %>
Fix the taxonomy breadcrumbs for taxon pages
Fix the taxonomy breadcrumbs for taxon pages The taxonomy breadcrumbs use a different method from the navigation helpers and therefore can't rely on the default breadcrumb data. This commit re-adds the taxonomy breadcrumbs.
HTML+ERB
mit
alphagov/collections,alphagov/collections,alphagov/collections,alphagov/collections
html+erb
## Code Before: <% content_for :title, taxon.title %> <% content_for :page_class, "taxon-page" %> <%= render partial: 'page_header', locals: { taxon: taxon, parent_taxon: taxon.parent_taxon } %> <% if taxon.has_grandchildren? %> <%= render partial: 'child_taxons_grid', locals: { child_taxons: taxon.child_taxons } %> <%= render partial: 'taxon_tagged_content', locals: { taxon: taxon, tagged_content: taxon.tagged_content } %> <% else %> <%= render partial: 'child_taxons_list', locals: { taxon: taxon, child_taxons: taxon.child_taxons, tagged_content: taxon.tagged_content } %> <% end %> ## Instruction: Fix the taxonomy breadcrumbs for taxon pages The taxonomy breadcrumbs use a different method from the navigation helpers and therefore can't rely on the default breadcrumb data. This commit re-adds the taxonomy breadcrumbs. ## Code After: <% content_for :title, taxon.title %> <% content_for :page_class, "taxon-page" %> <%= render partial: 'page_header', locals: { taxon: taxon, parent_taxon: taxon.parent_taxon } %> <% content_for :breadcrumbs do %> <%= render partial: 'govuk_component/breadcrumbs', locals: @navigation_helpers.taxon_breadcrumbs %> <% end %> <% if taxon.has_grandchildren? %> <%= render partial: 'child_taxons_grid', locals: { child_taxons: taxon.child_taxons } %> <%= render partial: 'taxon_tagged_content', locals: { taxon: taxon, tagged_content: taxon.tagged_content } %> <% else %> <%= render partial: 'child_taxons_list', locals: { taxon: taxon, child_taxons: taxon.child_taxons, tagged_content: taxon.tagged_content } %> <% end %>
<% content_for :title, taxon.title %> <% content_for :page_class, "taxon-page" %> <%= render partial: 'page_header', locals: { taxon: taxon, parent_taxon: taxon.parent_taxon } %> + + <% content_for :breadcrumbs do %> + <%= render partial: 'govuk_component/breadcrumbs', + locals: @navigation_helpers.taxon_breadcrumbs %> + <% end %> <% if taxon.has_grandchildren? %> <%= render partial: 'child_taxons_grid', locals: { child_taxons: taxon.child_taxons } %> <%= render partial: 'taxon_tagged_content', locals: { taxon: taxon, tagged_content: taxon.tagged_content } %> <% else %> <%= render partial: 'child_taxons_list', locals: { taxon: taxon, child_taxons: taxon.child_taxons, tagged_content: taxon.tagged_content } %> <% end %>
5
0.217391
5
0
000763a3490665c7b8019518645510f448922c3c
copycopter_client.gemspec
copycopter_client.gemspec
include_files = ["README*", "MIT-LICENSE", "Rakefile", "init.rb", "AddTrustExternalCARoot", "{lib,tasks,spec,features,rails}/**/*"].map do |glob| Dir[glob] end.flatten $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') require 'copycopter_client/version' Gem::Specification.new do |s| s.name = "copycopter_client" s.version = CopycopterClient::VERSION s.authors = ["thoughtbot"] s.date = "2010-06-04" s.email = "support@thoughtbot.com" s.files = include_files s.homepage = "http://github.com/thoughtbot/copycopter_client" s.require_path = "lib" s.rubyforge_project = "copycopter_client" s.rubygems_version = "1.3.5" s.summary = "Client for the Copycopter content management service" s.add_dependency 'i18n', '~> 0.5.0' s.add_dependency 'json' end
include_files = ["README*", "MIT-LICENSE", "Rakefile", "init.rb", "AddTrustExternalCARoot", "{lib,tasks,spec,features,rails}/**/*"].map do |glob| Dir[glob] end.flatten $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') require 'copycopter_client/version' Gem::Specification.new do |s| s.name = "copycopter_client" s.version = CopycopterClient::VERSION s.authors = ["thoughtbot"] s.email = "support@thoughtbot.com" s.files = include_files s.homepage = "http://github.com/thoughtbot/copycopter_client" s.require_path = "lib" s.rubyforge_project = "copycopter_client" s.rubygems_version = "1.3.5" s.summary = "Client for the Copycopter content management service" s.add_dependency 'i18n', '~> 0.5.0' s.add_dependency 'json' end
Remove gemspec date so that it gets updated
Remove gemspec date so that it gets updated
Ruby
mit
copycopter/copycopter-ruby-client,crowdtap/copycopter_client,timehop/copycopter-ruby-client
ruby
## Code Before: include_files = ["README*", "MIT-LICENSE", "Rakefile", "init.rb", "AddTrustExternalCARoot", "{lib,tasks,spec,features,rails}/**/*"].map do |glob| Dir[glob] end.flatten $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') require 'copycopter_client/version' Gem::Specification.new do |s| s.name = "copycopter_client" s.version = CopycopterClient::VERSION s.authors = ["thoughtbot"] s.date = "2010-06-04" s.email = "support@thoughtbot.com" s.files = include_files s.homepage = "http://github.com/thoughtbot/copycopter_client" s.require_path = "lib" s.rubyforge_project = "copycopter_client" s.rubygems_version = "1.3.5" s.summary = "Client for the Copycopter content management service" s.add_dependency 'i18n', '~> 0.5.0' s.add_dependency 'json' end ## Instruction: Remove gemspec date so that it gets updated ## Code After: include_files = ["README*", "MIT-LICENSE", "Rakefile", "init.rb", "AddTrustExternalCARoot", "{lib,tasks,spec,features,rails}/**/*"].map do |glob| Dir[glob] end.flatten $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') require 'copycopter_client/version' Gem::Specification.new do |s| s.name = "copycopter_client" s.version = CopycopterClient::VERSION s.authors = ["thoughtbot"] s.email = "support@thoughtbot.com" s.files = include_files s.homepage = "http://github.com/thoughtbot/copycopter_client" s.require_path = "lib" s.rubyforge_project = "copycopter_client" s.rubygems_version = "1.3.5" s.summary = "Client for the Copycopter content management service" s.add_dependency 'i18n', '~> 0.5.0' s.add_dependency 'json' end
include_files = ["README*", "MIT-LICENSE", "Rakefile", "init.rb", "AddTrustExternalCARoot", "{lib,tasks,spec,features,rails}/**/*"].map do |glob| Dir[glob] end.flatten $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') require 'copycopter_client/version' Gem::Specification.new do |s| s.name = "copycopter_client" s.version = CopycopterClient::VERSION s.authors = ["thoughtbot"] - s.date = "2010-06-04" s.email = "support@thoughtbot.com" s.files = include_files s.homepage = "http://github.com/thoughtbot/copycopter_client" s.require_path = "lib" s.rubyforge_project = "copycopter_client" s.rubygems_version = "1.3.5" s.summary = "Client for the Copycopter content management service" s.add_dependency 'i18n', '~> 0.5.0' s.add_dependency 'json' end
1
0.041667
0
1
14c649331b5ec886fd283adb545e84ef6db62bd3
pkg/geoipupdate/retry/retry.go
pkg/geoipupdate/retry/retry.go
package retry import ( "net/http" "time" "github.com/cenkalti/backoff/v4" "github.com/pkg/errors" ) // MaybeRetryRequest is an internal implementation detail of this module. It // shouldn't be used by users of the geoipupdate Go library. You can use the // RetryFor field of geoipupdate.Config if you'd like to retry failed requests // when using the library directly. func MaybeRetryRequest(c *http.Client, retryFor time.Duration, req *http.Request) (*http.Response, error) { exp := backoff.NewExponentialBackOff() exp.MaxElapsedTime = retryFor var resp *http.Response err := backoff.Retry( func() error { var err error resp, err = c.Do(req) return errors.Wrap(err, "error performing http request") }, exp, ) return resp, err }
package retry import ( "net/http" "time" "github.com/cenkalti/backoff/v4" "github.com/pkg/errors" ) // MaybeRetryRequest is an internal implementation detail of this module. It // shouldn't be used by users of the geoipupdate Go library. You can use the // RetryFor field of geoipupdate.Config if you'd like to retry failed requests // when using the library directly. func MaybeRetryRequest(c *http.Client, retryFor time.Duration, req *http.Request) (*http.Response, error) { if retryFor < 0 { return nil, errors.New("negative retry duration") } exp := backoff.NewExponentialBackOff() exp.MaxElapsedTime = retryFor var resp *http.Response err := backoff.Retry( func() error { var err error resp, err = c.Do(req) return errors.Wrap(err, "error performing http request") }, exp, ) return resp, err }
Raise errors on incorrect library usage
Raise errors on incorrect library usage
Go
apache-2.0
maxmind/geoipupdate,maxmind/geoipupdate,maxmind/geoipupdate
go
## Code Before: package retry import ( "net/http" "time" "github.com/cenkalti/backoff/v4" "github.com/pkg/errors" ) // MaybeRetryRequest is an internal implementation detail of this module. It // shouldn't be used by users of the geoipupdate Go library. You can use the // RetryFor field of geoipupdate.Config if you'd like to retry failed requests // when using the library directly. func MaybeRetryRequest(c *http.Client, retryFor time.Duration, req *http.Request) (*http.Response, error) { exp := backoff.NewExponentialBackOff() exp.MaxElapsedTime = retryFor var resp *http.Response err := backoff.Retry( func() error { var err error resp, err = c.Do(req) return errors.Wrap(err, "error performing http request") }, exp, ) return resp, err } ## Instruction: Raise errors on incorrect library usage ## Code After: package retry import ( "net/http" "time" "github.com/cenkalti/backoff/v4" "github.com/pkg/errors" ) // MaybeRetryRequest is an internal implementation detail of this module. It // shouldn't be used by users of the geoipupdate Go library. You can use the // RetryFor field of geoipupdate.Config if you'd like to retry failed requests // when using the library directly. func MaybeRetryRequest(c *http.Client, retryFor time.Duration, req *http.Request) (*http.Response, error) { if retryFor < 0 { return nil, errors.New("negative retry duration") } exp := backoff.NewExponentialBackOff() exp.MaxElapsedTime = retryFor var resp *http.Response err := backoff.Retry( func() error { var err error resp, err = c.Do(req) return errors.Wrap(err, "error performing http request") }, exp, ) return resp, err }
package retry import ( "net/http" "time" "github.com/cenkalti/backoff/v4" "github.com/pkg/errors" ) // MaybeRetryRequest is an internal implementation detail of this module. It // shouldn't be used by users of the geoipupdate Go library. You can use the // RetryFor field of geoipupdate.Config if you'd like to retry failed requests // when using the library directly. func MaybeRetryRequest(c *http.Client, retryFor time.Duration, req *http.Request) (*http.Response, error) { + if retryFor < 0 { + return nil, errors.New("negative retry duration") + } exp := backoff.NewExponentialBackOff() exp.MaxElapsedTime = retryFor var resp *http.Response err := backoff.Retry( func() error { var err error resp, err = c.Do(req) return errors.Wrap(err, "error performing http request") }, exp, ) return resp, err }
3
0.107143
3
0
8ed5ceb703bfd032f8f911dee26ec4ca7bdf66d4
src/database.js
src/database.js
const knex = require('knex'); const cfg = require('../config'); const db = knex(cfg.db); module.exports = { async createUser(telegramId) { return db('user') .insert({ telegram_id: telegramId }); }, async linkUser(telegramId, username) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: username }); }, async unlinkUser(telegramId) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: null, json_state: null }); }, async getUser(telegramId) { return db('user') .first() .where({ telegram_id: telegramId }); }, async getUserState(telegramId) { const user = await db('user') .first('json_state') .where({ telegram_id: telegramId }); return user ? JSON.parse(user.json_state) : null; }, async setUserState(telegramId, state) { return db('user') .where({ telegram_id: telegramId }) .update({ json_state: (state ? JSON.stringify(state) : JSON.stringify({})) }); }, };
const knex = require('knex'); const cfg = require('../config'); const db = knex(cfg.db); module.exports = { async createUser(telegramId) { return db('user') .insert({ telegram_id: telegramId }); }, async linkUser(telegramId, username) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: username }); }, async unlinkUser(telegramId) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: null, json_state: null }); }, async getUser(telegramId) { return db('user') .first() .where({ telegram_id: telegramId }); }, async getUserState(telegramId) { const user = await db('user') .first('json_state') .where({ telegram_id: telegramId }); return user ? JSON.parse(user.json_state) : null; }, async setUserState(telegramId, state) { return db('user') .where({ telegram_id: telegramId }) .update({ json_state: (state ? JSON.stringify(state) : null) }); }, };
Set default state back to null
Set default state back to null
JavaScript
mit
majori/piikki-client-tg
javascript
## Code Before: const knex = require('knex'); const cfg = require('../config'); const db = knex(cfg.db); module.exports = { async createUser(telegramId) { return db('user') .insert({ telegram_id: telegramId }); }, async linkUser(telegramId, username) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: username }); }, async unlinkUser(telegramId) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: null, json_state: null }); }, async getUser(telegramId) { return db('user') .first() .where({ telegram_id: telegramId }); }, async getUserState(telegramId) { const user = await db('user') .first('json_state') .where({ telegram_id: telegramId }); return user ? JSON.parse(user.json_state) : null; }, async setUserState(telegramId, state) { return db('user') .where({ telegram_id: telegramId }) .update({ json_state: (state ? JSON.stringify(state) : JSON.stringify({})) }); }, }; ## Instruction: Set default state back to null ## Code After: const knex = require('knex'); const cfg = require('../config'); const db = knex(cfg.db); module.exports = { async createUser(telegramId) { return db('user') .insert({ telegram_id: telegramId }); }, async linkUser(telegramId, username) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: username }); }, async unlinkUser(telegramId) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: null, json_state: null }); }, async getUser(telegramId) { return db('user') .first() .where({ telegram_id: telegramId }); }, async getUserState(telegramId) { const user = await db('user') .first('json_state') .where({ telegram_id: telegramId }); return user ? JSON.parse(user.json_state) : null; }, async setUserState(telegramId, state) { return db('user') .where({ telegram_id: telegramId }) .update({ json_state: (state ? JSON.stringify(state) : null) }); }, };
const knex = require('knex'); const cfg = require('../config'); const db = knex(cfg.db); module.exports = { async createUser(telegramId) { return db('user') .insert({ telegram_id: telegramId }); }, async linkUser(telegramId, username) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: username }); }, async unlinkUser(telegramId) { return db('user') .where({ telegram_id: telegramId }) .update({ piikki_username: null, json_state: null }); }, async getUser(telegramId) { return db('user') .first() .where({ telegram_id: telegramId }); }, async getUserState(telegramId) { const user = await db('user') .first('json_state') .where({ telegram_id: telegramId }); return user ? JSON.parse(user.json_state) : null; }, async setUserState(telegramId, state) { return db('user') .where({ telegram_id: telegramId }) - .update({ json_state: (state ? JSON.stringify(state) : JSON.stringify({})) }); ? --------- ^^^^^^^^ + .update({ json_state: (state ? JSON.stringify(state) : null) }); ? ^^^ }, };
2
0.046512
1
1
fa0513fe303a0111291d459d3bf275229b1eb052
main.py
main.py
import datetime import argparse from auth import twitter_auth as auth from twitterbot import TwitterBot from apscheduler.schedulers.blocking import BlockingScheduler parser = argparse.ArgumentParser(description='Respond to Twitter mentions.') parser.add_argument('-l', '--listen', nargs='+', default='happy birthday', help='phrase(s) to reply to (separate by space)') parser.add_argument('-r', '--reply', default='HANDLE thanks!', help='reply text (use HANDLE for user handle)') args = parser.parse_args() bot = TwitterBot(auth, args.listen, args.reply.replace('HANDLE', '@{}')) def reply(): print(' Running...') bot.reply_to_mention() print(' Finished running at {}'.format(datetime.datetime.now())) def main(): print('Starting bot...') # run once every minute scheduler = BlockingScheduler() scheduler.add_job(reply, 'interval', minutes=1) scheduler.start() if __name__ == '__main__': main()
import sys import datetime import argparse from auth import twitter_auth as auth from twitterbot import TwitterBot from apscheduler.schedulers.blocking import BlockingScheduler parser = argparse.ArgumentParser(description='Respond to Twitter mentions.') parser.add_argument('-l', '--listen', nargs='+', default=['happy birthday'], help='phrase(s) to reply to (separate by space)') parser.add_argument('-r', '--reply', default='HANDLE thanks!', help='reply text (use HANDLE for user handle)') args = parser.parse_args() bot = TwitterBot(auth, args.listen, args.reply.replace('HANDLE', '@{}')) def reply(): print(' Running...') bot.reply_to_mention() print(' Finished running at {}'.format(datetime.datetime.now())) def main(): print('Starting bot...') # run once every minute scheduler = BlockingScheduler() scheduler.add_job(reply, 'interval', minutes=1) scheduler.start() if __name__ == '__main__': main()
Change default type for listen argument
Change default type for listen argument str->list
Python
mit
kshvmdn/TwitterBirthdayResponder,kshvmdn/twitter-birthday-responder,kshvmdn/twitter-autoreply
python
## Code Before: import datetime import argparse from auth import twitter_auth as auth from twitterbot import TwitterBot from apscheduler.schedulers.blocking import BlockingScheduler parser = argparse.ArgumentParser(description='Respond to Twitter mentions.') parser.add_argument('-l', '--listen', nargs='+', default='happy birthday', help='phrase(s) to reply to (separate by space)') parser.add_argument('-r', '--reply', default='HANDLE thanks!', help='reply text (use HANDLE for user handle)') args = parser.parse_args() bot = TwitterBot(auth, args.listen, args.reply.replace('HANDLE', '@{}')) def reply(): print(' Running...') bot.reply_to_mention() print(' Finished running at {}'.format(datetime.datetime.now())) def main(): print('Starting bot...') # run once every minute scheduler = BlockingScheduler() scheduler.add_job(reply, 'interval', minutes=1) scheduler.start() if __name__ == '__main__': main() ## Instruction: Change default type for listen argument str->list ## Code After: import sys import datetime import argparse from auth import twitter_auth as auth from twitterbot import TwitterBot from apscheduler.schedulers.blocking import BlockingScheduler parser = argparse.ArgumentParser(description='Respond to Twitter mentions.') parser.add_argument('-l', '--listen', nargs='+', default=['happy birthday'], help='phrase(s) to reply to (separate by space)') parser.add_argument('-r', '--reply', default='HANDLE thanks!', help='reply text (use HANDLE for user handle)') args = parser.parse_args() bot = TwitterBot(auth, args.listen, args.reply.replace('HANDLE', '@{}')) def reply(): print(' Running...') bot.reply_to_mention() print(' Finished running at {}'.format(datetime.datetime.now())) def main(): print('Starting bot...') # run once every minute scheduler = BlockingScheduler() scheduler.add_job(reply, 'interval', minutes=1) scheduler.start() if __name__ == '__main__': main()
+ import sys import datetime import argparse from auth import twitter_auth as auth from twitterbot import TwitterBot from apscheduler.schedulers.blocking import BlockingScheduler parser = argparse.ArgumentParser(description='Respond to Twitter mentions.') - parser.add_argument('-l', '--listen', nargs='+', default='happy birthday', + parser.add_argument('-l', '--listen', nargs='+', default=['happy birthday'], ? + + help='phrase(s) to reply to (separate by space)') parser.add_argument('-r', '--reply', default='HANDLE thanks!', help='reply text (use HANDLE for user handle)') args = parser.parse_args() bot = TwitterBot(auth, args.listen, args.reply.replace('HANDLE', '@{}')) def reply(): print(' Running...') bot.reply_to_mention() print(' Finished running at {}'.format(datetime.datetime.now())) def main(): print('Starting bot...') # run once every minute scheduler = BlockingScheduler() scheduler.add_job(reply, 'interval', minutes=1) scheduler.start() if __name__ == '__main__': main()
3
0.090909
2
1
804de8a7cb105e99768435ef3038c97bfd8a67d9
client/components/RecipeContainer.js
client/components/RecipeContainer.js
import React from 'react'; import '../scss/_recipeContainer.scss'; import RecipeEntry from '../../client/components/RecipeEntry.js'; const RecipeContainer = (props) => { let childRecipes; if (!props.recipes || props.recipes.length === 0) { childRecipes = <p>No recipes to show.</p>; } else { childRecipes = props.recipes.map((recipe) => <RecipeEntry recipe={recipe} />); } return ( <div> <h2>{props.type}</h2> <div className="recipe-container"> {childRecipes} </div> </div> ); }; export default RecipeContainer;
import React from 'react'; import '../scss/_recipeContainer.scss'; import RecipeEntry from '../../client/components/RecipeEntry.js'; import RecipeListEntry from '../../client/components/RecipeListEntry.js'; const RecipeContainer = (props) => { let childRecipes; if (!props.recipes || props.recipes.length === 0) { childRecipes = <p>No recipes to show.</p>; } else if (props.type === 'Recipe History' || props.type === 'Search Results') { childRecipes = props.recipes.map((recipe) => <RecipeListEntry recipe={recipe} />); } else { childRecipes = props.recipes.map((recipe) => <RecipeEntry recipe={recipe} />); } return ( <div> <h2>{props.type}</h2> <div className="recipe-container"> {childRecipes} </div> </div> ); }; export default RecipeContainer;
Use RecipeListEntry for search results and recipe history
Use RecipeListEntry for search results and recipe history
JavaScript
mit
forkful/forkful,rompingstalactite/rompingstalactite,rompingstalactite/rompingstalactite,rompingstalactite/rompingstalactite,forkful/forkful,forkful/forkful
javascript
## Code Before: import React from 'react'; import '../scss/_recipeContainer.scss'; import RecipeEntry from '../../client/components/RecipeEntry.js'; const RecipeContainer = (props) => { let childRecipes; if (!props.recipes || props.recipes.length === 0) { childRecipes = <p>No recipes to show.</p>; } else { childRecipes = props.recipes.map((recipe) => <RecipeEntry recipe={recipe} />); } return ( <div> <h2>{props.type}</h2> <div className="recipe-container"> {childRecipes} </div> </div> ); }; export default RecipeContainer; ## Instruction: Use RecipeListEntry for search results and recipe history ## Code After: import React from 'react'; import '../scss/_recipeContainer.scss'; import RecipeEntry from '../../client/components/RecipeEntry.js'; import RecipeListEntry from '../../client/components/RecipeListEntry.js'; const RecipeContainer = (props) => { let childRecipes; if (!props.recipes || props.recipes.length === 0) { childRecipes = <p>No recipes to show.</p>; } else if (props.type === 'Recipe History' || props.type === 'Search Results') { childRecipes = props.recipes.map((recipe) => <RecipeListEntry recipe={recipe} />); } else { childRecipes = props.recipes.map((recipe) => <RecipeEntry recipe={recipe} />); } return ( <div> <h2>{props.type}</h2> <div className="recipe-container"> {childRecipes} </div> </div> ); }; export default RecipeContainer;
import React from 'react'; import '../scss/_recipeContainer.scss'; import RecipeEntry from '../../client/components/RecipeEntry.js'; + import RecipeListEntry from '../../client/components/RecipeListEntry.js'; const RecipeContainer = (props) => { let childRecipes; if (!props.recipes || props.recipes.length === 0) { childRecipes = <p>No recipes to show.</p>; + } else if (props.type === 'Recipe History' || props.type === 'Search Results') { + childRecipes = props.recipes.map((recipe) => <RecipeListEntry recipe={recipe} />); } else { childRecipes = props.recipes.map((recipe) => <RecipeEntry recipe={recipe} />); } return ( <div> <h2>{props.type}</h2> <div className="recipe-container"> {childRecipes} </div> </div> ); }; export default RecipeContainer;
3
0.130435
3
0
08830530d96260a59ec1187e991b9ba3b7e6ab03
README.md
README.md
Create Leads using Salesforce API #Usage ###Constructor --- ```ruby attributes: { last_name: String email: String company: String job_title: String phone: String website: String } credentials: { token: String instance_url: String } ``` ####Example ```ruby Salesforce::Lead.new({ last_name: 'Doe', email: 'john@doe.com', company: 'Foo Bar Inc.', job_title: 'Developer', phone: '55011998012345', website: 'http://johndoe.com' }, { token: 'Token123ABC', instance_url: 'http://n123.salesforce.com' }) ``` ###Methods --- ####create Sends the Lead to Salesforce API. Returns false if an error has ocurred or true if the request was succesfull. ####success? Check if the request succeed ###Attributes --- ####errors When the request fails, the errors are stored in this array #####Example ```ruby [{ message: 'Bad Request', code: 'BAD_REQUEST' }] ``` #Development Install the dependencies ```bash bundle install ``` Run the test suite ```bash rake test ```
Create Leads using Salesforce API [![Gem Version](https://badge.fury.io/rb/salesforce-lead.svg)](http://badge.fury.io/rb/salesforce-lead) [![License](https://img.shields.io/github/license/tegon/salesforce-lead.svg)](LICENSE) #Usage ###Constructor --- ```ruby attributes: { last_name: String email: String company: String job_title: String phone: String website: String } credentials: { token: String instance_url: String } ``` ####Example ```ruby Salesforce::Lead.new({ last_name: 'Doe', email: 'john@doe.com', company: 'Foo Bar Inc.', job_title: 'Developer', phone: '55011998012345', website: 'http://johndoe.com' }, { token: 'Token123ABC', instance_url: 'http://n123.salesforce.com' }) ``` ###Methods --- ####create Sends the Lead to Salesforce API. Returns false if an error has ocurred or true if the request was succesfull. ####success? Check if the request succeed ###Attributes --- ####errors When the request fails, the errors are stored in this array #####Example ```ruby [{ message: 'Bad Request', code: 'BAD_REQUEST' }] ``` #Development Install the dependencies ```bash bundle install ``` Run the test suite ```bash rake test ```
Add License and Gem version badges
:memo: Add License and Gem version badges
Markdown
mit
tegon/salesforce-lead
markdown
## Code Before: Create Leads using Salesforce API #Usage ###Constructor --- ```ruby attributes: { last_name: String email: String company: String job_title: String phone: String website: String } credentials: { token: String instance_url: String } ``` ####Example ```ruby Salesforce::Lead.new({ last_name: 'Doe', email: 'john@doe.com', company: 'Foo Bar Inc.', job_title: 'Developer', phone: '55011998012345', website: 'http://johndoe.com' }, { token: 'Token123ABC', instance_url: 'http://n123.salesforce.com' }) ``` ###Methods --- ####create Sends the Lead to Salesforce API. Returns false if an error has ocurred or true if the request was succesfull. ####success? Check if the request succeed ###Attributes --- ####errors When the request fails, the errors are stored in this array #####Example ```ruby [{ message: 'Bad Request', code: 'BAD_REQUEST' }] ``` #Development Install the dependencies ```bash bundle install ``` Run the test suite ```bash rake test ``` ## Instruction: :memo: Add License and Gem version badges ## Code After: Create Leads using Salesforce API [![Gem Version](https://badge.fury.io/rb/salesforce-lead.svg)](http://badge.fury.io/rb/salesforce-lead) [![License](https://img.shields.io/github/license/tegon/salesforce-lead.svg)](LICENSE) #Usage ###Constructor --- ```ruby attributes: { last_name: String email: String company: String job_title: String phone: String website: String } credentials: { token: String instance_url: String } ``` ####Example ```ruby Salesforce::Lead.new({ last_name: 'Doe', email: 'john@doe.com', company: 'Foo Bar Inc.', job_title: 'Developer', phone: '55011998012345', website: 'http://johndoe.com' }, { token: 'Token123ABC', instance_url: 'http://n123.salesforce.com' }) ``` ###Methods --- ####create Sends the Lead to Salesforce API. Returns false if an error has ocurred or true if the request was succesfull. ####success? Check if the request succeed ###Attributes --- ####errors When the request fails, the errors are stored in this array #####Example ```ruby [{ message: 'Bad Request', code: 'BAD_REQUEST' }] ``` #Development Install the dependencies ```bash bundle install ``` Run the test suite ```bash rake test ```
Create Leads using Salesforce API + + [![Gem Version](https://badge.fury.io/rb/salesforce-lead.svg)](http://badge.fury.io/rb/salesforce-lead) + [![License](https://img.shields.io/github/license/tegon/salesforce-lead.svg)](LICENSE) #Usage ###Constructor --- ```ruby attributes: { last_name: String email: String company: String job_title: String phone: String website: String } credentials: { token: String instance_url: String } ``` ####Example ```ruby Salesforce::Lead.new({ last_name: 'Doe', email: 'john@doe.com', company: 'Foo Bar Inc.', job_title: 'Developer', phone: '55011998012345', website: 'http://johndoe.com' }, { token: 'Token123ABC', instance_url: 'http://n123.salesforce.com' }) ``` ###Methods --- ####create Sends the Lead to Salesforce API. Returns false if an error has ocurred or true if the request was succesfull. ####success? Check if the request succeed ###Attributes --- ####errors When the request fails, the errors are stored in this array #####Example ```ruby [{ message: 'Bad Request', code: 'BAD_REQUEST' }] ``` #Development Install the dependencies ```bash bundle install ``` Run the test suite ```bash rake test ```
3
0.041667
3
0
2ca5ccb861962a021f81b6e794f5372d8079216f
fml/generatechangedfilelist.py
fml/generatechangedfilelist.py
import sys import os import commands import fnmatch import re import subprocess, shlex def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) prelist = os.path.join(md5dir,"temp","server.md5") postlist = os.path.join(md5dir,"temp","server_reobf.md5") cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (prelist, postlist) process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1) difflist,_= process.communicate() with open(list_file, 'w') as fh: fh.write(difflist) if __name__ == '__main__': main()
import sys import os import commands import fnmatch import re import subprocess, shlex mcp_root = os.path.abspath(sys.argv[1]) sys.path.append(os.path.join(mcp_root,"runtime")) from filehandling.srgshandler import parse_srg def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): list_file = os.path.abspath(sys.argv[2]) prelist = os.path.join(mcp_root,"temp","server.md5") postlist = os.path.join(mcp_root,"temp","server_reobf.md5") cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (prelist, postlist) process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1) difflist,_= process.communicate() srg_data = parse_srg(os.path.join(mcp_root,"temp","server_rg.srg") classes=dict() for row in srg_data['CL']: classes[row['deobf_name']] = row['obf_name'] with open(list_file, 'w') as fh: for diff in difflist: (clazz,md5)=diff.strip().split() if clazz in classes: clazz=classes[clazz] fh.write("%s\n" %(clazz)) if __name__ == '__main__': main()
Tweak file list script to print obf names
Tweak file list script to print obf names
Python
lgpl-2.1
Zaggy1024/MinecraftForge,luacs1998/MinecraftForge,simon816/MinecraftForge,karlthepagan/MinecraftForge,jdpadrnos/MinecraftForge,bonii-xx/MinecraftForge,mickkay/MinecraftForge,dmf444/MinecraftForge,Theerapak/MinecraftForge,ThiagoGarciaAlves/MinecraftForge,blay09/MinecraftForge,shadekiller666/MinecraftForge,Mathe172/MinecraftForge,CrafterKina/MinecraftForge,RainWarrior/MinecraftForge,fcjailybo/MinecraftForge,Vorquel/MinecraftForge,brubo1/MinecraftForge,Ghostlyr/MinecraftForge
python
## Code Before: import sys import os import commands import fnmatch import re import subprocess, shlex def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) prelist = os.path.join(md5dir,"temp","server.md5") postlist = os.path.join(md5dir,"temp","server_reobf.md5") cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (prelist, postlist) process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1) difflist,_= process.communicate() with open(list_file, 'w') as fh: fh.write(difflist) if __name__ == '__main__': main() ## Instruction: Tweak file list script to print obf names ## Code After: import sys import os import commands import fnmatch import re import subprocess, shlex mcp_root = os.path.abspath(sys.argv[1]) sys.path.append(os.path.join(mcp_root,"runtime")) from filehandling.srgshandler import parse_srg def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): list_file = os.path.abspath(sys.argv[2]) prelist = os.path.join(mcp_root,"temp","server.md5") postlist = os.path.join(mcp_root,"temp","server_reobf.md5") cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (prelist, postlist) process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1) difflist,_= process.communicate() srg_data = parse_srg(os.path.join(mcp_root,"temp","server_rg.srg") classes=dict() for row in srg_data['CL']: classes[row['deobf_name']] = row['obf_name'] with open(list_file, 'w') as fh: for diff in difflist: (clazz,md5)=diff.strip().split() if clazz in classes: clazz=classes[clazz] fh.write("%s\n" %(clazz)) if __name__ == '__main__': main()
import sys import os import commands import fnmatch import re import subprocess, shlex + mcp_root = os.path.abspath(sys.argv[1]) + sys.path.append(os.path.join(mcp_root,"runtime")) + from filehandling.srgshandler import parse_srg + def cmdsplit(args): if os.sep == '\\': args = args.replace('\\', '\\\\') return shlex.split(args) def main(): - md5dir = os.path.abspath(sys.argv[1]) list_file = os.path.abspath(sys.argv[2]) - prelist = os.path.join(md5dir,"temp","server.md5") ? ^^^^ + prelist = os.path.join(mcp_root,"temp","server.md5") ? ^^^ +++ - postlist = os.path.join(md5dir,"temp","server_reobf.md5") ? ^^^^ + postlist = os.path.join(mcp_root,"temp","server_reobf.md5") ? ^^^ +++ cmd = 'diff --unchanged-group-format='' --old-group-format='' --new-group-format=\'%%>\' --changed-group-format=\'%%>\' %s %s' % (prelist, postlist) process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, bufsize=-1) difflist,_= process.communicate() + srg_data = parse_srg(os.path.join(mcp_root,"temp","server_rg.srg") + classes=dict() + for row in srg_data['CL']: + classes[row['deobf_name']] = row['obf_name'] + with open(list_file, 'w') as fh: - fh.write(difflist) + for diff in difflist: + (clazz,md5)=diff.strip().split() + if clazz in classes: + clazz=classes[clazz] + fh.write("%s\n" %(clazz)) if __name__ == '__main__': main()
20
0.769231
16
4
0e8bf9aa858a3e564fd455e44f68e293e7578d9b
moment-import-behavior.html
moment-import-behavior.html
<link rel="import" href="../polymer/polymer.html"> <script> window.MomentJs = window.MomentJs || {}; /** * @polymerBehavior MomentJs.MomentImportBehavior */ MomentJs.MomentImportBehavior = { ready: function () { if (typeof window.moment === 'undefined') { if (!window._downloading_moment) { window._downloading_moment = true; this._loadMomentJs(); } else { this._waitToLoadMomentJs(); } } }, /** * Load momentjs library from local. * * @private */ _loadMomentJs: function () { var thiz = this; var script = document.createElement('script'); /** * TODO: Fix relative path. * There is an issue for relative paths in JS. Check #1 */ script.src = '../../moment/min/moment.min.js'; script.onload = function () { thiz.fire('moment-is-ready'); }; document.body.appendChild(script); }, /** * Wait till loading momentjs complete and then fire the event `moment-is-ready`. * * @private */ _waitToLoadMomentJs: function() { if (typeof window.moment !== 'undefined') { this.fire('moment-is-ready'); } else { var thiz = this; window.setTimeout(function () { thiz._waitToLoadMomentJs(); }, 1); } } }; </script>
<link rel="import" href="../polymer/polymer.html"> <script> window.MomentJs = window.MomentJs || {}; /** * @polymerBehavior MomentJs.MomentImportBehavior */ MomentJs.MomentImportBehavior = { ready: function () { if (typeof window.moment === 'undefined') { if (!window._downloading_moment) { window._downloading_moment = true; this._loadMomentJs(); } else { this._waitToLoadMomentJs(); } } }, /** * Loads momentjs library from local. * * @private */ _loadMomentJs: function() { var script = document.createElement('script'); script.src = this.resolveUrl('../moment/min/moment.min.js'); script.onload = function() { this.fire('moment-is-ready'); }.bind(this); document.body.appendChild(script); }, /** * Wait till loading momentjs complete and then fire the event `moment-is-ready`. * * @private */ _waitToLoadMomentJs: function() { if (typeof window.moment !== 'undefined') { this.fire('moment-is-ready'); } else { var thiz = this; window.setTimeout(function () { thiz._waitToLoadMomentJs(); }, 1); } } }; </script>
Fix relative path of momentjs import
Fix relative path of momentjs import This commit uses the Polymer.Base#method-resolveUrl method to set the src attribute of the injected script tag which will load momentjs.
HTML
mit
saeidzebardast/moment-js
html
## Code Before: <link rel="import" href="../polymer/polymer.html"> <script> window.MomentJs = window.MomentJs || {}; /** * @polymerBehavior MomentJs.MomentImportBehavior */ MomentJs.MomentImportBehavior = { ready: function () { if (typeof window.moment === 'undefined') { if (!window._downloading_moment) { window._downloading_moment = true; this._loadMomentJs(); } else { this._waitToLoadMomentJs(); } } }, /** * Load momentjs library from local. * * @private */ _loadMomentJs: function () { var thiz = this; var script = document.createElement('script'); /** * TODO: Fix relative path. * There is an issue for relative paths in JS. Check #1 */ script.src = '../../moment/min/moment.min.js'; script.onload = function () { thiz.fire('moment-is-ready'); }; document.body.appendChild(script); }, /** * Wait till loading momentjs complete and then fire the event `moment-is-ready`. * * @private */ _waitToLoadMomentJs: function() { if (typeof window.moment !== 'undefined') { this.fire('moment-is-ready'); } else { var thiz = this; window.setTimeout(function () { thiz._waitToLoadMomentJs(); }, 1); } } }; </script> ## Instruction: Fix relative path of momentjs import This commit uses the Polymer.Base#method-resolveUrl method to set the src attribute of the injected script tag which will load momentjs. ## Code After: <link rel="import" href="../polymer/polymer.html"> <script> window.MomentJs = window.MomentJs || {}; /** * @polymerBehavior MomentJs.MomentImportBehavior */ MomentJs.MomentImportBehavior = { ready: function () { if (typeof window.moment === 'undefined') { if (!window._downloading_moment) { window._downloading_moment = true; this._loadMomentJs(); } else { this._waitToLoadMomentJs(); } } }, /** * Loads momentjs library from local. * * @private */ _loadMomentJs: function() { var script = document.createElement('script'); script.src = this.resolveUrl('../moment/min/moment.min.js'); script.onload = function() { this.fire('moment-is-ready'); }.bind(this); document.body.appendChild(script); }, /** * Wait till loading momentjs complete and then fire the event `moment-is-ready`. * * @private */ _waitToLoadMomentJs: function() { if (typeof window.moment !== 'undefined') { this.fire('moment-is-ready'); } else { var thiz = this; window.setTimeout(function () { thiz._waitToLoadMomentJs(); }, 1); } } }; </script>
<link rel="import" href="../polymer/polymer.html"> <script> window.MomentJs = window.MomentJs || {}; /** * @polymerBehavior MomentJs.MomentImportBehavior */ MomentJs.MomentImportBehavior = { ready: function () { if (typeof window.moment === 'undefined') { if (!window._downloading_moment) { window._downloading_moment = true; this._loadMomentJs(); } else { this._waitToLoadMomentJs(); } } }, /** - * Load momentjs library from local. + * Loads momentjs library from local. ? + * * @private - */ ? -- + */ - _loadMomentJs: function () { ? - + _loadMomentJs: function() { - var thiz = this; - var script = document.createElement('script'); - - /** - * TODO: Fix relative path. - * There is an issue for relative paths in JS. Check #1 - */ - script.src = '../../moment/min/moment.min.js'; ? --- + script.src = this.resolveUrl('../moment/min/moment.min.js'); ? ++++++++++++++++ + - script.onload = function () { ? - + script.onload = function() { - thiz.fire('moment-is-ready'); ? ^ + this.fire('moment-is-ready'); ? ^ - }; + }.bind(this); document.body.appendChild(script); }, /** * Wait till loading momentjs complete and then fire the event `moment-is-ready`. * * @private */ _waitToLoadMomentJs: function() { if (typeof window.moment !== 'undefined') { this.fire('moment-is-ready'); } else { var thiz = this; window.setTimeout(function () { thiz._waitToLoadMomentJs(); }, 1); } } }; </script>
21
0.368421
7
14
df6b13a70241b616f49d4dcc25073084c371f5b1
share/models/creative/base.py
share/models/creative/base.py
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class AbstractCreativeWork(ShareObject, metaclass=TypedShareObjectMeta): title = models.TextField() description = models.TextField() contributors = ShareManyToManyField(Person, through='Contributor') institutions = ShareManyToManyField(Institution, through='ThroughInstitutions') venues = ShareManyToManyField(Venue, through='ThroughVenues') funders = ShareManyToManyField(Funder, through='ThroughFunders') awards = ShareManyToManyField(Award, through='ThroughAwards') subject = ShareForeignKey(Tag, related_name='subjected_%(class)s', null=True) # Note: Null allows inserting of None but returns it as an empty string tags = ShareManyToManyField(Tag, related_name='tagged_%(class)s', through='ThroughTags') created = models.DateTimeField(null=True) published = models.DateTimeField(null=True) free_to_read_type = models.URLField(blank=True) free_to_read_date = models.DateTimeField(null=True) rights = models.TextField() language = models.TextField() class CreativeWork(AbstractCreativeWork): pass
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class AbstractCreativeWork(ShareObject, metaclass=TypedShareObjectMeta): title = models.TextField() description = models.TextField() contributors = ShareManyToManyField(Person, through='Contributor') institutions = ShareManyToManyField(Institution, through='ThroughInstitutions') venues = ShareManyToManyField(Venue, through='ThroughVenues') funders = ShareManyToManyField(Funder, through='ThroughFunders') awards = ShareManyToManyField(Award, through='ThroughAwards') subject = ShareForeignKey(Tag, related_name='subjected_%(class)s', null=True) # Note: Null allows inserting of None but returns it as an empty string tags = ShareManyToManyField(Tag, related_name='tagged_%(class)s', through='ThroughTags') created = models.DateTimeField(null=True) published = models.DateTimeField(null=True) free_to_read_type = models.URLField(blank=True) free_to_read_date = models.DateTimeField(null=True) rights = models.TextField(blank=True, null=True) language = models.TextField(blank=True, null=True) class CreativeWork(AbstractCreativeWork): pass
Swap out license with rights
Swap out license with rights
Python
apache-2.0
CenterForOpenScience/SHARE,aaxelb/SHARE,zamattiac/SHARE,zamattiac/SHARE,CenterForOpenScience/SHARE,CenterForOpenScience/SHARE,aaxelb/SHARE,zamattiac/SHARE,laurenbarker/SHARE,aaxelb/SHARE,laurenbarker/SHARE,laurenbarker/SHARE
python
## Code Before: from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class AbstractCreativeWork(ShareObject, metaclass=TypedShareObjectMeta): title = models.TextField() description = models.TextField() contributors = ShareManyToManyField(Person, through='Contributor') institutions = ShareManyToManyField(Institution, through='ThroughInstitutions') venues = ShareManyToManyField(Venue, through='ThroughVenues') funders = ShareManyToManyField(Funder, through='ThroughFunders') awards = ShareManyToManyField(Award, through='ThroughAwards') subject = ShareForeignKey(Tag, related_name='subjected_%(class)s', null=True) # Note: Null allows inserting of None but returns it as an empty string tags = ShareManyToManyField(Tag, related_name='tagged_%(class)s', through='ThroughTags') created = models.DateTimeField(null=True) published = models.DateTimeField(null=True) free_to_read_type = models.URLField(blank=True) free_to_read_date = models.DateTimeField(null=True) rights = models.TextField() language = models.TextField() class CreativeWork(AbstractCreativeWork): pass ## Instruction: Swap out license with rights ## Code After: from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class AbstractCreativeWork(ShareObject, metaclass=TypedShareObjectMeta): title = models.TextField() description = models.TextField() contributors = ShareManyToManyField(Person, through='Contributor') institutions = ShareManyToManyField(Institution, through='ThroughInstitutions') venues = ShareManyToManyField(Venue, through='ThroughVenues') funders = ShareManyToManyField(Funder, through='ThroughFunders') awards = ShareManyToManyField(Award, through='ThroughAwards') subject = ShareForeignKey(Tag, related_name='subjected_%(class)s', null=True) # Note: Null allows inserting of None but returns it as an empty string tags = ShareManyToManyField(Tag, related_name='tagged_%(class)s', through='ThroughTags') created = models.DateTimeField(null=True) published = models.DateTimeField(null=True) free_to_read_type = models.URLField(blank=True) free_to_read_date = models.DateTimeField(null=True) rights = models.TextField(blank=True, null=True) language = models.TextField(blank=True, null=True) class CreativeWork(AbstractCreativeWork): pass
from django.db import models from share.models.base import ShareObject from share.models.people import Person from share.models.base import TypedShareObjectMeta from share.models.creative.meta import Venue, Institution, Funder, Award, Tag from share.models.fields import ShareForeignKey, ShareManyToManyField class AbstractCreativeWork(ShareObject, metaclass=TypedShareObjectMeta): title = models.TextField() description = models.TextField() contributors = ShareManyToManyField(Person, through='Contributor') institutions = ShareManyToManyField(Institution, through='ThroughInstitutions') venues = ShareManyToManyField(Venue, through='ThroughVenues') funders = ShareManyToManyField(Funder, through='ThroughFunders') awards = ShareManyToManyField(Award, through='ThroughAwards') subject = ShareForeignKey(Tag, related_name='subjected_%(class)s', null=True) # Note: Null allows inserting of None but returns it as an empty string tags = ShareManyToManyField(Tag, related_name='tagged_%(class)s', through='ThroughTags') created = models.DateTimeField(null=True) published = models.DateTimeField(null=True) free_to_read_type = models.URLField(blank=True) free_to_read_date = models.DateTimeField(null=True) - rights = models.TextField() + + rights = models.TextField(blank=True, null=True) - language = models.TextField() + language = models.TextField(blank=True, null=True) ? +++++++++++++++++++++ class CreativeWork(AbstractCreativeWork): pass
5
0.166667
3
2
5b056d4a6d5f9f7b6d3450cde053ebd4bf38b08c
app/assets/javascripts/angular_app/templates/monitor.html.slim
app/assets/javascripts/angular_app/templates/monitor.html.slim
.row .span12 p.data-updated-at.pull-right | Dados atualizados em <b>#{'31/12/2013'}</b>. .row .span4.value-box.authorized-budget h4 | Orçamento Autorizado br small[ng-cloak] | (referente à {{year}} · em R$) .large-number[title="{{autorizado | currency:'R$ '}}" ng-bind="autorizado | roundedCurrency"] p.percentual | 100% .span4.value-box.payments h4 | Pagamentos br small | (Pago + RP Pago · em R$) .large-number[title="{{pagamentos | currency:'R$ '}}" ng-bind="pagamentos | roundedCurrency"] p.percentual | {{percentualExecutado | percentual}} .span4.value-box.not-executed h4 | Não Executado br small | (Autorizado &minus; Pagamentos · em R$) .large-number[title="{{naoExecutado | currency:'R$ '}}" ng-bind="naoExecutado | roundedCurrency"] p.percentual | {{percentualNaoExecutado | percentual}}
.row .span12 p.data-updated-at.pull-right | Dados atualizados em <b>#{'31/12/2013'}</b>. Valores em Reais. .row .span4.value-box.authorized-budget h4 | Orçamento Autorizado br small[ng-cloak] | (referente à {{year}}) .large-number[title="{{autorizado | currency:'R$ '}}" ng-bind="autorizado | roundedCurrency"] p.percentual | 100% .span4.value-box.payments h4 | Pagamentos br small | (Pago + RP Pago) .large-number[title="{{pagamentos | currency:'R$ '}}" ng-bind="pagamentos | roundedCurrency"] p.percentual | {{percentualExecutado | percentual}} .span4.value-box.not-executed h4 | Não Executado br small | (Autorizado &minus; Pagamentos) .large-number[title="{{naoExecutado | currency:'R$ '}}" ng-bind="naoExecutado | roundedCurrency"] p.percentual | {{percentualNaoExecutado | percentual}}
Remove repetições de "em R$" no monitor.
Remove repetições de "em R$" no monitor.
Slim
mit
okfn-brasil/orcamento.inesc.org.br,okfn-brasil/orcamento.inesc.org.br,okfn-brasil/orcamento.inesc.org.br
slim
## Code Before: .row .span12 p.data-updated-at.pull-right | Dados atualizados em <b>#{'31/12/2013'}</b>. .row .span4.value-box.authorized-budget h4 | Orçamento Autorizado br small[ng-cloak] | (referente à {{year}} · em R$) .large-number[title="{{autorizado | currency:'R$ '}}" ng-bind="autorizado | roundedCurrency"] p.percentual | 100% .span4.value-box.payments h4 | Pagamentos br small | (Pago + RP Pago · em R$) .large-number[title="{{pagamentos | currency:'R$ '}}" ng-bind="pagamentos | roundedCurrency"] p.percentual | {{percentualExecutado | percentual}} .span4.value-box.not-executed h4 | Não Executado br small | (Autorizado &minus; Pagamentos · em R$) .large-number[title="{{naoExecutado | currency:'R$ '}}" ng-bind="naoExecutado | roundedCurrency"] p.percentual | {{percentualNaoExecutado | percentual}} ## Instruction: Remove repetições de "em R$" no monitor. ## Code After: .row .span12 p.data-updated-at.pull-right | Dados atualizados em <b>#{'31/12/2013'}</b>. Valores em Reais. .row .span4.value-box.authorized-budget h4 | Orçamento Autorizado br small[ng-cloak] | (referente à {{year}}) .large-number[title="{{autorizado | currency:'R$ '}}" ng-bind="autorizado | roundedCurrency"] p.percentual | 100% .span4.value-box.payments h4 | Pagamentos br small | (Pago + RP Pago) .large-number[title="{{pagamentos | currency:'R$ '}}" ng-bind="pagamentos | roundedCurrency"] p.percentual | {{percentualExecutado | percentual}} .span4.value-box.not-executed h4 | Não Executado br small | (Autorizado &minus; Pagamentos) .large-number[title="{{naoExecutado | currency:'R$ '}}" ng-bind="naoExecutado | roundedCurrency"] p.percentual | {{percentualNaoExecutado | percentual}}
.row .span12 p.data-updated-at.pull-right - | Dados atualizados em <b>#{'31/12/2013'}</b>. + | Dados atualizados em <b>#{'31/12/2013'}</b>. Valores em Reais. ? ++++++++++++++++++ .row .span4.value-box.authorized-budget h4 | Orçamento Autorizado br small[ng-cloak] - | (referente à {{year}} · em R$) ? -------- + | (referente à {{year}}) .large-number[title="{{autorizado | currency:'R$ '}}" ng-bind="autorizado | roundedCurrency"] p.percentual | 100% .span4.value-box.payments h4 | Pagamentos br small - | (Pago + RP Pago · em R$) ? -------- + | (Pago + RP Pago) .large-number[title="{{pagamentos | currency:'R$ '}}" ng-bind="pagamentos | roundedCurrency"] p.percentual | {{percentualExecutado | percentual}} .span4.value-box.not-executed h4 | Não Executado br small - | (Autorizado &minus; Pagamentos · em R$) ? -------- + | (Autorizado &minus; Pagamentos) .large-number[title="{{naoExecutado | currency:'R$ '}}" ng-bind="naoExecutado | roundedCurrency"] p.percentual | {{percentualNaoExecutado | percentual}}
8
0.228571
4
4
d497d04c452731e5099c1b39041aa922af29aa65
app/models/forem/post.rb
app/models/forem/post.rb
module Forem class Post < ActiveRecord::Base belongs_to :topic, :touch => true belongs_to :user, :class_name => Forem.user_class.to_s belongs_to :reply_to, :class_name => "Post" has_many :replies, :class_name => "Post", :foreign_key => "reply_to_id", :dependent => :nullify delegate :forum, :to => :topic class << self def by_created_at order("created_at asc") end end validates :text, :presence => true after_create :subscribe_replier after_create :email_topic_subscribers def owner_or_admin?(other_user) self.user == other_user || other_user.forem_admin? end def subscribe_replier if self.topic && self.user self.topic.subscribe_user(self.user.id) end end def email_topic_subscribers if self.topic self.topic.subscriptions.includes(:subscriber).each do |subscription| if subscription.subscriber != self.user subscription.send_notification(self.id) end end end end end end
module Forem class Post < ActiveRecord::Base belongs_to :topic, :touch => true belongs_to :user, :class_name => Forem.user_class.to_s belongs_to :reply_to, :class_name => "Post" has_many :replies, :class_name => "Post", :foreign_key => "reply_to_id", :dependent => :nullify delegate :forum, :to => :topic validates :text, :presence => true after_create :subscribe_replier after_create :email_topic_subscribers class << self def by_created_at order("created_at asc") end end def owner_or_admin?(other_user) self.user == other_user || other_user.forem_admin? end def subscribe_replier if self.topic && self.user self.topic.subscribe_user(self.user.id) end end def email_topic_subscribers if self.topic self.topic.subscriptions.includes(:subscriber).each do |subscription| if subscription.subscriber != self.user subscription.send_notification(self.id) end end end end end end
Move class method calls to above class method definitions in Post model
Move class method calls to above class method definitions in Post model
Ruby
mit
prasadrails/forem,bbatsov/forem,tomkrus/forem,ciscou/forem,zshannon/forem,Fullscreen/forem,brooks/forem,rdy/forem,link-er/forem,wesleycho/forem,juozasg/forem,ajeje/forem,abrambailey/forem,ascendbruce/forem,netjungle/forem,trakt/forem,bvsatyaram/forem,tonic20/forem,BoboFraggins/forem,sandboxrem/forem,jeremyong/forem,kenmazaika/forem,gabriel-dehan/forem,RostDetal/forem,BanzaiMan/forem,mijoharas/forem,sandboxrem/forem,mhoad/forem,code-mancers/forem,elm-city-craftworks/forem,mauriciopasquier/forem,ascendbruce/forem,devleoper/forem,ch000/forem,codev/forem,mijoharas/forem,xenonn/forem,hepu/forem,joneslee85/forem,kunalchaudhari/forem,0xCCD/forem,BanzaiMan/forem,0xCCD/forem,nikolaevav/forem,hanspolo/forem,knewter/forem,moh-alsheikh/forem,tomrc/forem,link-er/forem,bvsatyaram/forem,SamLau95/forem,frankmarineau/forem,syndicut/forem,frankmarineau/forem,etjossem/Goodsmiths-Hub,wuwx/forem,andypike/forem,beefsack/forem,juozasg/forem,tonic20/forem,zhublik/forem,zhublik/forem,jaybrueder/forem,jeremyong/forem,mhoad/forem,beefsack/forem,hepu/forem,rubysherpas/forem,mmcc/forem,abrambailey/forem,yan-hoose/forem,efrence/forem,xenonn/forem,yan-hoose/forem,rdy/forem,wuwx/forem,trakt/forem,kamarcum/forem,rubysherpas/forem,nikolaevav/forem,rubysherpas/forem,daniely/forem,Fullscreen/forem,radar/forem,danman01/forem,jaybrueder/forem,bodrovis/forem,ketanjain/forem,syndicut/forem,gabriel-dehan/forem,SamLau95/forem,bbatsov/forem,bcavileer/forem,zshannon/forem,elm-city-craftworks/forem,kunalchaudhari/forem,ajeje/forem,netjungle/forem,radar/forem,NOX73/forem,bcavileer/forem,ketanjain/forem,nikolaevav/forem,tomrc/forem,prasadrails/forem,bodrovis/forem,trakt/forem,bagusyuu/forem,wesleycho/forem,tomrc/forem,eivindhagen/forem,radar/forem,beansmile/forem,amwelles/forem,devleoper/forem,RostDetal/forem,kl/forem,ajeje/forem,amwelles/forem,BoboFraggins/forem,jarray52/forem,codev/forem,brooks/forem,RostDetal/forem,kl/forem,frankmarineau/forem,bagusyuu/forem,mmcc/forem,kamarcum/forem,mauriciopasquier/forem,jarray52/forem,zhublik/forem,tomkrus/forem,daniely/forem,wuwx/forem,kenmazaika/forem,danman01/forem,code-mancers/forem,kot-begemot/forem,hanspolo/forem,beansmile/forem,efrence/forem,joneslee85/forem,jaybrueder/forem,etjossem/Goodsmiths-Hub,hanspolo/forem,ketanjain/forem,efrence/forem,ciscou/forem,knewter/forem,moh-alsheikh/forem,andypike/forem,kot-begemot/forem,devleoper/forem,NOX73/forem,ch000/forem,eivindhagen/forem
ruby
## Code Before: module Forem class Post < ActiveRecord::Base belongs_to :topic, :touch => true belongs_to :user, :class_name => Forem.user_class.to_s belongs_to :reply_to, :class_name => "Post" has_many :replies, :class_name => "Post", :foreign_key => "reply_to_id", :dependent => :nullify delegate :forum, :to => :topic class << self def by_created_at order("created_at asc") end end validates :text, :presence => true after_create :subscribe_replier after_create :email_topic_subscribers def owner_or_admin?(other_user) self.user == other_user || other_user.forem_admin? end def subscribe_replier if self.topic && self.user self.topic.subscribe_user(self.user.id) end end def email_topic_subscribers if self.topic self.topic.subscriptions.includes(:subscriber).each do |subscription| if subscription.subscriber != self.user subscription.send_notification(self.id) end end end end end end ## Instruction: Move class method calls to above class method definitions in Post model ## Code After: module Forem class Post < ActiveRecord::Base belongs_to :topic, :touch => true belongs_to :user, :class_name => Forem.user_class.to_s belongs_to :reply_to, :class_name => "Post" has_many :replies, :class_name => "Post", :foreign_key => "reply_to_id", :dependent => :nullify delegate :forum, :to => :topic validates :text, :presence => true after_create :subscribe_replier after_create :email_topic_subscribers class << self def by_created_at order("created_at asc") end end def owner_or_admin?(other_user) self.user == other_user || other_user.forem_admin? end def subscribe_replier if self.topic && self.user self.topic.subscribe_user(self.user.id) end end def email_topic_subscribers if self.topic self.topic.subscriptions.includes(:subscriber).each do |subscription| if subscription.subscriber != self.user subscription.send_notification(self.id) end end end end end end
module Forem class Post < ActiveRecord::Base belongs_to :topic, :touch => true belongs_to :user, :class_name => Forem.user_class.to_s belongs_to :reply_to, :class_name => "Post" has_many :replies, :class_name => "Post", :foreign_key => "reply_to_id", :dependent => :nullify delegate :forum, :to => :topic + validates :text, :presence => true + after_create :subscribe_replier + after_create :email_topic_subscribers + class << self def by_created_at order("created_at asc") end end - - validates :text, :presence => true - after_create :subscribe_replier - after_create :email_topic_subscribers def owner_or_admin?(other_user) self.user == other_user || other_user.forem_admin? end def subscribe_replier if self.topic && self.user self.topic.subscribe_user(self.user.id) end end def email_topic_subscribers if self.topic self.topic.subscriptions.includes(:subscriber).each do |subscription| if subscription.subscriber != self.user subscription.send_notification(self.id) end end end end end end
8
0.186047
4
4
5f98fff4a0a2c12117b905d2faa076ff82ccea61
lib/template-instance-set.js
lib/template-instance-set.js
// Allow easy setting of template instance's parent (or ancestor) field Blaze.TemplateInstance.prototype.set = function set(fieldName, value) { var template = this; while (template) { if (fieldName in template) { var previousValue = template[fieldName]; if (Package['reactive-var']) { template[fieldName].set(value); } else { template[fieldName] = value; } return previousValue; } template = template.parent(1, true); } };
// Allow easy setting of template instance's parent (or ancestor) field Blaze.TemplateInstance.prototype.set = function set(fieldName, value) { var template = this; while (template) { if (fieldName in template) { var previousValue = template[fieldName]; if (Package['reactive-var'] && previousValue instanceof Package['reactive-var'].ReactiveVar) { template[fieldName].set(value); } else { template[fieldName] = value; } return previousValue; } template = template.parent(1, true); } };
Add check for ReactiveVar variable
Add check for ReactiveVar variable
JavaScript
mit
aldeed/meteor-template-extension,aldeed/meteor-template-extension
javascript
## Code Before: // Allow easy setting of template instance's parent (or ancestor) field Blaze.TemplateInstance.prototype.set = function set(fieldName, value) { var template = this; while (template) { if (fieldName in template) { var previousValue = template[fieldName]; if (Package['reactive-var']) { template[fieldName].set(value); } else { template[fieldName] = value; } return previousValue; } template = template.parent(1, true); } }; ## Instruction: Add check for ReactiveVar variable ## Code After: // Allow easy setting of template instance's parent (or ancestor) field Blaze.TemplateInstance.prototype.set = function set(fieldName, value) { var template = this; while (template) { if (fieldName in template) { var previousValue = template[fieldName]; if (Package['reactive-var'] && previousValue instanceof Package['reactive-var'].ReactiveVar) { template[fieldName].set(value); } else { template[fieldName] = value; } return previousValue; } template = template.parent(1, true); } };
// Allow easy setting of template instance's parent (or ancestor) field Blaze.TemplateInstance.prototype.set = function set(fieldName, value) { var template = this; while (template) { if (fieldName in template) { var previousValue = template[fieldName]; - if (Package['reactive-var']) { + if (Package['reactive-var'] && previousValue instanceof Package['reactive-var'].ReactiveVar) { template[fieldName].set(value); } else { template[fieldName] = value; } return previousValue; } template = template.parent(1, true); } };
2
0.111111
1
1
fb7e7877265e7dcc4cb7e45dc075df67f74e25d9
package.json
package.json
{ "name": "datum-and-wills", "version": "0.0.0", "description": "A narative browser-based voxel game that aims to introduce and teach javascript coding interactively", "main": "index.js", "dependencies": { "voxel-engine": "~0.18.4", "aabb-3d": "0.x.x", "gl-matrix": "2.x.x", "spatial-events": "0.0.1", "spatial-trigger": "0.0.x", "painterly-textures": "0.x.x", "voxel-player": "0.1.x", "voxel-critter": "0.x.x" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git://github.com/davidmason/datum-and-wills.git" }, "author": "David Mason @drdmason", "license": "MIT", "readmeFilename": "README.md", "gitHead": "09fc4895664b26b876b529b2bd3685815aa566c3" }
{ "name": "datum-and-wills", "version": "0.0.0", "description": "A narative browser-based voxel game that aims to introduce and teach javascript coding interactively", "main": "index.js", "dependencies": { "voxel-engine": "git://github.com/davidmason/voxel-engine.git#master", "aabb-3d": "0.x.x", "gl-matrix": "2.x.x", "spatial-events": "0.0.1", "spatial-trigger": "0.0.x", "painterly-textures": "0.x.x", "voxel-player": "0.1.x", "voxel-critter": "0.x.x" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git://github.com/davidmason/datum-and-wills.git" }, "author": "David Mason @drdmason", "license": "MIT", "readmeFilename": "README.md", "gitHead": "09fc4895664b26b876b529b2bd3685815aa566c3" }
Use hacked engine with configurable control module.
Use hacked engine with configurable control module. For now, a non-standard engine is required to import the altered control module that allows overriding of the methods for player movement. This is pretty hacky at the moment, but eventually this config can probably become a standard part of the control module and others.
JSON
mit
davidmason/datum-and-wills
json
## Code Before: { "name": "datum-and-wills", "version": "0.0.0", "description": "A narative browser-based voxel game that aims to introduce and teach javascript coding interactively", "main": "index.js", "dependencies": { "voxel-engine": "~0.18.4", "aabb-3d": "0.x.x", "gl-matrix": "2.x.x", "spatial-events": "0.0.1", "spatial-trigger": "0.0.x", "painterly-textures": "0.x.x", "voxel-player": "0.1.x", "voxel-critter": "0.x.x" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git://github.com/davidmason/datum-and-wills.git" }, "author": "David Mason @drdmason", "license": "MIT", "readmeFilename": "README.md", "gitHead": "09fc4895664b26b876b529b2bd3685815aa566c3" } ## Instruction: Use hacked engine with configurable control module. For now, a non-standard engine is required to import the altered control module that allows overriding of the methods for player movement. This is pretty hacky at the moment, but eventually this config can probably become a standard part of the control module and others. ## Code After: { "name": "datum-and-wills", "version": "0.0.0", "description": "A narative browser-based voxel game that aims to introduce and teach javascript coding interactively", "main": "index.js", "dependencies": { "voxel-engine": "git://github.com/davidmason/voxel-engine.git#master", "aabb-3d": "0.x.x", "gl-matrix": "2.x.x", "spatial-events": "0.0.1", "spatial-trigger": "0.0.x", "painterly-textures": "0.x.x", "voxel-player": "0.1.x", "voxel-critter": "0.x.x" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git://github.com/davidmason/datum-and-wills.git" }, "author": "David Mason @drdmason", "license": "MIT", "readmeFilename": "README.md", "gitHead": "09fc4895664b26b876b529b2bd3685815aa566c3" }
{ "name": "datum-and-wills", "version": "0.0.0", "description": "A narative browser-based voxel game that aims to introduce and teach javascript coding interactively", "main": "index.js", "dependencies": { - "voxel-engine": "~0.18.4", + "voxel-engine": "git://github.com/davidmason/voxel-engine.git#master", "aabb-3d": "0.x.x", "gl-matrix": "2.x.x", "spatial-events": "0.0.1", "spatial-trigger": "0.0.x", "painterly-textures": "0.x.x", "voxel-player": "0.1.x", "voxel-critter": "0.x.x" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git://github.com/davidmason/datum-and-wills.git" }, "author": "David Mason @drdmason", "license": "MIT", "readmeFilename": "README.md", "gitHead": "09fc4895664b26b876b529b2bd3685815aa566c3" }
2
0.074074
1
1
e518a89041f1d3b550ddec3abe371aed9ce78eeb
app/components/user-selection/template.hbs
app/components/user-selection/template.hbs
{{yield (hash user = (component 'power-select' options = users disabled = disabled selected = user placeholder = 'Select user...' searchField = 'longName' tagName = 'div' class = 'user-select' onchange = (action on-change) extra = (hash selectedTemplate = selectedTemplate optionTemplate = optionTemplate ) ) )}}
{{yield (hash user = (component 'power-select' options = users disabled = disabled selected = user placeholder = 'Select user...' searchField = 'longName' tagName = 'div' class = 'user-select' allowClear = true onchange = (action on-change) extra = (hash selectedTemplate = selectedTemplate optionTemplate = optionTemplate ) ) )}}
Allow clearing of the user selection
Allow clearing of the user selection
Handlebars
agpl-3.0
anehx/timed-frontend,adfinis-sygroup/timed-frontend,adfinis-sygroup/timed-frontend,anehx/timed-frontend,adfinis-sygroup/timed-frontend
handlebars
## Code Before: {{yield (hash user = (component 'power-select' options = users disabled = disabled selected = user placeholder = 'Select user...' searchField = 'longName' tagName = 'div' class = 'user-select' onchange = (action on-change) extra = (hash selectedTemplate = selectedTemplate optionTemplate = optionTemplate ) ) )}} ## Instruction: Allow clearing of the user selection ## Code After: {{yield (hash user = (component 'power-select' options = users disabled = disabled selected = user placeholder = 'Select user...' searchField = 'longName' tagName = 'div' class = 'user-select' allowClear = true onchange = (action on-change) extra = (hash selectedTemplate = selectedTemplate optionTemplate = optionTemplate ) ) )}}
{{yield (hash user = (component 'power-select' options = users disabled = disabled selected = user placeholder = 'Select user...' searchField = 'longName' tagName = 'div' class = 'user-select' + allowClear = true onchange = (action on-change) extra = (hash selectedTemplate = selectedTemplate optionTemplate = optionTemplate ) ) )}}
1
0.0625
1
0
df6442e6c8575cddfc48a327f5485d84bee35d33
package.json
package.json
{ "name": "ghosttrain", "version": "0.1.0", "description": "Client-side router in the spirit of Express, for mock data, development and demos.", "main": "index.js", "repository": "http://github.com/jsantell/GhostTrain", "dependencies": { "querystring": "0.2.0", "range-parser": "1.0.0", "simple-mime": "0.0.8" }, "devDependencies": { "mocha": "1.16.2", "chai": "1.8.1", "browserify": "3.18.0", "uglify-js": "2.4.8" }, "author": "Jordan Santell", "license": "MIT", "scripts": { "test": "./node_modules/.bin/mocha --reporter spec --ui bdd" }, "testling": { "browsers": { "ie": [8, 9, 10], "firefox": [25, "nightly"], "chrome": [30, "canary"], "opera": [10, "next"], "safari": [5.1, 6] }, "harness": "mocha", "scripts": [ "dist/ghosttrain.js", "test/testlingSetup.js", "test/test.*.js" ] } }
{ "name": "ghosttrain", "version": "0.1.0", "description": "Client-side router in the spirit of Express, for mock data, development and demos.", "main": "index.js", "repository": "http://github.com/jsantell/GhostTrain", "dependencies": { "querystring": "0.2.0", "range-parser": "1.0.0", "simple-mime": "0.0.8" }, "devDependencies": { "mocha": "1.16.2", "chai": "1.8.1", "browserify": "3.18.0", "uglify-js": "2.4.8" }, "author": "Jordan Santell", "license": "MIT", "scripts": { "test": "./node_modules/.bin/mocha --reporter spec --ui bdd" }, "testling": { "browsers": { "ie": [8, 9, 10], "firefox": [25, "nightly"], "chrome": [30, "canary"], "opera": [10, "next"], "safari": [5.1, 6] }, "harness": "mocha", "files": [ "test/test.*.js" ] } }
Change 'testling' key from scripts to files to leverage Browserify tests
Change 'testling' key from scripts to files to leverage Browserify tests
JSON
mit
jsantell/GhostTrain
json
## Code Before: { "name": "ghosttrain", "version": "0.1.0", "description": "Client-side router in the spirit of Express, for mock data, development and demos.", "main": "index.js", "repository": "http://github.com/jsantell/GhostTrain", "dependencies": { "querystring": "0.2.0", "range-parser": "1.0.0", "simple-mime": "0.0.8" }, "devDependencies": { "mocha": "1.16.2", "chai": "1.8.1", "browserify": "3.18.0", "uglify-js": "2.4.8" }, "author": "Jordan Santell", "license": "MIT", "scripts": { "test": "./node_modules/.bin/mocha --reporter spec --ui bdd" }, "testling": { "browsers": { "ie": [8, 9, 10], "firefox": [25, "nightly"], "chrome": [30, "canary"], "opera": [10, "next"], "safari": [5.1, 6] }, "harness": "mocha", "scripts": [ "dist/ghosttrain.js", "test/testlingSetup.js", "test/test.*.js" ] } } ## Instruction: Change 'testling' key from scripts to files to leverage Browserify tests ## Code After: { "name": "ghosttrain", "version": "0.1.0", "description": "Client-side router in the spirit of Express, for mock data, development and demos.", "main": "index.js", "repository": "http://github.com/jsantell/GhostTrain", "dependencies": { "querystring": "0.2.0", "range-parser": "1.0.0", "simple-mime": "0.0.8" }, "devDependencies": { "mocha": "1.16.2", "chai": "1.8.1", "browserify": "3.18.0", "uglify-js": "2.4.8" }, "author": "Jordan Santell", "license": "MIT", "scripts": { "test": "./node_modules/.bin/mocha --reporter spec --ui bdd" }, "testling": { "browsers": { "ie": [8, 9, 10], "firefox": [25, "nightly"], "chrome": [30, "canary"], "opera": [10, "next"], "safari": [5.1, 6] }, "harness": "mocha", "files": [ "test/test.*.js" ] } }
{ "name": "ghosttrain", "version": "0.1.0", "description": "Client-side router in the spirit of Express, for mock data, development and demos.", "main": "index.js", "repository": "http://github.com/jsantell/GhostTrain", "dependencies": { "querystring": "0.2.0", "range-parser": "1.0.0", "simple-mime": "0.0.8" }, "devDependencies": { "mocha": "1.16.2", "chai": "1.8.1", "browserify": "3.18.0", "uglify-js": "2.4.8" }, "author": "Jordan Santell", "license": "MIT", "scripts": { "test": "./node_modules/.bin/mocha --reporter spec --ui bdd" }, "testling": { "browsers": { "ie": [8, 9, 10], "firefox": [25, "nightly"], "chrome": [30, "canary"], "opera": [10, "next"], "safari": [5.1, 6] }, "harness": "mocha", + "files": [ - "scripts": [ - "dist/ghosttrain.js", - "test/testlingSetup.js", "test/test.*.js" ] } }
4
0.105263
1
3
1eeb1d49f7214732754b359bea00025d11395e4b
server/game/cards/02.2-FHaG/RaiseTheAlarm.js
server/game/cards/02.2-FHaG/RaiseTheAlarm.js
const DrawCard = require('../../drawcard.js'); class RaiseTheAlarm extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Flip a dynasty card', condition: context => this.game.isDuringConflict('military') && context.player.isDefendingPlayer(), cannotBeMirrored: true, effect: 'flip the card in the conflict province faceup', gameAction: ability.actions.flipDynasty(context => ({ target: context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location) })), then: context => ({ handler: () => { let card = context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location); if(card.type === 'character' && card.allowGameAction('putIntoConflict', context)) { this.game.addMessage('{0} is revealed and brought into the conflict!', card); ability.actions.putIntoConflict().resolve(card, context); } else { this.game.addMessage('{0} is revealed but cannot be brought into the conflict!', card); } } }) }); } } RaiseTheAlarm.id = 'raise-the-alarm'; module.exports = RaiseTheAlarm;
const DrawCard = require('../../drawcard.js'); class RaiseTheAlarm extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Flip a dynasty card', condition: context => this.game.isDuringConflict('military') && context.player.isDefendingPlayer(), cannotBeMirrored: true, effect: 'flip the card in the conflict province faceup', gameAction: ability.actions.flipDynasty(context => ({ target: context.player.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location) })), then: context => ({ handler: () => { let card = context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location); if(card.type === 'character' && card.allowGameAction('putIntoConflict', context)) { this.game.addMessage('{0} is revealed and brought into the conflict!', card); ability.actions.putIntoConflict().resolve(card, context); } else { this.game.addMessage('{0} is revealed but cannot be brought into the conflict!', card); } } }) }); } } RaiseTheAlarm.id = 'raise-the-alarm'; module.exports = RaiseTheAlarm;
Fix Raise the Alarm bug
Fix Raise the Alarm bug
JavaScript
mit
gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki
javascript
## Code Before: const DrawCard = require('../../drawcard.js'); class RaiseTheAlarm extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Flip a dynasty card', condition: context => this.game.isDuringConflict('military') && context.player.isDefendingPlayer(), cannotBeMirrored: true, effect: 'flip the card in the conflict province faceup', gameAction: ability.actions.flipDynasty(context => ({ target: context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location) })), then: context => ({ handler: () => { let card = context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location); if(card.type === 'character' && card.allowGameAction('putIntoConflict', context)) { this.game.addMessage('{0} is revealed and brought into the conflict!', card); ability.actions.putIntoConflict().resolve(card, context); } else { this.game.addMessage('{0} is revealed but cannot be brought into the conflict!', card); } } }) }); } } RaiseTheAlarm.id = 'raise-the-alarm'; module.exports = RaiseTheAlarm; ## Instruction: Fix Raise the Alarm bug ## Code After: const DrawCard = require('../../drawcard.js'); class RaiseTheAlarm extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Flip a dynasty card', condition: context => this.game.isDuringConflict('military') && context.player.isDefendingPlayer(), cannotBeMirrored: true, effect: 'flip the card in the conflict province faceup', gameAction: ability.actions.flipDynasty(context => ({ target: context.player.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location) })), then: context => ({ handler: () => { let card = context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location); if(card.type === 'character' && card.allowGameAction('putIntoConflict', context)) { this.game.addMessage('{0} is revealed and brought into the conflict!', card); ability.actions.putIntoConflict().resolve(card, context); } else { this.game.addMessage('{0} is revealed but cannot be brought into the conflict!', card); } } }) }); } } RaiseTheAlarm.id = 'raise-the-alarm'; module.exports = RaiseTheAlarm;
const DrawCard = require('../../drawcard.js'); class RaiseTheAlarm extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Flip a dynasty card', condition: context => this.game.isDuringConflict('military') && context.player.isDefendingPlayer(), cannotBeMirrored: true, effect: 'flip the card in the conflict province faceup', gameAction: ability.actions.flipDynasty(context => ({ - target: context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location) ? ----------- + target: context.player.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location) })), then: context => ({ handler: () => { let card = context.player.controller.getDynastyCardInProvince(this.game.currentConflict.conflictProvince.location); if(card.type === 'character' && card.allowGameAction('putIntoConflict', context)) { this.game.addMessage('{0} is revealed and brought into the conflict!', card); ability.actions.putIntoConflict().resolve(card, context); } else { this.game.addMessage('{0} is revealed but cannot be brought into the conflict!', card); } } }) }); } } RaiseTheAlarm.id = 'raise-the-alarm'; module.exports = RaiseTheAlarm;
2
0.066667
1
1
f240f38ee1080d17f5494734df8ca11d9bf48033
.travis.yml
.travis.yml
language: php php: - 5.3 - 5.4 - 5.5 before_script: - composer validate - composer install --dev --no-interaction - mkdir -p build/logs script: - phpunit -c test/phpunit.xml after_script: - php vendor/bin/coveralls -v notifications: irc: "irc.freenode.net#johmanx"
language: php php: - 5.3 - 5.4 - 5.5 before_script: - composer self-update - composer validate - composer install --dev --no-interaction - mkdir -p build/logs script: - phpunit -c test/phpunit.xml after_script: - php vendor/bin/coveralls -v notifications: irc: "irc.freenode.net#johmanx"
Add composer self-update in the hopes it fixes the build
Add composer self-update in the hopes it fixes the build
YAML
apache-2.0
HylianShield/validator
yaml
## Code Before: language: php php: - 5.3 - 5.4 - 5.5 before_script: - composer validate - composer install --dev --no-interaction - mkdir -p build/logs script: - phpunit -c test/phpunit.xml after_script: - php vendor/bin/coveralls -v notifications: irc: "irc.freenode.net#johmanx" ## Instruction: Add composer self-update in the hopes it fixes the build ## Code After: language: php php: - 5.3 - 5.4 - 5.5 before_script: - composer self-update - composer validate - composer install --dev --no-interaction - mkdir -p build/logs script: - phpunit -c test/phpunit.xml after_script: - php vendor/bin/coveralls -v notifications: irc: "irc.freenode.net#johmanx"
language: php php: - 5.3 - 5.4 - 5.5 before_script: + - composer self-update - composer validate - composer install --dev --no-interaction - mkdir -p build/logs script: - phpunit -c test/phpunit.xml after_script: - php vendor/bin/coveralls -v notifications: irc: "irc.freenode.net#johmanx"
1
0.066667
1
0
0bffe7506811292e3974677e45e3b948a2b188e1
resources/migrations/create_addresses_table.php
resources/migrations/create_addresses_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAddressesTable extends Migration { public function up() { Schema::create('addresses', function (Blueprint $table) { $table->increments('id'); $table->morphs('addressable'); $table->integer('country_id')->unsigned()->index(); $table->string('organization')->nullable(); $table->string('name_prefix'); $table->string('name_suffix')->nullable(); $table->string('first_name'); $table->string('last_name'); $table->string('street'); $table->string('building_number'); $table->string('building_flat')->nullable(); $table->string('city'); $table->string('city_prefix')->nullable(); $table->string('city_suffix')->nullable(); $table->string('state'); $table->string('state_code')->nullable(); $table->string('postcode'); $table->string('phone')->nullable(); $table->float('lat')->nullable(); $table->float('lng')->nullable(); foreach (config('addressable.flags', []) as $flag) { $table->boolean('is_'.$flag)->default(false)->index(); } $table->timestamps(); }); } public function down() { Schema::dropIfExists('addresses'); } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAddressesTable extends Migration { public function up() { Schema::create('addresses', function (Blueprint $table) { $table->increments('id'); $table->morphs('addressable'); $table->integer('country_id')->unsigned()->index(); $table->string('organization')->nullable(); $table->string('name_prefix'); $table->string('name_suffix')->nullable(); $table->string('first_name'); $table->string('last_name'); $table->string('street'); $table->string('building_number')->nullable(); $table->string('building_flat')->nullable(); $table->string('city'); $table->string('city_prefix')->nullable(); $table->string('city_suffix')->nullable(); $table->string('state')->nullable(); $table->string('state_code')->nullable(); $table->string('postcode'); $table->string('phone')->nullable(); $table->float('lat')->nullable(); $table->float('lng')->nullable(); foreach (config('addressable.flags', []) as $flag) { $table->boolean('is_'.$flag)->default(false)->index(); } $table->timestamps(); }); } public function down() { Schema::dropIfExists('addresses'); } }
Make building_number and state optional
Make building_number and state optional
PHP
mit
DraperStudio/Laravel-Addressable
php
## Code Before: <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAddressesTable extends Migration { public function up() { Schema::create('addresses', function (Blueprint $table) { $table->increments('id'); $table->morphs('addressable'); $table->integer('country_id')->unsigned()->index(); $table->string('organization')->nullable(); $table->string('name_prefix'); $table->string('name_suffix')->nullable(); $table->string('first_name'); $table->string('last_name'); $table->string('street'); $table->string('building_number'); $table->string('building_flat')->nullable(); $table->string('city'); $table->string('city_prefix')->nullable(); $table->string('city_suffix')->nullable(); $table->string('state'); $table->string('state_code')->nullable(); $table->string('postcode'); $table->string('phone')->nullable(); $table->float('lat')->nullable(); $table->float('lng')->nullable(); foreach (config('addressable.flags', []) as $flag) { $table->boolean('is_'.$flag)->default(false)->index(); } $table->timestamps(); }); } public function down() { Schema::dropIfExists('addresses'); } } ## Instruction: Make building_number and state optional ## Code After: <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAddressesTable extends Migration { public function up() { Schema::create('addresses', function (Blueprint $table) { $table->increments('id'); $table->morphs('addressable'); $table->integer('country_id')->unsigned()->index(); $table->string('organization')->nullable(); $table->string('name_prefix'); $table->string('name_suffix')->nullable(); $table->string('first_name'); $table->string('last_name'); $table->string('street'); $table->string('building_number')->nullable(); $table->string('building_flat')->nullable(); $table->string('city'); $table->string('city_prefix')->nullable(); $table->string('city_suffix')->nullable(); $table->string('state')->nullable(); $table->string('state_code')->nullable(); $table->string('postcode'); $table->string('phone')->nullable(); $table->float('lat')->nullable(); $table->float('lng')->nullable(); foreach (config('addressable.flags', []) as $flag) { $table->boolean('is_'.$flag)->default(false)->index(); } $table->timestamps(); }); } public function down() { Schema::dropIfExists('addresses'); } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAddressesTable extends Migration { public function up() { Schema::create('addresses', function (Blueprint $table) { $table->increments('id'); $table->morphs('addressable'); $table->integer('country_id')->unsigned()->index(); $table->string('organization')->nullable(); $table->string('name_prefix'); $table->string('name_suffix')->nullable(); $table->string('first_name'); $table->string('last_name'); $table->string('street'); - $table->string('building_number'); + $table->string('building_number')->nullable(); ? ++++++++++++ $table->string('building_flat')->nullable(); $table->string('city'); $table->string('city_prefix')->nullable(); $table->string('city_suffix')->nullable(); - $table->string('state'); + $table->string('state')->nullable(); ? ++++++++++++ $table->string('state_code')->nullable(); $table->string('postcode'); $table->string('phone')->nullable(); $table->float('lat')->nullable(); $table->float('lng')->nullable(); foreach (config('addressable.flags', []) as $flag) { $table->boolean('is_'.$flag)->default(false)->index(); } $table->timestamps(); }); } public function down() { Schema::dropIfExists('addresses'); } }
4
0.090909
2
2
67d7e9724c2d73ca3875a5d01a612bb2ba92a8e6
recipes/font-ttf-noto/meta.yaml
recipes/font-ttf-noto/meta.yaml
{% set version = '20201206' %} package: name: font-ttf-noto version: {{ version }} source: url: https://github.com/googlefonts/noto-fonts/archive/20bc5918912503bc1537a407a694738c33c048aa.tar.gz sha256: f7a466624e5cc6893833ceb9c30223b7630bae967391c3abae6cd011b359d859 build: number: 0 noarch: generic test: requires: # dummy to have at least one test env requirement - bzip2 commands: - test -f ${PREFIX}/fonts/NotoSans-VF.ttf # [unix] about: home: https://www.google.com/get/noto dev_url: https://github.com/googlefonts/noto-fonts summary: Noto CJK fonts license: OFL-1.1 license_file: LICENSE license_family: OTHER extra: recipe-maintainers: - izahn
{% set version = '20201206' %} package: name: font-ttf-noto version: {{ version }} source: url: https://github.com/googlefonts/noto-fonts/archive/refs/tags/v{{ version }}-phase3.zip sha256: 376e3243620dc698a4dcc7bb927d9476374ad886c151d33d9d26c8bf595186a6 build: number: 0 noarch: generic test: requires: # dummy to have at least one test env requirement - bzip2 commands: - test -f ${PREFIX}/fonts/NotoSans-VF.ttf # [unix] about: home: https://www.google.com/get/noto dev_url: https://github.com/googlefonts/noto-fonts summary: Noto CJK fonts license: OFL-1.1 license_file: LICENSE license_family: OTHER extra: recipe-maintainers: - izahn
Revert "released archive is corrupt, retrieve from corresponding commit"
Revert "released archive is corrupt, retrieve from corresponding commit" This reverts commit b70753a91e0b8edeb3bf4c4bbfb1e78277d74bb5.
YAML
bsd-3-clause
goanpeca/staged-recipes,ocefpaf/staged-recipes,ocefpaf/staged-recipes,jakirkham/staged-recipes,jakirkham/staged-recipes,johanneskoester/staged-recipes,conda-forge/staged-recipes,conda-forge/staged-recipes,goanpeca/staged-recipes,johanneskoester/staged-recipes
yaml
## Code Before: {% set version = '20201206' %} package: name: font-ttf-noto version: {{ version }} source: url: https://github.com/googlefonts/noto-fonts/archive/20bc5918912503bc1537a407a694738c33c048aa.tar.gz sha256: f7a466624e5cc6893833ceb9c30223b7630bae967391c3abae6cd011b359d859 build: number: 0 noarch: generic test: requires: # dummy to have at least one test env requirement - bzip2 commands: - test -f ${PREFIX}/fonts/NotoSans-VF.ttf # [unix] about: home: https://www.google.com/get/noto dev_url: https://github.com/googlefonts/noto-fonts summary: Noto CJK fonts license: OFL-1.1 license_file: LICENSE license_family: OTHER extra: recipe-maintainers: - izahn ## Instruction: Revert "released archive is corrupt, retrieve from corresponding commit" This reverts commit b70753a91e0b8edeb3bf4c4bbfb1e78277d74bb5. ## Code After: {% set version = '20201206' %} package: name: font-ttf-noto version: {{ version }} source: url: https://github.com/googlefonts/noto-fonts/archive/refs/tags/v{{ version }}-phase3.zip sha256: 376e3243620dc698a4dcc7bb927d9476374ad886c151d33d9d26c8bf595186a6 build: number: 0 noarch: generic test: requires: # dummy to have at least one test env requirement - bzip2 commands: - test -f ${PREFIX}/fonts/NotoSans-VF.ttf # [unix] about: home: https://www.google.com/get/noto dev_url: https://github.com/googlefonts/noto-fonts summary: Noto CJK fonts license: OFL-1.1 license_file: LICENSE license_family: OTHER extra: recipe-maintainers: - izahn
{% set version = '20201206' %} package: name: font-ttf-noto version: {{ version }} source: - url: https://github.com/googlefonts/noto-fonts/archive/20bc5918912503bc1537a407a694738c33c048aa.tar.gz - sha256: f7a466624e5cc6893833ceb9c30223b7630bae967391c3abae6cd011b359d859 + url: https://github.com/googlefonts/noto-fonts/archive/refs/tags/v{{ version }}-phase3.zip + sha256: 376e3243620dc698a4dcc7bb927d9476374ad886c151d33d9d26c8bf595186a6 build: number: 0 noarch: generic test: requires: # dummy to have at least one test env requirement - bzip2 commands: - test -f ${PREFIX}/fonts/NotoSans-VF.ttf # [unix] about: home: https://www.google.com/get/noto dev_url: https://github.com/googlefonts/noto-fonts summary: Noto CJK fonts license: OFL-1.1 license_file: LICENSE license_family: OTHER extra: recipe-maintainers: - izahn
4
0.125
2
2
0a609f9be6e529f85295e85dff236a0898530348
src/Flock/MainBundle/Controller/AuthController.php
src/Flock/MainBundle/Controller/AuthController.php
<?php /** * Created by Amal Raghav <amal.raghav@gmail.com> * Date: 11/06/11 */ namespace Flock\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Sensio\Bundle\FrameworkExtraBundle\Configuration as Extra; use Symfony\Component\HttpFoundation\Request; /** * @Extra\Route("/auth") */ class AuthController extends Controller { /** * @Extra\Route("/login", name="flock_login") * @return \Symfony\Bundle\FrameworkBundle\Controller\Response */ public function indexAction() { return $this->render('FlockMainBundle:Default:index.html.twig', array()); } /** * @Extra\Route("/twitter", name="twitter_auth") * * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function twitterAction(Request $request) { return new RedirectResponse($request->headers->get('referer')); } }
<?php /** * Created by Amal Raghav <amal.raghav@gmail.com> * Date: 11/06/11 */ namespace Flock\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Sensio\Bundle\FrameworkExtraBundle\Configuration as Extra; use Symfony\Component\HttpFoundation\Request; /** * @Extra\Route("/auth") */ class AuthController extends Controller { /** * @Extra\Route("/login", name="flock_login") * @return \Symfony\Bundle\FrameworkBundle\Controller\Response */ public function indexAction() { return $this->render('FlockMainBundle:Default:index.html.twig', array()); } /** * @Extra\Route("/twitter", name="twitter_auth") * * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function twitterAction(Request $request) { $redirectTo = $request->headers->get('referer') ?: '/'; return new RedirectResponse($redirectTo); } }
Fix to redirect to homepage when no referer is defined
Fix to redirect to homepage when no referer is defined
PHP
mit
kertz/flock,kertz/flock
php
## Code Before: <?php /** * Created by Amal Raghav <amal.raghav@gmail.com> * Date: 11/06/11 */ namespace Flock\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Sensio\Bundle\FrameworkExtraBundle\Configuration as Extra; use Symfony\Component\HttpFoundation\Request; /** * @Extra\Route("/auth") */ class AuthController extends Controller { /** * @Extra\Route("/login", name="flock_login") * @return \Symfony\Bundle\FrameworkBundle\Controller\Response */ public function indexAction() { return $this->render('FlockMainBundle:Default:index.html.twig', array()); } /** * @Extra\Route("/twitter", name="twitter_auth") * * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function twitterAction(Request $request) { return new RedirectResponse($request->headers->get('referer')); } } ## Instruction: Fix to redirect to homepage when no referer is defined ## Code After: <?php /** * Created by Amal Raghav <amal.raghav@gmail.com> * Date: 11/06/11 */ namespace Flock\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Sensio\Bundle\FrameworkExtraBundle\Configuration as Extra; use Symfony\Component\HttpFoundation\Request; /** * @Extra\Route("/auth") */ class AuthController extends Controller { /** * @Extra\Route("/login", name="flock_login") * @return \Symfony\Bundle\FrameworkBundle\Controller\Response */ public function indexAction() { return $this->render('FlockMainBundle:Default:index.html.twig', array()); } /** * @Extra\Route("/twitter", name="twitter_auth") * * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function twitterAction(Request $request) { $redirectTo = $request->headers->get('referer') ?: '/'; return new RedirectResponse($redirectTo); } }
<?php /** * Created by Amal Raghav <amal.raghav@gmail.com> * Date: 11/06/11 */ namespace Flock\MainBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Sensio\Bundle\FrameworkExtraBundle\Configuration as Extra; use Symfony\Component\HttpFoundation\Request; /** * @Extra\Route("/auth") */ class AuthController extends Controller { /** * @Extra\Route("/login", name="flock_login") * @return \Symfony\Bundle\FrameworkBundle\Controller\Response */ public function indexAction() { return $this->render('FlockMainBundle:Default:index.html.twig', array()); } /** * @Extra\Route("/twitter", name="twitter_auth") * * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function twitterAction(Request $request) { - return new RedirectResponse($request->headers->get('referer')); ? ^ ----------- ^^^^ ^^^^ ^ + $redirectTo = $request->headers->get('referer') ?: '/'; ? ^ ^ ^^^ ^^^^^^^ + return new RedirectResponse($redirectTo); } }
3
0.076923
2
1
9d77e8521f17594a2e2dcd4e78e48116a83523f4
js/controllers.js
js/controllers.js
angular.module('mini-data.controllers', []) .controller('mainCtrl', function($scope){ var getTimeInfo = function(){ var now = new Date(); var hours = now.getHours(); var period = 'AM'; var minutes = now.getMinutes(); if(hours > 12){ hours -= 12; period = 'PM'; } minutes < 10 && (minutes = '0' + minutes); return hours + ':' + minutes + period; } var getDateInfo = function(){ var monthObj = { 0: 'January', 1: 'February', 2: 'March', 3: 'April', 4: 'May', 5: 'June', 6: 'July', 7: 'August', 8: 'September', 9: 'October', 10: 'November', 11: 'December' } var now = new Date(); var day = now.getDate(); var month = monthObj[now.getMonth()]; var year = now.getFullYear(); return month + ' ' + day + 'th, ' + year; } $scope.time = getTimeInfo(); $scope.date = getDateInfo(); });
angular.module('mini-data.controllers', []) .controller('mainCtrl', function($scope){ var getTimeInfo = function(){ var now = new Date(); var hours = now.getHours(); var period = 'AM'; var minutes = now.getMinutes(); if(hours > 12){ hours -= 12; period = 'PM'; } minutes < 10 && (minutes = '0' + minutes); return hours + ':' + minutes + period; } var getDateInfo = function(){ var monthObj = { 0: 'January', 1: 'February', 2: 'March', 3: 'April', 4: 'May', 5: 'June', 6: 'July', 7: 'August', 8: 'September', 9: 'October', 10: 'November', 11: 'December' } var now = new Date(); var day = now.getDate(); var month = monthObj[now.getMonth()]; var year = now.getFullYear(); return month + ' ' + day + 'th, ' + year; } $scope.time = getTimeInfo(); setInterval(function(){ $scope.$apply(function(){ $scope.time = getTimeInfo(); }); }, 10000); $scope.date = getDateInfo(); });
Add setInterval to keep clock up to date
Add setInterval to keep clock up to date
JavaScript
mit
tylermcginnis/mini-data
javascript
## Code Before: angular.module('mini-data.controllers', []) .controller('mainCtrl', function($scope){ var getTimeInfo = function(){ var now = new Date(); var hours = now.getHours(); var period = 'AM'; var minutes = now.getMinutes(); if(hours > 12){ hours -= 12; period = 'PM'; } minutes < 10 && (minutes = '0' + minutes); return hours + ':' + minutes + period; } var getDateInfo = function(){ var monthObj = { 0: 'January', 1: 'February', 2: 'March', 3: 'April', 4: 'May', 5: 'June', 6: 'July', 7: 'August', 8: 'September', 9: 'October', 10: 'November', 11: 'December' } var now = new Date(); var day = now.getDate(); var month = monthObj[now.getMonth()]; var year = now.getFullYear(); return month + ' ' + day + 'th, ' + year; } $scope.time = getTimeInfo(); $scope.date = getDateInfo(); }); ## Instruction: Add setInterval to keep clock up to date ## Code After: angular.module('mini-data.controllers', []) .controller('mainCtrl', function($scope){ var getTimeInfo = function(){ var now = new Date(); var hours = now.getHours(); var period = 'AM'; var minutes = now.getMinutes(); if(hours > 12){ hours -= 12; period = 'PM'; } minutes < 10 && (minutes = '0' + minutes); return hours + ':' + minutes + period; } var getDateInfo = function(){ var monthObj = { 0: 'January', 1: 'February', 2: 'March', 3: 'April', 4: 'May', 5: 'June', 6: 'July', 7: 'August', 8: 'September', 9: 'October', 10: 'November', 11: 'December' } var now = new Date(); var day = now.getDate(); var month = monthObj[now.getMonth()]; var year = now.getFullYear(); return month + ' ' + day + 'th, ' + year; } $scope.time = getTimeInfo(); setInterval(function(){ $scope.$apply(function(){ $scope.time = getTimeInfo(); }); }, 10000); $scope.date = getDateInfo(); });
angular.module('mini-data.controllers', []) .controller('mainCtrl', function($scope){ var getTimeInfo = function(){ var now = new Date(); var hours = now.getHours(); var period = 'AM'; var minutes = now.getMinutes(); if(hours > 12){ hours -= 12; period = 'PM'; } minutes < 10 && (minutes = '0' + minutes); return hours + ':' + minutes + period; } var getDateInfo = function(){ var monthObj = { 0: 'January', 1: 'February', 2: 'March', 3: 'April', 4: 'May', 5: 'June', 6: 'July', 7: 'August', 8: 'September', 9: 'October', 10: 'November', 11: 'December' } var now = new Date(); var day = now.getDate(); var month = monthObj[now.getMonth()]; var year = now.getFullYear(); return month + ' ' + day + 'th, ' + year; } $scope.time = getTimeInfo(); + + setInterval(function(){ + $scope.$apply(function(){ + $scope.time = getTimeInfo(); + }); + }, 10000); + $scope.date = getDateInfo(); });
7
0.212121
7
0
ca1267b694d17c121147095ef22dfcb42927d7f9
src/components/Footer/Footer.js
src/components/Footer/Footer.js
import React from 'react'; function Footer() { return ( <footer style={{height: '100px', backgroundColor: 'rgb(80, 80, 80)'}}> <div> <div style={{color: 'whitesmoke'}}>© inneklemtedager.no</div> <ul> </ul> </div> </footer> ); } export default Footer;
import React from 'react'; import {Segment, Container} from 'semantic-ui-react'; function Footer() { return ( <footer style={{backgroundColor: 'rgb(80, 80, 80)'}}> <Segment vertical style={{padding: '2em 0'}}> <Container> <div> <div style={{color: 'whitesmoke', fontSize: '1.4em'}}>© inneklemtedager.no</div> <br/> <div><a href="https://github.com/viktorfa/squeezed-days">GitHub</a></div> <div><a href="https://www.facebook.com/inneklemtedager/">Facebook</a></div> </div> </Container> </Segment> </footer> ); } export default Footer;
Make footer a little better.
Make footer a little better.
JavaScript
mit
viktorfa/squeezed-days,viktorfa/squeezed-days
javascript
## Code Before: import React from 'react'; function Footer() { return ( <footer style={{height: '100px', backgroundColor: 'rgb(80, 80, 80)'}}> <div> <div style={{color: 'whitesmoke'}}>© inneklemtedager.no</div> <ul> </ul> </div> </footer> ); } export default Footer; ## Instruction: Make footer a little better. ## Code After: import React from 'react'; import {Segment, Container} from 'semantic-ui-react'; function Footer() { return ( <footer style={{backgroundColor: 'rgb(80, 80, 80)'}}> <Segment vertical style={{padding: '2em 0'}}> <Container> <div> <div style={{color: 'whitesmoke', fontSize: '1.4em'}}>© inneklemtedager.no</div> <br/> <div><a href="https://github.com/viktorfa/squeezed-days">GitHub</a></div> <div><a href="https://www.facebook.com/inneklemtedager/">Facebook</a></div> </div> </Container> </Segment> </footer> ); } export default Footer;
import React from 'react'; + import {Segment, Container} from 'semantic-ui-react'; function Footer() { - return ( + return ( ? ++ - <footer style={{height: '100px', backgroundColor: 'rgb(80, 80, 80)'}}> ? ----------------- + <footer style={{backgroundColor: 'rgb(80, 80, 80)'}}> ? ++++ - <div> + <Segment vertical style={{padding: '2em 0'}}> + <Container> + <div> - <div style={{color: 'whitesmoke'}}>© inneklemtedager.no</div> + <div style={{color: 'whitesmoke', fontSize: '1.4em'}}>© inneklemtedager.no</div> ? ++++++++++++++++ +++++++++++++++++++ - <ul> - </ul> - </div> + <br/> + <div><a href="https://github.com/viktorfa/squeezed-days">GitHub</a></div> + <div><a href="https://www.facebook.com/inneklemtedager/">Facebook</a></div> + + </div> + </Container> + </Segment> - </footer> + </footer> ? ++++ - ); + ); ? ++ } export default Footer;
25
1.666667
16
9
c21c536c62be0465175545501d98a6a74625833a
app/Console/Commands/SilentEnabledCommand.php
app/Console/Commands/SilentEnabledCommand.php
<?php // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. namespace App\Console\Commands; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; abstract class SilentEnabledCommand extends Command { public function info($string) { if (!$this->option('silent')) { parent::info($string); } } public function comment($string) { if (!$this->option('silent')) { parent::comment($string); } } public function getOptions() { return [ ['silent', null, InputOption::VALUE_NONE, 'Silence the output from the function', null], ]; } }
<?php // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. namespace App\Console\Commands; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; abstract class SilentEnabledCommand extends Command { public function info($string, $verbosity = null) { if (!$this->option('silent')) { parent::info($string); } } public function comment($string, $verbosity = null) { if (!$this->option('silent')) { parent::comment($string); } } public function getOptions() { return [ ['silent', null, InputOption::VALUE_NONE, 'Silence the output from the function', null], ]; } }
Fix incorrect override function signatures
Fix incorrect override function signatures
PHP
agpl-3.0
nanaya/osu-web,nanaya/osu-web,ppy/osu-web,notbakaneko/osu-web,notbakaneko/osu-web,ppy/osu-web,nanaya/osu-web,ppy/osu-web,notbakaneko/osu-web,nanaya/osu-web,nanaya/osu-web,notbakaneko/osu-web,ppy/osu-web,ppy/osu-web,notbakaneko/osu-web
php
## Code Before: <?php // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. namespace App\Console\Commands; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; abstract class SilentEnabledCommand extends Command { public function info($string) { if (!$this->option('silent')) { parent::info($string); } } public function comment($string) { if (!$this->option('silent')) { parent::comment($string); } } public function getOptions() { return [ ['silent', null, InputOption::VALUE_NONE, 'Silence the output from the function', null], ]; } } ## Instruction: Fix incorrect override function signatures ## Code After: <?php // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. namespace App\Console\Commands; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; abstract class SilentEnabledCommand extends Command { public function info($string, $verbosity = null) { if (!$this->option('silent')) { parent::info($string); } } public function comment($string, $verbosity = null) { if (!$this->option('silent')) { parent::comment($string); } } public function getOptions() { return [ ['silent', null, InputOption::VALUE_NONE, 'Silence the output from the function', null], ]; } }
<?php // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. namespace App\Console\Commands; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; abstract class SilentEnabledCommand extends Command { - public function info($string) + public function info($string, $verbosity = null) ? +++++++++++++++++++ { if (!$this->option('silent')) { parent::info($string); } } - public function comment($string) + public function comment($string, $verbosity = null) ? +++++++++++++++++++ { if (!$this->option('silent')) { parent::comment($string); } } public function getOptions() { return [ ['silent', null, InputOption::VALUE_NONE, 'Silence the output from the function', null], ]; } }
4
0.121212
2
2
dbfca4cb557ebe45e1b81ddbe37785e35b9513a8
webpack/webpack.build.js
webpack/webpack.build.js
var path = require("path"); var webpack = require("webpack"); var DtsBundlePlugin = require("./webpack.dts.plugin"); module.exports = { entry: { main: "./src/index", }, resolve: { extensions: [".ts"], }, output: { filename: "trapezium.js", }, module: { rules: [ /** * Enable inline source maps for code coverage report. * * See project repository for details / configuration reference: * https://github.com/s-panferov/awesome-typescript-loader */ { test: /\.ts(x?)$/, use: [ "ts-loader", ], }, ], }, plugins: [ new DtsBundlePlugin(), ], };
var path = require("path"); var webpack = require("webpack"); var DtsBundlePlugin = require("./webpack.dts.plugin"); module.exports = { entry: { main: "./src/index", }, resolve: { extensions: [".ts"], }, output: { filename: "trapezium.js", libraryTarget: "commonjs", }, module: { rules: [ /** * Enable inline source maps for code coverage report. * * See project repository for details / configuration reference: * https://github.com/s-panferov/awesome-typescript-loader */ { test: /\.ts(x?)$/, use: [ "ts-loader", ], }, ], }, plugins: [ new DtsBundlePlugin(), ], };
Add libraryTarget to make module exportable
Add libraryTarget to make module exportable
JavaScript
mit
Josh-ES/trapezium,Josh-ES/trapezium,Josh-ES/trapezium
javascript
## Code Before: var path = require("path"); var webpack = require("webpack"); var DtsBundlePlugin = require("./webpack.dts.plugin"); module.exports = { entry: { main: "./src/index", }, resolve: { extensions: [".ts"], }, output: { filename: "trapezium.js", }, module: { rules: [ /** * Enable inline source maps for code coverage report. * * See project repository for details / configuration reference: * https://github.com/s-panferov/awesome-typescript-loader */ { test: /\.ts(x?)$/, use: [ "ts-loader", ], }, ], }, plugins: [ new DtsBundlePlugin(), ], }; ## Instruction: Add libraryTarget to make module exportable ## Code After: var path = require("path"); var webpack = require("webpack"); var DtsBundlePlugin = require("./webpack.dts.plugin"); module.exports = { entry: { main: "./src/index", }, resolve: { extensions: [".ts"], }, output: { filename: "trapezium.js", libraryTarget: "commonjs", }, module: { rules: [ /** * Enable inline source maps for code coverage report. * * See project repository for details / configuration reference: * https://github.com/s-panferov/awesome-typescript-loader */ { test: /\.ts(x?)$/, use: [ "ts-loader", ], }, ], }, plugins: [ new DtsBundlePlugin(), ], };
var path = require("path"); var webpack = require("webpack"); var DtsBundlePlugin = require("./webpack.dts.plugin"); module.exports = { entry: { main: "./src/index", }, resolve: { extensions: [".ts"], }, output: { filename: "trapezium.js", + libraryTarget: "commonjs", }, module: { rules: [ /** * Enable inline source maps for code coverage report. * * See project repository for details / configuration reference: * https://github.com/s-panferov/awesome-typescript-loader */ { test: /\.ts(x?)$/, use: [ "ts-loader", ], }, ], }, plugins: [ new DtsBundlePlugin(), ], };
1
0.025641
1
0
0d183cab88b650ba5398893d5b338d07ad901aac
recipes/firefox/build.sh
recipes/firefox/build.sh
APP=${PREFIX}/bin/firefox if [[ $(uname) == Linux ]]; then mkdir -p ${PREFIX}/bin/Firefox mv * ${PREFIX}/bin/Firefox cat <<EOF >$APP #!/bin/bash $PREFIX/bin/Firefox/firefox "\$@" EOF elif [[ $(uname) == Darwin ]]; then pkgutil --expand firefox.pkg firefox cpio -i -I firefox/Payload cp -rf Firefox.app ${PREFIX}/ cat <<EOF >$APP #!/bin/bash $PREFIX/Firefox.app/Contents/MacOS/firefox "\$@" EOF fi chmod +x $APP
mkdir -p $PREFIX/bin/Firefox if [[ $(uname) == Linux ]]; then mv * $PREFIX/bin/Firefox/ elif [[ $(uname) == Darwin ]]; then pkgutil --expand firefox.pkg firefox cpio -i -I firefox/Payload cp -rf Firefox.app/* $PREFIX/bin/Firefox/ fi # 2) Make a launch script in bin LAUNCH_SCRIPT=$PREFIX/bin/firefox if [[ $(uname) == Linux ]]; then cat <<EOF >$LAUNCH_SCRIPT #!/bin/bash $PREFIX/bin/Firefox/firefox "\$@" EOF elif [[ $(uname) == Darwin ]]; then cat <<EOF >$LAUNCH_SCRIPT #!/bin/bash $PREFIX/bin/Firefox/Contents/MacOS/firefox "\$@" EOF fi # Now we've made the launch script, make it executable chmod +x $LAUNCH_SCRIPT
Split up and add notes to launch script and put bin in consistent place
Split up and add notes to launch script and put bin in consistent place
Shell
bsd-3-clause
ocefpaf/staged-recipes,scopatz/staged-recipes,asmeurer/staged-recipes,jochym/staged-recipes,kwilcox/staged-recipes,synapticarbors/staged-recipes,johanneskoester/staged-recipes,conda-forge/staged-recipes,petrushy/staged-recipes,petrushy/staged-recipes,birdsarah/staged-recipes,isuruf/staged-recipes,mcs07/staged-recipes,Juanlu001/staged-recipes,ocefpaf/staged-recipes,patricksnape/staged-recipes,chrisburr/staged-recipes,hadim/staged-recipes,birdsarah/staged-recipes,asmeurer/staged-recipes,Juanlu001/staged-recipes,ReimarBauer/staged-recipes,SylvainCorlay/staged-recipes,isuruf/staged-recipes,stuertz/staged-recipes,synapticarbors/staged-recipes,jakirkham/staged-recipes,kwilcox/staged-recipes,ReimarBauer/staged-recipes,jochym/staged-recipes,SylvainCorlay/staged-recipes,mcs07/staged-recipes,goanpeca/staged-recipes,dschreij/staged-recipes,goanpeca/staged-recipes,hadim/staged-recipes,patricksnape/staged-recipes,jakirkham/staged-recipes,scopatz/staged-recipes,igortg/staged-recipes,stuertz/staged-recipes,johanneskoester/staged-recipes,dschreij/staged-recipes,mariusvniekerk/staged-recipes,mariusvniekerk/staged-recipes,igortg/staged-recipes,chrisburr/staged-recipes,conda-forge/staged-recipes
shell
## Code Before: APP=${PREFIX}/bin/firefox if [[ $(uname) == Linux ]]; then mkdir -p ${PREFIX}/bin/Firefox mv * ${PREFIX}/bin/Firefox cat <<EOF >$APP #!/bin/bash $PREFIX/bin/Firefox/firefox "\$@" EOF elif [[ $(uname) == Darwin ]]; then pkgutil --expand firefox.pkg firefox cpio -i -I firefox/Payload cp -rf Firefox.app ${PREFIX}/ cat <<EOF >$APP #!/bin/bash $PREFIX/Firefox.app/Contents/MacOS/firefox "\$@" EOF fi chmod +x $APP ## Instruction: Split up and add notes to launch script and put bin in consistent place ## Code After: mkdir -p $PREFIX/bin/Firefox if [[ $(uname) == Linux ]]; then mv * $PREFIX/bin/Firefox/ elif [[ $(uname) == Darwin ]]; then pkgutil --expand firefox.pkg firefox cpio -i -I firefox/Payload cp -rf Firefox.app/* $PREFIX/bin/Firefox/ fi # 2) Make a launch script in bin LAUNCH_SCRIPT=$PREFIX/bin/firefox if [[ $(uname) == Linux ]]; then cat <<EOF >$LAUNCH_SCRIPT #!/bin/bash $PREFIX/bin/Firefox/firefox "\$@" EOF elif [[ $(uname) == Darwin ]]; then cat <<EOF >$LAUNCH_SCRIPT #!/bin/bash $PREFIX/bin/Firefox/Contents/MacOS/firefox "\$@" EOF fi # Now we've made the launch script, make it executable chmod +x $LAUNCH_SCRIPT
- APP=${PREFIX}/bin/firefox + mkdir -p $PREFIX/bin/Firefox if [[ $(uname) == Linux ]]; then - mkdir -p ${PREFIX}/bin/Firefox - mv * ${PREFIX}/bin/Firefox ? - - + mv * $PREFIX/bin/Firefox/ ? + - cat <<EOF >$APP + elif [[ $(uname) == Darwin ]]; then + pkgutil --expand firefox.pkg firefox + cpio -i -I firefox/Payload + cp -rf Firefox.app/* $PREFIX/bin/Firefox/ + fi + + # 2) Make a launch script in bin + + LAUNCH_SCRIPT=$PREFIX/bin/firefox + + if [[ $(uname) == Linux ]]; then + cat <<EOF >$LAUNCH_SCRIPT #!/bin/bash $PREFIX/bin/Firefox/firefox "\$@" EOF elif [[ $(uname) == Darwin ]]; then + cat <<EOF >$LAUNCH_SCRIPT - pkgutil --expand firefox.pkg firefox - cpio -i -I firefox/Payload - cp -rf Firefox.app ${PREFIX}/ - cat <<EOF >$APP #!/bin/bash - $PREFIX/Firefox.app/Contents/MacOS/firefox "\$@" ? ---- + $PREFIX/bin/Firefox/Contents/MacOS/firefox "\$@" ? ++++ EOF fi - chmod +x $APP + # Now we've made the launch script, make it executable + chmod +x $LAUNCH_SCRIPT
28
1.333333
18
10
bd1ce049956272df99ec52598a2234afa32b3055
Paystack/PublicHeaders/PSTCKTransactionParams.h
Paystack/PublicHeaders/PSTCKTransactionParams.h
// // PSTCKTransactionParams.h // Paystack // #import <Foundation/Foundation.h> #import "PSTCKFormEncodable.h" /** * Representation of the transaction to perform on a card */ @interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable> @property (nonatomic, copy, nonnull) NSString *email; @property (nonatomic) NSUInteger amount; @property (nonatomic, copy, nullable) NSString *reference; @property (nonatomic, copy, nullable) NSString *subaccount; @property (nonatomic) NSInteger transaction_charge; @property (nonatomic, copy, nullable) NSString *bearer; @property (nonatomic, readonly, nullable) NSString *metadata; @property (nonatomic, readonly, nullable) NSString *plan; @property (nonatomic, readonly, nullable) NSString *currency; - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key error:(NSError * _Nullable __autoreleasing * _Nonnull) error; - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name error:(NSError * _Nullable __autoreleasing * _Nonnull) error; @end
// // PSTCKTransactionParams.h // Paystack // #import <Foundation/Foundation.h> #import "PSTCKFormEncodable.h" /** * Representation of the transaction to perform on a card */ @interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable> @property (nonatomic, copy, nonnull) NSString *email; @property (nonatomic) NSUInteger amount; @property (nonatomic, copy, nullable) NSString *reference; @property (nonatomic, copy, nullable) NSString *subaccount; @property (nonatomic) NSInteger transaction_charge; @property (nonatomic, copy, nullable) NSString *bearer; @property (nonatomic, readonly, nullable) NSString *metadata; @property (nonatomic, nullable) NSString *plan; @property (nonatomic, nullable) NSString *currency; - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key error:(NSError * _Nullable __autoreleasing * _Nonnull) error; - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name error:(NSError * _Nullable __autoreleasing * _Nonnull) error; @end
Make sure plan and currency are not readonly
[fix] Make sure plan and currency are not readonly
C
mit
PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios
c
## Code Before: // // PSTCKTransactionParams.h // Paystack // #import <Foundation/Foundation.h> #import "PSTCKFormEncodable.h" /** * Representation of the transaction to perform on a card */ @interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable> @property (nonatomic, copy, nonnull) NSString *email; @property (nonatomic) NSUInteger amount; @property (nonatomic, copy, nullable) NSString *reference; @property (nonatomic, copy, nullable) NSString *subaccount; @property (nonatomic) NSInteger transaction_charge; @property (nonatomic, copy, nullable) NSString *bearer; @property (nonatomic, readonly, nullable) NSString *metadata; @property (nonatomic, readonly, nullable) NSString *plan; @property (nonatomic, readonly, nullable) NSString *currency; - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key error:(NSError * _Nullable __autoreleasing * _Nonnull) error; - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name error:(NSError * _Nullable __autoreleasing * _Nonnull) error; @end ## Instruction: [fix] Make sure plan and currency are not readonly ## Code After: // // PSTCKTransactionParams.h // Paystack // #import <Foundation/Foundation.h> #import "PSTCKFormEncodable.h" /** * Representation of the transaction to perform on a card */ @interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable> @property (nonatomic, copy, nonnull) NSString *email; @property (nonatomic) NSUInteger amount; @property (nonatomic, copy, nullable) NSString *reference; @property (nonatomic, copy, nullable) NSString *subaccount; @property (nonatomic) NSInteger transaction_charge; @property (nonatomic, copy, nullable) NSString *bearer; @property (nonatomic, readonly, nullable) NSString *metadata; @property (nonatomic, nullable) NSString *plan; @property (nonatomic, nullable) NSString *currency; - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key error:(NSError * _Nullable __autoreleasing * _Nonnull) error; - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name error:(NSError * _Nullable __autoreleasing * _Nonnull) error; @end
// // PSTCKTransactionParams.h // Paystack // #import <Foundation/Foundation.h> #import "PSTCKFormEncodable.h" /** * Representation of the transaction to perform on a card */ @interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable> @property (nonatomic, copy, nonnull) NSString *email; @property (nonatomic) NSUInteger amount; @property (nonatomic, copy, nullable) NSString *reference; @property (nonatomic, copy, nullable) NSString *subaccount; @property (nonatomic) NSInteger transaction_charge; @property (nonatomic, copy, nullable) NSString *bearer; @property (nonatomic, readonly, nullable) NSString *metadata; - @property (nonatomic, readonly, nullable) NSString *plan; ? ---------- + @property (nonatomic, nullable) NSString *plan; - @property (nonatomic, readonly, nullable) NSString *currency; ? ---------- + @property (nonatomic, nullable) NSString *currency; - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key error:(NSError * _Nullable __autoreleasing * _Nonnull) error; - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name error:(NSError * _Nullable __autoreleasing * _Nonnull) error; @end
4
0.133333
2
2
b8870dd95ad0f43d7d6c332927b70b4cff1c2005
app/components/layout/locale_switcher_component.html.erb
app/components/layout/locale_switcher_component.html.erb
<div class="locale"> <form class="locale-form"> <label class="inline-block" for="locale-switcher"> <%= t("layouts.header.locale") %> </label> <select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher"> <% locales.map do |loc| %> <option <%= "selected" if loc == I18n.locale %> value="<%= current_path_with_query_params(locale: loc) %>"><%= name_for_locale(loc) %></option> <% end %> </select> </form> </div>
<div class="locale"> <form class="locale-form"> <label class="inline-block" for="locale-switcher"> <%= t("layouts.header.locale") %> </label> <select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher"> <% locales.map do |loc| %> <option lang="<%= loc %>" <%= "selected" if loc == I18n.locale %> value="<%= current_path_with_query_params(locale: loc) %>"><%= name_for_locale(loc) %></option> <% end %> </select> </form> </div>
Add a `lang` attribute to language options
Add a `lang` attribute to language options I'm not sure screen readers recognize this attribute inside `<option>` tags, but if they do, it'll probably be helpful. And if they don't, no harm will be done.
HTML+ERB
agpl-3.0
consul/consul,consul/consul,consul/consul,consul/consul,consul/consul
html+erb
## Code Before: <div class="locale"> <form class="locale-form"> <label class="inline-block" for="locale-switcher"> <%= t("layouts.header.locale") %> </label> <select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher"> <% locales.map do |loc| %> <option <%= "selected" if loc == I18n.locale %> value="<%= current_path_with_query_params(locale: loc) %>"><%= name_for_locale(loc) %></option> <% end %> </select> </form> </div> ## Instruction: Add a `lang` attribute to language options I'm not sure screen readers recognize this attribute inside `<option>` tags, but if they do, it'll probably be helpful. And if they don't, no harm will be done. ## Code After: <div class="locale"> <form class="locale-form"> <label class="inline-block" for="locale-switcher"> <%= t("layouts.header.locale") %> </label> <select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher"> <% locales.map do |loc| %> <option lang="<%= loc %>" <%= "selected" if loc == I18n.locale %> value="<%= current_path_with_query_params(locale: loc) %>"><%= name_for_locale(loc) %></option> <% end %> </select> </form> </div>
<div class="locale"> <form class="locale-form"> <label class="inline-block" for="locale-switcher"> <%= t("layouts.header.locale") %> </label> <select class="js-location-changer locale-switcher inline-block" name="locale-switcher" id="locale-switcher"> <% locales.map do |loc| %> - <option <%= "selected" if loc == I18n.locale %> + <option lang="<%= loc %>" <%= "selected" if loc == I18n.locale %> ? ++++++++++++++++++ value="<%= current_path_with_query_params(locale: loc) %>"><%= name_for_locale(loc) %></option> <% end %> </select> </form> </div>
2
0.153846
1
1
438c6d0b8bea994e9f57b4c480ebcdfd197a0e28
setup.py
setup.py
from setuptools import setup, find_packages import plaid url = 'https://github.com/plaid/plaid-python' setup( name='plaid-python', version=plaid.__version__, description='Simple Python API client for Plaid', long_description='', keywords='api, client, plaid', author='Chris Forrette', author_email='chris@chrisforrette.com', url=url, download_url='{}/tarball/v{}'.format(url, plaid.__version__), license='MIT', packages=find_packages(exclude='tests'), package_data={'README': ['README.md']}, install_requires=['requests==2.2.1'], zip_safe=False, include_package_data=True, classifiers=[ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Environment :: Web Environment", ] )
from setuptools import setup, find_packages import plaid url = 'https://github.com/plaid/plaid-python' setup( name='plaid-python', version=plaid.__version__, description='Simple Python API client for Plaid', long_description='', keywords='api, client, plaid', author='Chris Forrette', author_email='chris@chrisforrette.com', url=url, download_url='{}/tarball/v{}'.format(url, plaid.__version__), license='MIT', packages=find_packages(exclude='tests'), package_data={'README': ['README.md']}, install_requires=['requests==2.2.1'], zip_safe=False, include_package_data=True, classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Environment :: Web Environment", ] )
Update "Programming Language" Tag to Indicate Python3 Support
Update "Programming Language" Tag to Indicate Python3 Support
Python
mit
erikbern/plaid-python,qwil/plaid-python,plaid/plaid-python
python
## Code Before: from setuptools import setup, find_packages import plaid url = 'https://github.com/plaid/plaid-python' setup( name='plaid-python', version=plaid.__version__, description='Simple Python API client for Plaid', long_description='', keywords='api, client, plaid', author='Chris Forrette', author_email='chris@chrisforrette.com', url=url, download_url='{}/tarball/v{}'.format(url, plaid.__version__), license='MIT', packages=find_packages(exclude='tests'), package_data={'README': ['README.md']}, install_requires=['requests==2.2.1'], zip_safe=False, include_package_data=True, classifiers=[ "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules", "Environment :: Web Environment", ] ) ## Instruction: Update "Programming Language" Tag to Indicate Python3 Support ## Code After: from setuptools import setup, find_packages import plaid url = 'https://github.com/plaid/plaid-python' setup( name='plaid-python', version=plaid.__version__, description='Simple Python API client for Plaid', long_description='', keywords='api, client, plaid', author='Chris Forrette', author_email='chris@chrisforrette.com', url=url, download_url='{}/tarball/v{}'.format(url, plaid.__version__), license='MIT', packages=find_packages(exclude='tests'), package_data={'README': ['README.md']}, install_requires=['requests==2.2.1'], zip_safe=False, include_package_data=True, classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Environment :: Web Environment", ] )
from setuptools import setup, find_packages import plaid url = 'https://github.com/plaid/plaid-python' setup( name='plaid-python', version=plaid.__version__, description='Simple Python API client for Plaid', long_description='', keywords='api, client, plaid', author='Chris Forrette', author_email='chris@chrisforrette.com', url=url, download_url='{}/tarball/v{}'.format(url, plaid.__version__), license='MIT', packages=find_packages(exclude='tests'), package_data={'README': ['README.md']}, install_requires=['requests==2.2.1'], zip_safe=False, include_package_data=True, classifiers=[ "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Environment :: Web Environment", ] )
4
0.142857
4
0
cddee54a20d3ba2f48251f8c78e5b7790d09a8c6
styleguide.md
styleguide.md
* Need information explaining the Component Library * Process of adding comments * Process of reporting issues * An area for discussion about Components (HMRC-hackpad) * Process of signing off a Component
This guide demonstrates styles and components for HMRC applications * Need information explaining the Component Library * Process of adding comments * Process of reporting issues * An area for discussion about Components (HMRC-hackpad) * Process of signing off a Component
Update welcome copy for component library homepage
Update welcome copy for component library homepage
Markdown
apache-2.0
hmrc/assets-frontend,hmrc/assets-frontend,hmrc/assets-frontend
markdown
## Code Before: * Need information explaining the Component Library * Process of adding comments * Process of reporting issues * An area for discussion about Components (HMRC-hackpad) * Process of signing off a Component ## Instruction: Update welcome copy for component library homepage ## Code After: This guide demonstrates styles and components for HMRC applications * Need information explaining the Component Library * Process of adding comments * Process of reporting issues * An area for discussion about Components (HMRC-hackpad) * Process of signing off a Component
+ This guide demonstrates styles and components for HMRC applications * Need information explaining the Component Library * Process of adding comments * Process of reporting issues * An area for discussion about Components (HMRC-hackpad) * Process of signing off a Component
1
0.166667
1
0