From 0e6fc93a270090bd5ca0b84a33dab0d9d7234dd8 Mon Sep 17 00:00:00 2001 From: Lakshmi Vyasarajan Date: Sun, 19 Jun 2011 17:35:40 +0530 Subject: [PATCH] Issue #18: Added failing test --- hyde/tests/ext/test_sorter.py | 34 +++++ hyde/tests/sites/test_sorter/content/404.html | 22 +++ .../sites/test_sorter/content/about.html | 8 + .../test_sorter/content/apple-touch-icon.png | Bin 0 -> 1893 bytes .../blog/2010/december/merry-christmas.html | 9 ++ .../test_sorter/content/blog/angry-post.html | 131 ++++++++++++++++ .../content/blog/another-sad-post.html | 85 +++++++++++ .../test_sorter/content/blog/happy-post.html | 142 ++++++++++++++++++ .../test_sorter/content/blog/sad-post.html | 90 +++++++++++ .../sites/test_sorter/content/crossdomain.xml | 25 +++ .../sites/test_sorter/content/favicon.ico | Bin 0 -> 1150 bytes .../test_sorter/content/media/css/site.css | 4 + .../sites/test_sorter/content/robots.txt | 5 + hyde/tests/sites/test_sorter/layout/root.j2 | 7 + .../sites/test_sorter/layout/tagged_posts.j2 | 8 + hyde/tests/sites/test_sorter/site.yaml | 14 ++ 16 files changed, 584 insertions(+) create mode 100644 hyde/tests/sites/test_sorter/content/404.html create mode 100644 hyde/tests/sites/test_sorter/content/about.html create mode 100644 hyde/tests/sites/test_sorter/content/apple-touch-icon.png create mode 100644 hyde/tests/sites/test_sorter/content/blog/2010/december/merry-christmas.html create mode 100644 hyde/tests/sites/test_sorter/content/blog/angry-post.html create mode 100644 hyde/tests/sites/test_sorter/content/blog/another-sad-post.html create mode 100644 hyde/tests/sites/test_sorter/content/blog/happy-post.html create mode 100644 hyde/tests/sites/test_sorter/content/blog/sad-post.html create mode 100644 hyde/tests/sites/test_sorter/content/crossdomain.xml create mode 100644 hyde/tests/sites/test_sorter/content/favicon.ico create mode 100644 hyde/tests/sites/test_sorter/content/media/css/site.css create mode 100644 hyde/tests/sites/test_sorter/content/robots.txt create mode 100644 hyde/tests/sites/test_sorter/layout/root.j2 create mode 100644 hyde/tests/sites/test_sorter/layout/tagged_posts.j2 create mode 100644 hyde/tests/sites/test_sorter/site.yaml diff --git a/hyde/tests/ext/test_sorter.py b/hyde/tests/ext/test_sorter.py index 3a3c25c..ba09e28 100644 --- a/hyde/tests/ext/test_sorter.py +++ b/hyde/tests/ext/test_sorter.py @@ -276,3 +276,37 @@ class TestSorter(object): q = PyQuery(text) assert q('span.latest').text() == 'YayYayYay' + +class TestSorterMeta(object): + + def setUp(self): + TEST_SITE.make() + TEST_SITE.parent.child_folder( + 'sites/test_sorter').copy_contents_to(TEST_SITE) + + def tearDown(self): + TEST_SITE.delete() + + def test_walk_resources_sorted_by_index(self): + s = Site(TEST_SITE) + s.load() + config = { + "index": { + "attr": ['meta.index', 'name'] + } + } + s.config.sorter = Expando(config) + SorterPlugin(s).begin_site() + + assert hasattr(s.content, 'walk_resources_sorted_by_index') + expected = ["angry-post.html", + "another-sad-post.html", + "happy-post.html"] + + pages = [page.name for page in + s.content.walk_resources_sorted_by_kind()] + + assert pages == sorted(expected, key=lambda f: (File(f).kind, f)) + + + diff --git a/hyde/tests/sites/test_sorter/content/404.html b/hyde/tests/sites/test_sorter/content/404.html new file mode 100644 index 0000000..b5ea1ac --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/404.html @@ -0,0 +1,22 @@ + +not found + + + + + + +
+

Not found

+

:(

+
\ No newline at end of file diff --git a/hyde/tests/sites/test_sorter/content/about.html b/hyde/tests/sites/test_sorter/content/about.html new file mode 100644 index 0000000..6fd8880 --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/about.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block main %} + Hi! + + I am a test template to make sure jinja2 generation works well with hyde. + {{resource.name}} +{% endblock %} \ No newline at end of file diff --git a/hyde/tests/sites/test_sorter/content/apple-touch-icon.png b/hyde/tests/sites/test_sorter/content/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1f1972bd8c2bd077e4b4cd4ea0697475c19df731 GIT binary patch literal 1893 zcmV-r2b%baP)S{GTWpK(_Dl9lTDn(2+ zNllbYEg>Z%cu6xFE;Z(6FhFW{NNRH^Dktb>F)B4RrCK^dO-&^#C_-RpN^N&UG%9v7 z78xccA}J_HXmVUaH9ApMz*Q(VO;RTs6g*jANpE@_Cnq5$Bi3aQAOEMPzIuEI8V>CWlUraVBBQY{JQCUT7ct>h8XO%*XmKGZC&ykgBPb^4X*A+zG$1G^<7hM@C?-j3bmnO^BPk~2 zXf;c2cS&q^No#dTYjq+iCrWH}=V>+LXEfqyG)ZiA>S!|MXf#7+a2OvUNNaTDXfz@y zC$v~Gm_i-jVlM7$G!-c@Kw@m>Xfq-%Eg~QsI%97jFECARcT6J@>uNMXUS&aEW<+Rm zL}+o;T`cWvHzp?|L1k})Sx3WPG~Q-3fk-YuMnptNMkg>YH%3R#Tr4p@K2=9PCp|)_ zRx+GfJgHkb%xFG@J|U$?Ag4$nQ&Uc?N+MoZQh-M-93v$xNKdj?FgaXjy;dqeTw^IZ zJ@IERE<8PmN-ir}WDzLNeZCFo9P@h*Uj@SwllrSV&Y= zOITUwYBot~b2BqAKwV?UTrVOgCB|Pe$6qsUFBL2-D5Oj%b_dWH(%AM{jy1H8&tACLk#%At)wyL@cmYFSl1MKwM}xg9Tr6T$PR?I3 z%VIT9BN16C6+~)veOgK3XEY-zCph>d`v3p~`$jMZNxIw6V zJ|P4@83_LUn+PPK@~KOJM*myIn+;Ph@z4CyKQn}WgQVU6|FZ^TGan#;7>MC|p>n@! zA#;`f@gO_x(Z7%PVJ=(n4+3tAKonoC19CDGl8m8xZveTRwWnc5_5Qo{ulE(qO&=QJ)!55_=47F?2I>FLs&as$|B_h@?Fy!GSKh@*29%T&==*X!cjOb3%7*Dk6oX&dD9PL=6yN__Ns% z(wRY~&gAn?blL;R(J8UbA<|4vIG1FdN+Hgf{QG$N|EH3uGeg)%<=-(~p}TC#B zdQP?G(wsC1$VrElI&DU6r4S)=OYyZ~uavR4_H>t!Aa~V2>>zLQa(NR`-lRPuTT`+4 zGoYCD``OBJOnsB*^>9^}Bqb#kJ{3^L5kefHa)q!Z!Clalrn*%@=-kCkF2_OB>*e!Xy|h*#v5aw?(tRPri=_|&4U4HClq z8a#c%sRUC(2A^jdNSmr};&zdPO`xLx8MDw`Ic0)6Jz^MvQLsWjp@26jiI?Z7Ah-U% zz?ZjqS(FLrR1$MG*S%=~i2|VKIQ-VF_T0;D#k1)@et$j}etgbjLq1Sj_8X^ENE9fC zUjFMJtEk0+-_9&0Hpe|lyu31gNUlre*sM@w|MoP2u+1`N3l`u&FA7edj + Temper. Temper. Temper. +created: !!timestamp '2011-01-01 10:00:00' +index: 1 +--- + +{% mark excerpt -%} + +To complete the character-study of Mr. Worple, he was a man of extremely +uncertain temper, and his general tendency was to think that Corky was a poor +chump and that whatever step he took in any direction on his own account, was +just another proof of his innate idiocy. I should imagine Jeeves feels very +much the same about me. + +{%- endmark %} + +So when Corky trickled into my apartment one afternoon, shooing a girl in +front of him, and said, "Bertie, I want you to meet my fiancée, Miss Singer," +the aspect of the matter which hit me first was precisely the one which he had +come to consult me about. The very first words I spoke were, "Corky, how about +your uncle?" + +The poor chap gave one of those mirthless laughs. He was looking anxious and +worried, like a man who has done the murder all right but can't think what the +deuce to do with the body. + +"We're so scared, Mr. Wooster," said the girl. "We were hoping that you might +suggest a way of breaking it to him." + +Muriel Singer was one of those very quiet, appealing girls who have a way of +looking at you with their big eyes as if they thought you were the greatest +thing on earth and wondered that you hadn't got on to it yet yourself. She sat +there in a sort of shrinking way, looking at me as if she were saying to +herself, "Oh, I do hope this great strong man isn't going to hurt me." She +gave a fellow a protective kind of feeling, made him want to stroke her hand +and say, "There, there, little one!" or words to that effect. She made me feel +that there was nothing I wouldn't do for her. She was rather like one of those +innocent-tasting American drinks which creep imperceptibly into your system so +that, before you know what you're doing, you're starting out to reform the +world by force if necessary and pausing on your way to tell the large man in +the corner that, if he looks at you like that, you will knock his head off. +What I mean is, she made me feel alert and dashing, like a jolly old +knight-errant or something of that kind. I felt that I was with her in this +thing to the limit. + +"I don't see why your uncle shouldn't be most awfully bucked," I said to +Corky. "He will think Miss Singer the ideal wife for you." + +Corky declined to cheer up. + +"You don't know him. Even if he did like Muriel he wouldn't admit it. That's +the sort of pig-headed guy he is. It would be a matter of principle with him +to kick. All he would consider would be that I had gone and taken an important +step without asking his advice, and he would raise Cain automatically. He's +always done it." + +I strained the old bean to meet this emergency. + +"You want to work it so that he makes Miss Singer's acquaintance without +knowing that you know her. Then you come along" + +"But how can I work it that way?" + +I saw his point. That was the catch. + +"There's only one thing to do," I said. + +"What's that?" + +"Leave it to Jeeves." + +And I rang the bell. + +"Sir?" said Jeeves, kind of manifesting himself. One of the rummy things about +Jeeves is that, unless you watch like a hawk, you very seldom see him come +into a room. He's like one of those weird chappies in India who dissolve +themselves into thin air and nip through space in a sort of disembodied way +and assemble the parts again just where they want them. I've got a cousin +who's what they call a Theosophist, and he says he's often nearly worked the +thing himself, but couldn't quite bring it off, probably owing to having fed +in his boyhood on the flesh of animals slain in anger and pie. + +The moment I saw the man standing there, registering respectful attention, a +weight seemed to roll off my mind. I felt like a lost child who spots his +father in the offing. There was something about him that gave me confidence. + +Jeeves is a tallish man, with one of those dark, shrewd faces. His eye gleams +with the light of pure intelligence. + +"Jeeves, we want your advice." + +"Very good, sir." + +I boiled down Corky's painful case into a few well-chosen words. + +"So you see what it amount to, Jeeves. We want you to suggest some way by +which Mr. Worple can make Miss Singer's acquaintance without getting on to the +fact that Mr. Corcoran already knows her. Understand?" + +"Perfectly, sir." + +"Well, try to think of something." + +"I have thought of something already, sir." + +"You have!" + +"The scheme I would suggest cannot fail of success, but it has what may seem +to you a drawback, sir, in that it requires a certain financial outlay." + +"He means," I translated to Corky, "that he has got a pippin of an idea, but +it's going to cost a bit." + +Naturally the poor chap's face dropped, for this seemed to dish the whole +thing. But I was still under the influence of the girl's melting gaze, and I +saw that this was where I started in as a knight-errant. + +"You can count on me for all that sort of thing, Corky," I said. "Only too +glad. Carry on, Jeeves." + +"I would suggest, sir, that Mr. Corcoran take advantage of Mr. Worple's +attachment to ornithology." + +"How on earth did you know that he was fond of birds?" + + +[My Man Jeeves by PG Wodehouse][MMJ] + +[MMJ]: http://www.gutenberg.org/cache/epub/8164/pg8164.html diff --git a/hyde/tests/sites/test_sorter/content/blog/another-sad-post.html b/hyde/tests/sites/test_sorter/content/blog/another-sad-post.html new file mode 100644 index 0000000..a7612cc --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/blog/another-sad-post.html @@ -0,0 +1,85 @@ +--- +title: Another Sad Post +description: > + Something else sad happened. +created: !!timestamp '2011-03-01 10:00:00' +index: 2 +--- + +{% mark excerpt -%} + +I went and dressed sadly. It will show you pretty well how pipped I was when I +tell you that I near as a toucher put on a white tie with a dinner-jacket. I +sallied out for a bit of food more to pass the time than because I wanted it. +It seemed brutal to be wading into the bill of fare with poor old Bicky headed +for the breadline. + +{%- endmark %} + +When I got back old Chiswick had gone to bed, but Bicky was there, hunched up +in an arm-chair, brooding pretty tensely, with a cigarette hanging out of the +corner of his mouth and a more or less glassy stare in his eyes. He had the +aspect of one who had been soaked with what the newspaper chappies call "some +blunt instrument." + +"This is a bit thick, old thing—what!" I said. + +He picked up his glass and drained it feverishly, overlooking the fact that it +hadn't anything in it. + +"I'm done, Bertie!" he said. + +He had another go at the glass. It didn't seem to do him any good. + +"If only this had happened a week later, Bertie! My next month's money was due +to roll in on Saturday. I could have worked a wheeze I've been reading about +in the magazine advertisements. It seems that you can make a dashed amount of +money if you can only collect a few dollars and start a chicken-farm. Jolly +sound scheme, Bertie! Say you buy a hen—call it one hen for the sake of +argument. It lays an egg every day of the week. You sell the eggs seven for +twenty-five cents. Keep of hen costs nothing. Profit practically twenty-five +cents on every seven eggs. Or look at it another way: Suppose you have a dozen +eggs. Each of the hens has a dozen chickens. The chickens grow up and have +more chickens. Why, in no time you'd have the place covered knee-deep in hens, +all laying eggs, at twenty-five cents for every seven. You'd make a fortune. +Jolly life, too, keeping hens!" He had begun to get quite worked up at the +thought of it, but he slopped back in his chair at this juncture with a good +deal of gloom. "But, of course, it's no good," he said, "because I haven't the +cash." + +"You've only to say the word, you know, Bicky, old top." + +"Thanks awfully, Bertie, but I'm not going to sponge on you." + +That's always the way in this world. The chappies you'd like to lend money to +won't let you, whereas the chappies you don't want to lend it to will do +everything except actually stand you on your head and lift the specie out of +your pockets. As a lad who has always rolled tolerably free in the right +stuff, I've had lots of experience of the second class. Many's the time, back +in London, I've hurried along Piccadilly and felt the hot breath of the +toucher on the back of my neck and heard his sharp, excited yapping as he +closed in on me. I've simply spent my life scattering largesse to blighters I +didn't care a hang for; yet here was I now, dripping doubloons and pieces of +eight and longing to hand them over, and Bicky, poor fish, absolutely on his +uppers, not taking any at any price. + +"Well, there's only one hope, then." + +"What's that?" + +"Jeeves." + +"Sir?" + +There was Jeeves, standing behind me, full of zeal. In this matter of +shimmering into rooms the chappie is rummy to a degree. You're sitting in the +old armchair, thinking of this and that, and then suddenly you look up, and +there he is. He moves from point to point with as little uproar as a jelly +fish. The thing startled poor old Bicky considerably. He rose from his seat +like a rocketing pheasant. I'm used to Jeeves now, but often in the days when +he first came to me I've bitten my tongue freely on finding him unexpectedly +in my midst. + +[My Man Jeeves by PG Wodehouse][MMJ] + +[MMJ]: http://www.gutenberg.org/cache/epub/8164/pg8164.html diff --git a/hyde/tests/sites/test_sorter/content/blog/happy-post.html b/hyde/tests/sites/test_sorter/content/blog/happy-post.html new file mode 100644 index 0000000..9bd5d3c --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/blog/happy-post.html @@ -0,0 +1,142 @@ +--- +title: A Happy Post +description: > + Smile. Laugh. +created: !!timestamp '2011-02-01 10:00:00' +index: 3 +--- + +{% mark excerpt -%} + +Lady Malvern was a hearty, happy, healthy, overpowering sort of dashed female, +not so very tall but making up for it by measuring about six feet from the +O.P. to the Prompt Side. + +{%- endmark %} + +She fitted into my biggest arm-chair as if it had +been built round her by someone who knew they were wearing arm-chairs tight +about the hips that season. She had bright, bulging eyes and a lot of yellow +hair, and when she spoke she showed about fifty-seven front teeth. She was one +of those women who kind of numb a fellow's faculties. She made me feel as if I +were ten years old and had been brought into the drawing-room in my Sunday +clothes to say how-d'you-do. Altogether by no means the sort of thing a +chappie would wish to find in his sitting-room before breakfast. + +Motty, the son, was about twenty-three, tall and thin and meek-looking. He had +the same yellow hair as his mother, but he wore it plastered down and parted +in the middle. His eyes bulged, too, but they weren't bright. They were a dull +grey with pink rims. His chin gave up the struggle about half-way down, and he +didn't appear to have any eyelashes. A mild, furtive, sheepish sort of +blighter, in short. + +"Awfully glad to see you," I said. "So you've popped over, eh? Making a long +stay in America?" + +"About a month. Your aunt gave me your address and told me to be sure and call +on you." + +I was glad to hear this, as it showed that Aunt Agatha was beginning to come +round a bit. There had been some unpleasantness a year before, when she had +sent me over to New York to disentangle my Cousin Gussie from the clutches of +a girl on the music-hall stage. When I tell you that by the time I had +finished my operations, Gussie had not only married the girl but had gone on +the stage himself, and was doing well, you'll understand that Aunt Agatha was +upset to no small extent. I simply hadn't dared go back and face her, and it +was a relief to find that time had healed the wound and all that sort of thing +enough to make her tell her pals to look me up. What I mean is, much as I +liked America, I didn't want to have England barred to me for the rest of my +natural; and, believe me, England is a jolly sight too small for anyone to +live in with Aunt Agatha, if she's really on the warpath. So I braced on +hearing these kind words and smiled genially on the assemblage. + +"Your aunt said that you would do anything that was in your power to be of +assistance to us." + +"Rather? Oh, rather! Absolutely!" + +"Thank you so much. I want you to put dear Motty up for a little while." + +I didn't get this for a moment. + +"Put him up? For my clubs?" + +"No, no! Darling Motty is essentially a home bird. Aren't you, Motty darling?" + +Motty, who was sucking the knob of his stick, uncorked himself. + +"Yes, mother," he said, and corked himself up again. + +"I should not like him to belong to clubs. I mean put him up here. Have him to +live with you while I am away." + +These frightful words trickled out of her like honey. The woman simply didn't +seem to understand the ghastly nature of her proposal. I gave Motty the swift +east-to-west. He was sitting with his mouth nuzzling the stick, blinking at +the wall. The thought of having this planted on me for an indefinite period +appalled me. Absolutely appalled me, don't you know. I was just starting to +say that the shot wasn't on the board at any price, and that the first sign +Motty gave of trying to nestle into my little home I would yell for the +police, when she went on, rolling placidly over me, as it were. + +There was something about this woman that sapped a chappie's will-power. + +"I am leaving New York by the midday train, as I have to pay a visit to +Sing-Sing prison. I am extremely interested in prison conditions in America. +After that I work my way gradually across to the coast, visiting the points of +interest on the journey. You see, Mr. Wooster, I am in America principally on +business. No doubt you read my book, India and the Indians? My publishers are +anxious for me to write a companion volume on the United States. I shall not +be able to spend more than a month in the country, as I have to get back for +the season, but a month should be ample. I was less than a month in India, and +my dear friend Sir Roger Cremorne wrote his America from Within after a stay +of only two weeks. I should love to take dear Motty with me, but the poor boy +gets so sick when he travels by train. I shall have to pick him up on my +return." + +From where I sat I could see Jeeves in the dining-room, laying the +breakfast-table. I wished I could have had a minute with him alone. I felt +certain that he would have been able to think of some way of putting a stop to +this woman. + +"It will be such a relief to know that Motty is safe with you, Mr. Wooster. I +know what the temptations of a great city are. Hitherto dear Motty has been +sheltered from them. He has lived quietly with me in the country. I know that +you will look after him carefully, Mr. Wooster. He will give very little +trouble." She talked about the poor blighter as if he wasn't there. Not that +Motty seemed to mind. He had stopped chewing his walking-stick and was sitting +there with his mouth open. "He is a vegetarian and a teetotaller and is +devoted to reading. Give him a nice book and he will be quite contented." She +got up. "Thank you so much, Mr. Wooster! I don't know what I should have done +without your help. Come, Motty! We have just time to see a few of the sights +before my train goes. But I shall have to rely on you for most of my +information about New York, darling. Be sure to keep your eyes open and take +notes of your impressions! It will be such a help. Good-bye, Mr. Wooster. I +will send Motty back early in the afternoon." + +They went out, and I howled for Jeeves. + +"Jeeves! What about it?" + +"Sir?" + +"What's to be done? You heard it all, didn't you? You were in the dining-room +most of the time. That pill is coming to stay here." + +"Pill, sir?" + +"The excrescence." + +"I beg your pardon, sir?" + +I looked at Jeeves sharply. This sort of thing wasn't like him. It was as if +he were deliberately trying to give me the pip. Then I understood. The man was +really upset about that tie. He was trying to get his own back. + +"Lord Pershore will be staying here from to-night, Jeeves," I said coldly. + +"Very good, sir. Breakfast is ready, sir." + +[My Man Jeeves by PG Wodehouse][MMJ] + +[MMJ]: http://www.gutenberg.org/cache/epub/8164/pg8164.html diff --git a/hyde/tests/sites/test_sorter/content/blog/sad-post.html b/hyde/tests/sites/test_sorter/content/blog/sad-post.html new file mode 100644 index 0000000..ce77137 --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/blog/sad-post.html @@ -0,0 +1,90 @@ +--- +title: A Sad Post +description: > + Something sad happened. +created: !!timestamp '2010-12-01 10:00:00' +--- + +{% mark image -%} + +![A Dark Image]([[!!images/dark.png]]) + +{%- endmark %} + +{% mark excerpt -%} + +I went and dressed sadly. It will show you pretty well how pipped I was when I +tell you that I near as a toucher put on a white tie with a dinner-jacket. I +sallied out for a bit of food more to pass the time than because I wanted it. +It seemed brutal to be wading into the bill of fare with poor old Bicky headed +for the breadline. + +{%- endmark %} + +When I got back old Chiswick had gone to bed, but Bicky was there, hunched up +in an arm-chair, brooding pretty tensely, with a cigarette hanging out of the +corner of his mouth and a more or less glassy stare in his eyes. He had the +aspect of one who had been soaked with what the newspaper chappies call "some +blunt instrument." + +"This is a bit thick, old thing—what!" I said. + +He picked up his glass and drained it feverishly, overlooking the fact that it +hadn't anything in it. + +"I'm done, Bertie!" he said. + +He had another go at the glass. It didn't seem to do him any good. + +"If only this had happened a week later, Bertie! My next month's money was due +to roll in on Saturday. I could have worked a wheeze I've been reading about +in the magazine advertisements. It seems that you can make a dashed amount of +money if you can only collect a few dollars and start a chicken-farm. Jolly +sound scheme, Bertie! Say you buy a hen—call it one hen for the sake of +argument. It lays an egg every day of the week. You sell the eggs seven for +twenty-five cents. Keep of hen costs nothing. Profit practically twenty-five +cents on every seven eggs. Or look at it another way: Suppose you have a dozen +eggs. Each of the hens has a dozen chickens. The chickens grow up and have +more chickens. Why, in no time you'd have the place covered knee-deep in hens, +all laying eggs, at twenty-five cents for every seven. You'd make a fortune. +Jolly life, too, keeping hens!" He had begun to get quite worked up at the +thought of it, but he slopped back in his chair at this juncture with a good +deal of gloom. "But, of course, it's no good," he said, "because I haven't the +cash." + +"You've only to say the word, you know, Bicky, old top." + +"Thanks awfully, Bertie, but I'm not going to sponge on you." + +That's always the way in this world. The chappies you'd like to lend money to +won't let you, whereas the chappies you don't want to lend it to will do +everything except actually stand you on your head and lift the specie out of +your pockets. As a lad who has always rolled tolerably free in the right +stuff, I've had lots of experience of the second class. Many's the time, back +in London, I've hurried along Piccadilly and felt the hot breath of the +toucher on the back of my neck and heard his sharp, excited yapping as he +closed in on me. I've simply spent my life scattering largesse to blighters I +didn't care a hang for; yet here was I now, dripping doubloons and pieces of +eight and longing to hand them over, and Bicky, poor fish, absolutely on his +uppers, not taking any at any price. + +"Well, there's only one hope, then." + +"What's that?" + +"Jeeves." + +"Sir?" + +There was Jeeves, standing behind me, full of zeal. In this matter of +shimmering into rooms the chappie is rummy to a degree. You're sitting in the +old armchair, thinking of this and that, and then suddenly you look up, and +there he is. He moves from point to point with as little uproar as a jelly +fish. The thing startled poor old Bicky considerably. He rose from his seat +like a rocketing pheasant. I'm used to Jeeves now, but often in the days when +he first came to me I've bitten my tongue freely on finding him unexpectedly +in my midst. + +[My Man Jeeves by PG Wodehouse][MMJ] + +[MMJ]: http://www.gutenberg.org/cache/epub/8164/pg8164.html diff --git a/hyde/tests/sites/test_sorter/content/crossdomain.xml b/hyde/tests/sites/test_sorter/content/crossdomain.xml new file mode 100644 index 0000000..5b938f1 --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/crossdomain.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hyde/tests/sites/test_sorter/content/favicon.ico b/hyde/tests/sites/test_sorter/content/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..4ec0d298859a6e33a6cc40f7a502354b8cad5f76 GIT binary patch literal 1150 zcmZvc&rcIU6vv0?T~3}Vg?4v#yIp9zU1&k*FC;0yN&pE-r71xP79vXcVT>0+io~c1 z@uXK{B+(d6OeFpaN@9YEe?#HwsR-_La3ytienMto~)nRwQ- ztEU+|%NSFI377ELelaj6V$~l2tkU-O_ua*{^@FsA{g}@8q9dxKtviRl!Uob8+Ta!EAg$QvH?ga$D;u=7jC-I3O|)O%LUjBohDWow zICCGdrSIq+zm4V)7dd%ttzd{992)p}!V915J%{L}2T0!ff%9UY*uq!DZ@fotY!u;; zX657PiH$^CemQGdZh)@35gRKaxwM1C!WSeLx6xjBh3x1cW+(a)Yd0au_8EwEcrMo? z6gJQ~@d&A#Hk+9Lgv9)3Bo@CRI{6%#ksRiyhLGurTeTsU&cH?9ej|$5l_!YLeL(Em z8!>K)-xsXdBQ^KV${{lK5~)lcopIBu6|wgHNl^7h_yW!FH3p#g6d1kJ)*Ym0pP{F_ z6SAg53mD*f@Z|i&p43m&UQtACgmJkJTBrpbb03kpyo^>;fh5%*$L-vy=EPDDIQ`?? zBaNIlpe_Fx10z}ZRJ-Ptai@QXr(T?%DZH+X6CdcvAYh0yD}QTF8q!wwuhYl$ZW!U< z0rjZWr<9K>?&f$+vH!h44o_ogZ{NMVvQ|u{(z`B~x9oCBWtx+ZVwGB&AG#SUpJ8nK U6k~U4Y^(l{aMn(ow8Rkm2iEifo&W#< literal 0 HcmV?d00001 diff --git a/hyde/tests/sites/test_sorter/content/media/css/site.css b/hyde/tests/sites/test_sorter/content/media/css/site.css new file mode 100644 index 0000000..aa72a24 --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/media/css/site.css @@ -0,0 +1,4 @@ +body{ + margin: 0 auto; + width: 960px; +} \ No newline at end of file diff --git a/hyde/tests/sites/test_sorter/content/robots.txt b/hyde/tests/sites/test_sorter/content/robots.txt new file mode 100644 index 0000000..d310d07 --- /dev/null +++ b/hyde/tests/sites/test_sorter/content/robots.txt @@ -0,0 +1,5 @@ +# www.robotstxt.org/ +# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 + +User-agent: * + diff --git a/hyde/tests/sites/test_sorter/layout/root.j2 b/hyde/tests/sites/test_sorter/layout/root.j2 new file mode 100644 index 0000000..751bb80 --- /dev/null +++ b/hyde/tests/sites/test_sorter/layout/root.j2 @@ -0,0 +1,7 @@ + + + {% block content -%} + + {%- endblock %} + + \ No newline at end of file diff --git a/hyde/tests/sites/test_sorter/layout/tagged_posts.j2 b/hyde/tests/sites/test_sorter/layout/tagged_posts.j2 new file mode 100644 index 0000000..0bd551b --- /dev/null +++ b/hyde/tests/sites/test_sorter/layout/tagged_posts.j2 @@ -0,0 +1,8 @@ +

Posts tagged: {{ tag }} in {{ node.name|title }}

+ \ No newline at end of file diff --git a/hyde/tests/sites/test_sorter/site.yaml b/hyde/tests/sites/test_sorter/site.yaml new file mode 100644 index 0000000..b95445d --- /dev/null +++ b/hyde/tests/sites/test_sorter/site.yaml @@ -0,0 +1,14 @@ +mode: development +media_root: media # Relative path from content folder. +media_url: /media # URL where the media files are served from. +base_url: / # The base url for autogenerated links. +plugins: + - hyde.ext.plugins.meta.MetaPlugin + - hyde.ext.plugins.auto_extend.AutoExtendPlugin + - hyde.ext.plugins.sorter.SorterPlugin + - hyde.ext.plugins.textlinks.TextlinksPlugin +meta: + nodemeta: meta.yaml + created: !!timestamp 2010-01-01 00:00:00 + extends: root.j2 + default_block: content