Merge lp:~scopecreator-team/scopecreator/rss-emblem into lp:scopecreator
- rss-emblem
- Merge into trunk
Proposed by
Chris Wayne
Status: | Superseded |
---|---|
Proposed branch: | lp:~scopecreator-team/scopecreator/rss-emblem |
Merge into: | lp:scopecreator |
Diff against target: |
5420 lines (+4942/-0) 75 files modified
CMakeLists.txt (+111/-0) LICENSE (+674/-0) cmake/FindGMock.cmake (+13/-0) cmake/FindIntltool.cmake (+265/-0) data/CMakeLists.txt (+12/-0) data/feeds.json (+46/-0) data/rss.canonical_rss.ini.in (+11/-0) include/api/client.h (+84/-0) include/api/config.h (+44/-0) include/scope/localization.h (+39/-0) include/scope/preview.h (+57/-0) include/scope/query.h (+58/-0) include/scope/scope.h (+70/-0) manifest.json.in (+15/-0) po/CMakeLists.txt (+10/-0) po/Makefile.in.in (+1/-0) po/POTFILES.in (+12/-0) po/rss.pot (+26/-0) readme.txt (+26/-0) rss.apparmor (+7/-0) src/CMakeLists.txt (+97/-0) src/api/client.cpp (+271/-0) src/scope/preview.cpp (+91/-0) src/scope/query.cpp (+233/-0) src/scope/scope.cpp (+77/-0) tests/CMakeLists.txt (+42/-0) tests/server/bbc/news/rss.xml (+40/-0) tests/server/cnet/rss/all/index.xml (+2/-0) tests/server/elpais/portada.xml (+73/-0) tests/server/euronews/_partners/ubuntu/news.xml (+2/-0) tests/server/server.py (+67/-0) tests/server/vox/rss/index.xml (+113/-0) tests/server/xataka/xataka2.xml (+6/-0) tests/unit/CMakeLists.txt (+34/-0) tests/unit/bbc/CMakeLists.txt (+31/-0) tests/unit/bbc/feeds.json (+62/-0) tests/unit/bbc/images/headerLogo.svg (+80/-0) tests/unit/bbc/images/logo.svg (+60/-0) tests/unit/bbc/rss.ssweeny_rss.ini.in (+11/-0) tests/unit/cnet/CMakeLists.txt (+36/-0) tests/unit/cnet/cache/.cheat-click (+1/-0) tests/unit/cnet/feeds.json (+50/-0) tests/unit/cnet/icon.svg (+92/-0) tests/unit/cnet/images/default.svg (+322/-0) tests/unit/cnet/renderer/carousel.json (+12/-0) tests/unit/cnet/renderer/hgrid.json (+15/-0) tests/unit/cnet/renderer/journal.json (+16/-0) tests/unit/cnet/renderer/large.json (+14/-0) tests/unit/cnet/renderer/wide-art.json (+13/-0) tests/unit/cnet/rss.ssweeny_rss.ini.in (+11/-0) tests/unit/elpais/CMakeLists.txt (+11/-0) tests/unit/elpais/feeds.json (+6/-0) tests/unit/elpais/scope.ini.in (+16/-0) tests/unit/euronews/CMakeLists.txt (+23/-0) tests/unit/euronews/feeds.json (+26/-0) tests/unit/euronews/icon.svg (+92/-0) tests/unit/euronews/images/default.svg (+322/-0) tests/unit/euronews/renderer/carousel.json (+12/-0) tests/unit/euronews/renderer/hgrid.json (+15/-0) tests/unit/euronews/renderer/journal.json (+15/-0) tests/unit/euronews/renderer/large.json (+14/-0) tests/unit/euronews/renderer/wide-art.json (+13/-0) tests/unit/euronews/rss-scope.ini.in (+12/-0) tests/unit/scope/test-scope.cpp (+630/-0) tests/unit/vox/CMakeLists.txt (+12/-0) tests/unit/vox/feeds.json (+46/-0) tests/unit/vox/rss.ssweeny_rss.ini.in (+11/-0) tests/unit/xataka/CMakeLists.txt (+23/-0) tests/unit/xataka/feeds.json (+6/-0) tests/unit/xataka/renderer/carousel.json (+12/-0) tests/unit/xataka/renderer/hgrid.json (+15/-0) tests/unit/xataka/renderer/journal.json (+15/-0) tests/unit/xataka/renderer/large.json (+14/-0) tests/unit/xataka/renderer/wide-art.json (+13/-0) tests/unit/xataka/rss-scope.ini.in (+13/-0) |
To merge this branch: | bzr merge lp:~scopecreator-team/scopecreator/rss-emblem |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scopecreator Team | Pending | ||
Review via email: mp+259618@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-05-20.
Commit message
Description of the change
To post a comment you must log in.
Unmerged revisions
- 11. By Chris Wayne
-
Add emblem
- 10. By Scott Sweeny
-
File rename was lost in a merge somewhere
- 9. By Scott Sweeny
-
Add license info
- 8. By Scott Sweeny
-
Merge in unit tests
- 7. By Scott Sweeny
-
We should be using Variants to set fields
- 6. By Scott Sweeny
-
Use readElementText() instead of text() for more robust text extraction.
- 5. By Scott Sweeny
-
Remove "News" category title since it doesn't always apply and would need to be translated
- 4. By Scott Sweeny
-
Don't try to register departments if we only have one.
- 3. By Scott Sweeny
-
Don't just accept any link as the article link
- 2. By Scott Sweeny
-
Should probably have Canonical in the canonical name
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3 | +++ CMakeLists.txt 2015-05-20 13:57:15 +0000 |
4 | @@ -0,0 +1,111 @@ |
5 | +project(rss CXX) |
6 | +cmake_minimum_required(VERSION 2.8.10) |
7 | +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") |
8 | + |
9 | +# We require g++ 4.9, to avoid ABI breakage with earlier version. |
10 | +set(cxx_version_required 4.9) |
11 | +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |
12 | + if (NOT CMAKE_CXX_COMPILER_VERSION MATCHES "^${cxx_version_required}") |
13 | + message(FATAL_ERROR "g++ version must be ${cxx_version_required}!") |
14 | + endif() |
15 | +endif() |
16 | + |
17 | +# Set strict and naggy C++ compiler flags, and enable C++11 |
18 | +add_definitions( |
19 | + -fno-permissive |
20 | + -std=c++11 |
21 | + -pedantic |
22 | + -Wall |
23 | + -Wextra |
24 | + -fPIC |
25 | + -DQT_NO_KEYWORDS |
26 | +) |
27 | + |
28 | +include(GNUInstallDirs) |
29 | +find_package(PkgConfig) |
30 | +find_package(Intltool) |
31 | + |
32 | +# We depend on Boost for string trimming |
33 | +find_package( |
34 | + Boost |
35 | + REQUIRED |
36 | +) |
37 | + |
38 | +# Search for our dependencies |
39 | +pkg_check_modules( |
40 | + SCOPE |
41 | + libunity-scopes>=0.6.0 |
42 | + net-cpp>=1.1.0 |
43 | + REQUIRED |
44 | +) |
45 | + |
46 | +find_package(Qt5Core REQUIRED) |
47 | +include_directories(${Qt5Core_INCLUDE_DIRS}) |
48 | + |
49 | +# Add our dependencies to the include paths |
50 | +include_directories( |
51 | + "${CMAKE_SOURCE_DIR}/include" |
52 | + ${Boost_INCLUDE_DIRS} |
53 | + ${SCOPE_INCLUDE_DIRS} |
54 | +) |
55 | + |
56 | +# Do not remove this line, its required for the correct functionality of the Ubuntu-SDK |
57 | +set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Tells QtCreator location and name of the manifest file") |
58 | +set(UBUNTU_PROJECT_TYPE "Scope" CACHE INTERNAL "Tells QtCreator this is a Scope project") |
59 | + |
60 | +# Important project paths |
61 | +set(CMAKE_INSTALL_PREFIX /) |
62 | +set(SCOPE_INSTALL_DIR "/rss") |
63 | +set(GETTEXT_PACKAGE "rss") |
64 | +set(PACKAGE_NAME "rss.canonical") |
65 | +set(SCOPE_NAME "${PACKAGE_NAME}_rss") |
66 | + |
67 | +# If we need to refer to the scope's name or package in code, these definitions will help |
68 | + |
69 | +add_definitions(-DPACKAGE_NAME="${PACKAGE_NAME}") |
70 | +add_definitions(-DSCOPE_NAME="${SCOPE_NAME}") |
71 | +add_definitions(-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}") |
72 | + |
73 | +#This command figures out the target architecture and puts it into the manifest file |
74 | +execute_process( |
75 | + COMMAND dpkg-architecture -qDEB_HOST_ARCH |
76 | + OUTPUT_VARIABLE CLICK_ARCH |
77 | + OUTPUT_STRIP_TRAILING_WHITESPACE |
78 | +) |
79 | + |
80 | +configure_file(manifest.json.in ${CMAKE_CURRENT_BINARY_DIR}/manifest.json) |
81 | + |
82 | +# Install the click manifest |
83 | +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json DESTINATION "/") |
84 | +install(FILES "rss.apparmor" DESTINATION "/") |
85 | + |
86 | +# Make these files show up in QtCreator |
87 | +file(GLOB_RECURSE |
88 | + _PO_FILES |
89 | + "po/*.po" |
90 | +) |
91 | +add_custom_target(hidden_files |
92 | + ALL |
93 | + SOURCES |
94 | + manifest.json.in |
95 | + rss.apparmor |
96 | + data/${SCOPE_NAME}.ini.in |
97 | + data/feeds.json |
98 | + po/POTFILES.in |
99 | + po/${GETTEXT_PACKAGE}.pot |
100 | + ${_PO_FILES} |
101 | +) |
102 | + |
103 | +# Add our main directories |
104 | +add_subdirectory(src) |
105 | +add_subdirectory(data) |
106 | +add_subdirectory(po) |
107 | + |
108 | +# Set up the tests |
109 | +enable_testing() |
110 | +add_subdirectory(tests) |
111 | +add_custom_target( |
112 | + check |
113 | + ${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure |
114 | +) |
115 | + |
116 | |
117 | === added file 'LICENSE' |
118 | --- LICENSE 1970-01-01 00:00:00 +0000 |
119 | +++ LICENSE 2015-05-20 13:57:15 +0000 |
120 | @@ -0,0 +1,674 @@ |
121 | + GNU GENERAL PUBLIC LICENSE |
122 | + Version 3, 29 June 2007 |
123 | + |
124 | + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
125 | + Everyone is permitted to copy and distribute verbatim copies |
126 | + of this license document, but changing it is not allowed. |
127 | + |
128 | + Preamble |
129 | + |
130 | + The GNU General Public License is a free, copyleft license for |
131 | +software and other kinds of works. |
132 | + |
133 | + The licenses for most software and other practical works are designed |
134 | +to take away your freedom to share and change the works. By contrast, |
135 | +the GNU General Public License is intended to guarantee your freedom to |
136 | +share and change all versions of a program--to make sure it remains free |
137 | +software for all its users. We, the Free Software Foundation, use the |
138 | +GNU General Public License for most of our software; it applies also to |
139 | +any other work released this way by its authors. You can apply it to |
140 | +your programs, too. |
141 | + |
142 | + When we speak of free software, we are referring to freedom, not |
143 | +price. Our General Public Licenses are designed to make sure that you |
144 | +have the freedom to distribute copies of free software (and charge for |
145 | +them if you wish), that you receive source code or can get it if you |
146 | +want it, that you can change the software or use pieces of it in new |
147 | +free programs, and that you know you can do these things. |
148 | + |
149 | + To protect your rights, we need to prevent others from denying you |
150 | +these rights or asking you to surrender the rights. Therefore, you have |
151 | +certain responsibilities if you distribute copies of the software, or if |
152 | +you modify it: responsibilities to respect the freedom of others. |
153 | + |
154 | + For example, if you distribute copies of such a program, whether |
155 | +gratis or for a fee, you must pass on to the recipients the same |
156 | +freedoms that you received. You must make sure that they, too, receive |
157 | +or can get the source code. And you must show them these terms so they |
158 | +know their rights. |
159 | + |
160 | + Developers that use the GNU GPL protect your rights with two steps: |
161 | +(1) assert copyright on the software, and (2) offer you this License |
162 | +giving you legal permission to copy, distribute and/or modify it. |
163 | + |
164 | + For the developers' and authors' protection, the GPL clearly explains |
165 | +that there is no warranty for this free software. For both users' and |
166 | +authors' sake, the GPL requires that modified versions be marked as |
167 | +changed, so that their problems will not be attributed erroneously to |
168 | +authors of previous versions. |
169 | + |
170 | + Some devices are designed to deny users access to install or run |
171 | +modified versions of the software inside them, although the manufacturer |
172 | +can do so. This is fundamentally incompatible with the aim of |
173 | +protecting users' freedom to change the software. The systematic |
174 | +pattern of such abuse occurs in the area of products for individuals to |
175 | +use, which is precisely where it is most unacceptable. Therefore, we |
176 | +have designed this version of the GPL to prohibit the practice for those |
177 | +products. If such problems arise substantially in other domains, we |
178 | +stand ready to extend this provision to those domains in future versions |
179 | +of the GPL, as needed to protect the freedom of users. |
180 | + |
181 | + Finally, every program is threatened constantly by software patents. |
182 | +States should not allow patents to restrict development and use of |
183 | +software on general-purpose computers, but in those that do, we wish to |
184 | +avoid the special danger that patents applied to a free program could |
185 | +make it effectively proprietary. To prevent this, the GPL assures that |
186 | +patents cannot be used to render the program non-free. |
187 | + |
188 | + The precise terms and conditions for copying, distribution and |
189 | +modification follow. |
190 | + |
191 | + TERMS AND CONDITIONS |
192 | + |
193 | + 0. Definitions. |
194 | + |
195 | + "This License" refers to version 3 of the GNU General Public License. |
196 | + |
197 | + "Copyright" also means copyright-like laws that apply to other kinds of |
198 | +works, such as semiconductor masks. |
199 | + |
200 | + "The Program" refers to any copyrightable work licensed under this |
201 | +License. Each licensee is addressed as "you". "Licensees" and |
202 | +"recipients" may be individuals or organizations. |
203 | + |
204 | + To "modify" a work means to copy from or adapt all or part of the work |
205 | +in a fashion requiring copyright permission, other than the making of an |
206 | +exact copy. The resulting work is called a "modified version" of the |
207 | +earlier work or a work "based on" the earlier work. |
208 | + |
209 | + A "covered work" means either the unmodified Program or a work based |
210 | +on the Program. |
211 | + |
212 | + To "propagate" a work means to do anything with it that, without |
213 | +permission, would make you directly or secondarily liable for |
214 | +infringement under applicable copyright law, except executing it on a |
215 | +computer or modifying a private copy. Propagation includes copying, |
216 | +distribution (with or without modification), making available to the |
217 | +public, and in some countries other activities as well. |
218 | + |
219 | + To "convey" a work means any kind of propagation that enables other |
220 | +parties to make or receive copies. Mere interaction with a user through |
221 | +a computer network, with no transfer of a copy, is not conveying. |
222 | + |
223 | + An interactive user interface displays "Appropriate Legal Notices" |
224 | +to the extent that it includes a convenient and prominently visible |
225 | +feature that (1) displays an appropriate copyright notice, and (2) |
226 | +tells the user that there is no warranty for the work (except to the |
227 | +extent that warranties are provided), that licensees may convey the |
228 | +work under this License, and how to view a copy of this License. If |
229 | +the interface presents a list of user commands or options, such as a |
230 | +menu, a prominent item in the list meets this criterion. |
231 | + |
232 | + 1. Source Code. |
233 | + |
234 | + The "source code" for a work means the preferred form of the work |
235 | +for making modifications to it. "Object code" means any non-source |
236 | +form of a work. |
237 | + |
238 | + A "Standard Interface" means an interface that either is an official |
239 | +standard defined by a recognized standards body, or, in the case of |
240 | +interfaces specified for a particular programming language, one that |
241 | +is widely used among developers working in that language. |
242 | + |
243 | + The "System Libraries" of an executable work include anything, other |
244 | +than the work as a whole, that (a) is included in the normal form of |
245 | +packaging a Major Component, but which is not part of that Major |
246 | +Component, and (b) serves only to enable use of the work with that |
247 | +Major Component, or to implement a Standard Interface for which an |
248 | +implementation is available to the public in source code form. A |
249 | +"Major Component", in this context, means a major essential component |
250 | +(kernel, window system, and so on) of the specific operating system |
251 | +(if any) on which the executable work runs, or a compiler used to |
252 | +produce the work, or an object code interpreter used to run it. |
253 | + |
254 | + The "Corresponding Source" for a work in object code form means all |
255 | +the source code needed to generate, install, and (for an executable |
256 | +work) run the object code and to modify the work, including scripts to |
257 | +control those activities. However, it does not include the work's |
258 | +System Libraries, or general-purpose tools or generally available free |
259 | +programs which are used unmodified in performing those activities but |
260 | +which are not part of the work. For example, Corresponding Source |
261 | +includes interface definition files associated with source files for |
262 | +the work, and the source code for shared libraries and dynamically |
263 | +linked subprograms that the work is specifically designed to require, |
264 | +such as by intimate data communication or control flow between those |
265 | +subprograms and other parts of the work. |
266 | + |
267 | + The Corresponding Source need not include anything that users |
268 | +can regenerate automatically from other parts of the Corresponding |
269 | +Source. |
270 | + |
271 | + The Corresponding Source for a work in source code form is that |
272 | +same work. |
273 | + |
274 | + 2. Basic Permissions. |
275 | + |
276 | + All rights granted under this License are granted for the term of |
277 | +copyright on the Program, and are irrevocable provided the stated |
278 | +conditions are met. This License explicitly affirms your unlimited |
279 | +permission to run the unmodified Program. The output from running a |
280 | +covered work is covered by this License only if the output, given its |
281 | +content, constitutes a covered work. This License acknowledges your |
282 | +rights of fair use or other equivalent, as provided by copyright law. |
283 | + |
284 | + You may make, run and propagate covered works that you do not |
285 | +convey, without conditions so long as your license otherwise remains |
286 | +in force. You may convey covered works to others for the sole purpose |
287 | +of having them make modifications exclusively for you, or provide you |
288 | +with facilities for running those works, provided that you comply with |
289 | +the terms of this License in conveying all material for which you do |
290 | +not control copyright. Those thus making or running the covered works |
291 | +for you must do so exclusively on your behalf, under your direction |
292 | +and control, on terms that prohibit them from making any copies of |
293 | +your copyrighted material outside their relationship with you. |
294 | + |
295 | + Conveying under any other circumstances is permitted solely under |
296 | +the conditions stated below. Sublicensing is not allowed; section 10 |
297 | +makes it unnecessary. |
298 | + |
299 | + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
300 | + |
301 | + No covered work shall be deemed part of an effective technological |
302 | +measure under any applicable law fulfilling obligations under article |
303 | +11 of the WIPO copyright treaty adopted on 20 December 1996, or |
304 | +similar laws prohibiting or restricting circumvention of such |
305 | +measures. |
306 | + |
307 | + When you convey a covered work, you waive any legal power to forbid |
308 | +circumvention of technological measures to the extent such circumvention |
309 | +is effected by exercising rights under this License with respect to |
310 | +the covered work, and you disclaim any intention to limit operation or |
311 | +modification of the work as a means of enforcing, against the work's |
312 | +users, your or third parties' legal rights to forbid circumvention of |
313 | +technological measures. |
314 | + |
315 | + 4. Conveying Verbatim Copies. |
316 | + |
317 | + You may convey verbatim copies of the Program's source code as you |
318 | +receive it, in any medium, provided that you conspicuously and |
319 | +appropriately publish on each copy an appropriate copyright notice; |
320 | +keep intact all notices stating that this License and any |
321 | +non-permissive terms added in accord with section 7 apply to the code; |
322 | +keep intact all notices of the absence of any warranty; and give all |
323 | +recipients a copy of this License along with the Program. |
324 | + |
325 | + You may charge any price or no price for each copy that you convey, |
326 | +and you may offer support or warranty protection for a fee. |
327 | + |
328 | + 5. Conveying Modified Source Versions. |
329 | + |
330 | + You may convey a work based on the Program, or the modifications to |
331 | +produce it from the Program, in the form of source code under the |
332 | +terms of section 4, provided that you also meet all of these conditions: |
333 | + |
334 | + a) The work must carry prominent notices stating that you modified |
335 | + it, and giving a relevant date. |
336 | + |
337 | + b) The work must carry prominent notices stating that it is |
338 | + released under this License and any conditions added under section |
339 | + 7. This requirement modifies the requirement in section 4 to |
340 | + "keep intact all notices". |
341 | + |
342 | + c) You must license the entire work, as a whole, under this |
343 | + License to anyone who comes into possession of a copy. This |
344 | + License will therefore apply, along with any applicable section 7 |
345 | + additional terms, to the whole of the work, and all its parts, |
346 | + regardless of how they are packaged. This License gives no |
347 | + permission to license the work in any other way, but it does not |
348 | + invalidate such permission if you have separately received it. |
349 | + |
350 | + d) If the work has interactive user interfaces, each must display |
351 | + Appropriate Legal Notices; however, if the Program has interactive |
352 | + interfaces that do not display Appropriate Legal Notices, your |
353 | + work need not make them do so. |
354 | + |
355 | + A compilation of a covered work with other separate and independent |
356 | +works, which are not by their nature extensions of the covered work, |
357 | +and which are not combined with it such as to form a larger program, |
358 | +in or on a volume of a storage or distribution medium, is called an |
359 | +"aggregate" if the compilation and its resulting copyright are not |
360 | +used to limit the access or legal rights of the compilation's users |
361 | +beyond what the individual works permit. Inclusion of a covered work |
362 | +in an aggregate does not cause this License to apply to the other |
363 | +parts of the aggregate. |
364 | + |
365 | + 6. Conveying Non-Source Forms. |
366 | + |
367 | + You may convey a covered work in object code form under the terms |
368 | +of sections 4 and 5, provided that you also convey the |
369 | +machine-readable Corresponding Source under the terms of this License, |
370 | +in one of these ways: |
371 | + |
372 | + a) Convey the object code in, or embodied in, a physical product |
373 | + (including a physical distribution medium), accompanied by the |
374 | + Corresponding Source fixed on a durable physical medium |
375 | + customarily used for software interchange. |
376 | + |
377 | + b) Convey the object code in, or embodied in, a physical product |
378 | + (including a physical distribution medium), accompanied by a |
379 | + written offer, valid for at least three years and valid for as |
380 | + long as you offer spare parts or customer support for that product |
381 | + model, to give anyone who possesses the object code either (1) a |
382 | + copy of the Corresponding Source for all the software in the |
383 | + product that is covered by this License, on a durable physical |
384 | + medium customarily used for software interchange, for a price no |
385 | + more than your reasonable cost of physically performing this |
386 | + conveying of source, or (2) access to copy the |
387 | + Corresponding Source from a network server at no charge. |
388 | + |
389 | + c) Convey individual copies of the object code with a copy of the |
390 | + written offer to provide the Corresponding Source. This |
391 | + alternative is allowed only occasionally and noncommercially, and |
392 | + only if you received the object code with such an offer, in accord |
393 | + with subsection 6b. |
394 | + |
395 | + d) Convey the object code by offering access from a designated |
396 | + place (gratis or for a charge), and offer equivalent access to the |
397 | + Corresponding Source in the same way through the same place at no |
398 | + further charge. You need not require recipients to copy the |
399 | + Corresponding Source along with the object code. If the place to |
400 | + copy the object code is a network server, the Corresponding Source |
401 | + may be on a different server (operated by you or a third party) |
402 | + that supports equivalent copying facilities, provided you maintain |
403 | + clear directions next to the object code saying where to find the |
404 | + Corresponding Source. Regardless of what server hosts the |
405 | + Corresponding Source, you remain obligated to ensure that it is |
406 | + available for as long as needed to satisfy these requirements. |
407 | + |
408 | + e) Convey the object code using peer-to-peer transmission, provided |
409 | + you inform other peers where the object code and Corresponding |
410 | + Source of the work are being offered to the general public at no |
411 | + charge under subsection 6d. |
412 | + |
413 | + A separable portion of the object code, whose source code is excluded |
414 | +from the Corresponding Source as a System Library, need not be |
415 | +included in conveying the object code work. |
416 | + |
417 | + A "User Product" is either (1) a "consumer product", which means any |
418 | +tangible personal property which is normally used for personal, family, |
419 | +or household purposes, or (2) anything designed or sold for incorporation |
420 | +into a dwelling. In determining whether a product is a consumer product, |
421 | +doubtful cases shall be resolved in favor of coverage. For a particular |
422 | +product received by a particular user, "normally used" refers to a |
423 | +typical or common use of that class of product, regardless of the status |
424 | +of the particular user or of the way in which the particular user |
425 | +actually uses, or expects or is expected to use, the product. A product |
426 | +is a consumer product regardless of whether the product has substantial |
427 | +commercial, industrial or non-consumer uses, unless such uses represent |
428 | +the only significant mode of use of the product. |
429 | + |
430 | + "Installation Information" for a User Product means any methods, |
431 | +procedures, authorization keys, or other information required to install |
432 | +and execute modified versions of a covered work in that User Product from |
433 | +a modified version of its Corresponding Source. The information must |
434 | +suffice to ensure that the continued functioning of the modified object |
435 | +code is in no case prevented or interfered with solely because |
436 | +modification has been made. |
437 | + |
438 | + If you convey an object code work under this section in, or with, or |
439 | +specifically for use in, a User Product, and the conveying occurs as |
440 | +part of a transaction in which the right of possession and use of the |
441 | +User Product is transferred to the recipient in perpetuity or for a |
442 | +fixed term (regardless of how the transaction is characterized), the |
443 | +Corresponding Source conveyed under this section must be accompanied |
444 | +by the Installation Information. But this requirement does not apply |
445 | +if neither you nor any third party retains the ability to install |
446 | +modified object code on the User Product (for example, the work has |
447 | +been installed in ROM). |
448 | + |
449 | + The requirement to provide Installation Information does not include a |
450 | +requirement to continue to provide support service, warranty, or updates |
451 | +for a work that has been modified or installed by the recipient, or for |
452 | +the User Product in which it has been modified or installed. Access to a |
453 | +network may be denied when the modification itself materially and |
454 | +adversely affects the operation of the network or violates the rules and |
455 | +protocols for communication across the network. |
456 | + |
457 | + Corresponding Source conveyed, and Installation Information provided, |
458 | +in accord with this section must be in a format that is publicly |
459 | +documented (and with an implementation available to the public in |
460 | +source code form), and must require no special password or key for |
461 | +unpacking, reading or copying. |
462 | + |
463 | + 7. Additional Terms. |
464 | + |
465 | + "Additional permissions" are terms that supplement the terms of this |
466 | +License by making exceptions from one or more of its conditions. |
467 | +Additional permissions that are applicable to the entire Program shall |
468 | +be treated as though they were included in this License, to the extent |
469 | +that they are valid under applicable law. If additional permissions |
470 | +apply only to part of the Program, that part may be used separately |
471 | +under those permissions, but the entire Program remains governed by |
472 | +this License without regard to the additional permissions. |
473 | + |
474 | + When you convey a copy of a covered work, you may at your option |
475 | +remove any additional permissions from that copy, or from any part of |
476 | +it. (Additional permissions may be written to require their own |
477 | +removal in certain cases when you modify the work.) You may place |
478 | +additional permissions on material, added by you to a covered work, |
479 | +for which you have or can give appropriate copyright permission. |
480 | + |
481 | + Notwithstanding any other provision of this License, for material you |
482 | +add to a covered work, you may (if authorized by the copyright holders of |
483 | +that material) supplement the terms of this License with terms: |
484 | + |
485 | + a) Disclaiming warranty or limiting liability differently from the |
486 | + terms of sections 15 and 16 of this License; or |
487 | + |
488 | + b) Requiring preservation of specified reasonable legal notices or |
489 | + author attributions in that material or in the Appropriate Legal |
490 | + Notices displayed by works containing it; or |
491 | + |
492 | + c) Prohibiting misrepresentation of the origin of that material, or |
493 | + requiring that modified versions of such material be marked in |
494 | + reasonable ways as different from the original version; or |
495 | + |
496 | + d) Limiting the use for publicity purposes of names of licensors or |
497 | + authors of the material; or |
498 | + |
499 | + e) Declining to grant rights under trademark law for use of some |
500 | + trade names, trademarks, or service marks; or |
501 | + |
502 | + f) Requiring indemnification of licensors and authors of that |
503 | + material by anyone who conveys the material (or modified versions of |
504 | + it) with contractual assumptions of liability to the recipient, for |
505 | + any liability that these contractual assumptions directly impose on |
506 | + those licensors and authors. |
507 | + |
508 | + All other non-permissive additional terms are considered "further |
509 | +restrictions" within the meaning of section 10. If the Program as you |
510 | +received it, or any part of it, contains a notice stating that it is |
511 | +governed by this License along with a term that is a further |
512 | +restriction, you may remove that term. If a license document contains |
513 | +a further restriction but permits relicensing or conveying under this |
514 | +License, you may add to a covered work material governed by the terms |
515 | +of that license document, provided that the further restriction does |
516 | +not survive such relicensing or conveying. |
517 | + |
518 | + If you add terms to a covered work in accord with this section, you |
519 | +must place, in the relevant source files, a statement of the |
520 | +additional terms that apply to those files, or a notice indicating |
521 | +where to find the applicable terms. |
522 | + |
523 | + Additional terms, permissive or non-permissive, may be stated in the |
524 | +form of a separately written license, or stated as exceptions; |
525 | +the above requirements apply either way. |
526 | + |
527 | + 8. Termination. |
528 | + |
529 | + You may not propagate or modify a covered work except as expressly |
530 | +provided under this License. Any attempt otherwise to propagate or |
531 | +modify it is void, and will automatically terminate your rights under |
532 | +this License (including any patent licenses granted under the third |
533 | +paragraph of section 11). |
534 | + |
535 | + However, if you cease all violation of this License, then your |
536 | +license from a particular copyright holder is reinstated (a) |
537 | +provisionally, unless and until the copyright holder explicitly and |
538 | +finally terminates your license, and (b) permanently, if the copyright |
539 | +holder fails to notify you of the violation by some reasonable means |
540 | +prior to 60 days after the cessation. |
541 | + |
542 | + Moreover, your license from a particular copyright holder is |
543 | +reinstated permanently if the copyright holder notifies you of the |
544 | +violation by some reasonable means, this is the first time you have |
545 | +received notice of violation of this License (for any work) from that |
546 | +copyright holder, and you cure the violation prior to 30 days after |
547 | +your receipt of the notice. |
548 | + |
549 | + Termination of your rights under this section does not terminate the |
550 | +licenses of parties who have received copies or rights from you under |
551 | +this License. If your rights have been terminated and not permanently |
552 | +reinstated, you do not qualify to receive new licenses for the same |
553 | +material under section 10. |
554 | + |
555 | + 9. Acceptance Not Required for Having Copies. |
556 | + |
557 | + You are not required to accept this License in order to receive or |
558 | +run a copy of the Program. Ancillary propagation of a covered work |
559 | +occurring solely as a consequence of using peer-to-peer transmission |
560 | +to receive a copy likewise does not require acceptance. However, |
561 | +nothing other than this License grants you permission to propagate or |
562 | +modify any covered work. These actions infringe copyright if you do |
563 | +not accept this License. Therefore, by modifying or propagating a |
564 | +covered work, you indicate your acceptance of this License to do so. |
565 | + |
566 | + 10. Automatic Licensing of Downstream Recipients. |
567 | + |
568 | + Each time you convey a covered work, the recipient automatically |
569 | +receives a license from the original licensors, to run, modify and |
570 | +propagate that work, subject to this License. You are not responsible |
571 | +for enforcing compliance by third parties with this License. |
572 | + |
573 | + An "entity transaction" is a transaction transferring control of an |
574 | +organization, or substantially all assets of one, or subdividing an |
575 | +organization, or merging organizations. If propagation of a covered |
576 | +work results from an entity transaction, each party to that |
577 | +transaction who receives a copy of the work also receives whatever |
578 | +licenses to the work the party's predecessor in interest had or could |
579 | +give under the previous paragraph, plus a right to possession of the |
580 | +Corresponding Source of the work from the predecessor in interest, if |
581 | +the predecessor has it or can get it with reasonable efforts. |
582 | + |
583 | + You may not impose any further restrictions on the exercise of the |
584 | +rights granted or affirmed under this License. For example, you may |
585 | +not impose a license fee, royalty, or other charge for exercise of |
586 | +rights granted under this License, and you may not initiate litigation |
587 | +(including a cross-claim or counterclaim in a lawsuit) alleging that |
588 | +any patent claim is infringed by making, using, selling, offering for |
589 | +sale, or importing the Program or any portion of it. |
590 | + |
591 | + 11. Patents. |
592 | + |
593 | + A "contributor" is a copyright holder who authorizes use under this |
594 | +License of the Program or a work on which the Program is based. The |
595 | +work thus licensed is called the contributor's "contributor version". |
596 | + |
597 | + A contributor's "essential patent claims" are all patent claims |
598 | +owned or controlled by the contributor, whether already acquired or |
599 | +hereafter acquired, that would be infringed by some manner, permitted |
600 | +by this License, of making, using, or selling its contributor version, |
601 | +but do not include claims that would be infringed only as a |
602 | +consequence of further modification of the contributor version. For |
603 | +purposes of this definition, "control" includes the right to grant |
604 | +patent sublicenses in a manner consistent with the requirements of |
605 | +this License. |
606 | + |
607 | + Each contributor grants you a non-exclusive, worldwide, royalty-free |
608 | +patent license under the contributor's essential patent claims, to |
609 | +make, use, sell, offer for sale, import and otherwise run, modify and |
610 | +propagate the contents of its contributor version. |
611 | + |
612 | + In the following three paragraphs, a "patent license" is any express |
613 | +agreement or commitment, however denominated, not to enforce a patent |
614 | +(such as an express permission to practice a patent or covenant not to |
615 | +sue for patent infringement). To "grant" such a patent license to a |
616 | +party means to make such an agreement or commitment not to enforce a |
617 | +patent against the party. |
618 | + |
619 | + If you convey a covered work, knowingly relying on a patent license, |
620 | +and the Corresponding Source of the work is not available for anyone |
621 | +to copy, free of charge and under the terms of this License, through a |
622 | +publicly available network server or other readily accessible means, |
623 | +then you must either (1) cause the Corresponding Source to be so |
624 | +available, or (2) arrange to deprive yourself of the benefit of the |
625 | +patent license for this particular work, or (3) arrange, in a manner |
626 | +consistent with the requirements of this License, to extend the patent |
627 | +license to downstream recipients. "Knowingly relying" means you have |
628 | +actual knowledge that, but for the patent license, your conveying the |
629 | +covered work in a country, or your recipient's use of the covered work |
630 | +in a country, would infringe one or more identifiable patents in that |
631 | +country that you have reason to believe are valid. |
632 | + |
633 | + If, pursuant to or in connection with a single transaction or |
634 | +arrangement, you convey, or propagate by procuring conveyance of, a |
635 | +covered work, and grant a patent license to some of the parties |
636 | +receiving the covered work authorizing them to use, propagate, modify |
637 | +or convey a specific copy of the covered work, then the patent license |
638 | +you grant is automatically extended to all recipients of the covered |
639 | +work and works based on it. |
640 | + |
641 | + A patent license is "discriminatory" if it does not include within |
642 | +the scope of its coverage, prohibits the exercise of, or is |
643 | +conditioned on the non-exercise of one or more of the rights that are |
644 | +specifically granted under this License. You may not convey a covered |
645 | +work if you are a party to an arrangement with a third party that is |
646 | +in the business of distributing software, under which you make payment |
647 | +to the third party based on the extent of your activity of conveying |
648 | +the work, and under which the third party grants, to any of the |
649 | +parties who would receive the covered work from you, a discriminatory |
650 | +patent license (a) in connection with copies of the covered work |
651 | +conveyed by you (or copies made from those copies), or (b) primarily |
652 | +for and in connection with specific products or compilations that |
653 | +contain the covered work, unless you entered into that arrangement, |
654 | +or that patent license was granted, prior to 28 March 2007. |
655 | + |
656 | + Nothing in this License shall be construed as excluding or limiting |
657 | +any implied license or other defenses to infringement that may |
658 | +otherwise be available to you under applicable patent law. |
659 | + |
660 | + 12. No Surrender of Others' Freedom. |
661 | + |
662 | + If conditions are imposed on you (whether by court order, agreement or |
663 | +otherwise) that contradict the conditions of this License, they do not |
664 | +excuse you from the conditions of this License. If you cannot convey a |
665 | +covered work so as to satisfy simultaneously your obligations under this |
666 | +License and any other pertinent obligations, then as a consequence you may |
667 | +not convey it at all. For example, if you agree to terms that obligate you |
668 | +to collect a royalty for further conveying from those to whom you convey |
669 | +the Program, the only way you could satisfy both those terms and this |
670 | +License would be to refrain entirely from conveying the Program. |
671 | + |
672 | + 13. Use with the GNU Affero General Public License. |
673 | + |
674 | + Notwithstanding any other provision of this License, you have |
675 | +permission to link or combine any covered work with a work licensed |
676 | +under version 3 of the GNU Affero General Public License into a single |
677 | +combined work, and to convey the resulting work. The terms of this |
678 | +License will continue to apply to the part which is the covered work, |
679 | +but the special requirements of the GNU Affero General Public License, |
680 | +section 13, concerning interaction through a network will apply to the |
681 | +combination as such. |
682 | + |
683 | + 14. Revised Versions of this License. |
684 | + |
685 | + The Free Software Foundation may publish revised and/or new versions of |
686 | +the GNU General Public License from time to time. Such new versions will |
687 | +be similar in spirit to the present version, but may differ in detail to |
688 | +address new problems or concerns. |
689 | + |
690 | + Each version is given a distinguishing version number. If the |
691 | +Program specifies that a certain numbered version of the GNU General |
692 | +Public License "or any later version" applies to it, you have the |
693 | +option of following the terms and conditions either of that numbered |
694 | +version or of any later version published by the Free Software |
695 | +Foundation. If the Program does not specify a version number of the |
696 | +GNU General Public License, you may choose any version ever published |
697 | +by the Free Software Foundation. |
698 | + |
699 | + If the Program specifies that a proxy can decide which future |
700 | +versions of the GNU General Public License can be used, that proxy's |
701 | +public statement of acceptance of a version permanently authorizes you |
702 | +to choose that version for the Program. |
703 | + |
704 | + Later license versions may give you additional or different |
705 | +permissions. However, no additional obligations are imposed on any |
706 | +author or copyright holder as a result of your choosing to follow a |
707 | +later version. |
708 | + |
709 | + 15. Disclaimer of Warranty. |
710 | + |
711 | + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
712 | +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
713 | +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
714 | +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
715 | +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
716 | +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
717 | +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
718 | +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
719 | + |
720 | + 16. Limitation of Liability. |
721 | + |
722 | + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
723 | +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
724 | +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
725 | +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
726 | +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
727 | +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
728 | +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
729 | +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
730 | +SUCH DAMAGES. |
731 | + |
732 | + 17. Interpretation of Sections 15 and 16. |
733 | + |
734 | + If the disclaimer of warranty and limitation of liability provided |
735 | +above cannot be given local legal effect according to their terms, |
736 | +reviewing courts shall apply local law that most closely approximates |
737 | +an absolute waiver of all civil liability in connection with the |
738 | +Program, unless a warranty or assumption of liability accompanies a |
739 | +copy of the Program in return for a fee. |
740 | + |
741 | + END OF TERMS AND CONDITIONS |
742 | + |
743 | + How to Apply These Terms to Your New Programs |
744 | + |
745 | + If you develop a new program, and you want it to be of the greatest |
746 | +possible use to the public, the best way to achieve this is to make it |
747 | +free software which everyone can redistribute and change under these terms. |
748 | + |
749 | + To do so, attach the following notices to the program. It is safest |
750 | +to attach them to the start of each source file to most effectively |
751 | +state the exclusion of warranty; and each file should have at least |
752 | +the "copyright" line and a pointer to where the full notice is found. |
753 | + |
754 | + <one line to give the program's name and a brief idea of what it does.> |
755 | + Copyright (C) <year> <name of author> |
756 | + |
757 | + This program is free software: you can redistribute it and/or modify |
758 | + it under the terms of the GNU General Public License as published by |
759 | + the Free Software Foundation, either version 3 of the License, or |
760 | + (at your option) any later version. |
761 | + |
762 | + This program is distributed in the hope that it will be useful, |
763 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
764 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
765 | + GNU General Public License for more details. |
766 | + |
767 | + You should have received a copy of the GNU General Public License |
768 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
769 | + |
770 | +Also add information on how to contact you by electronic and paper mail. |
771 | + |
772 | + If the program does terminal interaction, make it output a short |
773 | +notice like this when it starts in an interactive mode: |
774 | + |
775 | + <program> Copyright (C) <year> <name of author> |
776 | + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
777 | + This is free software, and you are welcome to redistribute it |
778 | + under certain conditions; type `show c' for details. |
779 | + |
780 | +The hypothetical commands `show w' and `show c' should show the appropriate |
781 | +parts of the General Public License. Of course, your program's commands |
782 | +might be different; for a GUI interface, you would use an "about box". |
783 | + |
784 | + You should also get your employer (if you work as a programmer) or school, |
785 | +if any, to sign a "copyright disclaimer" for the program, if necessary. |
786 | +For more information on this, and how to apply and follow the GNU GPL, see |
787 | +<http://www.gnu.org/licenses/>. |
788 | + |
789 | + The GNU General Public License does not permit incorporating your program |
790 | +into proprietary programs. If your program is a subroutine library, you |
791 | +may consider it more useful to permit linking proprietary applications with |
792 | +the library. If this is what you want to do, use the GNU Lesser General |
793 | +Public License instead of this License. But first, please read |
794 | +<http://www.gnu.org/philosophy/why-not-lgpl.html>. |
795 | |
796 | === added directory 'cmake' |
797 | === added file 'cmake/FindGMock.cmake' |
798 | --- cmake/FindGMock.cmake 1970-01-01 00:00:00 +0000 |
799 | +++ cmake/FindGMock.cmake 2015-05-20 13:57:15 +0000 |
800 | @@ -0,0 +1,13 @@ |
801 | +# Build with system gmock and embedded gtest |
802 | +set (GMOCK_INCLUDE_DIRS "/usr/include/gmock/include" CACHE PATH "gmock source include directory") |
803 | +set (GMOCK_SOURCE_DIR "/usr/src/gmock" CACHE PATH "gmock source directory") |
804 | +set (GTEST_INCLUDE_DIRS "${GMOCK_SOURCE_DIR}/gtest/include" CACHE PATH "gtest source include directory") |
805 | + |
806 | +add_subdirectory(${GMOCK_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}/gmock") |
807 | + |
808 | +set(GTEST_LIBRARIES gtest) |
809 | +set(GTEST_MAIN_LIBRARIES gtest_main) |
810 | +set(GMOCK_LIBRARIES gmock gmock_main) |
811 | + |
812 | +set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}) |
813 | + |
814 | |
815 | === added file 'cmake/FindIntltool.cmake' |
816 | --- cmake/FindIntltool.cmake 1970-01-01 00:00:00 +0000 |
817 | +++ cmake/FindIntltool.cmake 2015-05-20 13:57:15 +0000 |
818 | @@ -0,0 +1,265 @@ |
819 | +# Copyright (C) 2014 Canonical Ltd |
820 | +# |
821 | +# This program is free software: you can redistribute it and/or modify |
822 | +# it under the terms of the GNU Lesser General Public License version 3 as |
823 | +# published by the Free Software Foundation. |
824 | +# |
825 | +# This program is distributed in the hope that it will be useful, |
826 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
827 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
828 | +# GNU Lesser General Public License for more details. |
829 | +# |
830 | +# You should have received a copy of the GNU Lesser General Public License |
831 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
832 | + |
833 | +# This package provides macros that wrap the intltool programs. |
834 | +# |
835 | +# An example of common usage is: |
836 | +# |
837 | +# For an ini file: |
838 | +# |
839 | +# intltool_merge_translations( |
840 | +# "foo.ini.in" |
841 | +# "${CMAKE_CURRENT_BINARY_DIR}/foo.ini" |
842 | +# ALL |
843 | +# UTF8 |
844 | +# ) |
845 | +# |
846 | +# Inside po/CMakeLists.txt: |
847 | +# |
848 | +# intltool_update_potfile( |
849 | +# ALL |
850 | +# GETTEXT_PACKAGE ${GETTEXT_PACKAGE} |
851 | +# ) |
852 | +# |
853 | +# intltool_install_translations( |
854 | +# ALL |
855 | +# GETTEXT_PACKAGE ${GETTEXT_PACKAGE} |
856 | +# ) |
857 | + |
858 | +find_package(Gettext REQUIRED) |
859 | + |
860 | +find_program(INTLTOOL_UPDATE_EXECUTABLE intltool-update) |
861 | + |
862 | +if(INTLTOOL_UPDATE_EXECUTABLE) |
863 | + execute_process( |
864 | + COMMAND ${INTLTOOL_UPDATE_EXECUTABLE} --version |
865 | + OUTPUT_VARIABLE intltool_update_version |
866 | + ERROR_QUIET |
867 | + OUTPUT_STRIP_TRAILING_WHITESPACE) |
868 | + if (intltool_update_version MATCHES "^intltool-update \\(.*\\) [0-9]") |
869 | + string( |
870 | + REGEX REPLACE "^intltool-update \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" |
871 | + INTLTOOL_UPDATE_VERSION_STRING "${intltool_update_version}" |
872 | + ) |
873 | + endif() |
874 | + unset(intltool_update_version) |
875 | +endif() |
876 | + |
877 | +find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge) |
878 | + |
879 | +if(INTLTOOL_MERGE_EXECUTABLE) |
880 | + execute_process( |
881 | + COMMAND ${INTLTOOL_MERGE_EXECUTABLE} --version |
882 | + OUTPUT_VARIABLE intltool_merge_version |
883 | + ERROR_QUIET |
884 | + OUTPUT_STRIP_TRAILING_WHITESPACE) |
885 | + if (intltool_update_version MATCHES "^intltool-merge \\(.*\\) [0-9]") |
886 | + string( |
887 | + REGEX REPLACE "^intltool-merge \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" |
888 | + INTLTOOL_MERGE_VERSION_STRING "${intltool_merge_version}" |
889 | + ) |
890 | + endif() |
891 | + unset(intltool_merge_version) |
892 | +endif() |
893 | + |
894 | +include(FindPackageHandleStandardArgs) |
895 | + |
896 | +find_package_handle_standard_args( |
897 | + Intltool |
898 | + REQUIRED_VARS |
899 | + INTLTOOL_UPDATE_EXECUTABLE |
900 | + INTLTOOL_MERGE_EXECUTABLE |
901 | + VERSION_VAR |
902 | + INTLTOOL_UPDATE_VERSION_STRING |
903 | + HANDLE_COMPONENTS |
904 | +) |
905 | + |
906 | +function(APPEND_EACH LISTNAME GLUE OUTPUT) |
907 | + set(_tmp_list "") |
908 | + foreach(VAL ${${LISTNAME}}) |
909 | + list(APPEND _tmp_list "${GLUE}${VAL}") |
910 | + endforeach(VAL ${${LISTNAME}}) |
911 | + set(${OUTPUT} "${_tmp_list}" PARENT_SCOPE) |
912 | +endfunction() |
913 | + |
914 | +function(INTLTOOL_UPDATE_POTFILE) |
915 | + set(_options ALL) |
916 | + set(_oneValueArgs GETTEXT_PACKAGE OUTPUT_FILE PO_DIRECTORY) |
917 | + |
918 | + cmake_parse_arguments(_ARG "${_options}" "${_oneValueArgs}" "" ${ARGN}) |
919 | + |
920 | + set(_POT_FILE "${PROJECT}.pot") |
921 | + |
922 | + set(_GETTEXT_PACKAGE "") |
923 | + if(_ARG_GETTEXT_PACKAGE) |
924 | + set(_POT_FILE "${_ARG_GETTEXT_PACKAGE}.pot") |
925 | + set(_GETTEXT_PACKAGE --gettext-package="${_ARG_GETTEXT_PACKAGE}") |
926 | + endif() |
927 | + |
928 | + set(_OUTPUT_FILE "") |
929 | + if(_ARG_OUTPUT_FILE) |
930 | + set(_POT_FILE "${_ARG_OUTPUT_FILE}") |
931 | + set(_OUTPUT_FILE --output-file="${_ARG_OUTPUT_FILE}") |
932 | + endif() |
933 | + |
934 | + set(_PO_DIRECTORY "${CMAKE_SOURCE_DIR}/po") |
935 | + if(_ARG_PO_DIRECTORY) |
936 | + set(_PO_DIRECTORY "${_ARG_PO_DIRECTORY}") |
937 | + endif() |
938 | + |
939 | + file( |
940 | + GLOB_RECURSE _CODE_SOURCES |
941 | + ${CMAKE_SOURCE_DIR}/*.cpp |
942 | + ${CMAKE_SOURCE_DIR}/*.cc |
943 | + ${CMAKE_SOURCE_DIR}/*.cxx |
944 | + ${CMAKE_SOURCE_DIR}/*.vala |
945 | + ${CMAKE_SOURCE_DIR}/*.c |
946 | + ${CMAKE_SOURCE_DIR}/*.h |
947 | + ${CMAKE_SOURCE_DIR}/*.ini.in |
948 | + ) |
949 | + |
950 | + add_custom_command( |
951 | + OUTPUT "${_POT_FILE}" |
952 | + COMMAND ${INTLTOOL_UPDATE_EXECUTABLE} --pot ${_OUTPUT_FILE} ${_GETTEXT_PACKAGE} |
953 | + DEPENDS |
954 | + "${_PO_DIRECTORY}/POTFILES.in" |
955 | + ${_CODE_SOURCES} |
956 | + WORKING_DIRECTORY ${_PO_DIRECTORY} |
957 | + ) |
958 | + |
959 | + _GETTEXT_GET_UNIQUE_TARGET_NAME(${_POT_FILE} _UNIQUE_TARGET_NAME) |
960 | + |
961 | + if(_ARG_ALL) |
962 | + add_custom_target( |
963 | + ${_UNIQUE_TARGET_NAME} |
964 | + ALL |
965 | + DEPENDS |
966 | + ${_POT_FILE} |
967 | + ) |
968 | + else() |
969 | + add_custom_target( |
970 | + ${_UNIQUE_TARGET_NAME} |
971 | + DEPENDS |
972 | + ${_POT_FILE} |
973 | + ) |
974 | + endif() |
975 | +endfunction() |
976 | + |
977 | +function(INTLTOOL_INSTALL_TRANSLATIONS) |
978 | + set(_options ALL) |
979 | + set(_oneValueArgs GETTEXT_PACKAGE POT_FILE) |
980 | + |
981 | + cmake_parse_arguments(_ARG "${_options}" "${_oneValueArgs}" "" ${ARGN}) |
982 | + |
983 | + set(_POT_FILE "${PROJECT}.pot") |
984 | + |
985 | + if(_ARG_GETTEXT_PACKAGE) |
986 | + set(_POT_FILE "${_ARG_GETTEXT_PACKAGE}.pot") |
987 | + endif() |
988 | + |
989 | + if(_ARG_OUTPUT_FILE) |
990 | + set(_POT_FILE "${_ARG_OUTPUT_FILE}") |
991 | + endif() |
992 | + |
993 | + file( |
994 | + GLOB _PO_FILES |
995 | + ${CMAKE_CURRENT_SOURCE_DIR}/*.po |
996 | + ) |
997 | + |
998 | + get_filename_component(_ABS_POT_FILE ${_POT_FILE} ABSOLUTE) |
999 | + |
1000 | + foreach(_PO_FILE ${_PO_FILES}) |
1001 | + add_custom_command( |
1002 | + OUTPUT |
1003 | + ${_PO_FILE} |
1004 | + COMMAND |
1005 | + ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_PO_FILE} ${_ABS_POT_FILE} |
1006 | + DEPENDS |
1007 | + ${_ABS_POT_FILE} |
1008 | + ) |
1009 | + endforeach() |
1010 | + |
1011 | + if(_ARG_ALL) |
1012 | + gettext_create_translations( |
1013 | + ${_POT_FILE} |
1014 | + ALL |
1015 | + ${_PO_FILES} |
1016 | + ) |
1017 | + else() |
1018 | + gettext_create_translations( |
1019 | + ${_POT_FILE} |
1020 | + ${_PO_FILES} |
1021 | + ) |
1022 | + endif() |
1023 | +endfunction() |
1024 | + |
1025 | +function(INTLTOOL_MERGE_TRANSLATIONS FILENAME OUTPUT_FILE) |
1026 | + set(_options ALL UTF8 PASS_THROUGH) |
1027 | + set(_oneValueArgs PO_DIRECTORY) |
1028 | + |
1029 | + cmake_parse_arguments(_ARG "${_options}" "${_oneValueArgs}" "" ${ARGN}) |
1030 | + |
1031 | + get_filename_component(_ABS_FILENAME ${FILENAME} ABSOLUTE) |
1032 | + |
1033 | + set(_PO_DIRECTORY "${CMAKE_SOURCE_DIR}/po") |
1034 | + if(_ARG_PO_DIRECTORY) |
1035 | + set(_PO_DIRECTORY "${_ARG_PO_DIRECTORY}") |
1036 | + endif() |
1037 | + |
1038 | + set(_UTF8 "") |
1039 | + if(_ARG_UTF8) |
1040 | + set(_UTF8 "--utf8") |
1041 | + endif() |
1042 | + |
1043 | + set(_PASS_THROUGH "") |
1044 | + if(_ARG_PASS_THROUGH) |
1045 | + set(_PASS_THROUGH "--pass-through") |
1046 | + endif() |
1047 | + |
1048 | + file( |
1049 | + GLOB_RECURSE _PO_FILES |
1050 | + ${_PO_DIRECTORY}/*.po |
1051 | + ) |
1052 | + |
1053 | + add_custom_command( |
1054 | + OUTPUT |
1055 | + ${OUTPUT_FILE} |
1056 | + COMMAND |
1057 | + ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style --quiet ${_UTF8} ${_PASS_THROUGH} ${_PO_DIRECTORY} ${FILENAME} ${OUTPUT_FILE} |
1058 | + DEPENDS |
1059 | + ${_ABS_FILENAME} |
1060 | + ${_PO_FILES} |
1061 | + WORKING_DIRECTORY |
1062 | + ${CMAKE_CURRENT_SOURCE_DIR} |
1063 | + ) |
1064 | + |
1065 | + get_filename_component(_OUTPUT_NAME ${OUTPUT_FILE} NAME) |
1066 | + _GETTEXT_GET_UNIQUE_TARGET_NAME(${_OUTPUT_NAME} _UNIQUE_TARGET_NAME) |
1067 | + |
1068 | + if(_ARG_ALL) |
1069 | + add_custom_target( |
1070 | + ${_UNIQUE_TARGET_NAME} |
1071 | + ALL |
1072 | + DEPENDS |
1073 | + ${OUTPUT_FILE} |
1074 | + ) |
1075 | + else() |
1076 | + add_custom_target( |
1077 | + ${_UNIQUE_TARGET_NAME} |
1078 | + DEPENDS |
1079 | + ${OUTPUT_FILE} |
1080 | + ) |
1081 | + endif() |
1082 | +endfunction() |
1083 | + |
1084 | |
1085 | === added directory 'data' |
1086 | === added file 'data/CMakeLists.txt' |
1087 | --- data/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
1088 | +++ data/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
1089 | @@ -0,0 +1,12 @@ |
1090 | + |
1091 | +# Install the scope images |
1092 | +install( |
1093 | + FILES |
1094 | + "icon.png" |
1095 | + "logo.png" |
1096 | + "screenshot.png" |
1097 | + "feeds.json" |
1098 | + DESTINATION |
1099 | + "${SCOPE_INSTALL_DIR}" |
1100 | +) |
1101 | + |
1102 | |
1103 | === added file 'data/feeds.json' |
1104 | --- data/feeds.json 1970-01-01 00:00:00 +0000 |
1105 | +++ data/feeds.json 2015-05-20 13:57:15 +0000 |
1106 | @@ -0,0 +1,46 @@ |
1107 | +[ |
1108 | + { |
1109 | + "label": "All", |
1110 | + "id": "http://www.vox.com/rss/index.xml" |
1111 | + }, |
1112 | + { |
1113 | + "label": "Front Page", |
1114 | + "id": "http://www.vox.com/rss/front-page/index.xml" |
1115 | + }, |
1116 | + { |
1117 | + "label": "Business and Technology", |
1118 | + "id": "http://www.vox.com/rss/business_and_technology/index.xml" |
1119 | + }, |
1120 | + { |
1121 | + "label": "Culture", |
1122 | + "id": "http://www.vox.com/rss/culture/index.xml" |
1123 | + }, |
1124 | + { |
1125 | + "label": "Policy and Politics", |
1126 | + "id": "http://www.vox.com/rss/policy_and_politics/index.xml" |
1127 | + }, |
1128 | + { |
1129 | + "label": "Life", |
1130 | + "id": "http://www.vox.com/rss/life/index.xml" |
1131 | + }, |
1132 | + { |
1133 | + "label": "Videos", |
1134 | + "id": "http://www.vox.com/rss/videos/index.xml" |
1135 | + }, |
1136 | + { |
1137 | + "label": "Maps", |
1138 | + "id": "http://www.vox.com/rss/maps/index.xml" |
1139 | + }, |
1140 | + { |
1141 | + "label": "World and Defense", |
1142 | + "id": "http://www.vox.com/rss/world_and_defense/index.xml" |
1143 | + }, |
1144 | + { |
1145 | + "label": "Justice and Law", |
1146 | + "id": "http://www.vox.com/rss/justice_and_law/index.xml" |
1147 | + }, |
1148 | + { |
1149 | + "label": "Science of Everyday Life", |
1150 | + "id": "http://www.vox.com/rss/life-science/index.xml" |
1151 | + } |
1152 | +] |
1153 | |
1154 | === added file 'data/icon.png' |
1155 | Binary files data/icon.png 1970-01-01 00:00:00 +0000 and data/icon.png 2015-05-20 13:57:15 +0000 differ |
1156 | === added file 'data/logo.png' |
1157 | Binary files data/logo.png 1970-01-01 00:00:00 +0000 and data/logo.png 2015-05-20 13:57:15 +0000 differ |
1158 | === added file 'data/rss.canonical_rss.ini.in' |
1159 | --- data/rss.canonical_rss.ini.in 1970-01-01 00:00:00 +0000 |
1160 | +++ data/rss.canonical_rss.ini.in 2015-05-20 13:57:15 +0000 |
1161 | @@ -0,0 +1,11 @@ |
1162 | +[ScopeConfig] |
1163 | +_DisplayName=Vox |
1164 | +_Description=Vox |
1165 | +Art=screenshot.png |
1166 | +Author=Scott Sweeny |
1167 | +Icon=icon.png |
1168 | + |
1169 | +[Appearance] |
1170 | +PageHeader.Logo=logo.png |
1171 | +PageHeader.Background=color:///#e9e7e8 |
1172 | +PageHeader.DividerColor=#ffeb00 |
1173 | |
1174 | === added file 'data/screenshot.png' |
1175 | Binary files data/screenshot.png 1970-01-01 00:00:00 +0000 and data/screenshot.png 2015-05-20 13:57:15 +0000 differ |
1176 | === added directory 'include' |
1177 | === added directory 'include/api' |
1178 | === added file 'include/api/client.h' |
1179 | --- include/api/client.h 1970-01-01 00:00:00 +0000 |
1180 | +++ include/api/client.h 2015-05-20 13:57:15 +0000 |
1181 | @@ -0,0 +1,84 @@ |
1182 | +/* |
1183 | + * Copyright 2015 Canonical Ltd. |
1184 | + * |
1185 | + * This program is free software; you can redistribute it and/or modify |
1186 | + * it under the terms of the GNU General Public License as published by |
1187 | + * the Free Software Foundation; version 3. |
1188 | + * |
1189 | + * This program is distributed in the hope that it will be useful, |
1190 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1191 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1192 | + * GNU General Public License for more details. |
1193 | + * |
1194 | + * You should have received a copy of the GNU General Public License |
1195 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1196 | + * |
1197 | + * Authors: |
1198 | + * Scott Sweeny |
1199 | + */ |
1200 | + |
1201 | +#ifndef API_CLIENT_H_ |
1202 | +#define API_CLIENT_H_ |
1203 | + |
1204 | +#include <atomic> |
1205 | +#include <deque> |
1206 | +#include <map> |
1207 | +#include <string> |
1208 | +#include <core/net/http/request.h> |
1209 | +#include <core/net/uri.h> |
1210 | + |
1211 | +#include <QXmlStreamReader> |
1212 | + |
1213 | +namespace api { |
1214 | + |
1215 | +/** |
1216 | + * Provide a nice way to access the HTTP API. |
1217 | + * |
1218 | + * We don't want our scope's code to be mixed together with HTTP and JSON handling. |
1219 | + */ |
1220 | +class Client { |
1221 | +public: |
1222 | + |
1223 | + struct Item { |
1224 | + std::string title; |
1225 | + std::string published; |
1226 | + std::string author; |
1227 | + std::string art; |
1228 | + std::string uri; |
1229 | + std::string summary; |
1230 | + std::string content; |
1231 | + }; |
1232 | + |
1233 | + Client(); |
1234 | + |
1235 | + virtual ~Client() = default; |
1236 | + |
1237 | + /** |
1238 | + * Get the feed content |
1239 | + */ |
1240 | + virtual std::vector<Item> getItems(const std::string &url); |
1241 | + |
1242 | + /** |
1243 | + * Cancel any pending queries (this method can be called from a different thread) |
1244 | + */ |
1245 | + virtual void cancel(); |
1246 | + |
1247 | +protected: |
1248 | + void get(const std::string &url, QXmlStreamReader &reader); |
1249 | + void parseItem(std::vector<Item>& results, QXmlStreamReader& xml); |
1250 | + /** |
1251 | + * Progress callback that allows the query to cancel pending HTTP requests. |
1252 | + */ |
1253 | + core::net::http::Request::Progress::Next progress_report( |
1254 | + const core::net::http::Request::Progress& progress); |
1255 | + |
1256 | + /** |
1257 | + * Thread-safe cancelled flag |
1258 | + */ |
1259 | + std::atomic<bool> cancelled_; |
1260 | +}; |
1261 | + |
1262 | +} |
1263 | + |
1264 | +#endif // API_CLIENT_H_ |
1265 | + |
1266 | |
1267 | === added file 'include/api/config.h' |
1268 | --- include/api/config.h 1970-01-01 00:00:00 +0000 |
1269 | +++ include/api/config.h 2015-05-20 13:57:15 +0000 |
1270 | @@ -0,0 +1,44 @@ |
1271 | +/* |
1272 | + * Copyright 2015 Canonical Ltd. |
1273 | + * |
1274 | + * This program is free software; you can redistribute it and/or modify |
1275 | + * it under the terms of the GNU General Public License as published by |
1276 | + * the Free Software Foundation; version 3. |
1277 | + * |
1278 | + * This program is distributed in the hope that it will be useful, |
1279 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1280 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1281 | + * GNU General Public License for more details. |
1282 | + * |
1283 | + * You should have received a copy of the GNU General Public License |
1284 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1285 | + * |
1286 | + * Authors: |
1287 | + * Scott Sweeny |
1288 | + */ |
1289 | + |
1290 | +#ifndef API_CONFIG_H_ |
1291 | +#define API_CONFIG_H_ |
1292 | + |
1293 | +#include <memory> |
1294 | +#include <string> |
1295 | + |
1296 | +namespace api { |
1297 | + |
1298 | +struct Config { |
1299 | + typedef std::shared_ptr<Config> Ptr; |
1300 | + |
1301 | + /* The XML element names of the fields we want */ |
1302 | + std::string title = "title"; |
1303 | + std::string subtitle = "pubDate"; |
1304 | + std::string art = "enclosure"; |
1305 | + std::string uri = "link"; |
1306 | + std::string summary = "description"; |
1307 | + std::string content = "content:encoded"; |
1308 | + std::string item = "item"; |
1309 | +}; |
1310 | + |
1311 | +} |
1312 | + |
1313 | +#endif /* API_CONFIG_H_ */ |
1314 | + |
1315 | |
1316 | === added directory 'include/scope' |
1317 | === added file 'include/scope/localization.h' |
1318 | --- include/scope/localization.h 1970-01-01 00:00:00 +0000 |
1319 | +++ include/scope/localization.h 2015-05-20 13:57:15 +0000 |
1320 | @@ -0,0 +1,39 @@ |
1321 | +/* |
1322 | + * Copyright 2015 Canonical Ltd. |
1323 | + * |
1324 | + * This program is free software; you can redistribute it and/or modify |
1325 | + * it under the terms of the GNU General Public License as published by |
1326 | + * the Free Software Foundation; version 3. |
1327 | + * |
1328 | + * This program is distributed in the hope that it will be useful, |
1329 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1330 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1331 | + * GNU General Public License for more details. |
1332 | + * |
1333 | + * You should have received a copy of the GNU General Public License |
1334 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1335 | + */ |
1336 | + |
1337 | +#ifndef SCOPE_LOCALIZATION_H_ |
1338 | +#define SCOPE_LOCALIZATION_H_ |
1339 | + |
1340 | +#include <libintl.h> |
1341 | +#include <string> |
1342 | + |
1343 | +inline char * _(const char *__msgid) { |
1344 | + return dgettext(GETTEXT_PACKAGE, __msgid); |
1345 | +} |
1346 | + |
1347 | +inline std::string _(const char *__msgid1, const char *__msgid2, |
1348 | + unsigned long int __n) { |
1349 | + char buffer [256]; |
1350 | + if (snprintf ( buffer, 256, dngettext(GETTEXT_PACKAGE, __msgid1, __msgid2, __n), __n ) >= 0) { |
1351 | + return buffer; |
1352 | + } else { |
1353 | + return std::string(); |
1354 | + } |
1355 | +} |
1356 | + |
1357 | +#endif // SCOPE_LOCALIZATION_H_ |
1358 | + |
1359 | + |
1360 | |
1361 | === added file 'include/scope/preview.h' |
1362 | --- include/scope/preview.h 1970-01-01 00:00:00 +0000 |
1363 | +++ include/scope/preview.h 2015-05-20 13:57:15 +0000 |
1364 | @@ -0,0 +1,57 @@ |
1365 | +/* |
1366 | + * Copyright 2015 Canonical Ltd. |
1367 | + * |
1368 | + * This program is free software; you can redistribute it and/or modify |
1369 | + * it under the terms of the GNU General Public License as published by |
1370 | + * the Free Software Foundation; version 3. |
1371 | + * |
1372 | + * This program is distributed in the hope that it will be useful, |
1373 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1374 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1375 | + * GNU General Public License for more details. |
1376 | + * |
1377 | + * You should have received a copy of the GNU General Public License |
1378 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1379 | + * |
1380 | + * Authors: |
1381 | + * Scott Sweeny |
1382 | + */ |
1383 | + |
1384 | +#ifndef SCOPE_PREVIEW_H_ |
1385 | +#define SCOPE_PREVIEW_H_ |
1386 | + |
1387 | +#include <unity/scopes/PreviewQueryBase.h> |
1388 | + |
1389 | +namespace unity { |
1390 | +namespace scopes { |
1391 | +class Result; |
1392 | +} |
1393 | +} |
1394 | + |
1395 | +namespace scope { |
1396 | + |
1397 | +/** |
1398 | + * Represents an individual preview request. |
1399 | + * |
1400 | + * Each time a result is previewed in the UI a new Preview |
1401 | + * object is created. |
1402 | + */ |
1403 | +class Preview: public unity::scopes::PreviewQueryBase { |
1404 | +public: |
1405 | + Preview(const unity::scopes::Result &result, |
1406 | + const unity::scopes::ActionMetadata &metadata); |
1407 | + |
1408 | + ~Preview() = default; |
1409 | + |
1410 | + void cancelled() override; |
1411 | + |
1412 | + /** |
1413 | + * Populates the reply object with preview information. |
1414 | + */ |
1415 | + void run(unity::scopes::PreviewReplyProxy const& reply) override; |
1416 | +}; |
1417 | + |
1418 | +} |
1419 | + |
1420 | +#endif // SCOPE_PREVIEW_H_ |
1421 | + |
1422 | |
1423 | === added file 'include/scope/query.h' |
1424 | --- include/scope/query.h 1970-01-01 00:00:00 +0000 |
1425 | +++ include/scope/query.h 2015-05-20 13:57:15 +0000 |
1426 | @@ -0,0 +1,58 @@ |
1427 | +/* |
1428 | + * Copyright 2015 Canonical Ltd. |
1429 | + * |
1430 | + * This program is free software; you can redistribute it and/or modify |
1431 | + * it under the terms of the GNU General Public License as published by |
1432 | + * the Free Software Foundation; version 3. |
1433 | + * |
1434 | + * This program is distributed in the hope that it will be useful, |
1435 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1436 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1437 | + * GNU General Public License for more details. |
1438 | + * |
1439 | + * You should have received a copy of the GNU General Public License |
1440 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1441 | + * |
1442 | + * Authors: |
1443 | + * Scott Sweeny |
1444 | + */ |
1445 | + |
1446 | +#ifndef SCOPE_QUERY_H_ |
1447 | +#define SCOPE_QUERY_H_ |
1448 | + |
1449 | +#include <api/client.h> |
1450 | + |
1451 | +#include <unity/scopes/SearchQueryBase.h> |
1452 | +#include <unity/scopes/ReplyProxyFwd.h> |
1453 | + |
1454 | +namespace scope { |
1455 | + |
1456 | +/** |
1457 | + * Represents an individual query. |
1458 | + * |
1459 | + * A new Query object will be constructed for each query. It is |
1460 | + * given query information, metadata about the search, and |
1461 | + * some scope-specific configuration. |
1462 | + */ |
1463 | +class Query: public unity::scopes::SearchQueryBase { |
1464 | +public: |
1465 | + Query(const unity::scopes::CannedQuery &query, |
1466 | + const unity::scopes::SearchMetadata &metadata, |
1467 | + const std::string scope_directory); |
1468 | + |
1469 | + ~Query() = default; |
1470 | + |
1471 | + void cancelled() override; |
1472 | + |
1473 | + void run(const unity::scopes::SearchReplyProxy &reply) override; |
1474 | + |
1475 | +private: |
1476 | + api::Client client_; |
1477 | + std::string scope_directory_; |
1478 | +}; |
1479 | + |
1480 | +} |
1481 | + |
1482 | +#endif // SCOPE_QUERY_H_ |
1483 | + |
1484 | + |
1485 | |
1486 | === added file 'include/scope/scope.h' |
1487 | --- include/scope/scope.h 1970-01-01 00:00:00 +0000 |
1488 | +++ include/scope/scope.h 2015-05-20 13:57:15 +0000 |
1489 | @@ -0,0 +1,70 @@ |
1490 | +/* |
1491 | + * Copyright 2015 Canonical Ltd. |
1492 | + * |
1493 | + * This program is free software; you can redistribute it and/or modify |
1494 | + * it under the terms of the GNU General Public License as published by |
1495 | + * the Free Software Foundation; version 3. |
1496 | + * |
1497 | + * This program is distributed in the hope that it will be useful, |
1498 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1499 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1500 | + * GNU General Public License for more details. |
1501 | + * |
1502 | + * You should have received a copy of the GNU General Public License |
1503 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1504 | + * |
1505 | + * Authors: |
1506 | + * Scott Sweeny |
1507 | + */ |
1508 | + |
1509 | +#ifndef SCOPE_SCOPE_H_ |
1510 | +#define SCOPE_SCOPE_H_ |
1511 | + |
1512 | +#include <api/config.h> |
1513 | + |
1514 | +#include <unity/scopes/ScopeBase.h> |
1515 | +#include <unity/scopes/QueryBase.h> |
1516 | +#include <unity/scopes/ReplyProxyFwd.h> |
1517 | +#include <unity/scopes/QueryBase.h> |
1518 | +#include <unity/scopes/PreviewQueryBase.h> |
1519 | + |
1520 | +namespace scope { |
1521 | + |
1522 | +/** |
1523 | + * Defines the lifecycle of scope plugin, and acts as a factory |
1524 | + * for Query and Preview objects. |
1525 | + * |
1526 | + * Note that the #preview and #search methods are each called on |
1527 | + * different threads, so some form of interlocking is required |
1528 | + * if shared data structures are used. |
1529 | + */ |
1530 | +class Scope: public unity::scopes::ScopeBase { |
1531 | +public: |
1532 | + /** |
1533 | + * Called once at startup |
1534 | + */ |
1535 | + void start(std::string const&) override; |
1536 | + |
1537 | + /** |
1538 | + * Called at shutdown |
1539 | + */ |
1540 | + void stop() override; |
1541 | + |
1542 | + /** |
1543 | + * Called each time a new preview is requested |
1544 | + */ |
1545 | + unity::scopes::PreviewQueryBase::UPtr preview(const unity::scopes::Result&, |
1546 | + const unity::scopes::ActionMetadata&) override; |
1547 | + |
1548 | + /** |
1549 | + * Called each time a new query is requested |
1550 | + */ |
1551 | + unity::scopes::SearchQueryBase::UPtr search( |
1552 | + unity::scopes::CannedQuery const& q, |
1553 | + unity::scopes::SearchMetadata const&) override; |
1554 | +}; |
1555 | + |
1556 | +} |
1557 | + |
1558 | +#endif // SCOPE_SCOPE_H_ |
1559 | + |
1560 | |
1561 | === added file 'manifest.json.in' |
1562 | --- manifest.json.in 1970-01-01 00:00:00 +0000 |
1563 | +++ manifest.json.in 2015-05-20 13:57:15 +0000 |
1564 | @@ -0,0 +1,15 @@ |
1565 | +{ |
1566 | + "architecture": "@CLICK_ARCH@", |
1567 | + "description": "A simple Unity scope that accesses the network", |
1568 | + "framework": "ubuntu-sdk-14.10", |
1569 | + "hooks": { |
1570 | + "rss": { |
1571 | + "apparmor": "rss.apparmor", |
1572 | + "scope": "rss" |
1573 | + } |
1574 | + }, |
1575 | + "maintainer": "Scott Sweeny <scott.sweeny@canonical.com>", |
1576 | + "name": "rss.canonical", |
1577 | + "title": "rss", |
1578 | + "version": "0.1" |
1579 | +} |
1580 | |
1581 | === added directory 'po' |
1582 | === added file 'po/CMakeLists.txt' |
1583 | --- po/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
1584 | +++ po/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
1585 | @@ -0,0 +1,10 @@ |
1586 | +intltool_update_potfile( |
1587 | + ALL |
1588 | + GETTEXT_PACKAGE ${GETTEXT_PACKAGE} |
1589 | +) |
1590 | + |
1591 | +intltool_install_translations( |
1592 | + ALL |
1593 | + GETTEXT_PACKAGE ${GETTEXT_PACKAGE} |
1594 | +) |
1595 | + |
1596 | |
1597 | === added file 'po/Makefile.in.in' |
1598 | --- po/Makefile.in.in 1970-01-01 00:00:00 +0000 |
1599 | +++ po/Makefile.in.in 2015-05-20 13:57:15 +0000 |
1600 | @@ -0,0 +1,1 @@ |
1601 | +XGETTEXT_KEYWORDS=--c++ --keyword=_ --keyword=N_ --keyword=_:1,2 |
1602 | |
1603 | === added file 'po/POTFILES.in' |
1604 | --- po/POTFILES.in 1970-01-01 00:00:00 +0000 |
1605 | +++ po/POTFILES.in 2015-05-20 13:57:15 +0000 |
1606 | @@ -0,0 +1,12 @@ |
1607 | +[type: gettext/ini] data/rss.canonical_rss.ini.in |
1608 | +include/api/config.h |
1609 | +include/api/client.h |
1610 | +include/scope/preview.h |
1611 | +include/scope/localization.h |
1612 | +include/scope/query.h |
1613 | +include/scope/scope.h |
1614 | +src/api/client.cpp |
1615 | +src/scope/query.cpp |
1616 | +src/scope/scope.cpp |
1617 | +src/scope/preview.cpp |
1618 | + |
1619 | |
1620 | === added file 'po/rss.pot' |
1621 | --- po/rss.pot 1970-01-01 00:00:00 +0000 |
1622 | +++ po/rss.pot 2015-05-20 13:57:15 +0000 |
1623 | @@ -0,0 +1,26 @@ |
1624 | +# SOME DESCRIPTIVE TITLE. |
1625 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
1626 | +# This file is distributed under the same license as the PACKAGE package. |
1627 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
1628 | +# |
1629 | +#, fuzzy |
1630 | +msgid "" |
1631 | +msgstr "" |
1632 | +"Project-Id-Version: PACKAGE VERSION\n" |
1633 | +"Report-Msgid-Bugs-To: \n" |
1634 | +"POT-Creation-Date: 2015-05-20 09:29-0400\n" |
1635 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
1636 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
1637 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
1638 | +"Language: \n" |
1639 | +"MIME-Version: 1.0\n" |
1640 | +"Content-Type: text/plain; charset=CHARSET\n" |
1641 | +"Content-Transfer-Encoding: 8bit\n" |
1642 | + |
1643 | +#: ../data/rss.canonical_rss.ini.in.h:1 |
1644 | +msgid "Vox" |
1645 | +msgstr "" |
1646 | + |
1647 | +#: ../src/scope/query.cpp:214 |
1648 | +msgid "Open" |
1649 | +msgstr "" |
1650 | |
1651 | === added file 'readme.txt' |
1652 | --- readme.txt 1970-01-01 00:00:00 +0000 |
1653 | +++ readme.txt 2015-05-20 13:57:15 +0000 |
1654 | @@ -0,0 +1,26 @@ |
1655 | +Unity scope template |
1656 | + |
1657 | +Building |
1658 | +-------- |
1659 | + |
1660 | +To build this scope outside of QtCreator, please install phablet-tools and run click-buddy. |
1661 | + |
1662 | +Localization |
1663 | +------------ |
1664 | + |
1665 | +intltool is used to perform localization of the scope. Ensure whenever you add / rename files |
1666 | +that contain localizable strings you update "po/POTFILES.in". |
1667 | + |
1668 | +When you want to add a new language to the translation catalogue: |
1669 | + |
1670 | + * Copy the .pot file from the "po" directory and rename it to e.g. "zh_CH.po". |
1671 | + * Enter the language code in "Language:". |
1672 | + * Enter the "UTF-8" as the "Content-Type:". |
1673 | + * Enter the translations in the msgstr tags. |
1674 | + |
1675 | +For the new translation to show up, cmake needs to be re-run to enable the recusive search |
1676 | +macro to delect the new translation. In QtCreator this can be done with the "Build->Run Cmake" |
1677 | +menu entry. |
1678 | + |
1679 | +Remember! When you copy the .pot file, make sure you change the file extension to ".po". |
1680 | + |
1681 | |
1682 | === added file 'rss.apparmor' |
1683 | --- rss.apparmor 1970-01-01 00:00:00 +0000 |
1684 | +++ rss.apparmor 2015-05-20 13:57:15 +0000 |
1685 | @@ -0,0 +1,7 @@ |
1686 | +{ |
1687 | + "template": "ubuntu-scope-network", |
1688 | + "policy_groups": [], |
1689 | + "policy_version": 1.2 |
1690 | +} |
1691 | + |
1692 | + |
1693 | |
1694 | === added directory 'src' |
1695 | === added file 'src/CMakeLists.txt' |
1696 | --- src/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
1697 | +++ src/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
1698 | @@ -0,0 +1,97 @@ |
1699 | + |
1700 | +# Put the ini file in the build directory next to the scope |
1701 | +# .so file so test tools can find both easily. |
1702 | +intltool_merge_translations( |
1703 | + "${CMAKE_SOURCE_DIR}/data/${SCOPE_NAME}.ini.in" |
1704 | + "${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.ini" |
1705 | + ALL |
1706 | + UTF8 |
1707 | +) |
1708 | + |
1709 | +# Install the scope ini file |
1710 | +install( |
1711 | + FILES "${CMAKE_CURRENT_BINARY_DIR}/${SCOPE_NAME}.ini" |
1712 | + DESTINATION ${SCOPE_INSTALL_DIR} |
1713 | +) |
1714 | + |
1715 | +configure_file( |
1716 | + "${CMAKE_SOURCE_DIR}/data/logo.png" |
1717 | + "${CMAKE_CURRENT_BINARY_DIR}/logo.png" |
1718 | + @ONLY |
1719 | + COPYONLY |
1720 | +) |
1721 | + |
1722 | +configure_file( |
1723 | + "${CMAKE_SOURCE_DIR}/data/feeds.json" |
1724 | + "${CMAKE_CURRENT_BINARY_DIR}/feeds.json" |
1725 | + @ONLY |
1726 | + COPYONLY |
1727 | +) |
1728 | + |
1729 | +configure_file( |
1730 | + "${CMAKE_SOURCE_DIR}/data/icon.png" |
1731 | + "${CMAKE_CURRENT_BINARY_DIR}/icon.png" |
1732 | + @ONLY |
1733 | + COPYONLY |
1734 | +) |
1735 | + |
1736 | +# The sources to build the scope |
1737 | +set(SCOPE_SOURCES |
1738 | + api/client.cpp |
1739 | + scope/preview.cpp |
1740 | + scope/query.cpp |
1741 | + scope/scope.cpp |
1742 | +) |
1743 | + |
1744 | +# Find all the headers |
1745 | +file(GLOB_RECURSE |
1746 | + SCOPE_HEADERS |
1747 | + "${CMAKE_SOURCE_DIR}/include/*.h" |
1748 | +) |
1749 | + |
1750 | +# Build an object library for the scope code |
1751 | +add_library( |
1752 | + scope-static OBJECT |
1753 | + ${SCOPE_SOURCES} |
1754 | + ${SCOPE_HEADERS} |
1755 | +) |
1756 | + |
1757 | +# Ensure we export all the symbols |
1758 | +set_target_properties( |
1759 | + scope-static |
1760 | + PROPERTIES |
1761 | + LINK_FLAGS "-Wl,--export-all-symbols" |
1762 | +) |
1763 | + |
1764 | +# Build a shared library containing our scope code. |
1765 | +# This will be the actual plugin that is loaded. |
1766 | +add_library( |
1767 | + scope SHARED |
1768 | + $<TARGET_OBJECTS:scope-static> |
1769 | +) |
1770 | + |
1771 | +# Link against the object library and our external library dependencies |
1772 | +target_link_libraries( |
1773 | + scope |
1774 | + ${SCOPE_LDFLAGS} |
1775 | + ${Boost_LIBRARIES} |
1776 | +) |
1777 | + |
1778 | +qt5_use_modules( |
1779 | + scope |
1780 | + Core |
1781 | +) |
1782 | + |
1783 | +# Set the correct library output name to conform to the securiry policy |
1784 | +set_target_properties( |
1785 | + scope |
1786 | + PROPERTIES |
1787 | + OUTPUT_NAME "${SCOPE_NAME}" |
1788 | +) |
1789 | + |
1790 | +# Install the scope shared library |
1791 | +install( |
1792 | + TARGETS scope |
1793 | + LIBRARY DESTINATION ${SCOPE_INSTALL_DIR} |
1794 | +) |
1795 | + |
1796 | |
1797 | === added directory 'src/api' |
1798 | === added file 'src/api/client.cpp' |
1799 | --- src/api/client.cpp 1970-01-01 00:00:00 +0000 |
1800 | +++ src/api/client.cpp 2015-05-20 13:57:15 +0000 |
1801 | @@ -0,0 +1,271 @@ |
1802 | +/* |
1803 | + * Copyright 2015 Canonical Ltd. |
1804 | + * |
1805 | + * This program is free software; you can redistribute it and/or modify |
1806 | + * it under the terms of the GNU General Public License as published by |
1807 | + * the Free Software Foundation; version 3. |
1808 | + * |
1809 | + * This program is distributed in the hope that it will be useful, |
1810 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1811 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1812 | + * GNU General Public License for more details. |
1813 | + * |
1814 | + * You should have received a copy of the GNU General Public License |
1815 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1816 | + * |
1817 | + * Authors: |
1818 | + * Scott Sweeny |
1819 | + */ |
1820 | + |
1821 | +#include <api/client.h> |
1822 | + |
1823 | +#include <core/net/error.h> |
1824 | +#include <core/net/http/client.h> |
1825 | +#include <core/net/http/content_type.h> |
1826 | +#include <core/net/http/response.h> |
1827 | + |
1828 | +#include <QDebug> |
1829 | + |
1830 | +namespace http = core::net::http; |
1831 | +namespace net = core::net; |
1832 | + |
1833 | +using namespace api; |
1834 | +using namespace std; |
1835 | + |
1836 | +Client::Client() : |
1837 | + cancelled_(false) { |
1838 | +} |
1839 | + |
1840 | +namespace { |
1841 | +static string readText(QXmlStreamReader& xml) |
1842 | +{ |
1843 | + return xml.readElementText(QXmlStreamReader::IncludeChildElements).trimmed().toStdString(); |
1844 | +} |
1845 | + |
1846 | +static void getArtFromBody(Client::Item& item) |
1847 | +{ |
1848 | + if (item.art.empty()) { |
1849 | + qDebug() << "ART IS EMPTY"; |
1850 | + // Use the first image in the summary if one exists |
1851 | + if (!(item.summary.empty()) && (item.summary.find("<img")!= string::npos)){ |
1852 | + qDebug() << "FOUND IMG TAG IN SUMMARY"; |
1853 | + QString summary = QString::fromStdString(item.summary); |
1854 | + QString aUrl = summary.right(summary.size() - summary.indexOf("<img")); |
1855 | + QString aSep = aUrl.mid(aUrl.indexOf("src=")+4,1); |
1856 | + aUrl = aUrl.right(aUrl.size()- aUrl.indexOf("src=")-5); |
1857 | + aUrl = aUrl.left(aUrl.indexOf(aSep)); |
1858 | + if (!aUrl.contains(".gif")) |
1859 | + item.art = aUrl.toStdString(); |
1860 | + qDebug()<< aUrl; |
1861 | + } |
1862 | + } |
1863 | + |
1864 | + if (item.art.empty()) { |
1865 | + qDebug() << "ART IS EMPTY"; |
1866 | + // Use the first image in the body if one exists |
1867 | + if (!(item.content.empty()) && (item.content.find("<img")!= string::npos)){ |
1868 | + qDebug() << "FOUND IMG TAG IN BODY"; |
1869 | + QString content = QString::fromStdString(item.content); |
1870 | + QString aUrl = content.right(content.size() - content.indexOf("<img")); |
1871 | + QString aSep = aUrl.mid(aUrl.indexOf("src=")+4,1); |
1872 | + aUrl = aUrl.right(aUrl.size()- aUrl.indexOf("src=")-5); |
1873 | + aUrl = aUrl.left(aUrl.indexOf(aSep)); |
1874 | + if (!aUrl.contains(".gif")) |
1875 | + item.art = aUrl.toStdString(); |
1876 | + qDebug()<< aUrl; |
1877 | + } |
1878 | + } |
1879 | +} |
1880 | + |
1881 | +static void parseAuthor(Client::Item& item, QXmlStreamReader& xml) |
1882 | +{ |
1883 | + // In an ATOM feed, the author's name may be a subitem |
1884 | + if ((xml.name() == "author") || xml.qualifiedName() == "dc:creator") { |
1885 | + item.author = readText(xml); |
1886 | + |
1887 | + if (item.author.empty()) { // there was no text so the name is below |
1888 | + xml.readNext(); |
1889 | + if (xml.name() == "name") { |
1890 | + item.author = readText(xml); |
1891 | + } |
1892 | + } |
1893 | + } |
1894 | +} |
1895 | + |
1896 | +static void parseLink(Client::Item& item, QXmlStreamReader& xml) |
1897 | +{ |
1898 | + // Atom feeds use a <link rel="alternate" href=.../> style |
1899 | + QXmlStreamAttributes attributes = xml.attributes(); |
1900 | + if (attributes.hasAttribute("rel")) { |
1901 | + if ((attributes.value("rel") == "alternate") && |
1902 | + attributes.hasAttribute("href")) { |
1903 | + item.uri = attributes.value("href").toString().toStdString(); |
1904 | + } |
1905 | + } else { |
1906 | + // The URI should be in the text |
1907 | + item.uri = readText(xml); |
1908 | + } |
1909 | + |
1910 | +} |
1911 | + |
1912 | +static void parseArt(Client::Item& item, QXmlStreamReader& xml) |
1913 | +{ |
1914 | + if (xml.name() == "enclosure") { |
1915 | + QXmlStreamAttributes attributes = xml.attributes(); |
1916 | + if (attributes.hasAttribute("url") && |
1917 | + attributes.hasAttribute("type")) { |
1918 | + // We are only interested in image types |
1919 | + if (attributes.value("type").contains("image")) { |
1920 | + item.art = attributes.value("url").toString().toStdString(); |
1921 | + } |
1922 | + } |
1923 | + } else if (xml.qualifiedName() == "media:thumbnail") { |
1924 | + QXmlStreamAttributes attributes = xml.attributes(); |
1925 | + if (attributes.hasAttribute("url")) { |
1926 | + item.art = attributes.value("url").toString().toStdString(); |
1927 | + } |
1928 | + } |
1929 | +} |
1930 | + |
1931 | +static string sanitize(string contents) |
1932 | +{ |
1933 | + QString content = QString::fromStdString(contents); // easier from QString |
1934 | + content.remove(QRegExp("<[/]*(a|img)[^>]*>")) // strip links and image tags |
1935 | + .remove(QRegExp("<[/]*(br)[^>]*>")); // strip links and image tags |
1936 | + return content.toStdString(); |
1937 | +} |
1938 | + |
1939 | +} |
1940 | +void Client::parseItem(vector<Client::Item>& results, QXmlStreamReader& xml) |
1941 | +{ |
1942 | + // Create a result object |
1943 | + Client::Item result; |
1944 | + while (!xml.atEnd() && !(xml.isEndElement() && (xml.name() == "item" || xml.name() == "entry"))) |
1945 | + { |
1946 | + if (xml.isStartElement()) { |
1947 | + if (xml.name() == "title") { |
1948 | + result.title = xml.readElementText().toStdString(); |
1949 | + qDebug() << "Title:" << QString::fromStdString(result.title); |
1950 | + } else if ((xml.name() == "pubDate") || (xml.name() == "published")) { |
1951 | + result.published = xml.readElementText().toStdString(); |
1952 | + qDebug() << "Published:" << QString::fromStdString(result.published); |
1953 | + } else if (xml.name() == "link") { |
1954 | + parseLink(result, xml); |
1955 | + qDebug() << "Link:" << QString::fromStdString(result.uri); |
1956 | + } else if ((xml.name() == "enclosure") || (xml.qualifiedName() == "media:thumbnail")) { |
1957 | + parseArt(result, xml); |
1958 | + qDebug() << "Art:" << QString::fromStdString(result.art); |
1959 | + } else if ((xml.name() == "description") || (xml.name() == "summary")) { |
1960 | + qDebug() << "DESCRIPTION"; |
1961 | + result.summary = readText(xml); |
1962 | + qDebug() << "Summary:" << QString::fromStdString(result.summary); |
1963 | + } else if ((xml.name() == "content") || (xml.qualifiedName() == "content:encoded")) { |
1964 | + result.content = readText(xml); |
1965 | + qDebug() << "Content:" << QString::fromStdString(result.content); |
1966 | + } else if ((xml.name() == "author") || (xml.qualifiedName() == "dc:creator")) { |
1967 | + parseAuthor(result, xml); |
1968 | + qDebug() << "Author:" << QString::fromStdString(result.author); |
1969 | + } |
1970 | + } |
1971 | + xml.readNext(); |
1972 | + } |
1973 | + |
1974 | + if (result.art.empty()) { |
1975 | + qDebug() << "GETTING ART FROM BODY"; |
1976 | + getArtFromBody(result); |
1977 | + } |
1978 | + |
1979 | + // Make sure we have both content and summary |
1980 | + if (result.content.empty() && !result.summary.empty()) { |
1981 | + result.content = result.summary; |
1982 | + } |
1983 | + |
1984 | + if (result.summary.empty() && !result.content.empty()) { |
1985 | + result.summary = result.content; |
1986 | + } |
1987 | + |
1988 | + // Strip image and link tags from content |
1989 | + result.summary = sanitize(result.summary); |
1990 | + result.content = sanitize(result.content); |
1991 | + |
1992 | + // Add the item to our list of results |
1993 | + results.emplace_back(result); |
1994 | +} |
1995 | + |
1996 | +void Client::get(const string &url, QXmlStreamReader &reader) { |
1997 | + qDebug() << "Client::get" << QString::fromStdString(url); |
1998 | + // Create a new HTTP client |
1999 | + auto client = http::make_client(); |
2000 | + |
2001 | + // Start building the request configuration |
2002 | + http::Request::Configuration configuration; |
2003 | + |
2004 | + net::Uri uri = net::make_uri(url); |
2005 | + configuration.uri = client->uri_to_string(uri); |
2006 | + |
2007 | + // Build a HTTP request object from our configuration |
2008 | + auto request = client->head(configuration); |
2009 | + |
2010 | + try { |
2011 | + // Synchronously make the HTTP request |
2012 | + // We bind the cancellable callback to #progress_report |
2013 | + auto response = request->execute( |
2014 | + bind(&Client::progress_report, this, placeholders::_1)); |
2015 | + |
2016 | + // Check that we got a sensible HTTP status code |
2017 | + if (response.status != http::Status::ok) { |
2018 | + throw domain_error(response.body); |
2019 | + } |
2020 | + // Parse the Xml from the response |
2021 | + reader.addData(response.body.c_str()); |
2022 | + } catch (net::Error &) { |
2023 | + } |
2024 | +} |
2025 | + |
2026 | +vector<Client::Item> Client::getItems(const string& url) { |
2027 | + // This is the method that we will call from the Query class. |
2028 | + // It connects to an HTTP source and returns the results. |
2029 | + qDebug() << "getItems!!!"; |
2030 | + |
2031 | + // In this case we are going to retrieve XML data. |
2032 | + QXmlStreamReader root; |
2033 | + get(url, root); |
2034 | + |
2035 | + vector<Item> results; |
2036 | + |
2037 | + |
2038 | + while (!root.atEnd() && !root.hasError()) { |
2039 | + Item result; |
2040 | + QXmlStreamReader::TokenType token = root.readNext(); |
2041 | + |
2042 | + /* If token is just StartDocument, we'll go to next.*/ |
2043 | + if (token == QXmlStreamReader::StartDocument) { |
2044 | + continue; |
2045 | + } |
2046 | + |
2047 | + /* If token is StartElement, we'll see if we can read it.*/ |
2048 | + if (token == QXmlStreamReader::StartElement) { |
2049 | + if (root.name() == "item" || root.name() == "entry") { |
2050 | + parseItem(results, root); |
2051 | + } |
2052 | + } |
2053 | + } |
2054 | + |
2055 | + if (root.hasError()) { |
2056 | + throw domain_error(root.errorString().toStdString()); |
2057 | + } |
2058 | + return results; |
2059 | +} |
2060 | + |
2061 | +http::Request::Progress::Next Client::progress_report( |
2062 | + const http::Request::Progress&) { |
2063 | + |
2064 | + return cancelled_ ? |
2065 | + http::Request::Progress::Next::abort_operation : |
2066 | + http::Request::Progress::Next::continue_operation; |
2067 | +} |
2068 | + |
2069 | +void Client::cancel() { |
2070 | + cancelled_ = true; |
2071 | +} |
2072 | + |
2073 | |
2074 | === added directory 'src/scope' |
2075 | === added file 'src/scope/preview.cpp' |
2076 | --- src/scope/preview.cpp 1970-01-01 00:00:00 +0000 |
2077 | +++ src/scope/preview.cpp 2015-05-20 13:57:15 +0000 |
2078 | @@ -0,0 +1,91 @@ |
2079 | +/* |
2080 | + * Copyright 2015 Canonical Ltd. |
2081 | + * |
2082 | + * This program is free software; you can redistribute it and/or modify |
2083 | + * it under the terms of the GNU General Public License as published by |
2084 | + * the Free Software Foundation; version 3. |
2085 | + * |
2086 | + * This program is distributed in the hope that it will be useful, |
2087 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2088 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2089 | + * GNU General Public License for more details. |
2090 | + * |
2091 | + * You should have received a copy of the GNU General Public License |
2092 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2093 | + * |
2094 | + * Authors: |
2095 | + * Scott Sweeny |
2096 | + */ |
2097 | + |
2098 | +#include <scope/preview.h> |
2099 | + |
2100 | +#include <unity/scopes/ColumnLayout.h> |
2101 | +#include <unity/scopes/PreviewWidget.h> |
2102 | +#include <unity/scopes/PreviewReply.h> |
2103 | +#include <unity/scopes/Result.h> |
2104 | +#include <unity/scopes/VariantBuilder.h> |
2105 | + |
2106 | +#include <iostream> |
2107 | + |
2108 | +namespace sc = unity::scopes; |
2109 | + |
2110 | +using namespace std; |
2111 | +using namespace scope; |
2112 | + |
2113 | +Preview::Preview(const sc::Result &result, const sc::ActionMetadata &metadata) : |
2114 | + sc::PreviewQueryBase(result, metadata) { |
2115 | +} |
2116 | + |
2117 | +void Preview::cancelled() { |
2118 | +} |
2119 | + |
2120 | +void Preview::run(sc::PreviewReplyProxy const& reply) { |
2121 | + // Support three different column layouts |
2122 | + sc::ColumnLayout layout1col(1), layout2col(2), layout3col(3); |
2123 | + |
2124 | + // We define 3 different layouts, that will be used depending on the |
2125 | + // device. The shell (view) will decide which layout fits best. |
2126 | + // If, for instance, we are executing in a tablet probably the view will use |
2127 | + // 2 or more columns. |
2128 | + // Column layout definitions are optional. |
2129 | + // However, we recommend that scopes define layouts for the best visual appearance. |
2130 | + |
2131 | + // Single column layout |
2132 | + layout1col.add_column( { "image", "header", "summary", "actions" }); |
2133 | + |
2134 | + // Two column layout |
2135 | + layout2col.add_column( { "image" }); |
2136 | + layout2col.add_column( { "header", "summary", "actions" }); |
2137 | + |
2138 | + // Three cokumn layout |
2139 | + layout3col.add_column( { "image" }); |
2140 | + layout3col.add_column( { "header", "summary", "actions" }); |
2141 | + layout3col.add_column( { }); |
2142 | + |
2143 | + // Register the layouts we just created |
2144 | + reply->register_layout( { layout1col, layout2col, layout3col }); |
2145 | + |
2146 | + // Define the header section |
2147 | + sc::PreviewWidget header("header", "header"); |
2148 | + // It has title and a subtitle properties |
2149 | + header.add_attribute_mapping("title", "title"); |
2150 | + header.add_attribute_mapping("subtitle", "subtitle"); |
2151 | + |
2152 | + // Define the image section |
2153 | + sc::PreviewWidget image("image", "image"); |
2154 | + // It has a single source property, mapped to the result's art property |
2155 | + image.add_attribute_mapping("source", "art"); |
2156 | + |
2157 | + // Define the summary section |
2158 | + sc::PreviewWidget description("summary", "text"); |
2159 | + // It has a text property, mapped to the result's description property |
2160 | + description.add_attribute_mapping("text", "content"); |
2161 | + |
2162 | + // Define the action buttons |
2163 | + sc::PreviewWidget actions("actions", "actions"); |
2164 | + actions.add_attribute_mapping("actions", "actions"); |
2165 | + |
2166 | + // Push each of the sections |
2167 | + reply->push( { image, header, description, actions }); |
2168 | +} |
2169 | + |
2170 | |
2171 | === added file 'src/scope/query.cpp' |
2172 | --- src/scope/query.cpp 1970-01-01 00:00:00 +0000 |
2173 | +++ src/scope/query.cpp 2015-05-20 13:57:15 +0000 |
2174 | @@ -0,0 +1,233 @@ |
2175 | +/* |
2176 | + * Copyright 2015 Canonical Ltd. |
2177 | + * |
2178 | + * This program is free software; you can redistribute it and/or modify |
2179 | + * it under the terms of the GNU General Public License as published by |
2180 | + * the Free Software Foundation; version 3. |
2181 | + * |
2182 | + * This program is distributed in the hope that it will be useful, |
2183 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2184 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2185 | + * GNU General Public License for more details. |
2186 | + * |
2187 | + * You should have received a copy of the GNU General Public License |
2188 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2189 | + * |
2190 | + * Authors: |
2191 | + * Scott Sweeny |
2192 | + */ |
2193 | + |
2194 | +#include <boost/algorithm/string/trim.hpp> |
2195 | + |
2196 | +#include <scope/localization.h> |
2197 | +#include <scope/query.h> |
2198 | + |
2199 | +#include <unity/scopes/Annotation.h> |
2200 | +#include <unity/scopes/CategorisedResult.h> |
2201 | +#include <unity/scopes/CategoryRenderer.h> |
2202 | +#include <unity/scopes/Department.h> |
2203 | +#include <unity/scopes/QueryBase.h> |
2204 | +#include <unity/scopes/SearchReply.h> |
2205 | +#include <unity/scopes/VariantBuilder.h> |
2206 | + |
2207 | +#include <iomanip> |
2208 | +#include <sstream> |
2209 | + |
2210 | +#include <QDebug> |
2211 | +#include <QFile> |
2212 | +#include <QJsonArray> |
2213 | +#include <QJsonDocument> |
2214 | +#include <QJsonObject> |
2215 | + |
2216 | +namespace sc = unity::scopes; |
2217 | +namespace alg = boost::algorithm; |
2218 | + |
2219 | +using namespace std; |
2220 | +using namespace api; |
2221 | +using namespace scope; |
2222 | + |
2223 | + |
2224 | +std::string NEWS_LAYOUT = R"( |
2225 | +{ |
2226 | + "schema-version" : 1, |
2227 | + "template" : { |
2228 | + "category-layout" : "vertical-journal", |
2229 | + "card-layout": "horizontal", |
2230 | + "card-size": "small" |
2231 | + }, |
2232 | + "components" : { |
2233 | + "title" : "title", |
2234 | + "subtitle":"published", |
2235 | + "summary":"summary", |
2236 | + "art":"art" |
2237 | + } |
2238 | +} |
2239 | +)"; |
2240 | + |
2241 | +std::string ERROR_GRID = R"( |
2242 | +{ |
2243 | + "schema-version" : 1, |
2244 | + "template" : { |
2245 | + "category-layout" : "grid", |
2246 | + "card-layout": "horizontal", |
2247 | + "card-size": "small" |
2248 | + }, |
2249 | + "components" : { |
2250 | + "title" : "title", |
2251 | + "mascot":"art", |
2252 | + "art" : { |
2253 | + "field": "art", |
2254 | + "aspect-ratio": 1.6, |
2255 | + "fill-mode": "fit" |
2256 | + } |
2257 | + } |
2258 | +} |
2259 | +)"; |
2260 | + |
2261 | +QString getDepartments(QString filePath, sc::SearchReplyProxy const& reply) { |
2262 | + sc::DepartmentList depts; |
2263 | + QString rootDeptUrl; |
2264 | + |
2265 | + // Read department names and URLs from the file |
2266 | + QFile departmentsFile(filePath); |
2267 | + if (!departmentsFile.open(QIODevice::ReadOnly | QIODevice::Text)) { |
2268 | + qWarning() << "Departments file" << filePath << "not found"; |
2269 | + return ""; |
2270 | + } |
2271 | + |
2272 | + QByteArray data = departmentsFile.readAll(); |
2273 | + departmentsFile.close(); |
2274 | + |
2275 | + QJsonDocument doc = QJsonDocument::fromJson(data); |
2276 | + if (doc.isNull()){ |
2277 | + qWarning() << "JSON parsing failed"; |
2278 | + return ""; |
2279 | + } |
2280 | + QJsonArray results = doc.array(); |
2281 | + |
2282 | + sc::CannedQuery myquery(SCOPE_NAME); |
2283 | + myquery.set_department_id(""); |
2284 | + sc::Department::SPtr topDept; |
2285 | + |
2286 | + auto value = results[0]; |
2287 | + auto obj = value.toObject(); |
2288 | + rootDeptUrl = obj["id"].toString(); |
2289 | + topDept = move(sc::Department::create("",myquery,obj["label"].toString().toStdString())); |
2290 | + |
2291 | + if (results.size() > 1) { |
2292 | + for (int i = 1; i < results.size(); ++i) |
2293 | + { |
2294 | + auto value = results[i]; |
2295 | + auto obj = value.toObject(); |
2296 | + sc::Department::SPtr aDept= move(sc::Department::create(obj["id"].toString().toStdString(),\ |
2297 | + myquery,obj["label"].toString().toStdString())); |
2298 | + depts.insert(depts.end(),aDept); |
2299 | + } |
2300 | + |
2301 | + topDept->set_subdepartments(depts); |
2302 | + reply->register_departments(topDept); |
2303 | + } |
2304 | + return rootDeptUrl; |
2305 | +} |
2306 | + |
2307 | +Query::Query(const sc::CannedQuery &query, const sc::SearchMetadata &metadata, const string scope_directory) : |
2308 | + sc::SearchQueryBase(query, metadata), |
2309 | + client_(), |
2310 | + scope_directory_(scope_directory) { |
2311 | +} |
2312 | + |
2313 | +void Query::cancelled() { |
2314 | + client_.cancel(); |
2315 | +} |
2316 | + |
2317 | + |
2318 | +void Query::run(sc::SearchReplyProxy const& reply) { |
2319 | + try { |
2320 | + // Start by getting information about the query |
2321 | + const sc::CannedQuery &query(sc::SearchQueryBase::query()); |
2322 | + |
2323 | + // Trim the query string of whitespace |
2324 | + string query_string = alg::trim_copy(query.query_string()); |
2325 | + |
2326 | + // Get the departments |
2327 | + QString deptFile = QString::fromStdString(scope_directory_) + "/feeds.json"; |
2328 | + string feedUrl = getDepartments(deptFile, reply).toStdString(); // feedUrl has the root URL |
2329 | + |
2330 | + // If the current dept ID is empty use the root URL otherwise use |
2331 | + // the dept ID, which should be a department feed URL |
2332 | + if (!query.department_id().empty()) { |
2333 | + feedUrl = query.department_id(); |
2334 | + } |
2335 | + |
2336 | + if (feedUrl.empty()) { |
2337 | + // We can't proceed if we don't have a feed URL |
2338 | + qWarning() << "No feed URL found"; |
2339 | + return; |
2340 | + } |
2341 | + |
2342 | + vector<Client::Item> results = client_.getItems(feedUrl); |
2343 | + |
2344 | + // Register a category for the forecast |
2345 | + auto news_cat = reply->register_category("news", |
2346 | + "", "", sc::CategoryRenderer(NEWS_LAYOUT)); |
2347 | + |
2348 | + // For each of the forecast days |
2349 | + for (const auto &item : results) { |
2350 | + |
2351 | + // Filter by search term if we have one |
2352 | + if (!query_string.empty()) { |
2353 | + QString qry = QString::fromStdString(query_string); |
2354 | + QString title = QString::fromStdString(item.title); |
2355 | + QString summary = QString::fromStdString(item.summary); |
2356 | + QString content = QString::fromStdString(item.content); |
2357 | + |
2358 | + if (!title.contains(qry, Qt::CaseInsensitive) && |
2359 | + !summary.contains(qry, Qt::CaseInsensitive) && |
2360 | + !content.contains(qry, Qt::CaseInsensitive)) { |
2361 | + continue; |
2362 | + } |
2363 | + } |
2364 | + |
2365 | + // Create a result |
2366 | + sc::CategorisedResult res(news_cat); |
2367 | + |
2368 | + // We must have a URI |
2369 | + res.set_uri(item.uri); |
2370 | + res.set_dnd_uri(item.uri); |
2371 | + |
2372 | + // Set the rest of the attributes |
2373 | + res.set_title(item.title); |
2374 | + res.set_art(item.art); |
2375 | + res["published"] = sc::Variant(item.published); |
2376 | + res["author"] = sc::Variant(item.author); |
2377 | + res["summary"] = sc::Variant(item.summary); |
2378 | + res["content"] = sc::Variant(item.content); |
2379 | + res["emblem"] = sc::Variant(scope_directory_+"/images/emblem.png"); |
2380 | + |
2381 | + if (res.art().empty()) { |
2382 | + res.set_art(scope_directory_ + "/icon.png"); |
2383 | + } |
2384 | + |
2385 | + sc::VariantBuilder actions; |
2386 | + actions.add_tuple({ |
2387 | + {"id", sc::Variant("open")}, |
2388 | + {"label", sc::Variant(_("Open"))}, |
2389 | + {"uri", sc::Variant(res.dnd_uri())} |
2390 | + }); |
2391 | + res["actions"] = actions.end(); |
2392 | + |
2393 | + // Push the result |
2394 | + if (!reply->push(res)) { |
2395 | + // If we fail to push, it means the query has been cancelled. |
2396 | + // So don't continue; |
2397 | + return; |
2398 | + } |
2399 | + } |
2400 | + |
2401 | + } catch (domain_error &e) { |
2402 | + // Handle exceptions being thrown by the client API |
2403 | + cerr << e.what() << endl; |
2404 | + reply->error(current_exception()); |
2405 | + } |
2406 | +} |
2407 | + |
2408 | |
2409 | === added file 'src/scope/scope.cpp' |
2410 | --- src/scope/scope.cpp 1970-01-01 00:00:00 +0000 |
2411 | +++ src/scope/scope.cpp 2015-05-20 13:57:15 +0000 |
2412 | @@ -0,0 +1,77 @@ |
2413 | +/* |
2414 | + * Copyright 2015 Canonical Ltd. |
2415 | + * |
2416 | + * This program is free software; you can redistribute it and/or modify |
2417 | + * it under the terms of the GNU General Public License as published by |
2418 | + * the Free Software Foundation; version 3. |
2419 | + * |
2420 | + * This program is distributed in the hope that it will be useful, |
2421 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2422 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2423 | + * GNU General Public License for more details. |
2424 | + * |
2425 | + * You should have received a copy of the GNU General Public License |
2426 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2427 | + * |
2428 | + * Authors: |
2429 | + * Scott Sweeny |
2430 | + */ |
2431 | + |
2432 | +#include <scope/localization.h> |
2433 | +#include <scope/preview.h> |
2434 | +#include <scope/query.h> |
2435 | +#include <scope/scope.h> |
2436 | + |
2437 | +#include <iostream> |
2438 | +#include <sstream> |
2439 | +#include <fstream> |
2440 | + |
2441 | +namespace sc = unity::scopes; |
2442 | +using namespace std; |
2443 | +using namespace api; |
2444 | +using namespace scope; |
2445 | + |
2446 | +void Scope::start(string const&) { |
2447 | + |
2448 | + setlocale(LC_ALL, ""); |
2449 | + string translation_directory = ScopeBase::scope_directory() |
2450 | + + "/../share/locale/"; |
2451 | + bindtextdomain(GETTEXT_PACKAGE, translation_directory.c_str()); |
2452 | +} |
2453 | + |
2454 | +void Scope::stop() { |
2455 | +} |
2456 | + |
2457 | +sc::SearchQueryBase::UPtr Scope::search(const sc::CannedQuery &query, |
2458 | + const sc::SearchMetadata &metadata) { |
2459 | + // Boilerplate construction of Query |
2460 | + return sc::SearchQueryBase::UPtr(new Query(query, metadata, scope_directory())); |
2461 | +} |
2462 | + |
2463 | +sc::PreviewQueryBase::UPtr Scope::preview(sc::Result const& result, |
2464 | + sc::ActionMetadata const& metadata) { |
2465 | + // Boilerplate construction of Preview |
2466 | + return sc::PreviewQueryBase::UPtr(new Preview(result, metadata)); |
2467 | +} |
2468 | + |
2469 | +#define EXPORT __attribute__ ((visibility ("default"))) |
2470 | + |
2471 | +// These functions define the entry points for the scope plugin |
2472 | +extern "C" { |
2473 | + |
2474 | +EXPORT |
2475 | +unity::scopes::ScopeBase* |
2476 | +// cppcheck-suppress unusedFunction |
2477 | +UNITY_SCOPE_CREATE_FUNCTION() { |
2478 | + return new Scope(); |
2479 | +} |
2480 | + |
2481 | +EXPORT |
2482 | +void |
2483 | +// cppcheck-suppress unusedFunction |
2484 | +UNITY_SCOPE_DESTROY_FUNCTION(unity::scopes::ScopeBase* scope_base) { |
2485 | + delete scope_base; |
2486 | +} |
2487 | + |
2488 | +} |
2489 | + |
2490 | |
2491 | === added directory 'tests' |
2492 | === added file 'tests/CMakeLists.txt' |
2493 | --- tests/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2494 | +++ tests/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
2495 | @@ -0,0 +1,42 @@ |
2496 | + |
2497 | +# Google Mock unfortunately has to be compiled from source |
2498 | +include(FindGMock) |
2499 | + |
2500 | +# We need process-cpp to launch the python test server |
2501 | +pkg_check_modules( |
2502 | + TEST |
2503 | + process-cpp |
2504 | + REQUIRED |
2505 | +) |
2506 | + |
2507 | +# Include our test library headers |
2508 | +include_directories( |
2509 | + ${GTEST_INCLUDE_DIRS} |
2510 | + ${GMOCK_INCLUDE_DIRS} |
2511 | + ${TEST_INCLUDE_DIRS} |
2512 | +) |
2513 | + |
2514 | +# Where to find the scope ini file and .so |
2515 | +add_definitions( |
2516 | +# -DTEST_SCOPE_DIRECTORY="${CMAKE_BINARY_DIR}/src" |
2517 | +) |
2518 | + |
2519 | +file(GLOB_RECURSE |
2520 | + TEST_FIXTURES |
2521 | + "server/*" |
2522 | + "unit/*" |
2523 | +) |
2524 | + |
2525 | +# Make this file show up in QtCreator |
2526 | +add_custom_target(hidden_test_fixtures ALL |
2527 | + SOURCES ${TEST_FIXTURES} |
2528 | +) |
2529 | + |
2530 | +# Where to find the test server binary |
2531 | +add_definitions( |
2532 | + -DFAKE_SERVER="${CMAKE_CURRENT_SOURCE_DIR}/server/server.py" |
2533 | +) |
2534 | + |
2535 | +# Add the unit tests |
2536 | +add_subdirectory(unit) |
2537 | + |
2538 | |
2539 | === added directory 'tests/server' |
2540 | === added directory 'tests/server/bbc' |
2541 | === added directory 'tests/server/bbc/news' |
2542 | === added file 'tests/server/bbc/news/rss.xml' |
2543 | --- tests/server/bbc/news/rss.xml 1970-01-01 00:00:00 +0000 |
2544 | +++ tests/server/bbc/news/rss.xml 2015-05-20 13:57:15 +0000 |
2545 | @@ -0,0 +1,40 @@ |
2546 | +<?xml version="1.0" encoding="UTF-8"?> |
2547 | +<?xml-stylesheet title="XSL_formatting" type="text/xsl" href="/shared/bsp/xsl/rss/nolsol.xsl"?> |
2548 | + |
2549 | +<rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> |
2550 | + <channel> |
2551 | + <title>BBC News - Home</title> |
2552 | + <link>http://www.bbc.co.uk/news/#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> |
2553 | + <description>The latest stories from the Home section of the BBC News web site.</description> |
2554 | + <language>en-gb</language> |
2555 | + <lastBuildDate>Mon, 08 Dec 2014 15:15:32 GMT</lastBuildDate> |
2556 | + <copyright>Copyright: (C) British Broadcasting Corporation, see http://news.bbc.co.uk/2/hi/help/rss/4498287.stm for terms and conditions of reuse.</copyright> |
2557 | + <image> |
2558 | + <url>http://news.bbcimg.co.uk/nol/shared/img/bbc_news_120x60.gif</url> |
2559 | + <title>BBC News - Home</title> |
2560 | + <link>http://www.bbc.co.uk/news/#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> |
2561 | + <width>120</width> |
2562 | + <height>60</height> |
2563 | + </image> |
2564 | + <ttl>15</ttl> |
2565 | + <atom:link href="http://feeds.bbci.co.uk/news/rss.xml" rel="self" type="application/rss+xml"/> |
2566 | + <item> |
2567 | + <title>Dewani cleared of honeymoon murder</title> |
2568 | + <description>The family of Anni Dewani believe they have been failed by the justice system after millionaire businessman Shrien Dewani is cleared of the honeymoon murder.</description> |
2569 | + <link>http://www.bbc.co.uk/news/uk-england-bristol-30375335#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> |
2570 | + <guid isPermaLink="false">http://www.bbc.co.uk/news/uk-england-bristol-30375335</guid> |
2571 | + <pubDate>Mon, 08 Dec 2014 14:40:30 GMT</pubDate> |
2572 | + <media:thumbnail width="66" height="49" url="http://news.bbcimg.co.uk/media/images/79581000/jpg/_79581908_78423657.jpg"/> |
2573 | + <media:thumbnail width="144" height="81" url="http://news.bbcimg.co.uk/media/images/79581000/jpg/_79581909_78423657.jpg"/> |
2574 | + </item> |
2575 | + <item> |
2576 | + <title>'Pay benefits faster' to cut hunger</title> |
2577 | + <description>An income squeeze, benefit delays and high utility bills are blamed by a cross-party committee of MPs for a rise in hunger in the UK.</description> |
2578 | + <link>http://www.bbc.co.uk/news/education-30346060#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> |
2579 | + <guid isPermaLink="false">http://www.bbc.co.uk/news/education-30346060</guid> |
2580 | + <pubDate>Mon, 08 Dec 2014 10:56:04 GMT</pubDate> |
2581 | + <media:thumbnail width="66" height="49" url="http://news.bbcimg.co.uk/media/images/79569000/jpg/_79569923_79569916.jpg"/> |
2582 | + <media:thumbnail width="144" height="81" url="http://news.bbcimg.co.uk/media/images/79569000/jpg/_79569924_79569916.jpg"/> |
2583 | + </item> |
2584 | + </channel> |
2585 | +</rss> |
2586 | |
2587 | === added directory 'tests/server/cnet' |
2588 | === added directory 'tests/server/cnet/rss' |
2589 | === added directory 'tests/server/cnet/rss/all' |
2590 | === added file 'tests/server/cnet/rss/all/index.xml' |
2591 | --- tests/server/cnet/rss/all/index.xml 1970-01-01 00:00:00 +0000 |
2592 | +++ tests/server/cnet/rss/all/index.xml 2015-05-20 13:57:15 +0000 |
2593 | @@ -0,0 +1,2 @@ |
2594 | +<?xml version="1.0" encoding="UTF-8"?> |
2595 | +<rss xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>CNET</title><link>http://www.cnet.com/#ftag=CADf328eec</link><description>The latest tech news, product reviews, videos, and how tos from CNET.</description><language>en</language><pubDate>Thu, 22 Jan 2015 14:59:05 GMT</pubDate><lastBuildDate>Thu, 22 Jan 2015 14:59:05 GMT</lastBuildDate><ttl>2</ttl><image><title>CNET</title><url>http://i.i.cbsi.com/cnwk.1d/i/ne/gr/prtnr/CNET_Logo_150.gif</url><link>http://www.cnet.com/#ftag=CADf328eec</link></image><item><title>Cook with gas like a pro on the hardy Decor Renaissance range</title><link>http://www.cnet.com/videos/cook-with-gas-like-a-pro-on-the-hardy-decor-renaissance-range/#ftag=CADf328eec</link><description>Dacor's new gas grilling monster is built to last and cook with lots of control.<img width='1' height='1' src='http://cnet.com.feedsportal.com/c/34938/f/645450/s/42987c70/sc/36/mf.gif' border='0'/><br clear='all'/><br/><br/><a href="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/rc/1/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/rc/2/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/rc/3/rc.img" border="0"/></a><br/><br/><a href="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/a2.htm"><img src="http://da.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/a2.img" border="0"/></a><img width="1" height="1" src="http://pi.feedsportal.com/r/218610936754/u/57/f/645450/c/34938/s/42987c70/sc/36/a2t.img" border="0"/></description><pubDate>Thu, 22 Jan 2015 14:52:46 GMT</pubDate><guid>http://www.cnet.com/videos/cook-with-gas-like-a-pro-on-the-hardy-decor-renaissance-range/#ftag=CADf328eec</guid><dc:creator>Brian Bennett</dc:creator><media:thumbnail url="http://cnet3.cbsistatic.com/hub/i/r/2015/01/22/cf096def-ba6c-4fed-a624-5789eaa42cc1/thumbnail/300x230/84411a75f4fa59904efffe0cb1e9b371/fldacorrenaissanceprostylegasrange0.jpg" /></item><item><title>Dropbox app arrives on Windows tablets, phones</title><link>http://www.cnet.com/news/dropbox-official-app-arrives-on-windows-tablets-phones/#ftag=CADf328eec</link><description>Dropbox, Microsoft hope to win over more customers with improved work flow and compatibilty.<img width='1' height='1' src='http://cnet.com.feedsportal.com/c/34938/f/645450/s/42987c74/sc/21/mf.gif' border='0'/><br clear='all'/><br/><br/><a href="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/rc/1/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/rc/2/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/rc/3/rc.img" border="0"/></a><br/><br/><a href="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/a2.htm"><img src="http://da.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/a2.img" border="0"/></a><img width="1" height="1" src="http://pi.feedsportal.com/r/218610936753/u/57/f/645450/c/34938/s/42987c74/sc/21/a2t.img" border="0"/></description><pubDate>Thu, 22 Jan 2015 14:45:36 GMT</pubDate><guid>http://www.cnet.com/news/dropbox-official-app-arrives-on-windows-tablets-phones/#ftag=CADf328eec</guid><dc:creator>Lance Whitney</dc:creator><media:thumbnail url="http://cnet3.cbsistatic.com/hub/i/r/2015/01/22/8ea8815f-4595-4184-a65f-6a494ea16e00/thumbnail/300x230/21ab57c0ba05d8ceb5dcf00a468e63e8/dropbox-windows-app.jpg" /></item></channel></rss> |
2596 | |
2597 | === added directory 'tests/server/elpais' |
2598 | === added file 'tests/server/elpais/portada.xml' |
2599 | --- tests/server/elpais/portada.xml 1970-01-01 00:00:00 +0000 |
2600 | +++ tests/server/elpais/portada.xml 2015-05-20 13:57:15 +0000 |
2601 | @@ -0,0 +1,73 @@ |
2602 | +<?xml version="1.0" encoding="utf-8"?> |
2603 | +<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"> |
2604 | +<channel> |
2605 | + <title><![CDATA[Portada de EL PAÍS]]></title> |
2606 | + <link><![CDATA[http://elpais.com/rss/elpais/portada.xml]]></link> |
2607 | + <description><![CDATA[Portada de EL PAÍS]]></description> |
2608 | + <lastBuildDate>Thu, 22 Jan 2015 16:48:19 +0100</lastBuildDate> |
2609 | + <pubDate>Thu, 22 Jan 2015 16:48:19 +0100</pubDate> |
2610 | + <language>es</language> |
2611 | + <copyright><![CDATA[Copyright 2015, Ediciones EL PAÍS]]></copyright> |
2612 | + <ttl>5</ttl> |
2613 | + <image> |
2614 | + <url>http://ep00.epimg.net/iconos/v1.x/v1.0/logos/cabecera_portada.png</url> |
2615 | + <title>Logotipo de EL PAÍS</title> |
2616 | + <link>http://elpais.com/</link> |
2617 | + </image> |
2618 | + <item> |
2619 | + <title><![CDATA[Los mercados celebran el plan de compra de activos del BCE]]></title> |
2620 | + <link><![CDATA[http://elpais.com/economia/2015/01/22/actualidad/1421918178_469436.html]]></link> |
2621 | + <guid isPermaLink="true"><![CDATA[http://elpais.com/economia/2015/01/22/actualidad/1421918178_469436.html]]></guid> |
2622 | + <dc:creator><![CDATA[El País]]></dc:creator> |
2623 | + <description><![CDATA[Las Bolsas europeas suben tras los primeros detalles del programa de estímulo. La prima española baja de 100 puntos]]></description> |
2624 | + <pubDate><![CDATA[Thu, 22 Jan 2015 15:41:53 +0100]]></pubDate> |
2625 | + <category><![CDATA[Mario Draghi]]></category> |
2626 | + <category><![CDATA[BCE]]></category> |
2627 | + <category><![CDATA[Política financiera]]></category> |
2628 | + <category><![CDATA[Bolsa]]></category> |
2629 | + <category><![CDATA[Política económica]]></category> |
2630 | + <category><![CDATA[UE]]></category> |
2631 | + <category><![CDATA[Bancos]]></category> |
2632 | + <category><![CDATA[Mercados financieros]]></category> |
2633 | + <category><![CDATA[Europa]]></category> |
2634 | + <category><![CDATA[Banca]]></category> |
2635 | + <category><![CDATA[Economía]]></category> |
2636 | + <category><![CDATA[Finanzas]]></category> |
2637 | + <content:encoded><![CDATA[<p>Las Bolsas han recibido en verde el anuncio del <a href="http://economia.elpais.com/economia/2015/01/22/actualidad/1421930158_392049.html">plan de estímulo a la economía europea del Banco Central Europeo</a> (BCE). Pero pese al optimismo, los mercados tampoco han celebrado una fiesta: el <a href="http://resultados.elpais.com/mercados/indices/ibex_35/582/">Ibex 35</a> ha registrado alzas de menos del 1% mientras la rueda de prensa del presidente de Mario Draghi todavía seguía en marcha. Aunque sin excesos —<a href="http://economia.elpais.com/economia/2015/01/17/actualidad/1421529316_697978.html">el anuncio de Draghi llevaba semanas avanzándose</a>—, todas las plazas europeas se han teñido de verde.</p> |
2638 | +<p>Los inversores llevaban meses esperando que el presidente Mario Draghi se decidiera a poner en marcha las medidas de política monetaria más agresivas. Desde principios de diciembre el día de hoy estaba marcado en el calendario como la jornada en la que todo indicaba que se anunciaría el programa. La expectación ha hecho que las Bolsas se apunten toda la semana subidas y que los bonos soberanos marquen cotas mínimas. Los inversores, advertían los analistas, estaban ya descontando el plan de Draghi, y de ahí que este jueves el salto de la Bolsa sea más bien tímido.</p> |
2639 | +<p>El Ibex 35, el selectivo de la Bolsa española, ha titubeado, con subidas de entre el 0,8% y el 1,8%. Antes de la rueda de prensa de Draghi, estaba cerca de los 10.400 puntos. Con los primeros detalles del plan, que supondrá la compra de 60.000 millones de euros en activos cada mes, subía a 10.524 puntos. Y ya terminados los anuncios, cerca de las cuatro de la tarde, rondaba los 10.500 puntos, el 1,6% más. La banca y las empresas energéticas eran las que más tiraban del selectivo.</p> |
2640 | +<p>La reacción del selectivo español ha sido de las más efusivas. Entre las grandes plazas, solo Milán celebraba con más entusiasmo los estímulos, con una subida cercana al 1,9% a media tarde. París subía el 1%, la Bolsa alemana medio punto y el índice combinado europeo Euro Stoxx más del 1%.</p> |
2641 | +<p>La prima de riesgo española, que es el diferencial de interés que los inversores exigen en los bonos a 10 años españoles respecto de los alemanes, por la mañana ha bajado de los 100 puntos, y así se ha mantenido tras la rueda de prensa del BCE.</p>]]></content:encoded> |
2642 | + <enclosure url="http://ep00.epimg.net/economia/imagenes/2015/01/22/actualidad/1421918178_469436_1421919363_miniatura_normal.jpg" length="7780" type="image/jpeg" /> |
2643 | + <enclosure url="http://ep00.epimg.net/economia/imagenes/2015/01/22/actualidad/1421918178_469436_1421919363_noticia_normal.jpg" length="47941" type="image/jpeg" /> |
2644 | + <comments><![CDATA[http://eskup.elpais.com/C1421918177-a42f07be2996d7f8f79fac06f3ba4a3a]]></comments> |
2645 | + </item> |
2646 | + <item> |
2647 | + <title><![CDATA[La presidenta afirma que la muerte de Nisman “no fue suicidio”]]></title> |
2648 | + <link><![CDATA[http://elpais.com/internacional/2015/01/22/actualidad/1421925039_624424.html]]></link> |
2649 | + <guid isPermaLink="true"><![CDATA[http://elpais.com/internacional/2015/01/22/actualidad/1421925039_624424.html]]></guid> |
2650 | + <dc:creator><![CDATA[Francisco Peregil]]></dc:creator> |
2651 | + <description><![CDATA["La verdadera operación contra el Gobierno era la muerte del fiscal después de acusar a la presidenta", escribe Fernández]]></description> |
2652 | + <pubDate><![CDATA[Thu, 22 Jan 2015 16:47:52 +0100]]></pubDate> |
2653 | + <category><![CDATA[Caso AMIA]]></category> |
2654 | + <category><![CDATA[Alberto Nisman]]></category> |
2655 | + <category><![CDATA[Cristina Fernández de Kirchner]]></category> |
2656 | + <category><![CDATA[Investigación judicial]]></category> |
2657 | + <category><![CDATA[Casos judiciales]]></category> |
2658 | + <category><![CDATA[Atentados terroristas]]></category> |
2659 | + <category><![CDATA[Terrorismo]]></category> |
2660 | + <category><![CDATA[Proceso judicial]]></category> |
2661 | + <category><![CDATA[Justicia]]></category> |
2662 | + <content:encoded><![CDATA[<p>La presidenta de Argentina, Cristina Fernández, ha vuelto a escribir en <a href="https://es-es.facebook.com/CFKArgentina">Facebook</a> sobre la muerte del fiscal <a href="http://internacional.elpais.com/tag/natalio_alberto_nisman/a/">Alberto Nisman</a>, el hombre que la denunció por encubrimiento de terroristas cuatro días antes de fallecer con una bala incrustada en la cabeza. En un extenso mensaje de 2.900 palabras, <a href="http://ep00.epimg.net/descargables/2015/01/22/ee83afe3302baa81171063688a9f4d57.pdf">Fernández asegura que no cree que la muerte de Nisman se trate de un suicidio</a>. Y sostiene que "una rápida lectura" a la denuncia íntegra del fiscal no hace más que confirmar sus "peores sospechas". Es decir, que el informe de Nisman no aporta nada nuevo y que le "plantaron" pistas falsas y que Nisman fue utilizado dentro de una operación contra el Gobierno.</p> |
2663 | +<p> Sin embargo, la denuncia del fiscal y su contenido ha pasado a segundo plano. Lo que se discute hoy por hoy son las circunstancias de la muerte de Nisman y la actuación del Gobierno respecto a ella. Cristina Fernández ya fue criticada por guardar silencio durante cinco días desde que el fiscal planteó el miércoles de la semana pasada una denuncia de una gravedad inusitada. Cuando Fernández eligió ofrecer una primera explicación lo hizo a través de Facebook el mismo día de su muerte. La oposición criticó que eligiera las redes sociales cuando la presidenta acostumbra a transmitir muchos de sus mensajes por "cadena nacional", es decir, mediante la difusión obligatoria en todos los canales de radio y televisión.</p> |
2664 | +<p>En aquella primera carta por Facebook, Fernández habló de suicidio: "La muerte de una persona siempre causa dolor y pérdida entre sus seres queridos, y consternación en el resto. El suicidio provoca, además, en todos los casos, primero: estupor, y después: interrogantes. ¿Qué fue lo que llevó a una persona a tomar la terrible decisión de quitarse la vida?". A renglón seguido empleó los signos de interrogación: "En el caso del ¿suicidio? Del Fiscal a cargo de la causa AMIA (...) Pero en este segundo mensaje, apenas tres días después del primero, Fernández asegura ya estar convencida de que no se trató de un suicidio. El texto lo titula: "Los espías que no eran espías. Los interrogantes que se convierten en certeza. El suicidio (que estoy convencida) no fue suicidio".</p> |
2665 | +<p>La muerte de Nisman parece haber dejado al Gobierno sin capacidad de reacción, sin iniciativa, al rebufo de los acontecimientos. La idea de que la presidenta Fernández convoque una conferencia de prensa es casi inconcebible. Pero su insistencia en mantenerse detrás del muro de Facebook ha soliviantado a la oposición. "Es incomprensible que la presidenta se siga comunicando por las redes", señaló el senador de la Unión Cívica Radical y precandidato a la presidencia, Ernesto Sanz.</p> |
2666 | +<p>El mensaje de Fernández ha dado la señal al resto del Ejecutivo para cambiar de opinión. Uno de los primeros en hacerlo es Sergio Berni, el secretario de Seguridad, quien llegó a la casa de Nisman antes del juez y la fiscal. Berni fue la primera autoridad en señalar que todo apuntaba a un suicidio. Lo hizo horas antes de que se conocieran los primeros informes periciales. Sin embargo, después de conocerse el mensaje de la presidenta ha corregido sus palabras basándose en las declaraciones del cerrajero que abrió la puerta de servicio: "Cuando dice el cerrajero que la puerta estaba abierta, quiere decir que no estaba puesta con dos vueltas de llaves. Alguien puede haber salido por esa puerta". Y declaró: "la teoría del suicidio está cada vez más lejos".</p> |
2667 | +<p>Respecto al contenido de la denuncia presentada por Nisman y publicada de forma íntegra en Internet, Fernández sostiene que no aporta nada nuevo. Y añade que a Nisman le "plantaron" información falsa en su informe."La acusación de Nisman no sólo se derrumba, sino que constituye un verdadero escándalo político y jurídico", asegura. Y precisa: "La denuncia del fiscal Nisman nunca fue en sí misma la verdadera operación contra el Gobierno. Se derrumbaba a poco de andar. Nisman no lo sabía y probablemente no lo supo nunca. La verdadera operación contra el Gobierno era la muerte del Fiscal después de acusar a la Presidenta, a su Canciller y al Secretario General de La Cámpora de ser encubridores de los iraníes acusados por <a href="http://www.google.es/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&cad=rja&uact=8&ved=0CD8QFjAE&url=http%3A%2F%2Felpais.com%2Ftag%2Fcaso_amia%2Fa%2F&ei=Qd7AVJ_KH4T_UJTAgcgD&usg=AFQjCNEtg-VXnV7cN6RzzUUWngZruUJ_ZA&bvm=bv.83829542,d.d24">el atentado de la AMIA".</a> Más adelante remacha: "Lo usaron vivo y después lo necesitaban muerto. Así de triste y terrible".</p>]]></content:encoded> |
2668 | + <enclosure url="http://ep00.epimg.net/internacional/imagenes/2015/01/22/actualidad/1421925039_624424_1421926785_miniatura_normal.jpg" length="4801" type="image/jpeg" /> |
2669 | + <enclosure url="http://ep00.epimg.net/internacional/imagenes/2015/01/22/actualidad/1421925039_624424_1421926785_noticia_normal.jpg" length="22843" type="image/jpeg" /> |
2670 | + <enclosure url="http://ep00.epimg.net/internacional/imagenes/2015/01/22/actualidad/1421925039_624424_1421926785_noticia_grande.jpg" length="61907" type="image/jpeg" /> |
2671 | + <comments><![CDATA[http://eskup.elpais.com/C1421925039-804361179de943a9a7c88eebc78bcc35]]></comments> |
2672 | + </item> |
2673 | +</channel> |
2674 | +</rss> |
2675 | |
2676 | === added directory 'tests/server/euronews' |
2677 | === added directory 'tests/server/euronews/_partners' |
2678 | === added directory 'tests/server/euronews/_partners/ubuntu' |
2679 | === added file 'tests/server/euronews/_partners/ubuntu/news.xml' |
2680 | --- tests/server/euronews/_partners/ubuntu/news.xml 1970-01-01 00:00:00 +0000 |
2681 | +++ tests/server/euronews/_partners/ubuntu/news.xml 2015-05-20 13:57:15 +0000 |
2682 | @@ -0,0 +1,2 @@ |
2683 | +<?xml version="1.0" encoding="UTF-8"?> |
2684 | +<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>euronews</title><link>http://www.euronews.com</link><description>The leading European News TV-channel. All the International news in 14.</description><language>en</language><pubDate>Wed, 21 Jan 2015 21:55:01 GMT</pubDate><lastBuildDate>Wed, 21 Jan 2015 21:55:01 GMT</lastBuildDate><ttl>2</ttl><image><link>http://www.euronews.net/</link><url>http://www.euronews.net/media/rss/logo-rss.png</url><title>euronews</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/euronews/en/home" /><feedburner:info uri="euronews/en/home" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>US and Cuba differ on migration policy on first day of talks</title><link>http://feedproxy.google.com/~r/euronews/en/home/~3/jxq__KwrJ0E/story01.htm</link><description>Migration has proved a divisive issue on the first day of historic talks in Havana between senior Cuban and US officials - the first since both…<img width='1' height='1' src='http://Euronews.net.feedsportal.com/c/32800/f/536666/s/4291afc7/sc/11/mf.gif' border='0'/><br clear='all'/><br/><br/><a href="http://da.feedsportal.com/r/218610861473/u/49/f/536666/c/32800/s/4291afc7/sc/11/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610861473/u/49/f/536666/c/32800/s/4291afc7/sc/11/rc/1/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610861473/u/49/f/536666/c/32800/s/4291afc7/sc/11/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610861473/u/49/f/536666/c/32800/s/4291afc7/sc/11/rc/2/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610861473/u/49/f/536666/c/32800/s/4291afc7/sc/11/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610861473/u/49/f/536666/c/32800/s/4291afc7/sc/11/rc/3/rc.img" border="0"/></a><img src="//feeds.feedburner.com/~r/euronews/en/home/~4/jxq__KwrJ0E" height="1" width="1" alt=""/></description><pubDate>Wed, 21 Jan 2015 21:38:01 GMT</pubDate><guid isPermaLink="false">http://Euronews.net.feedsportal.com/c/32800/f/536666/s/4291afc7/sc/11/l/0L0Seuronews0N0C20A150C0A10C210Cus0Eand0Ecuba0Ediffer0Eon0Emigration0Epolicy0Eon0Efirst0Eday0Eof0Etalks0C/story01.htm</guid><feedburner:origLink>http://Euronews.net.feedsportal.com/c/32800/f/536666/s/4291afc7/sc/11/l/0L0Seuronews0N0C20A150C0A10C210Cus0Eand0Ecuba0Ediffer0Eon0Emigration0Epolicy0Eon0Efirst0Eday0Eof0Etalks0C/story01.htm</feedburner:origLink></item><item><title>PEGIDA leader quits amid 'Hitler' row</title><link>http://feedproxy.google.com/~r/euronews/en/home/~3/9_aOJCAU-lw/story01.htm</link><description>The leader of the anti-Islamisation PEGIDA party in Germany has quit amid a row over photo where he posed as Hitler and comments about immigrants on…<img width='1' height='1' src='http://Euronews.net.feedsportal.com/c/32800/f/536666/s/4291afca/sc/3/mf.gif' border='0'/><br clear='all'/><br/><br/><a href="http://da.feedsportal.com/r/218610861472/u/49/f/536666/c/32800/s/4291afca/sc/3/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610861472/u/49/f/536666/c/32800/s/4291afca/sc/3/rc/1/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610861472/u/49/f/536666/c/32800/s/4291afca/sc/3/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610861472/u/49/f/536666/c/32800/s/4291afca/sc/3/rc/2/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610861472/u/49/f/536666/c/32800/s/4291afca/sc/3/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610861472/u/49/f/536666/c/32800/s/4291afca/sc/3/rc/3/rc.img" border="0"/></a><img src="//feeds.feedburner.com/~r/euronews/en/home/~4/9_aOJCAU-lw" height="1" width="1" alt=""/></description><pubDate>Wed, 21 Jan 2015 21:34:03 GMT</pubDate><guid isPermaLink="false">http://Euronews.net.feedsportal.com/c/32800/f/536666/s/4291afca/sc/3/l/0L0Seuronews0N0C20A150C0A10C210Cpegida0Eleader0Equits0Eamid0Ehitler0Erow0C/story01.htm</guid><feedburner:origLink>http://Euronews.net.feedsportal.com/c/32800/f/536666/s/4291afca/sc/3/l/0L0Seuronews0N0C20A150C0A10C210Cpegida0Eleader0Equits0Eamid0Ehitler0Erow0C/story01.htm</feedburner:origLink></item></channel></rss> |
2685 | |
2686 | === added file 'tests/server/server.py' |
2687 | --- tests/server/server.py 1970-01-01 00:00:00 +0000 |
2688 | +++ tests/server/server.py 2015-05-20 13:57:15 +0000 |
2689 | @@ -0,0 +1,67 @@ |
2690 | +#!/usr/bin/env python3 |
2691 | +## |
2692 | +## Copyright 2015 Canonical Ltd. |
2693 | +## |
2694 | +## This program is free software; you can redistribute it and/or modify |
2695 | +## it under the terms of the GNU General Public License as published by |
2696 | +## the Free Software Foundation; version 3. |
2697 | +## |
2698 | +## This program is distributed in the hope that it will be useful, |
2699 | +## but WITHOUT ANY WARRANTY; without even the implied warranty of |
2700 | +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2701 | +## GNU General Public License for more details. |
2702 | +## |
2703 | +## You should have received a copy of the GNU General Public License |
2704 | +## along with this program. If not, see <http://www.gnu.org/licenses/>. |
2705 | +## |
2706 | +## Authors: |
2707 | +## Scott Sweeny |
2708 | +## |
2709 | + |
2710 | +import http.server |
2711 | +import os |
2712 | +import socketserver |
2713 | +import sys |
2714 | +from urllib.parse import urlparse,parse_qs |
2715 | + |
2716 | +def read_file(path): |
2717 | + # The path we get starts with a '/' so strip it |
2718 | + file = os.path.join(os.path.dirname(os.path.abspath(__file__)), path[1:]) |
2719 | + sys.stderr.write("File Path: %s\n" % file) |
2720 | + if os.path.isfile(file): |
2721 | + with open(file, 'r') as fp: |
2722 | + content = fp.read() |
2723 | + else: |
2724 | + content = '' |
2725 | + |
2726 | + return content |
2727 | + |
2728 | +class MyRequestHandler(http.server.BaseHTTPRequestHandler): |
2729 | + def do_GET(self): |
2730 | + sys.stderr.write("GET: %s\n" % self.path) |
2731 | + sys.stderr.flush() |
2732 | + |
2733 | + parse = urlparse(self.path) |
2734 | + path = parse.path |
2735 | + |
2736 | + content = read_file(path) |
2737 | + if content != '': |
2738 | + self.send_response(200) |
2739 | + self.send_header("Content-type", "application/xml") |
2740 | + self.end_headers() |
2741 | + self.wfile.write(bytes(content, 'UTF-8')) |
2742 | + else: |
2743 | + self.send_response(404) |
2744 | + self.send_header("Content-type", "text/html") |
2745 | + self.end_headers() |
2746 | + self.wfile.write(bytes('ERROR\n', 'UTF-8')) |
2747 | + |
2748 | +if __name__ == "__main__": |
2749 | + Handler = MyRequestHandler |
2750 | + httpd = socketserver.TCPServer(("127.0.0.1", 9999), Handler) |
2751 | + |
2752 | + sys.stdout.write('%d\n' % httpd.server_address[1]) |
2753 | + sys.stdout.flush() |
2754 | + httpd.serve_forever() |
2755 | + |
2756 | + |
2757 | |
2758 | === added directory 'tests/server/vox' |
2759 | === added directory 'tests/server/vox/rss' |
2760 | === added file 'tests/server/vox/rss/index.xml' |
2761 | --- tests/server/vox/rss/index.xml 1970-01-01 00:00:00 +0000 |
2762 | +++ tests/server/vox/rss/index.xml 2015-05-20 13:57:15 +0000 |
2763 | @@ -0,0 +1,113 @@ |
2764 | +<?xml version="1.0" encoding="UTF-8"?> |
2765 | +<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> |
2766 | + <title>Vox - All</title> |
2767 | + <subtitle/> |
2768 | + <icon>https://cdn3.vox-cdn.com/community_logos/52517/voxv.png</icon> |
2769 | + <updated>2015-01-22T16:20:00-05:00</updated> |
2770 | + <id>http://www.vox.com/rss/index.xml</id> |
2771 | + <link type="text/html" href="http://www.vox.com/" rel="alternate"/> |
2772 | + <entry> |
2773 | + <published>2015-01-22T16:20:00-05:00</published> |
2774 | + <updated>2015-01-22T16:20:00-05:00</updated> |
2775 | + <title>The New England Patriots' deflated footballs scandal, explained</title> |
2776 | + <content type="html"> |
2777 | + <img alt="" src="https://cdn3.vox-cdn.com/thumbor/3YPNccEVQeXUgjjqUexFC-LFOM0=/0x0:4915x3277/400x267/cdn0.vox-cdn.com/uploads/chorus_image/image/45507798/459836192.0.0.jpg" /> |
2778 | + |
2779 | + |
2780 | + |
2781 | + <p>An NFL investigation has found that 11 of the 12 footballs used by the New England Patriots during the AFC Championship were under-inflated, according to <a href="https://twitter.com/mortreport/status/557748673208401921">ESPN's Chris Mortensen</a>.</p> |
2782 | +<p>Why might the Patriots want under-inflated footballs? In theory, it would have made the balls easier for quarterback Tom Brady to hold and for the team's receivers to catch during the game's rainy conditions. Because teams always use their own sets of footballs when they're on offense, this wouldn't have helped their opponents, the Indianapolis Colts. For better or worse, this scandal seems to have been unofficially named <a href="http://www.latimes.com/sports/nfl/la-sp-patriots-deflated-footballs-20150121-story.html">Deflate-gate</a>.</p> |
2783 | +<p>On Thursday, both Patriots coach <a target="_blank" href="https://twitter.com/SBNationNFL/status/558274393336725504">Bill Belichick</a> and Brady denied any involvement, and the league hasn't made any official comment yet. But if the allegations are true, it could mean serious penalties for the Patriots — possibly including fines and lost draft picks. And given previous instances of cheating by the team, it could further tarnish their legacy, even if they win <a href="http://en.wikipedia.org/wiki/Super_Bowl_XLIX">Super Bowl XLIX</a>, giving Brady and Belichick a fourth ring together.</p> |
2784 | +<p>Here's what we know so far about the situation.</p> |
2785 | +<h3>What did the Patriots do?</h3> |
2786 | + |
2787 | +<p class="caption">Patriots coach Bill Belichick, on the sideline of the AFC Championship. (Elsa/Getty Images)</p> |
2788 | +<p>In their game on Sunday, January 18 against the Indianapolis Colts — a game in which the winner would advance to the Super Bowl — the Patriots allegedly let a bit of air out of the footballs they were using on offense.</p> |
2789 | +<p>Initially, it was reported that after catching an interception in the second quarter, Colts linebacker D'Qwell Jackson noticed the ball was less inflated than usual. On the sidelines, he passed it over to an equipment manager, and it eventually made its way to the team's general manager, then the NFL's director of football operations.</p> |
2790 | +<p>However, <a style="font-size: 15px; line-height: 1.65;" href="http://www.foxsports.com/nfl/story/deflategate-baltimore-ravens-indianapolis-colts-deflated-footballs-012115" target="_blank">Fox Sports' Jay Glazer has since reported</a> that the Patriots' previous opponent (the Baltimore Ravens) tipped the Colts off to the fact that their balls might be under-inflated before the game, and the NFL was already planning to inspect them.</p> |
2791 | +<p>In any event, officials checked the balls at halftime, and reportedly found that 11 of the 12 balls the Patriots were using were indeed under-inflated — with about two pounds per square inch less pressure than the minimum <a href="http://static.nfl.com/static/content/public/image/rulebook/pdfs/5_2013_Ball.pdf">12.5 psi </a>mandated by the league. But we still don't know the full results of the investigation.</p> |
2792 | +<h3>Why would the Patriots want to under-inflate footballs?</h3> |
2793 | + |
2794 | +<p class="caption">Patriots quarterback Tom Brady passes during the first quarter against the Colts. (Jared Wickerham/Getty Images)</p> |
2795 | +<p>The basic idea is that softer, less fully-inflated footballs are easier to hold and catch.</p> |
2796 | +<p>Given that the game was played in slick, rainy conditions — and that different footballs are used by each team (more on that below) — this could provide a slight advantage to the Patriots offense, especially for quarterback Tom Brady. <span>Teams use their own sets of balls whenever they're on offense, so it wouldn't have benefitted the Colts.</span></p> |
2797 | +<p>It might not make a huge difference, but <a href="http://www.npr.org/blogs/thetwo-way/2015/01/20/378581349/scientists-say-the-nfls-deflate-gate-isnt-all-hot-air">materials scientists</a> and <a href="http://espn.go.com/nfl/playoffs/2014/story/_/id/12201369/aaron-rodgers-green-bay-packers-upset-referees-take-air-footballs">players</a> confirm that letting a bit of air out could make the balls somewhat easier to hold, especially for the quarterback.</p> |
2798 | +<h3>How could the Patriots have done this?</h3> |
2799 | + |
2800 | +<p class="caption">Game balls rest in a sideline bag during a December game. (Brett Carlsen/Getty Images)</p> |
2801 | +<p>Here's how the NFL's system for game balls works: for each game, each team prepares a set of 12 balls for it to use on offense. Team equipment staff are allowed to <a href="http://www.nytimes.com/2013/11/24/sports/football/eli-mannings-footballs-are-months-in-making.html?_r=0">scuff up brand-new balls</a>, removing the factory shine, and allowing them to be gripped more easily by their quarterbacks.</p> |
2802 | +<p>Before the game, these balls are <a href="http://mmqb.si.com/2013/12/06/peter-king-week-with-officiating-crew-part-three/2/">delivered to the officials</a>, who test to see if they're inflated to somewhere between 12.5 and 13.5 pounds per square inch. If they're under-inflated, the officials add some air themselves.</p> |
2803 | +<p>Then, the balls are kept in a zipped bag on the sidelines. During the game, ball boys occasionally hand fresh balls to the officials, who put them in play.</p> |
2804 | +<p>It's unclear how or when Patriots staff might have let some of the air out of their set of balls. It'd be extremely risky to do so on the sideline, in full view of the whole stadium, but in theory, they should have been properly inflated just before the game. During press conferences on Thursday, both Belichick and Brady denied any involvement or knowledge of deflating the balls.</p> |
2805 | +<p>An even bigger mystery is how the officials — who handle the balls before every single play — didn't notice they were under-inflated, when one touch by Jackson caught his attention.</p> |
2806 | + |
2807 | +<p class="caption">Umpire Carl Paganelli handles a ball during the game. (Elsa/Getty Images)</p> |
2808 | +<h3>Could under-inflating the balls have let the Patriots win?</h3> |
2809 | +<p>Almost certainly not. The Patriots beat the Colts 45 to 7 — an especially dominant win, even for the Patriots.</p> |
2810 | +<p>Further, they scored mostly by running the ball, an area where under-inflated balls wouldn't make much of a difference.</p> |
2811 | +<p>People aren't upset because the Patriots may have won this game by under-inflating their balls. They're upset because the Patriots have been remarkably dominant for 15 years — but during that time, have consistently pushed the envelope in terms of rules, and on at least one other occasion, have been caught cheating.</p> |
2812 | +<p>If the team habitually under-inflates its game balls, it could provide a very real advantage — something that may have, in some cases, been the difference between a loss and a win.</p> |
2813 | +<h3>Is this the first time the Patriots have been accused of cheating?</h3> |
2814 | + |
2815 | +<p class="caption">Bill Belichick. (John Tlumacki/The Boston Globe via Getty Images)</p> |
2816 | +<p>Nope.</p> |
2817 | +<p>In 2007, the team was <a href="http://en.wikipedia.org/wiki/2007_National_Football_League_videotaping_controversy">caught illegally filming</a> the New York Jets coaching staff. Having tape of the coaches' hand signals — and being able to match them up with the actual plays run on the field — could provide a big advantage, essentially allowing Belichick and the Patriots' staff to decode opponents' signaling systems. <a href="http://sports.espn.go.com/nfl/news/story?id=3392047">Belichick later admitted</a> that he'd been taping opposing coaching staffs ever since becoming a head coach in 2000, and thought it was permitted by league rules.</p> |
2818 | +<p>It wasn't, and in response, the NFL fined Belichick $500,000, fined the team $250,000, and stripped the team of its first round draft pick. Around the same time, allegations surfaced that Belichick had also filmed a St. Louis Rams practice right before beating them in Super Bowl XXXVI, but he denied it.</p> |
2819 | +<p>There have also been all other sorts of unproven allegations of cheating by the Patriots. Most recently, two weeks ago, <a href="http://www.cbssports.com/nfl/writer/jason-la-canfora/24981269/some-baltimore-ravens-think-footballs-were-under-inflated-vs-patriots">some Baltimore Ravens felt</a> that the kicking balls they used in their playoff loss to the Patriots (a separate set of game balls used solely for kicking and punting) were under-inflated, which would have made it more difficult to kick long field goals. And during a regular season game this past November, <a style="font-size: 15px; line-height: 1.65;" href="http://www.sbnation.com/2015/1/21/7867523/deflategate-deflated-balls-colts-patriots-regular-season-game" target="_blank">Colts players were reportedly suspicious</a> that the Patriots were using under-inflated balls.</p> |
2820 | +<p>Even when he's playing within the rules, Belichick — smartly — likes to push the envelope in ways that aren't part of conventional football practice. In the same game against the Ravens, he used unusual formations on several plays, for instance, and <a href="http://mmqb.si.com/2015/01/12/nfl-playoffs-cowboys-packers-dez-bryant-replay-catch-peyton-manning-retirement/7/">Ravens coach John Harbaugh complained</a> that his team didn't have enough time to match up, as mandated by league rules.</p> |
2821 | +<p>For many fans, all this raises a question: what else have Belichick and the Patriots gotten away with?</p> |
2822 | +<h3>Is there a name for this new scandal?</h3> |
2823 | +<p>Alas. Yes. Most people seem to be calling it <a href="http://www.latimes.com/sports/nfl/la-sp-patriots-deflated-footballs-20150121-story.html">Deflate-gate</a>, the latest in a string of <a href="http://en.wikipedia.org/wiki/List_of_scandals_with_%22-gate%22_suffix">hundreds of scandals</a> with the "gate" suffix tacked on, in an allusion to <a href="http://en.wikipedia.org/wiki/Watergate_scandal">Watergate</a>.</p> |
2824 | +<p>It'd be great if we could figure out a more creative way to name our scandals, though, and some people have come up with the more imaginative "<a target="_blank" href="http://www.gq.com/blogs/the-feed/2015/01/russell-wilson-vs-ballghazi-in-the-super-bowl.html">Ballghazi</a>." It remains to be seen if it will catch on.</p> |
2825 | +<h3>What's going to happen next?</h3> |
2826 | +<p>The <a href="http://www.sbnation.com/nfl/2015/1/20/7862021/superbowl-deflategate-new-england-patriots">NFL has said</a> it's hoping to wrap up the investigation quickly, within a few days. That means the official results will likely be public soon — and the story will become a huge one in the week leading up to Super Bowl XLIX.</p> |
2827 | +<p>However, this scandal won't impact the Super Bowl directly. Instead, if the Patriots are found guilty, the team or Belichick might have to pay fines, and perhaps give up a draft pick in the upcoming draft, which is in April. The punishments <a target="_blank" href="https://twitter.com/SI_PeterKing/status/557934211118927872">will likely be meted out</a> after the Super Bowl.</p> |
2828 | + |
2829 | +<p class="caption">Bill Belichick holds the Lombardi Trophy after Super Bowl XXXVIII. (JEFF HAYNES/AFP/Getty Images)</p> |
2830 | +<p>The biggest consequence of all this is that, if found guilty, Deflate-gate could tarnish the Patriots' long-term legacy.</p> |
2831 | +<p>If they win the Super Bowl, it could cement Belichick and Brady's legacy as one of the best coach-quarterback pairings of all time — they'd become one of only two duos to ever win four Super Bowls. But having a second instance of confirmed cheating during that remarkable run might change perceptions of it in the future.</p> |
2832 | +<hr> |
2833 | +<h4>Watch: Can the NFL survive its concussion crisis?</h4> |
2834 | + |
2835 | + |
2836 | +</content> |
2837 | + <link rel="alternate" type="text/html" href="http://www.vox.com/2015/1/21/7866121/deflated-football-patriots-cheating"/> |
2838 | + <id>http://www.vox.com/2015/1/21/7866121/deflated-football-patriots-cheating</id> |
2839 | + <author> |
2840 | + <name>Joseph Stromberg</name> |
2841 | + </author> |
2842 | + </entry> |
2843 | + <entry> |
2844 | + <published>2015-01-22T15:40:02-05:00</published> |
2845 | + <updated>2015-01-22T15:40:02-05:00</updated> |
2846 | + <title>Read McDonald's workers' shocking harassment and discrimination complaints — and why they're so important</title> |
2847 | + <content type="html"> |
2848 | + <img alt="" src="https://cdn2.vox-cdn.com/thumbor/3YAMFCiMs4zJnJIty3Fl402tGhY=/0x40:2039x1399/400x267/cdn0.vox-cdn.com/uploads/chorus_image/image/45516554/112561118.0.jpg" /> |
2849 | + |
2850 | + |
2851 | + |
2852 | + <p>Ten current and former McDonald's workers filed suit in a Virginia district court on Thursday, alleging racial discrimination and sexual harassment at McDonald's locations in two Virginia cities.</p> |
2853 | +<p>In one store, for example, one supervisor allegedly would say it was "too dark in the store" at times when most workers were African-American. And the suit goes on to list some almost unfathomably degrading behavior on the part of supervisors:</p> |
2854 | +<blockquote> |
2855 | +<p>Plaintiffs were subjected to rampant racial and sexual harassment, committed by the restaurants' highest-ranking supervisors. Together, these supervisors demeaned African American workers; often complained that "there are too many black people in the store;" called African-American workers "bitch," "ghetto," and "ratchet;" called Hispanic workers "dirty Mexican;" disciplined African-American employees for rule infractions that were forgiven when committed by white employees; inappropriately touched female employees on their legs and buttocks; sent female employees sexual pictures; and solicited sexual relations from female employees.</p> |
2856 | +</blockquote> |
2857 | +<p>The allegations in the lawsuit are of course shocking on a basic level. But this suit is also important in a much subtler way, in that it's filed against both Soweva — the franchisee operating these stores — and the McDonald's corporation itself. Far more than being a simply discrimination and harassment suit, this case is another example of a question that has repeatedly been raised in labor law in the last year — when is an big chain a "joint employer" of people who work for one of its franchises?</p> |
2858 | +<p>In other words, can McDonald's and other corporations be held legally accountable for the working conditions endured by front-line employees who wear their uniforms but are technically employees of independently owned franchises? This seemingly pedantic question actually has broad implications for many franchise-heavy industries (fast food, hotels, gyms) and how they relate to their workers — how they schedule employees and negotiate with unions, for example.</p> |
2859 | +<h3>A bigger, nationwide debate</h3> |
2860 | +<p>The franchising debate has heated up with a few high-profile cases. In California, for example, the supreme court <a href="http://blogs.orrick.com/employment/2014/09/30/dominos-delivers-key-ruling-in-favor-of-franchisors/" target="_blank">last year</a> ultimately ruled in favor of Domino's Pizza, saying it was not a joint employer along with its franchise operators. A <a href="http://www.vox.com/2014/12/19/7420729/nlrb-browning-ferris-employer">yet-to-be-decided case</a> before the National Labor Relations Board questions whether a waste management company is an employer along with its subcontractors. And in December, the NLRB decided to authorize complaints against both franchise operators and the McDonald's parent company, alleging retaliation against employees who participated in protests demanding $15-per-hour wages. Even though that was a preliminary decision, it was considered a big win for labor-rights advocates.</p> |
2861 | +<p>These sorts of cases could strike at the heart of the franchisor-franchisee relationship, in which the franchisee runs the business according to certain specifications set by the parent company but operates independently in many other ways, like in how it treats its employees. That often means a franchisee acts as a sort of buffer between workers and the parent corporation.</p> |
2862 | +<p>But the question of joint employership is being reconsidered lately. The NLRB, for example, <a href="http://www.whitecase.com/files/Publication/65ab18cc-ecf9-4c2f-9719-4642b26cb61c/Presentation/PublicationAttachment/5cccd1d1-a9c9-4660-9dd3-4a7a8475ece5/would-you-like-joint-employer-liability-mcdonalds-serves-cautionary-tal.pdf">appears willing</a> to reconsider that definition, which currently says an employer must have "direct and immediate impact" on the terms and conditions of workers' employment — for example, having a say in hiring and firing, as well as wage-setting.</p> |
2863 | +<p>In this case, plaintiffs are saying that McDonald's is partially liable because it had so much control over its stores. The lawsuit references McDonald's' detailed training manuals, control over menus, and routine visits from McDonald's mystery shoppers as examples of the parent company's control over stores. And in a call with reporters, plaintiff Katrina Stanfield said she complained to McDonald's about the harassment and discrimination and that they did nothing in response.</p> |
2864 | +<h3>The repercussions of a new definition could be huge</h3> |
2865 | +<p>According to one attorney, when the definition is murky, it makes operating those businesses difficult.</p> |
2866 | +<p>"If you don't know who the employer is, you can't allocate liability, and you really don't know how to run your business," says Michael Lotito, co-chair of the Workplace Policy Institute at law firm Littler Mendelson.</p> |
2867 | +<p>And if pending cases do indeed find parent companies to be liable for their franchisees' wrongdoings, it could have repercussions far beyond McDonald's. <span>And the broader question of what, exactly, is an "employer" could even affect the relationships between, for example, retailers and suppliers, as well as employers and staffing agencies. </span><span>Of course, neither the NLRB nor Virginia's District Court has the last word. Settling this question could be a years-long process, says Lotito, and decisions could differ from jurisdiction to jurisdiction. And given that groups like SEIU and Fast Food Forward are fighting hard on this question, expect to hear more about the joint employer issue in the years to come.</span></p> |
2868 | + |
2869 | +</content> |
2870 | + <link rel="alternate" type="text/html" href="http://www.vox.com/2015/1/22/7873661/mcdonalds-lawsuit-harassment-discrimination"/> |
2871 | + <id>http://www.vox.com/2015/1/22/7873661/mcdonalds-lawsuit-harassment-discrimination</id> |
2872 | + <author> |
2873 | + <name>Danielle Kurtzleben</name> |
2874 | + </author> |
2875 | + </entry> |
2876 | +</feed> |
2877 | |
2878 | === added directory 'tests/server/xataka' |
2879 | === added file 'tests/server/xataka/xataka2.xml' |
2880 | --- tests/server/xataka/xataka2.xml 1970-01-01 00:00:00 +0000 |
2881 | +++ tests/server/xataka/xataka2.xml 2015-05-20 13:57:15 +0000 |
2882 | @@ -0,0 +1,6 @@ |
2883 | +<?xml version="1.0" encoding="UTF-8"?> |
2884 | +<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2spanishfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.weblogssl.com/~d/styles/itemcontent.css"?><rss xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Xataka</title><link>http://www.xataka.com</link><description>Publicación de noticias sobre gadgets y tecnología. Últimas tecnologías en electrónica de consumo y novedades tecnológicas en móviles, tablets, informática, etc</description><language>en</language><pubDate>Wed, 21 Jan 2015 23:14:01 GMT</pubDate><lastBuildDate>Wed, 21 Jan 2015 23:14:01 GMT</lastBuildDate><ttl>2</ttl><feedburner:info uri="xataka2" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /><image><link>http://xataka.com</link><url>http://img.weblogssl.com/g/recursos/planet/xataka.jpg</url><title>Xataka | blog de gadgets y electrónica de consumo</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://xataka.com/atom.xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/content?lg=es&url=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://eur.i1.yimg.com/eur.yimg.com/i/es/my/addto1.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&contentvalue=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Fxataka.com%2Fatom.xml" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><feedburner:browserFriendly>Esta es la fuente o feed para suscripción de Xataka. Vale para cualquier formato (RSS, Atom, lo que sea). Aunque salga esta página "rara" en vez del código habitual, es lo mismo. De verdad.</feedburner:browserFriendly><item><title>En Samsung ya preparan la mudanza, sus nuevas oficinas en Silicon Valley están casi listas</title><link>http://feeds.weblogssl.com/~r/xataka2/~3/sN5HXQsOYCA/en-samsung-ya-preparan-la-mudanza-sus-nuevas-oficinas-en-silicon-valley-estan-casi-listas</link><description><p><img alt="Samsung Hq Silicon Valley" src="http://img.xataka.com/2015/01/650_1000_samsung_hq_silicon_valley.jpg" class="centro_sinmarco" /></p> <p>Hace un año <a href="http://www.xataka.com/otros/asi-sera-el-campus-con-el-que-samsung-quiere-enamorar-a-eeuu">Samsung nos presumía</a> su nuevo gran proyecto con el que entrarían de lleno con <strong>presencia <em>in-situ</em> en los Estados Unidos</strong>, sus nuevos cuarteles centrales en el centro neurálgico de la tecnología en el mundo, Silicon Valley.</p> <p>Pero Samsung no sólo se está limitando a construir sus nuevas oficinas, sino que también quieren adelantarse y ser <strong>los primeros en echarlas a andar</strong>, porque recordemos que tanto <a href="http://www.applesfera.com/apple-1/apple-presenta-su-futuro-campus-en-un-video-que-rescata-la-voz-de-steve-jobs">Apple</a>, como Google y Facebook tienen actualmente importantes proyectos de expansión en sus oficinas dentro de California.<!--more--></p> <h2>Samsung quiere concentrar esfuerzos en EE.UU. y Latinoamérica</h2> <p>Estás oficinas serán una expansión del negocio de semiconductores, memorias, almacenamiento y paneles LCD, además de que un gran equipo de ventas con sede en Corea del Sur se mudará a este nuevo complejo, la idea es clara, <strong>reducir costes de traslado y operación</strong> hacia uno de los mercados más importantes de la compañía, Estados Unidos, donde además también tendrán cobertura en negocios dentro de Latinoamérica.</p> <p><img alt="Samsung Hq Silicon Valley 01" src="http://img.xataka.com/2015/01/650_1000_samsung_hq_silicon_valley_01.jpg" class="centro_sinmarco" /></p> <p>El nuevo campus contará con diez plantas divididas en dos edificios conectados entre sí, con una <strong>nueva área de investigación y desarrollo</strong>, abarcando una superficie de poco más de 10 hectáreas, todo bajo un diseño del estudio de arquitectura <a href="http://www.nbbj.com/work/samsung-america-headquarters/">NBBJ</a>, famoso por los desarrollos de Google, Amazon, Alipay en China, entre otros.</p> <p>El concepto que busca transmitir Samsung en este nuevo campus es hacia el estilo de <strong>trabajo colaborativo</strong>, ya que el diseño es en torno a un gran patio central, de tal manera que todos los que trabajan ahí puedan salir a los pasillos e interactuar con sus otros compañeros de otros pisos, además se contará con un centro de acondicionamiento físico, con canchas de baloncesto, y un centro de interacción con cafeterías y mesas dentro de un parque para ayudar con dicha convivencia.</p> <p><img alt="Samsung Hq Silicon Valley 02" src="http://img.xataka.com/2015/01/650_1000_samsung_hq_silicon_valley_02.jpg" class="centro_sinmarco" /></p> <p>Los materiales usados son principalmente metal blanco, cristal y jardines, ya que la idea es reducir el calor al interior, transmitir <strong>sensación de ligereza</strong> y tener siempre una vista hacia el exterior. El proyecto que ha costado 300 millones de dólares y que albergará hasta 2.500 trabajadores, ha llegado a su etapa final y han confirmando su apertura durante julio próximo. </p> <p>Con esto se esperan reacciones sobre todo de empresas extranjeras, ya que el gobierno de California está <strong>otorgando apoyos</strong> para que todas aquellas compañías que quieran entrar y formar parte de los nuevos desarrollos, sobre todo en San José, incrementen el valor de la ciudad, concentrando así a las empresas de tecnología en un solo lugar.</p> <p><iframe width="650" height="366" src="//player.vimeo.com/video/70145380?title=0&#38;byline=0&#38;frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></p> <p><p> <strong>nuevo-campus-de-samsung-en-silicon-valley</strong> </p> <p> <a href="http://www.xataka.com/galeria/nuevo-campus-de-samsung-en-silicon-valley/1"> <img src="http://img.xataka.com/galleries/nuevo-campus-de-samsung-en-silicon-valley/120_120_Samsung-6936-728x600.jpg" alt="image01" data-type="gallery"/> </a> <a href="http://www.xataka.com/galeria/nuevo-campus-de-samsung-en-silicon-valley/2"> <img src="http://img.xataka.com/galleries/nuevo-campus-de-samsung-en-silicon-valley/120_120_Samsung-6958-800x533.jpg" alt="image01" data-type="gallery"/> </a> <a href="http://www.xataka.com/galeria/nuevo-campus-de-samsung-en-silicon-valley/3"> <img src="http://img.xataka.com/galleries/nuevo-campus-de-samsung-en-silicon-valley/120_120_Samsung-6971-677x600.jpg" alt="image01" data-type="gallery"/> </a> <a href="http://www.xataka.com/galeria/nuevo-campus-de-samsung-en-silicon-valley/4"> <img src="http://img.xataka.com/galleries/nuevo-campus-de-samsung-en-silicon-valley/120_120_Samsung-69971.jpg" alt="image01" data-type="gallery"/> </a> </p></p> <p>Vía | <a href="http://www.wired.com/2015/01/photos-samsungs-giant-new-silicon-valley-hq-almost-complete/">Wired</a></p> <p> - <br/> La noticia <a href="http://www.xataka.com/otros/en-samsung-ya-preparan-la-mudanza-sus-nuevas-oficinas-en-silicon-valley-estan-casi-listas?utm_source=feedburner&utm_medium=feed&utm_campaign=22_Jan_2015"> <em> En Samsung ya preparan la mudanza, sus nuevas oficinas en Silicon Valley están casi listas </em> </a> fue publicada originalmente en <a href="http://www.xataka.com?utm_source=feedburner&utm_medium=feed&utm_campaign=22_Jan_2015"> <strong> Xataka </strong> </a> por <a href="http://www.xataka.com/autor/raul-alvarez?utm_source=feedburner&utm_medium=feed&utm_campaign=22_Jan_2015"> Raúl Álvarez </a> . </p><img width='1' height='1' src='http://weblogs.feedsportal.com/c/32673/f/502913/s/4291eb56/sc/28/mf.gif' border='0'/><br clear='all'/><br/><br/><a href="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/rc/1/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/rc/2/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/rc/3/rc.img" border="0"/></a><br/><br/><a href="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/a2.htm"><img src="http://da.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/a2.img" border="0"/></a><img width="1" height="1" src="http://pi.feedsportal.com/r/218610885794/u/49/f/502913/c/32673/s/4291eb56/sc/28/a2t.img" border="0"/><div class="feedflare"> |
2885 | +<a href="http://feeds.weblogssl.com/~ff/xataka2?a=sN5HXQsOYCA:zZYjFGREknA:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/xataka2?i=sN5HXQsOYCA:zZYjFGREknA:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.weblogssl.com/~ff/xataka2?a=sN5HXQsOYCA:zZYjFGREknA:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/xataka2?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.weblogssl.com/~ff/xataka2?a=sN5HXQsOYCA:zZYjFGREknA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/xataka2?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.weblogssl.com/~ff/xataka2?a=sN5HXQsOYCA:zZYjFGREknA:ecdYMiMMAMM"><img src="http://feeds.feedburner.com/~ff/xataka2?d=ecdYMiMMAMM" border="0"></img></a> |
2886 | +</div><img src="//feeds.feedburner.com/~r/xataka2/~4/sN5HXQsOYCA" height="1" width="1" alt=""/></description><pubDate>Wed, 21 Jan 2015 22:00:58 GMT</pubDate><guid isPermaLink="false">http://www.xataka.com/otros/en-samsung-ya-preparan-la-mudanza-sus-nuevas-oficinas-en-silicon-valley-estan-casi-listas</guid><dc:creator>Raúl Álvarez</dc:creator><feedburner:origLink>http://www.xataka.com/otros/en-samsung-ya-preparan-la-mudanza-sus-nuevas-oficinas-en-silicon-valley-estan-casi-listas</feedburner:origLink></item><item><title>Project HoloLens: así ve Microsoft el futuro del ordenador personal</title><link>http://feeds.weblogssl.com/~r/xataka2/~3/j6xSZORTEeo/project-hololens-asi-ve-microsoft-el-futuro-del-ordenador-personal</link><description><p><img alt="D76d1d6c A4e6 41d2 Bc43 C9b49041a219" src="http://img.xataka.com/2015/01/650_1000_d76d1d6c-a4e6-41d2-bc43-c9b49041a219.png" class="centro_sinmarco" /></p> <p>La gran sorpresa, y llevamos unas cuantas, de Microsoft en su evento sobre Windows 10 ha sido <strong>Windows Holographic</strong>. En fase de desarrollo, nos da una idea de <strong>cómo ve Microsoft el futuro del ordenador personal</strong>.</p> <p>Holographic basa la experiencia en un ordenador llamado <strong>HoloLens</strong> que llevamos colocado sobre la cabeza como unas gafas de <strong>realidad aumentada</strong> y que superponen holografía en nuestro entorno para poder interactuar con él. </p> <!--more--> <p><iframe width="650" height="366" src="http://www.youtube.com/embed/aThCr0PsyuA" frameborder="0" allowfullscreen></iframe></p> <h3>Un ordenador personal colocado en la cabeza</h3> <p>Hololens incluye un ordenador completo, con CPU, GPU, sensores y pantalla HD, además de <strong>una cámara similar a Kinect para identificar lo que nos rodea</strong> y los gestos que hacemos con nuestras manos o la voz. Todo es inalámbrico y con funcionamiento autónomo.</p> <p><img alt="68d91e7d 0ec2 45fb 899d 612b546550ea 1" src="http://img.xataka.com/2015/01/650_1000_68d91e7d-0ec2-45fb-899d-612b546550ea-1.jpg" class="centro_sinmarco" /></p> <p>Aunque queda por ver cómo quedará finalmente, las demostraciones han sido muy positivas. Microsoft afirma que Holographic llegará de la mano de Windows 10 y ya hay un programa, <strong>Holostudio</strong>, para que se puedan crear experiencias, aplicaciones y formas de interactuar con todo lo que nos rodea.</p> <p><img alt="Ef989fe2 5c9b 4437 Ad74 Eebf34fbb625 1" src="http://img.xataka.com/2015/01/650_1000_ef989fe2-5c9b-4437-ad74-eebf34fbb625-1.jpg" class="centro_sinmarco" /></p> <p> - <br/> La noticia <a href="http://www.xataka.com/ordenadores/project-hololens-asi-ve-microsoft-el-futuro-del-ordenador-personal?utm_source=feedburner&utm_medium=feed&utm_campaign=22_Jan_2015"> <em> Project HoloLens: así ve Microsoft el futuro del ordenador personal </em> </a> fue publicada originalmente en <a href="http://www.xataka.com?utm_source=feedburner&utm_medium=feed&utm_campaign=22_Jan_2015"> <strong> Xataka </strong> </a> por <a href="http://www.xataka.com/autor/javier-penalva?utm_source=feedburner&utm_medium=feed&utm_campaign=22_Jan_2015"> Javier Penalva </a> . </p><img width='1' height='1' src='http://weblogs.feedsportal.com/c/32673/f/502913/s/429043c6/sc/28/mf.gif' border='0'/><br clear='all'/><br/><br/><a href="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/rc/1/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/rc/1/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/rc/2/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/rc/2/rc.img" border="0"/></a><br/><a href="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/rc/3/rc.htm" rel="nofollow"><img src="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/rc/3/rc.img" border="0"/></a><br/><br/><a href="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/a2.htm"><img src="http://da.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/a2.img" border="0"/></a><img width="1" height="1" src="http://pi.feedsportal.com/r/218610893961/u/49/f/502913/c/32673/s/429043c6/sc/28/a2t.img" border="0"/><div class="feedflare"> |
2887 | +<a href="http://feeds.weblogssl.com/~ff/xataka2?a=j6xSZORTEeo:UiKlTkuHu-E:3QFJfmc7Om4"><img src="http://feeds.feedburner.com/~ff/xataka2?i=j6xSZORTEeo:UiKlTkuHu-E:3QFJfmc7Om4" border="0"></img></a> <a href="http://feeds.weblogssl.com/~ff/xataka2?a=j6xSZORTEeo:UiKlTkuHu-E:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/xataka2?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.weblogssl.com/~ff/xataka2?a=j6xSZORTEeo:UiKlTkuHu-E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/xataka2?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.weblogssl.com/~ff/xataka2?a=j6xSZORTEeo:UiKlTkuHu-E:ecdYMiMMAMM"><img src="http://feeds.feedburner.com/~ff/xataka2?d=ecdYMiMMAMM" border="0"></img></a> |
2888 | +</div><img src="//feeds.feedburner.com/~r/xataka2/~4/j6xSZORTEeo" height="1" width="1" alt=""/></description><pubDate>Wed, 21 Jan 2015 18:17:22 GMT</pubDate><guid isPermaLink="false">http://www.xataka.com/ordenadores/project-hololens-asi-ve-microsoft-el-futuro-del-ordenador-personal</guid><dc:creator>Javier Penalva</dc:creator><feedburner:origLink>http://www.xataka.com/ordenadores/project-hololens-asi-ve-microsoft-el-futuro-del-ordenador-personal</feedburner:origLink></item></channel></rss> |
2889 | |
2890 | === added directory 'tests/unit' |
2891 | === added file 'tests/unit/CMakeLists.txt' |
2892 | --- tests/unit/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2893 | +++ tests/unit/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
2894 | @@ -0,0 +1,34 @@ |
2895 | + |
2896 | +add_definitions( |
2897 | + -DTEST_SCOPE_DIRECTORY="${CMAKE_CURRENT_SOURCE_DIR}" |
2898 | + -DFAKE_RSS_SERVER="${CMAKE_CURRENT_SOURCE_DIR}/server.py" |
2899 | +) |
2900 | + |
2901 | +# Our test executable. |
2902 | +# It includes the object code from the scope |
2903 | +add_executable( |
2904 | + scope-unit-tests |
2905 | + scope/test-scope.cpp |
2906 | + $<TARGET_OBJECTS:scope-static> |
2907 | +) |
2908 | + |
2909 | +# Link against the scope, and all of our test lib dependencies |
2910 | +target_link_libraries( |
2911 | + scope-unit-tests |
2912 | + ${GTEST_BOTH_LIBRARIES} |
2913 | + ${GMOCK_LIBRARIES} |
2914 | + ${SCOPE_LDFLAGS} |
2915 | + ${TEST_LDFLAGS} |
2916 | + ${Boost_LIBRARIES} |
2917 | +) |
2918 | + |
2919 | +qt5_use_modules( |
2920 | + scope-unit-tests |
2921 | + Core |
2922 | +) |
2923 | + |
2924 | +# Register the test with CTest |
2925 | +add_test( |
2926 | + scope-unit-tests |
2927 | + scope-unit-tests |
2928 | +) |
2929 | |
2930 | === added directory 'tests/unit/bbc' |
2931 | === added file 'tests/unit/bbc/CMakeLists.txt' |
2932 | --- tests/unit/bbc/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
2933 | +++ tests/unit/bbc/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
2934 | @@ -0,0 +1,31 @@ |
2935 | +#for desktop dev |
2936 | +configure_file( |
2937 | + "scope.ini.in" |
2938 | + "${CMAKE_BINARY_DIR}/src/scope.ini" |
2939 | +) |
2940 | +#this is the basis for localization |
2941 | +configure_file( |
2942 | + "scope.ini.in" |
2943 | + "${CMAKE_SOURCE_DIR}/data/scope.ini" |
2944 | +) |
2945 | + |
2946 | +INSTALL(DIRECTORY "images" DESTINATION "${SCOPE_INSTALLDIR}") |
2947 | + |
2948 | +# for desktop dev |
2949 | +configure_file(departments.json ../src/departments.json) |
2950 | + |
2951 | +INSTALL( |
2952 | + FILES "scope.ini" |
2953 | + DESTINATION ${SCOPE_INSTALLDIR} |
2954 | + RENAME "${PKG_PREFIX}.${PKG}_${APP}.ini" |
2955 | +) |
2956 | + |
2957 | +INSTALL( |
2958 | + FILES departments.json |
2959 | + DESTINATION ${SCOPE_INSTALLDIR} |
2960 | +) |
2961 | + |
2962 | +INSTALL( |
2963 | + DIRECTORY "images" |
2964 | + DESTINATION ${SCOPE_INSTALLDIR} |
2965 | +) |
2966 | |
2967 | === added directory 'tests/unit/bbc/caching' |
2968 | === added file 'tests/unit/bbc/feeds.json' |
2969 | --- tests/unit/bbc/feeds.json 1970-01-01 00:00:00 +0000 |
2970 | +++ tests/unit/bbc/feeds.json 2015-05-20 13:57:15 +0000 |
2971 | @@ -0,0 +1,62 @@ |
2972 | +[ |
2973 | + { |
2974 | + "label": "News", |
2975 | + "id": "http://127.0.0.1:9999/bbc/news/rss.xml" |
2976 | + }, |
2977 | + { |
2978 | + "label": "World", |
2979 | + "id": "http://127.0.0.1:9999/bbc/news/world/rss.xml" |
2980 | + }, |
2981 | + { |
2982 | + "label": "UK", |
2983 | + "id": "http://127.0.0.1:9999/bbc/news/uk/rss.xml" |
2984 | + }, |
2985 | + { |
2986 | + "label": "Business", |
2987 | + "id": "http://127.0.0.1:9999/bbc/news/business/rss.xml" |
2988 | + }, |
2989 | + { |
2990 | + "label": "Politics", |
2991 | + "id": "http://127.0.0.1:9999/bbc/news/politics/rss.xml" |
2992 | + }, |
2993 | + { |
2994 | + "label": "Health", |
2995 | + "id": "http://127.0.0.1:9999/bbc/news/health/rss.xml" |
2996 | + }, |
2997 | + { |
2998 | + "label": "Education", |
2999 | + "id": "http://127.0.0.1:9999/bbc/news/education/rss.xml" |
3000 | + }, |
3001 | + { |
3002 | + "label": "Science and Environment", |
3003 | + "id": "http://127.0.0.1:9999/bbc/news/science_and_environment/rss.xml" |
3004 | + }, |
3005 | + { |
3006 | + "label": "Technology", |
3007 | + "id": "http://127.0.0.1:9999/bbc/news/technology/rss.xml" |
3008 | + }, |
3009 | + { |
3010 | + "label": "Entertainment and Arts", |
3011 | + "id": "http://127.0.0.1:9999/bbc/news/entertainment_and_arts/rss.xml" |
3012 | + }, |
3013 | + { |
3014 | + "label": "Nature", |
3015 | + "id": "http://127.0.0.1:9999/bbc/nature/wildlife/by/latest.rss", |
3016 | + "layout": "large" |
3017 | + }, |
3018 | + { |
3019 | + "label": "Magazine", |
3020 | + "id": "http://127.0.0.1:9999/bbc/news/magazine/rss.xml", |
3021 | + "layout": "carousel" |
3022 | + }, |
3023 | + { |
3024 | + "label": "In Pictures", |
3025 | + "id": "http://127.0.0.1:9999/bbc/news/in_pictures/rss.xml", |
3026 | + "layout": "large" |
3027 | + }, |
3028 | + { |
3029 | + "label": "Special Reports", |
3030 | + "id": "http://127.0.0.1:9999/bbc/news/special_reports/rss.xml", |
3031 | + "layout": "journal" |
3032 | + } |
3033 | +] |
3034 | |
3035 | === added file 'tests/unit/bbc/icon.png' |
3036 | Binary files tests/unit/bbc/icon.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/icon.png 2015-05-20 13:57:15 +0000 differ |
3037 | === added directory 'tests/unit/bbc/images' |
3038 | === added file 'tests/unit/bbc/images/default.png' |
3039 | Binary files tests/unit/bbc/images/default.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/images/default.png 2015-05-20 13:57:15 +0000 differ |
3040 | === added file 'tests/unit/bbc/images/error.png' |
3041 | Binary files tests/unit/bbc/images/error.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/images/error.png 2015-05-20 13:57:15 +0000 differ |
3042 | === added file 'tests/unit/bbc/images/header-bbc-news.png' |
3043 | Binary files tests/unit/bbc/images/header-bbc-news.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/images/header-bbc-news.png 2015-05-20 13:57:15 +0000 differ |
3044 | === added file 'tests/unit/bbc/images/headerLogo.svg' |
3045 | --- tests/unit/bbc/images/headerLogo.svg 1970-01-01 00:00:00 +0000 |
3046 | +++ tests/unit/bbc/images/headerLogo.svg 2015-05-20 13:57:15 +0000 |
3047 | @@ -0,0 +1,80 @@ |
3048 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3049 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3050 | + |
3051 | +<svg |
3052 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
3053 | + xmlns:cc="http://creativecommons.org/ns#" |
3054 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
3055 | + xmlns:svg="http://www.w3.org/2000/svg" |
3056 | + xmlns="http://www.w3.org/2000/svg" |
3057 | + xmlns:xlink="http://www.w3.org/1999/xlink" |
3058 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
3059 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
3060 | + id="svg2" |
3061 | + version="1.1" |
3062 | + inkscape:version="0.48.4 r9939" |
3063 | + width="84" |
3064 | + height="24" |
3065 | + sodipodi:docname="logo.png"> |
3066 | + <metadata |
3067 | + id="metadata8"> |
3068 | + <rdf:RDF> |
3069 | + <cc:Work |
3070 | + rdf:about=""> |
3071 | + <dc:format>image/svg+xml</dc:format> |
3072 | + <dc:type |
3073 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
3074 | + <dc:title></dc:title> |
3075 | + </cc:Work> |
3076 | + </rdf:RDF> |
3077 | + </metadata> |
3078 | + <defs |
3079 | + id="defs6" /> |
3080 | + <sodipodi:namedview |
3081 | + pagecolor="#ffffff" |
3082 | + bordercolor="#666666" |
3083 | + borderopacity="1" |
3084 | + objecttolerance="10" |
3085 | + gridtolerance="10" |
3086 | + guidetolerance="10" |
3087 | + inkscape:pageopacity="0" |
3088 | + inkscape:pageshadow="2" |
3089 | + inkscape:window-width="640" |
3090 | + inkscape:window-height="480" |
3091 | + id="namedview4" |
3092 | + showgrid="false" |
3093 | + inkscape:zoom="3.8571429" |
3094 | + inkscape:cx="42" |
3095 | + inkscape:cy="12" |
3096 | + inkscape:window-x="49" |
3097 | + inkscape:window-y="24" |
3098 | + inkscape:window-maximized="0" |
3099 | + inkscape:current-layer="svg2" /> |
3100 | + <image |
3101 | + width="84" |
3102 | + height="24" |
3103 | + xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAYCAYAAABk8drWAAAABHNCSVQICAgIfAhkiAAABA1JREFU |
3104 | +WIXt2VuIlVUUB/DfNJppimZ2May0LEQr0ekqlljEdKUL9RBdHiNCCKQSgh6yDKKHrJ4KglIyygJ7 |
3105 | +qSgpuotW9pKlINloU3Shm6alM6eH9R3nm2/OOe0534eQ+YePWXv2Pmuts/Za6/vvfTq6urpqDgw6 |
3106 | +cvJBa/OwA2Hk/4RDAa0YI1rM/YjnRakUS2cczsAcjKrQn71YgV/RWbA5CqfifIyv0GYR32A9NuIL |
3107 | +/IZJOBOzMBvTDY7JfnS06KGfY67WvWcensGMBEdT+tlOzMT2FnpOwhO4piKbdXyLB8WG7m6xbiQu |
3108 | +xCJcV5xMLfkOkc0jCk5+hIuxKVFPip28/rrNvJ89uBavVGQT1ojMe8pAMDtxHE7O/tYrZi/exlIN |
3109 | +Nik1oKfgU1ECn+BpHJ/NfScypmqMxhv4SpTfGpyXm78Puyqw8xKux8/ZeCLuFsmyRSTLFmzAk6Ll |
3110 | +QH8jZa16aB5HiFKsr5+LMbglG78ndm5kor4UdOJ0nJiNzxJ9e7YI5BZsznxpF5txh4FMuxTPYXKD |
3111 | +tXOyZxHewWvYp/CdUwPaqP9My8nFUq0CtQZ2j8aRqslMeBS/ZPJ8vCoq49+wMHuGYDg9tIiVOXm+ |
3112 | +9M1JRYeh/r2JHzL5NJHB7aIHL+fGD0kLZkukBuF3sXvwtfhib2XjGbinrCMNsA+vi169HesMvIjG |
3113 | +YTnGltD/gaBERNtYUELXfqQGdDtuaPD/0YJqTK/CmQL24PYmc3fi8pL6e3LytKarhomyJ6XduBE3 |
3114 | +48/y7iTjEZwtGEC7+CsnV/YyTc3QqXg2M1zDH3gfL2IrVgka8UJVjonsX4kpovz3Cvq0Gh/jM1wl |
3115 | +WsGkNvQfk5N3lPI0h9ST0qxsXNyAHbgg59BaXNLMVk5uZnOXoGc9oj9uMkCb8rhC9FciW+9tw+Z6 |
3116 | +A7x2rODZZV5ySC/5ZgGYgq7ceGM5d4bYbGb3spy8rk3956I7k3diWZt6BqEMbSJKMX/u7myyrh20 |
3117 | +4rb5o24ZurYkJ6/AYk1OQAVsyz77U3Ei1Zm/RRkeLrKmD714XPQyor9elKgvBf3iwmJkZp+4hVot |
3118 | +LmTq6NY+FuJ+wVTgMUGnFuMcnCB6+R58jy8Fd10lTo9LCvqSA7pVHP3q6M+M5EtyscHlXxa7RT+u |
3119 | +Z2kts5nPoHm4taSdpSJBHs7GG3CTuC6cjKMEX+3N7NcxppGy1ID2a37cm4i7xE6XRb5v1jSnYqPE |
3120 | +1dlyUTVlsUxcejwgXk4ErdqWPUVMxW2YUJxoFdDxwuk+g3ttLfvcNHHp2o1j031viRGCsPcayg1r |
3121 | +ogRnisxNuYMdDq7GlXhXMIgPRYvpz3yZIIK+QLSKhhnaijZVjf/ij3R9IqCdEl/gVV9oHGzoNEzm |
3122 | +cuhHuorxDy1c2Kp4SUJrAAAAAElFTkSuQmCC |
3123 | +" |
3124 | + id="image10" |
3125 | + x="0" |
3126 | + y="0" /> |
3127 | +</svg> |
3128 | |
3129 | === added file 'tests/unit/bbc/images/logo.png' |
3130 | Binary files tests/unit/bbc/images/logo.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/images/logo.png 2015-05-20 13:57:15 +0000 differ |
3131 | === added file 'tests/unit/bbc/images/logo.svg' |
3132 | --- tests/unit/bbc/images/logo.svg 1970-01-01 00:00:00 +0000 |
3133 | +++ tests/unit/bbc/images/logo.svg 2015-05-20 13:57:15 +0000 |
3134 | @@ -0,0 +1,60 @@ |
3135 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3136 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3137 | + |
3138 | +<svg |
3139 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
3140 | + xmlns:cc="http://creativecommons.org/ns#" |
3141 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
3142 | + xmlns:svg="http://www.w3.org/2000/svg" |
3143 | + xmlns="http://www.w3.org/2000/svg" |
3144 | + xmlns:xlink="http://www.w3.org/1999/xlink" |
3145 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
3146 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
3147 | + id="svg2" |
3148 | + version="1.1" |
3149 | + inkscape:version="0.48.4 r9939" |
3150 | + width="84" |
3151 | + height="84" |
3152 | + sodipodi:docname="logo.svg"> |
3153 | + <metadata |
3154 | + id="metadata8"> |
3155 | + <rdf:RDF> |
3156 | + <cc:Work |
3157 | + rdf:about=""> |
3158 | + <dc:format>image/svg+xml</dc:format> |
3159 | + <dc:type |
3160 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
3161 | + <dc:title /> |
3162 | + </cc:Work> |
3163 | + </rdf:RDF> |
3164 | + </metadata> |
3165 | + <defs |
3166 | + id="defs6" /> |
3167 | + <sodipodi:namedview |
3168 | + pagecolor="#ffffff" |
3169 | + bordercolor="#666666" |
3170 | + borderopacity="1" |
3171 | + objecttolerance="10" |
3172 | + gridtolerance="10" |
3173 | + guidetolerance="10" |
3174 | + inkscape:pageopacity="0" |
3175 | + inkscape:pageshadow="2" |
3176 | + inkscape:window-width="915" |
3177 | + inkscape:window-height="728" |
3178 | + id="namedview4" |
3179 | + showgrid="false" |
3180 | + inkscape:zoom="3.8571429" |
3181 | + inkscape:cx="42" |
3182 | + inkscape:cy="12" |
3183 | + inkscape:window-x="49" |
3184 | + inkscape:window-y="24" |
3185 | + inkscape:window-maximized="0" |
3186 | + inkscape:current-layer="svg2" /> |
3187 | + <image |
3188 | + width="84" |
3189 | + height="24" |
3190 | + xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAYCAYAAABk8drWAAAABHNCSVQICAgIfAhkiAAABA1JREFU WIXt2VuIlVUUB/DfNJppimZ2May0LEQr0ekqlljEdKUL9RBdHiNCCKQSgh6yDKKHrJ4KglIyygJ7 qSgpuotW9pKlINloU3Shm6alM6eH9R3nm2/OOe0534eQ+YePWXv2Pmuts/Za6/vvfTq6urpqDgw6 cvJBa/OwA2Hk/4RDAa0YI1rM/YjnRakUS2cczsAcjKrQn71YgV/RWbA5CqfifIyv0GYR32A9NuIL /IZJOBOzMBvTDY7JfnS06KGfY67WvWcensGMBEdT+tlOzMT2FnpOwhO4piKbdXyLB8WG7m6xbiQu xCJcV5xMLfkOkc0jCk5+hIuxKVFPip28/rrNvJ89uBavVGQT1ojMe8pAMDtxHE7O/tYrZi/exlIN Nik1oKfgU1ECn+BpHJ/NfScypmqMxhv4SpTfGpyXm78Puyqw8xKux8/ZeCLuFsmyRSTLFmzAk6Ll QH8jZa16aB5HiFKsr5+LMbglG78ndm5kor4UdOJ0nJiNzxJ9e7YI5BZsznxpF5txh4FMuxTPYXKD tXOyZxHewWvYp/CdUwPaqP9My8nFUq0CtQZ2j8aRqslMeBS/ZPJ8vCoq49+wMHuGYDg9tIiVOXm+ 9M1JRYeh/r2JHzL5NJHB7aIHL+fGD0kLZkukBuF3sXvwtfhib2XjGbinrCMNsA+vi169HesMvIjG YTnGltD/gaBERNtYUELXfqQGdDtuaPD/0YJqTK/CmQL24PYmc3fi8pL6e3LytKarhomyJ6XduBE3 48/y7iTjEZwtGEC7+CsnV/YyTc3QqXg2M1zDH3gfL2IrVgka8UJVjonsX4kpovz3Cvq0Gh/jM1wl WsGkNvQfk5N3lPI0h9ST0qxsXNyAHbgg59BaXNLMVk5uZnOXoGc9oj9uMkCb8rhC9FciW+9tw+Z6 A7x2rODZZV5ySC/5ZgGYgq7ceGM5d4bYbGb3spy8rk3956I7k3diWZt6BqEMbSJKMX/u7myyrh20 4rb5o24ZurYkJ6/AYk1OQAVsyz77U3Ei1Zm/RRkeLrKmD714XPQyor9elKgvBf3iwmJkZp+4hVot LmTq6NY+FuJ+wVTgMUGnFuMcnCB6+R58jy8Fd10lTo9LCvqSA7pVHP3q6M+M5EtyscHlXxa7RT+u Z2kts5nPoHm4taSdpSJBHs7GG3CTuC6cjKMEX+3N7NcxppGy1ID2a37cm4i7xE6XRb5v1jSnYqPE 1dlyUTVlsUxcejwgXk4ErdqWPUVMxW2YUJxoFdDxwuk+g3ttLfvcNHHp2o1j031viRGCsPcayg1r ogRnisxNuYMdDq7GlXhXMIgPRYvpz3yZIIK+QLSKhhnaijZVjf/ij3R9IqCdEl/gVV9oHGzoNEzm cuhHuorxDy1c2Kp4SUJrAAAAAElFTkSuQmCC " |
3191 | + id="image10" |
3192 | + x="0.25925925" |
3193 | + y="29.148148" /> |
3194 | +</svg> |
3195 | |
3196 | === added file 'tests/unit/bbc/images/scope-card.png' |
3197 | Binary files tests/unit/bbc/images/scope-card.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/images/scope-card.png 2015-05-20 13:57:15 +0000 differ |
3198 | === added file 'tests/unit/bbc/logo.png' |
3199 | Binary files tests/unit/bbc/logo.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/logo.png 2015-05-20 13:57:15 +0000 differ |
3200 | === added file 'tests/unit/bbc/rss.ssweeny_rss.ini.in' |
3201 | --- tests/unit/bbc/rss.ssweeny_rss.ini.in 1970-01-01 00:00:00 +0000 |
3202 | +++ tests/unit/bbc/rss.ssweeny_rss.ini.in 2015-05-20 13:57:15 +0000 |
3203 | @@ -0,0 +1,11 @@ |
3204 | +[ScopeConfig] |
3205 | +_DisplayName=BBC |
3206 | +_Description=BBC |
3207 | +Art=screenshot.png |
3208 | +Author=Scott Sweeny |
3209 | +Icon=icon.png |
3210 | + |
3211 | +[Appearance] |
3212 | +PageHeader.Logo=logo.png |
3213 | +PageHeader.Background=color:///#e9e7e8 |
3214 | +PageHeader.DividerColor=#ffeb00 |
3215 | |
3216 | === added file 'tests/unit/bbc/screenshot.png' |
3217 | Binary files tests/unit/bbc/screenshot.png 1970-01-01 00:00:00 +0000 and tests/unit/bbc/screenshot.png 2015-05-20 13:57:15 +0000 differ |
3218 | === added directory 'tests/unit/cnet' |
3219 | === added file 'tests/unit/cnet/CMakeLists.txt' |
3220 | --- tests/unit/cnet/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3221 | +++ tests/unit/cnet/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
3222 | @@ -0,0 +1,36 @@ |
3223 | +# Put the ini file in the build directory next to the scope |
3224 | +# .so file so test tools can find both easily. |
3225 | +#this is for launching on desktop with unity-scope-tool from src dir |
3226 | +configure_file( |
3227 | + "rss-scope.ini.in.in" |
3228 | + "${CMAKE_BINARY_DIR}/src/rss-scope.ini" |
3229 | +) |
3230 | +#this is the basis for localization |
3231 | +configure_file( |
3232 | + "rss-scope.ini.in.in" |
3233 | + "${CMAKE_SOURCE_DIR}/data/rss-scope.ini.in" |
3234 | +) |
3235 | + |
3236 | +file(GLOB INIS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.ini.in) |
3237 | +foreach(INI ${INIS}) |
3238 | + string(REPLACE ".ini.in" ".ini" INIFINAL ${INI}) |
3239 | + exec_program("intltool-merge -d -u ${CMAKE_SOURCE_DIR}/po/ ${CMAKE_CURRENT_SOURCE_DIR}/${INI} ${CMAKE_CURRENT_BINARY_DIR}/${INIFINAL}") |
3240 | +endforeach(INI) |
3241 | + |
3242 | +INSTALL( |
3243 | + FILES "${CMAKE_CURRENT_BINARY_DIR}/rss-scope.ini" |
3244 | + DESTINATION ${INI_INSTALLDIR} |
3245 | + RENAME ${SO_NAME}.ini |
3246 | +) |
3247 | +INSTALL( |
3248 | + FILES departments.json |
3249 | + DESTINATION ${SCOPE_INSTALLDIR} |
3250 | +) |
3251 | +INSTALL( |
3252 | + DIRECTORY "renderer" |
3253 | + DESTINATION ${SCOPE_INSTALLDIR} |
3254 | +) |
3255 | +INSTALL( |
3256 | + DIRECTORY "images" |
3257 | + DESTINATION ${SCOPE_INSTALLDIR} |
3258 | +) |
3259 | |
3260 | === added directory 'tests/unit/cnet/cache' |
3261 | === added file 'tests/unit/cnet/cache/.cheat-click' |
3262 | --- tests/unit/cnet/cache/.cheat-click 1970-01-01 00:00:00 +0000 |
3263 | +++ tests/unit/cnet/cache/.cheat-click 2015-05-20 13:57:15 +0000 |
3264 | @@ -0,0 +1,1 @@ |
3265 | +This file will force click to include the empty cache directory in the click package. |
3266 | |
3267 | === added file 'tests/unit/cnet/feeds.json' |
3268 | --- tests/unit/cnet/feeds.json 1970-01-01 00:00:00 +0000 |
3269 | +++ tests/unit/cnet/feeds.json 2015-05-20 13:57:15 +0000 |
3270 | @@ -0,0 +1,50 @@ |
3271 | +[ |
3272 | + { |
3273 | + "label": "All", |
3274 | + "id": "http://127.0.0.1:9999/cnet/rss/all/index.xml" |
3275 | + }, |
3276 | + { |
3277 | + "label": "News", |
3278 | + "id": "http://127.0.0.1:9999/cnet/rss/news/" |
3279 | + }, |
3280 | + { |
3281 | + "label": "Reviews", |
3282 | + "id": "http://127.0.0.1:9999/cnet/rss/reviews/" |
3283 | + }, |
3284 | + { |
3285 | + "label": "Video", |
3286 | + "id": "http://127.0.0.1:9999/cnet/rss/video/" |
3287 | + }, |
3288 | + { |
3289 | + "label": "How To", |
3290 | + "id": "http://127.0.0.1:9999/cnet/rss/how-to/" |
3291 | + }, |
3292 | + { |
3293 | + "label": "Deals", |
3294 | + "id": "http://127.0.0.1:9999/cnet/rss/deals/" |
3295 | + }, |
3296 | + { |
3297 | + "label": "Crave", |
3298 | + "id": "http://127.0.0.1:9999/cnet/rss/crave/" |
3299 | + }, |
3300 | + { |
3301 | + "label": "Car Tech", |
3302 | + "id": "http://127.0.0.1:9999/cnet/rss/car-tech/" |
3303 | + }, |
3304 | + { |
3305 | + "label": "Android Update", |
3306 | + "id": "http://127.0.0.1:9999/cnet/rss/android-update/" |
3307 | + }, |
3308 | + { |
3309 | + "label": "Gaming", |
3310 | + "id": "http://127.0.0.1:9999/cnet/rss/gaming/" |
3311 | + }, |
3312 | + { |
3313 | + "label": "Cheapskate", |
3314 | + "id": "http://127.0.0.1:9999/cnet/rss/cheapskate/" |
3315 | + }, |
3316 | + { |
3317 | + "label": "Podcasts", |
3318 | + "id": "http://127.0.0.1:9999/cnet/rss/cnet-podcasts/" |
3319 | + } |
3320 | +] |
3321 | |
3322 | === added file 'tests/unit/cnet/icon.svg' |
3323 | --- tests/unit/cnet/icon.svg 1970-01-01 00:00:00 +0000 |
3324 | +++ tests/unit/cnet/icon.svg 2015-05-20 13:57:15 +0000 |
3325 | @@ -0,0 +1,92 @@ |
3326 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3327 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3328 | +<svg |
3329 | + xmlns:svg="http://www.w3.org/2000/svg" |
3330 | + xmlns="http://www.w3.org/2000/svg" |
3331 | + version="1.0" |
3332 | + width="544.00006" |
3333 | + height="544" |
3334 | + id="svg2"> |
3335 | + <defs |
3336 | + id="defs4" /> |
3337 | + <g |
3338 | + transform="translate(-6.4712476,3.0971002)" |
3339 | + id="layer1"> |
3340 | + <g |
3341 | + transform="matrix(0.8880597,0,0,0.8880597,0.7243933,-0.3466903)" |
3342 | + id="g3208"> |
3343 | + <g |
3344 | + transform="matrix(34.669279,0,0,-34.669276,312.75001,137.48351)" |
3345 | + id="g17052"> |
3346 | + <path |
3347 | + d="M 0,0 C -1.891,0 -3.424,-1.533 -3.424,-3.425 C -3.424,-5.316 -1.891,-6.849 0,-6.849 C 1.891,-6.849 3.424,-5.316 3.424,-3.425 C 3.424,-1.533 1.891,0 0,0" |
3348 | + id="path17054" |
3349 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3350 | + </g> |
3351 | + <g |
3352 | + transform="matrix(34.669279,0,0,-34.669276,207.7853,422.93993)" |
3353 | + id="g17056"> |
3354 | + <path |
3355 | + d="M 0,0 L -0.005,0 L -0.005,-0.757 C -0.005,-0.85 -0.038,-0.935 -0.098,-0.996 C -0.155,-1.056 -0.232,-1.089 -0.314,-1.089 C -0.396,-1.089 -0.473,-1.056 -0.53,-0.996 C -0.59,-0.935 -0.622,-0.85 -0.622,-0.757 L -0.622,0 L -0.869,0 L -0.869,-0.757 C -0.869,-0.922 -0.815,-1.065 -0.711,-1.169 C -0.61,-1.27 -0.469,-1.325 -0.314,-1.325 C -0.159,-1.325 -0.018,-1.27 0.083,-1.169 C 0.187,-1.065 0.242,-0.922 0.242,-0.757 L 0.242,0 L 0.237,0" |
3356 | + id="path17058" |
3357 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3358 | + </g> |
3359 | + <g |
3360 | + transform="matrix(34.669279,0,0,-34.669276,280.39317,456.46858)" |
3361 | + id="g17060"> |
3362 | + <path |
3363 | + d="M 0,0 C -0.075,-0.079 -0.181,-0.122 -0.298,-0.122 C -0.416,-0.122 -0.522,-0.079 -0.597,0 C -0.673,0.079 -0.714,0.192 -0.714,0.317 C -0.714,0.442 -0.673,0.556 -0.597,0.635 C -0.522,0.714 -0.416,0.757 -0.298,0.757 C -0.181,0.757 -0.075,0.714 0,0.635 C 0.076,0.556 0.117,0.442 0.117,0.317 C 0.117,0.192 0.076,0.079 0,0 M 0.173,0.806 C 0.048,0.927 -0.121,0.994 -0.298,0.994 C -0.477,0.994 -0.645,0.927 -0.77,0.806 C -0.901,0.68 -0.972,0.507 -0.972,0.317 C -0.972,0.128 -0.901,-0.045 -0.77,-0.171 C -0.645,-0.292 -0.477,-0.358 -0.298,-0.358 C -0.121,-0.358 0.048,-0.292 0.173,-0.171 C 0.304,-0.045 0.375,0.128 0.375,0.317 C 0.375,0.507 0.304,0.68 0.173,0.806" |
3364 | + id="path17062" |
3365 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3366 | + </g> |
3367 | + <g |
3368 | + transform="matrix(34.669279,0,0,-34.669276,319.16729,422.00733)" |
3369 | + id="g17064"> |
3370 | + <path |
3371 | + d="M 0,0 C -0.155,0 -0.296,-0.055 -0.397,-0.157 C -0.5,-0.261 -0.556,-0.404 -0.556,-0.569 L -0.556,-1.326 L -0.309,-1.326 L -0.309,-0.569 C -0.309,-0.476 -0.276,-0.391 -0.217,-0.329 C -0.159,-0.269 -0.082,-0.237 0,-0.237 C 0.082,-0.237 0.159,-0.269 0.216,-0.329 C 0.276,-0.391 0.309,-0.476 0.309,-0.569 L 0.309,-1.326 L 0.556,-1.326 L 0.556,-0.569 C 0.556,-0.404 0.501,-0.261 0.397,-0.157 C 0.296,-0.055 0.155,0 0,0" |
3372 | + id="path17066" |
3373 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3374 | + </g> |
3375 | + <g |
3376 | + transform="matrix(34.669279,0,0,-34.669276,447.51643,422.93993)" |
3377 | + id="g17068"> |
3378 | + <path |
3379 | + d="M 0,0 L -0.005,0 L -0.005,-0.827 C -0.005,-0.986 -0.094,-1.089 -0.231,-1.089 C -0.395,-1.089 -0.478,-0.988 -0.478,-0.789 L -0.478,0 L -0.725,0 L -0.725,-0.789 C -0.725,-0.988 -0.808,-1.089 -0.972,-1.089 C -1.109,-1.089 -1.197,-0.986 -1.197,-0.827 L -1.197,0 L -1.444,0 L -1.444,-0.88 C -1.444,-1.13 -1.239,-1.325 -0.977,-1.325 C -0.819,-1.325 -0.683,-1.26 -0.601,-1.147 C -0.519,-1.26 -0.383,-1.325 -0.225,-1.325 C 0.036,-1.325 0.242,-1.13 0.242,-0.88 L 0.242,0 L 0.237,0" |
3380 | + id="path17070" |
3381 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3382 | + </g> |
3383 | + <g |
3384 | + transform="matrix(34.669279,0,0,-34.669276,482.0401,440.7114)" |
3385 | + id="g17072"> |
3386 | + <path |
3387 | + d="M 0,0 C -0.158,0.044 -0.294,0.082 -0.294,0.169 C -0.289,0.242 -0.265,0.277 -0.146,0.277 L 0.455,0.277 L 0.455,0.513 L -0.106,0.513 C -0.393,0.513 -0.552,0.387 -0.552,0.158 C -0.552,0.042 -0.497,-0.049 -0.384,-0.119 C -0.287,-0.179 -0.159,-0.216 -0.046,-0.249 C 0.119,-0.296 0.262,-0.337 0.262,-0.432 C 0.262,-0.514 0.216,-0.55 0.114,-0.55 L -0.552,-0.55 L -0.552,-0.787 L 0.114,-0.787 C 0.232,-0.787 0.332,-0.756 0.403,-0.697 C 0.479,-0.634 0.52,-0.538 0.52,-0.422 C 0.52,-0.145 0.232,-0.065 0,0" |
3388 | + id="path17074" |
3389 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3390 | + </g> |
3391 | + <g |
3392 | + transform="matrix(34.669279,0,0,-34.669276,223.62569,440.00761)" |
3393 | + id="g17076"> |
3394 | + <path |
3395 | + d="M 0,0 L 0,-0.796 L 0.23,-0.796 L 0.23,0 C 0.23,0.147 0.275,0.315 0.627,0.315 L 0.633,0.315 L 0.633,0.545 L 0.627,0.545 C 0.082,0.545 0,0.203 0,0" |
3396 | + id="path17078" |
3397 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3398 | + </g> |
3399 | + <g |
3400 | + transform="matrix(34.669279,0,0,-34.669276,162.68056,452.232)" |
3401 | + id="g17080"> |
3402 | + <path |
3403 | + d="M 0,0 L -0.005,0.002 L -0.007,-0.003 C -0.043,-0.07 -0.096,-0.129 -0.163,-0.171 C -0.371,-0.303 -0.648,-0.24 -0.779,-0.032 C -0.843,0.068 -0.864,0.188 -0.837,0.304 C -0.811,0.421 -0.741,0.52 -0.641,0.584 C -0.492,0.677 -0.303,0.675 -0.157,0.579 L -0.551,0.255 L -0.556,0.252 L -0.552,0.248 L -0.417,0.08 L -0.414,0.075 L -0.41,0.079 L 0.169,0.554 L 0.172,0.557 L 0.17,0.561 L 0.166,0.566 C 0.07,0.717 -0.079,0.822 -0.255,0.861 C -0.43,0.901 -0.61,0.87 -0.761,0.774 C -0.912,0.679 -1.018,0.53 -1.057,0.355 C -1.097,0.179 -1.066,-0.001 -0.97,-0.153 C -0.772,-0.466 -0.356,-0.56 -0.043,-0.362 C 0.056,-0.299 0.137,-0.212 0.192,-0.108 L 0.195,-0.103 L 0.19,-0.1" |
3404 | + id="path17082" |
3405 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3406 | + </g> |
3407 | + <g |
3408 | + transform="matrix(34.669279,0,0,-34.669276,381.92215,452.232)" |
3409 | + id="g17084"> |
3410 | + <path |
3411 | + d="M 0,0 L -0.005,0.002 L -0.008,-0.003 C -0.043,-0.07 -0.097,-0.129 -0.163,-0.171 C -0.371,-0.303 -0.648,-0.24 -0.78,-0.032 C -0.843,0.068 -0.864,0.188 -0.838,0.305 C -0.811,0.421 -0.741,0.52 -0.641,0.584 C -0.493,0.677 -0.304,0.675 -0.157,0.579 L -0.552,0.255 L -0.556,0.252 L -0.552,0.248 L -0.417,0.08 L -0.414,0.075 L -0.409,0.079 L 0.168,0.554 L 0.173,0.557 L 0.169,0.561 L 0.166,0.566 L 0.166,0.566 C -0.032,0.879 -0.448,0.972 -0.761,0.774 C -0.913,0.679 -1.018,0.53 -1.057,0.355 C -1.097,0.179 -1.066,-0.001 -0.971,-0.153 C -0.772,-0.466 -0.356,-0.56 -0.043,-0.362 C 0.056,-0.299 0.137,-0.212 0.192,-0.108 L 0.195,-0.103 L 0.19,-0.1" |
3412 | + id="path17086" |
3413 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
3414 | + </g> |
3415 | + </g> |
3416 | + </g> |
3417 | +</svg> |
3418 | |
3419 | === added directory 'tests/unit/cnet/images' |
3420 | === added file 'tests/unit/cnet/images/card.png' |
3421 | Binary files tests/unit/cnet/images/card.png 1970-01-01 00:00:00 +0000 and tests/unit/cnet/images/card.png 2015-05-20 13:57:15 +0000 differ |
3422 | === added file 'tests/unit/cnet/images/default.png' |
3423 | Binary files tests/unit/cnet/images/default.png 1970-01-01 00:00:00 +0000 and tests/unit/cnet/images/default.png 2015-05-20 13:57:15 +0000 differ |
3424 | === added file 'tests/unit/cnet/images/default.svg' |
3425 | --- tests/unit/cnet/images/default.svg 1970-01-01 00:00:00 +0000 |
3426 | +++ tests/unit/cnet/images/default.svg 2015-05-20 13:57:15 +0000 |
3427 | @@ -0,0 +1,322 @@ |
3428 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3429 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3430 | + |
3431 | +<svg |
3432 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
3433 | + xmlns:cc="http://creativecommons.org/ns#" |
3434 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
3435 | + xmlns:svg="http://www.w3.org/2000/svg" |
3436 | + xmlns="http://www.w3.org/2000/svg" |
3437 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
3438 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
3439 | + width="720" |
3440 | + height="330" |
3441 | + id="svg2" |
3442 | + sodipodi:version="0.32" |
3443 | + inkscape:version="0.48.4 r9939" |
3444 | + version="1.0" |
3445 | + sodipodi:docname="default.svg.old" |
3446 | + inkscape:output_extension="org.inkscape.output.svg.inkscape"> |
3447 | + <defs |
3448 | + id="defs4" /> |
3449 | + <sodipodi:namedview |
3450 | + id="base" |
3451 | + pagecolor="#ffffff" |
3452 | + bordercolor="#666666" |
3453 | + borderopacity="1.0" |
3454 | + gridtolerance="10000" |
3455 | + guidetolerance="10" |
3456 | + objecttolerance="10" |
3457 | + inkscape:pageopacity="0.0" |
3458 | + inkscape:pageshadow="2" |
3459 | + inkscape:zoom="0.88003809" |
3460 | + inkscape:cx="490.40724" |
3461 | + inkscape:cy="124.4655" |
3462 | + inkscape:document-units="px" |
3463 | + inkscape:current-layer="layer1" |
3464 | + height="24px" |
3465 | + width="24px" |
3466 | + showgrid="true" |
3467 | + inkscape:window-width="1366" |
3468 | + inkscape:window-height="744" |
3469 | + inkscape:window-x="0" |
3470 | + inkscape:window-y="24" |
3471 | + inkscape:snap-nodes="true" |
3472 | + inkscape:window-maximized="1" |
3473 | + fit-margin-top="0" |
3474 | + fit-margin-left="0" |
3475 | + fit-margin-right="0" |
3476 | + fit-margin-bottom="0" /> |
3477 | + <metadata |
3478 | + id="metadata7"> |
3479 | + <rdf:RDF> |
3480 | + <cc:Work |
3481 | + rdf:about=""> |
3482 | + <dc:format>image/svg+xml</dc:format> |
3483 | + <dc:type |
3484 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
3485 | + <dc:title></dc:title> |
3486 | + </cc:Work> |
3487 | + </rdf:RDF> |
3488 | + </metadata> |
3489 | + <g |
3490 | + inkscape:label="Layer 1" |
3491 | + inkscape:groupmode="layer" |
3492 | + id="layer1" |
3493 | + transform="translate(-5.7571953,-706.0344)"> |
3494 | + <g |
3495 | + id="g15405" |
3496 | + clip-path="url(#id335)" |
3497 | + transform="matrix(1,0,0,-1,-328.30292,933.75171)"> |
3498 | + <g |
3499 | + id="g15407" |
3500 | + transform="matrix(0.0384521,0,0,-0.0384521,58.949158,55.939194)"> |
3501 | + <path |
3502 | + id="path15409" |
3503 | + d="m 0,0 -11.3,0 0,-11.5 -5,0 0,28.801 5,0 0,-12.301 0.5,-0.699 10.1,0 0.7,0.5 0,12.5 5,0 0,-28.801 -5,0 L 0,0 z" |
3504 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3505 | + inkscape:connector-curvature="0" /> |
3506 | + </g> |
3507 | + <g |
3508 | + id="g15411" |
3509 | + transform="matrix(0.0384521,0,0,-0.0384521,60.075806,56.381393)"> |
3510 | + <path |
3511 | + id="path15413" |
3512 | + d="m 0,0 -10.6,28.801 5.1,0 2.4,-6.5 11.5,0 2.4,6.5 L 16.1,28.5 5.5,0 0,0 z M -1,17.7 C -0.1,14 1.1,9.801 2.6,6 4.3,9.5 5.2,13.7 6.5,17.5 L -1,17.7" |
3513 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3514 | + inkscape:connector-curvature="0" /> |
3515 | + </g> |
3516 | + <g |
3517 | + id="g15415" |
3518 | + transform="matrix(0.0384521,0,0,-0.0384521,61.883057,55.550842)"> |
3519 | + <path |
3520 | + id="path15417" |
3521 | + d="m 0,0 c -4.3,-6.7 -6.8,-14.6 -10.8,-21.6 l -6,0 0,28.801 4.6,0 0.2,-21.601 c 3.8,6.9 7.3,14.3 10.6,21.601 l 6.201,0 0,-28.801 -4.5,0 L 0,0" |
3522 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3523 | + inkscape:connector-curvature="0" /> |
3524 | + </g> |
3525 | + <g |
3526 | + id="g15419" |
3527 | + transform="matrix(0.0384521,0,0,-0.0384521,63.478821,55.550842)"> |
3528 | + <path |
3529 | + id="path15421" |
3530 | + d="m 0,0 c -3.8,-7.1 -6.699,-14.5 -10.5,-21.6 l -6.3,0 0,28.801 4.8,0 0.301,-21.601 c 3.599,6.9 7.099,14.3 10.5,21.601 l 6.299,0 0,-28.801 -4.799,0.2 L 0,0" |
3531 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3532 | + inkscape:connector-curvature="0" /> |
3533 | + </g> |
3534 | + <g |
3535 | + id="g15423" |
3536 | + transform="matrix(0.0384521,0,0,-0.0384521,65.139938,56.223755)"> |
3537 | + <path |
3538 | + id="path15425" |
3539 | + d="m 0,0 -0.2,-4.1 -17.8,0 0,28.801 18,0 0,-4.301 -12.899,-0.3 0.199,-7.7 11.301,0 0,-3.8 -11.5,-0.5 L -12.7,0.201 0,0 z" |
3540 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3541 | + inkscape:connector-curvature="0" /> |
3542 | + </g> |
3543 | + <g |
3544 | + id="g15427" |
3545 | + transform="matrix(0.0384521,0,0,-0.0384521,66.06279,56.381393)"> |
3546 | + <path |
3547 | + id="path15429" |
3548 | + d="m 0,0 -4.8,0 0,28.801 16.3,0 0,-4.301 -11,0 L 0,0 z" |
3549 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3550 | + inkscape:connector-curvature="0" /> |
3551 | + </g> |
3552 | + </g> |
3553 | + <g |
3554 | + id="g35751" |
3555 | + clip-path="url(#id554)" |
3556 | + transform="matrix(1,0,0,-1,-328.30292,933.75171)"> |
3557 | + <g |
3558 | + id="g35753" |
3559 | + transform="matrix(0.0384521,0,0,-0.0384521,58.949158,55.939194)"> |
3560 | + <path |
3561 | + id="path35755" |
3562 | + d="m 0,0 -11.3,0 0,-11.5 -5,0 0,28.801 5,0 0,-12.301 0.5,-0.699 10.1,0 0.7,0.5 0,12.5 5,0 0,-28.801 -5,0 L 0,0 z" |
3563 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3564 | + inkscape:connector-curvature="0" /> |
3565 | + </g> |
3566 | + <g |
3567 | + id="g35757" |
3568 | + transform="matrix(0.0384521,0,0,-0.0384521,60.075806,56.381393)"> |
3569 | + <path |
3570 | + id="path35759" |
3571 | + d="m 0,0 -10.6,28.801 5.1,0 2.4,-6.5 11.5,0 2.4,6.5 L 16.1,28.5 5.5,0 0,0 z M -1,17.7 C -0.1,14 1.1,9.801 2.6,6 4.3,9.5 5.2,13.7 6.5,17.5 L -1,17.7" |
3572 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3573 | + inkscape:connector-curvature="0" /> |
3574 | + </g> |
3575 | + <g |
3576 | + id="g35761" |
3577 | + transform="matrix(0.0384521,0,0,-0.0384521,61.883057,55.550842)"> |
3578 | + <path |
3579 | + id="path35763" |
3580 | + d="m 0,0 c -4.3,-6.7 -6.8,-14.6 -10.8,-21.6 l -6,0 0,28.801 4.6,0 0.2,-21.601 c 3.8,6.9 7.3,14.3 10.6,21.601 l 6.201,0 0,-28.801 -4.5,0 L 0,0" |
3581 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3582 | + inkscape:connector-curvature="0" /> |
3583 | + </g> |
3584 | + <g |
3585 | + id="g35765" |
3586 | + transform="matrix(0.0384521,0,0,-0.0384521,63.478821,55.550842)"> |
3587 | + <path |
3588 | + id="path35767" |
3589 | + d="m 0,0 c -3.8,-7.1 -6.699,-14.5 -10.5,-21.6 l -6.3,0 0,28.801 4.8,0 0.301,-21.601 c 3.599,6.9 7.099,14.3 10.5,21.601 l 6.299,0 0,-28.801 -4.799,0.2 L 0,0" |
3590 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3591 | + inkscape:connector-curvature="0" /> |
3592 | + </g> |
3593 | + <g |
3594 | + id="g35769" |
3595 | + transform="matrix(0.0384521,0,0,-0.0384521,65.139938,56.223755)"> |
3596 | + <path |
3597 | + id="path35771" |
3598 | + d="m 0,0 -0.2,-4.1 -17.8,0 0,28.801 18,0 0,-4.301 -12.899,-0.3 0.199,-7.7 11.301,0 0,-3.8 -11.5,-0.5 L -12.7,0.201 0,0 z" |
3599 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3600 | + inkscape:connector-curvature="0" /> |
3601 | + </g> |
3602 | + <g |
3603 | + id="g35773" |
3604 | + transform="matrix(0.0384521,0,0,-0.0384521,66.06279,56.381393)"> |
3605 | + <path |
3606 | + id="path35775" |
3607 | + d="m 0,0 -4.8,0 0,28.801 16.3,0 0,-4.301 -11,0 L 0,0 z" |
3608 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3609 | + inkscape:connector-curvature="0" /> |
3610 | + </g> |
3611 | + </g> |
3612 | + <path |
3613 | + id="path52181" |
3614 | + d="m 5.7571953,706.0344 720.0000047,0 0,330 -720.0000047,0 0,-330 z" |
3615 | + style="fill:#b6b5b5;fill-rule:nonzero;stroke:none" |
3616 | + inkscape:connector-curvature="0" /> |
3617 | + <g |
3618 | + transform="matrix(2.1166696,0,0,2.2148216,250.77235,1223.5571)" |
3619 | + id="g52187"> |
3620 | + <path |
3621 | + inkscape:connector-curvature="0" |
3622 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3623 | + d="m 0,-170.06272 -0.101,0 0,0.1 0,13.828 c 0,1.705 -0.601,3.267 -1.695,4.404 -1.058,1.1 -2.476,1.707 -3.985,1.707 -1.509,0 -2.922,-0.607 -3.979,-1.707 -1.092,-1.135 -1.691,-2.699 -1.691,-4.404 l 0,-13.828 0,-0.1 -0.1,0 -4.345,0 -0.102,0 0,0.1 0,13.828 c 0,3.039 1.011,5.662 2.925,7.582 1.85,1.859 4.441,2.883 7.292,2.883 2.856,0 5.45,-1.024 7.305,-2.883 1.911,-1.92 2.923,-4.541 2.923,-7.582 l 0,-13.828 0,-0.1 -0.098,0 -4.349,0 z" |
3624 | + id="path52189" /> |
3625 | + </g> |
3626 | + <g |
3627 | + transform="matrix(2.1166696,0,0,2.2148216,332.31519,1262.9618)" |
3628 | + id="g52191"> |
3629 | + <path |
3630 | + inkscape:connector-curvature="0" |
3631 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3632 | + d="m 0,-170.06272 c -1.383,1.449 -3.334,2.248 -5.489,2.248 -2.156,0 -4.106,-0.799 -5.489,-2.248 -1.392,-1.463 -2.159,-3.533 -2.159,-5.832 0,-2.307 0.767,-4.385 2.159,-5.848 1.382,-1.453 3.331,-2.252 5.489,-2.252 2.155,0 4.106,0.799 5.489,2.252 1.396,1.465 2.162,3.541 2.162,5.848 0,2.299 -0.766,4.369 -2.162,5.832 m 3.186,-14.822 c -2.312,-2.23501 -5.395,-3.46301 -8.675,-3.46301 -3.285,0 -6.368,1.228 -8.682,3.46301 -2.394,2.312 -3.712,5.506 -3.712,8.99 0,3.481 1.318,6.668 3.712,8.979 2.313,2.228 5.397,3.455 8.682,3.455 3.28,0 6.363,-1.227 8.675,-3.455 2.401,-2.311 3.719,-5.498 3.719,-8.979 0,-3.482 -1.318,-6.676 -3.719,-8.99" |
3633 | + id="path52193" /> |
3634 | + </g> |
3635 | + <g |
3636 | + transform="matrix(2.1166696,0,0,2.2148216,375.87691,1222.4616)" |
3637 | + id="g52195"> |
3638 | + <path |
3639 | + inkscape:connector-curvature="0" |
3640 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3641 | + d="m 0,-170.06272 c -2.854,0 -5.448,1.023 -7.299,2.883 -1.914,1.92 -2.924,4.545 -2.924,7.592 l 0,13.828 0,0.099 0.1,0 4.343,0 0.1,0 0,-0.099 0,-13.828 c 0,-1.709 0.603,-3.278 1.696,-4.413 1.061,-1.103 2.476,-1.709 3.984,-1.709 1.508,0 2.925,0.606 3.982,1.709 1.094,1.135 1.693,2.704 1.693,4.413 l 0,13.828 0,0.099 0.1,0 4.355,0 0.101,0 0,-0.099 0,-13.828 c 0,-3.043 -1.012,-5.668 -2.926,-7.592 -1.857,-1.862 -4.45,-2.883 -7.305,-2.883" |
3642 | + id="path52197" /> |
3643 | + </g> |
3644 | + <g |
3645 | + transform="matrix(2.1166696,0,0,2.2148216,520.04351,1223.5571)" |
3646 | + id="g52199"> |
3647 | + <path |
3648 | + inkscape:connector-curvature="0" |
3649 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3650 | + d="m 0,-170.06272 -0.102,0 0,0.1 0,15.115 c 0,2.93 -1.627,4.824 -4.146,4.824 -3.014,0 -4.543,-1.857 -4.543,-5.519 l 0,-14.42 0,-0.1 -0.102,0 -4.339,0 -0.1,0 0,0.1 0,14.42 c 0,3.662 -1.529,5.519 -4.547,5.519 -2.517,0 -4.146,-1.894 -4.146,-4.824 l 0,-15.115 0,-0.1 -0.098,0 -4.35,0 -0.097,0 0,0.1 0,16.09 c 0,4.599 3.777,8.203 8.599,8.203 2.889,0 5.398,-1.202 6.916,-3.293 1.502,2.091 4.008,3.293 6.909,3.293 4.816,0 8.587,-3.604 8.587,-8.203 l 0,-16.09 0,-0.1 -0.096,0 -4.345,0 z" |
3651 | + id="path52201" /> |
3652 | + </g> |
3653 | + <g |
3654 | + transform="matrix(2.1166696,0,0,2.2148216,558.82208,1244.4554)" |
3655 | + id="g52203"> |
3656 | + <path |
3657 | + inkscape:connector-curvature="0" |
3658 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3659 | + d="m 0,-170.06272 c -2.902,-0.809 -5.408,-1.51 -5.408,-3.108 0.095,-1.344 0.525,-1.984 2.713,-1.984 l 10.966,0 0.098,0 0,-0.1 0,-4.144 0,-0.1 -0.098,0 -10.222,0 c -5.289,0 -8.201,2.315 -8.201,6.52 0,2.15 1.007,3.82 3.08,5.105 1.793,1.111 4.144,1.785 6.224,2.383 3.036,0.871 5.661,1.625 5.661,3.383 0,1.496 -0.838,2.164 -2.713,2.164 l -12.153,0 -0.099,0 0,0.099 0,4.155 0,0.099 0.099,0 12.153,0 c 2.175,0 4.013,-0.57 5.31,-1.65 1.403,-1.166 2.141,-2.916 2.141,-5.065 0,-5.091 -5.295,-6.57 -9.551,-7.757" |
3660 | + id="path52205" /> |
3661 | + </g> |
3662 | + <g |
3663 | + transform="matrix(2.1166696,0,0,2.2148216,268.56736,1243.6203)" |
3664 | + id="g52207"> |
3665 | + <path |
3666 | + inkscape:connector-curvature="0" |
3667 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3668 | + d="m 0,-170.06272 0,14.541 0,0.099 0.101,0 4.028,0 0.099,0 0,-0.099 0,-14.541 c 0,-2.702 0.832,-5.803 7.307,-5.803 l 0.1,0 0,-0.1 0,-4.021 0,-0.1 -0.1,0 c -10.037,0 -11.535,6.28 -11.535,10.024" |
3669 | + id="path52209" /> |
3670 | + </g> |
3671 | + <g |
3672 | + transform="matrix(2.1166696,0,0,2.2148216,200.10636,1257.9899)" |
3673 | + id="g52211"> |
3674 | + <path |
3675 | + inkscape:connector-curvature="0" |
3676 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3677 | + d="m 0,-170.06272 -0.089,-0.047 -0.045,0.09 c -0.65,1.246 -1.641,2.32 -2.866,3.105 -3.835,2.416 -8.919,1.268 -11.336,-2.558 -1.174,-1.85 -1.553,-4.049 -1.07,-6.194 0.484,-2.142 1.767,-3.968 3.619,-5.136 2.725,-1.721 6.201,-1.678 8.898,0.092 l -7.255,5.951 -0.077,0.062 0.062,0.076 2.484,3.09 0.064,0.078 0.078,-0.064 10.634,-8.736 0.074,-0.063 -0.059,-0.078 -0.068,-0.088 c -1.755,-2.775 -4.502,-4.70901 -7.729,-5.43401 -3.224,-0.726 -6.533,-0.154 -9.317,1.60801 -2.788,1.758 -4.723,4.5 -5.449,7.723 -0.732,3.228 -0.162,6.542 1.599,9.332 3.644,5.759 11.295,7.486 17.063,3.843 1.82,-1.148 3.315,-2.765 4.326,-4.674 l 0.047,-0.089 -0.089,-0.047 -3.499,-1.842 z" |
3678 | + id="path52213" /> |
3679 | + </g> |
3680 | + <g |
3681 | + transform="matrix(2.1166696,0,0,2.2148216,446.35715,1257.9899)" |
3682 | + id="g52215"> |
3683 | + <path |
3684 | + inkscape:connector-curvature="0" |
3685 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
3686 | + d="m 0,-170.06272 -0.088,-0.047 -0.045,0.09 c -0.652,1.246 -1.644,2.318 -2.869,3.105 -3.832,2.414 -8.919,1.268 -11.34,-2.558 -1.172,-1.852 -1.547,-4.051 -1.062,-6.196 0.482,-2.144 1.767,-3.966 3.614,-5.134 2.73,-1.721 6.204,-1.678 8.897,0.092 l -7.253,5.951 -0.077,0.062 0.065,0.076 2.485,3.09 0.064,0.078 0.077,-0.064 10.634,-8.736 0.076,-0.063 -0.061,-0.08 -0.07,-0.088 0.006,0.01 c -3.645,-5.75601 -11.294,-7.47701 -17.047,-3.834 -2.791,1.756 -4.731,4.498 -5.457,7.719 -0.731,3.23 -0.164,6.543 1.597,9.336 3.651,5.757 11.304,7.482 17.065,3.843 1.824,-1.148 3.322,-2.765 4.33,-4.674 l 0.045,-0.089 -0.09,-0.047 -3.496,-1.842 z" |
3687 | + id="path52217" /> |
3688 | + </g> |
3689 | + <g |
3690 | + id="g56347" |
3691 | + clip-path="url(#id786)" |
3692 | + transform="matrix(1,0,0,-1,-328.30292,933.75171)"> |
3693 | + <g |
3694 | + id="g56349" |
3695 | + transform="matrix(0.0384521,0,0,-0.0384521,58.949158,55.939194)"> |
3696 | + <path |
3697 | + id="path56351" |
3698 | + d="m 0,0 -11.3,0 0,-11.5 -5,0 0,28.801 5,0 0,-12.301 0.5,-0.699 10.1,0 0.7,0.5 0,12.5 5,0 0,-28.801 -5,0 L 0,0 z" |
3699 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3700 | + inkscape:connector-curvature="0" /> |
3701 | + </g> |
3702 | + <g |
3703 | + id="g56353" |
3704 | + transform="matrix(0.0384521,0,0,-0.0384521,60.075806,56.381393)"> |
3705 | + <path |
3706 | + id="path56355" |
3707 | + d="m 0,0 -10.6,28.801 5.1,0 2.4,-6.5 11.5,0 2.4,6.5 L 16.1,28.5 5.5,0 0,0 z M -1,17.7 C -0.1,14 1.1,9.801 2.6,6 4.3,9.5 5.2,13.7 6.5,17.5 L -1,17.7" |
3708 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3709 | + inkscape:connector-curvature="0" /> |
3710 | + </g> |
3711 | + <g |
3712 | + id="g56357" |
3713 | + transform="matrix(0.0384521,0,0,-0.0384521,61.883057,55.550842)"> |
3714 | + <path |
3715 | + id="path56359" |
3716 | + d="m 0,0 c -4.3,-6.7 -6.8,-14.6 -10.8,-21.6 l -6,0 0,28.801 4.6,0 0.2,-21.601 c 3.8,6.9 7.3,14.3 10.6,21.601 l 6.201,0 0,-28.801 -4.5,0 L 0,0" |
3717 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3718 | + inkscape:connector-curvature="0" /> |
3719 | + </g> |
3720 | + <g |
3721 | + id="g56361" |
3722 | + transform="matrix(0.0384521,0,0,-0.0384521,63.478821,55.550842)"> |
3723 | + <path |
3724 | + id="path56363" |
3725 | + d="m 0,0 c -3.8,-7.1 -6.699,-14.5 -10.5,-21.6 l -6.3,0 0,28.801 4.8,0 0.301,-21.601 c 3.599,6.9 7.099,14.3 10.5,21.601 l 6.299,0 0,-28.801 -4.799,0.2 L 0,0" |
3726 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3727 | + inkscape:connector-curvature="0" /> |
3728 | + </g> |
3729 | + <g |
3730 | + id="g56365" |
3731 | + transform="matrix(0.0384521,0,0,-0.0384521,65.139938,56.223755)"> |
3732 | + <path |
3733 | + id="path56367" |
3734 | + d="m 0,0 -0.2,-4.1 -17.8,0 0,28.801 18,0 0,-4.301 -12.899,-0.3 0.199,-7.7 11.301,0 0,-3.8 -11.5,-0.5 L -12.7,0.201 0,0 z" |
3735 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3736 | + inkscape:connector-curvature="0" /> |
3737 | + </g> |
3738 | + <g |
3739 | + id="g56369" |
3740 | + transform="matrix(0.0384521,0,0,-0.0384521,66.06279,56.381393)"> |
3741 | + <path |
3742 | + id="path56371" |
3743 | + d="m 0,0 -4.8,0 0,28.801 16.3,0 0,-4.301 -11,0 L 0,0 z" |
3744 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
3745 | + inkscape:connector-curvature="0" /> |
3746 | + </g> |
3747 | + </g> |
3748 | + </g> |
3749 | +</svg> |
3750 | |
3751 | === added file 'tests/unit/cnet/images/euronews-art.png' |
3752 | Binary files tests/unit/cnet/images/euronews-art.png 1970-01-01 00:00:00 +0000 and tests/unit/cnet/images/euronews-art.png 2015-05-20 13:57:15 +0000 differ |
3753 | === added file 'tests/unit/cnet/images/logo.png' |
3754 | Binary files tests/unit/cnet/images/logo.png 1970-01-01 00:00:00 +0000 and tests/unit/cnet/images/logo.png 2015-05-20 13:57:15 +0000 differ |
3755 | === added directory 'tests/unit/cnet/renderer' |
3756 | === added file 'tests/unit/cnet/renderer/carousel.json' |
3757 | --- tests/unit/cnet/renderer/carousel.json 1970-01-01 00:00:00 +0000 |
3758 | +++ tests/unit/cnet/renderer/carousel.json 2015-05-20 13:57:15 +0000 |
3759 | @@ -0,0 +1,12 @@ |
3760 | +{ |
3761 | + "schema-version": 1, |
3762 | + "template": { |
3763 | + "category-layout": "carousel", |
3764 | + "card-size": "medium", |
3765 | + "overlay": true |
3766 | + }, |
3767 | + "components": { |
3768 | + "title": "title", |
3769 | + "art": "image" |
3770 | + } |
3771 | +} |
3772 | |
3773 | === added file 'tests/unit/cnet/renderer/hgrid.json' |
3774 | --- tests/unit/cnet/renderer/hgrid.json 1970-01-01 00:00:00 +0000 |
3775 | +++ tests/unit/cnet/renderer/hgrid.json 2015-05-20 13:57:15 +0000 |
3776 | @@ -0,0 +1,15 @@ |
3777 | +{ |
3778 | + "schema-version": 1, |
3779 | + "template": { |
3780 | + "category-layout": "grid", |
3781 | + "card-layout": "horizontal", |
3782 | + "card-size": "medium", |
3783 | + "collapsed-rows": 0 |
3784 | + }, |
3785 | + "components": { |
3786 | + "mascot": "image", |
3787 | + "title": "title", |
3788 | + "subtitle": "subtitle", |
3789 | + "summary": "summary" |
3790 | + } |
3791 | +} |
3792 | |
3793 | === added file 'tests/unit/cnet/renderer/journal.json' |
3794 | --- tests/unit/cnet/renderer/journal.json 1970-01-01 00:00:00 +0000 |
3795 | +++ tests/unit/cnet/renderer/journal.json 2015-05-20 13:57:15 +0000 |
3796 | @@ -0,0 +1,16 @@ |
3797 | +{ |
3798 | + "schema-version": 1, |
3799 | + "template": { |
3800 | + "category-layout": "vertical-journal", |
3801 | + "card-layout": "horizontal", |
3802 | + "card-size": "large", |
3803 | + "collapsed-rows": 0 |
3804 | + }, |
3805 | + "components": { |
3806 | + "art": "image", |
3807 | + "title": "title", |
3808 | + "subtitle": "subtitle", |
3809 | + "summary": "summary", |
3810 | + "attributes": "attributes" |
3811 | + } |
3812 | +} |
3813 | |
3814 | === added file 'tests/unit/cnet/renderer/large.json' |
3815 | --- tests/unit/cnet/renderer/large.json 1970-01-01 00:00:00 +0000 |
3816 | +++ tests/unit/cnet/renderer/large.json 2015-05-20 13:57:15 +0000 |
3817 | @@ -0,0 +1,14 @@ |
3818 | +{ |
3819 | + "schema-version": 1, |
3820 | + "template": { |
3821 | + "category-layout": "grid", |
3822 | + "card-size": "large", |
3823 | + "overlay": true, |
3824 | + "collapsed-rows": 0 |
3825 | + }, |
3826 | + "components": { |
3827 | + "art": "image", |
3828 | + "title": "title", |
3829 | + "subtitle": "subtitle" |
3830 | + } |
3831 | +} |
3832 | |
3833 | === added file 'tests/unit/cnet/renderer/wide-art.json' |
3834 | --- tests/unit/cnet/renderer/wide-art.json 1970-01-01 00:00:00 +0000 |
3835 | +++ tests/unit/cnet/renderer/wide-art.json 2015-05-20 13:57:15 +0000 |
3836 | @@ -0,0 +1,13 @@ |
3837 | +{ |
3838 | + "schema-version": 1, |
3839 | + "template": { |
3840 | + "category-layout": "grid", |
3841 | + "card-size": "large", |
3842 | + "overlay": true, |
3843 | + "collapsed-rows": 0 |
3844 | + }, |
3845 | + "components": { |
3846 | + "title": "title", |
3847 | + "art": { "field": "image", "aspect-ratio": 2.5 } |
3848 | + } |
3849 | +} |
3850 | |
3851 | === added file 'tests/unit/cnet/rss.ssweeny_rss.ini.in' |
3852 | --- tests/unit/cnet/rss.ssweeny_rss.ini.in 1970-01-01 00:00:00 +0000 |
3853 | +++ tests/unit/cnet/rss.ssweeny_rss.ini.in 2015-05-20 13:57:15 +0000 |
3854 | @@ -0,0 +1,11 @@ |
3855 | +[ScopeConfig] |
3856 | +_DisplayName=CNet |
3857 | +_Description=CNet |
3858 | +Art=screenshot.png |
3859 | +Author=Scott Sweeny |
3860 | +Icon=icon.png |
3861 | + |
3862 | +[Appearance] |
3863 | +PageHeader.Logo=logo.png |
3864 | +PageHeader.Background=color:///#e9e7e8 |
3865 | +PageHeader.DividerColor=#ffeb00 |
3866 | |
3867 | === added directory 'tests/unit/elpais' |
3868 | === added file 'tests/unit/elpais/CMakeLists.txt' |
3869 | --- tests/unit/elpais/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3870 | +++ tests/unit/elpais/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
3871 | @@ -0,0 +1,11 @@ |
3872 | +# Put the ini file in the build directory next to the scope |
3873 | +# .so file so test tools can find both easily. |
3874 | +configure_file(scope.ini.in ../src/${SCOPE_PACKAGE}_${SCOPE_NAME}.ini) |
3875 | + |
3876 | +INSTALL(FILES ${CMAKE_BINARY_DIR}/src/${SCOPE_PACKAGE}_${SCOPE_NAME}.ini |
3877 | +DESTINATION ${INI_INSTALLDIR}) |
3878 | + |
3879 | +INSTALL( |
3880 | + DIRECTORY "images" |
3881 | + DESTINATION ${SCOPE_INSTALLDIR} |
3882 | +) |
3883 | |
3884 | === added directory 'tests/unit/elpais/caching' |
3885 | === added file 'tests/unit/elpais/feeds.json' |
3886 | --- tests/unit/elpais/feeds.json 1970-01-01 00:00:00 +0000 |
3887 | +++ tests/unit/elpais/feeds.json 2015-05-20 13:57:15 +0000 |
3888 | @@ -0,0 +1,6 @@ |
3889 | +[ |
3890 | + { |
3891 | + "label": "All", |
3892 | + "id": "http://127.0.0.1:9999/elpais/portada.xml" |
3893 | + } |
3894 | +] |
3895 | |
3896 | === added directory 'tests/unit/elpais/images' |
3897 | === added file 'tests/unit/elpais/images/EL_PAIS.png' |
3898 | Binary files tests/unit/elpais/images/EL_PAIS.png 1970-01-01 00:00:00 +0000 and tests/unit/elpais/images/EL_PAIS.png 2015-05-20 13:57:15 +0000 differ |
3899 | === added file 'tests/unit/elpais/images/default.png' |
3900 | Binary files tests/unit/elpais/images/default.png 1970-01-01 00:00:00 +0000 and tests/unit/elpais/images/default.png 2015-05-20 13:57:15 +0000 differ |
3901 | === added file 'tests/unit/elpais/images/error.png' |
3902 | Binary files tests/unit/elpais/images/error.png 1970-01-01 00:00:00 +0000 and tests/unit/elpais/images/error.png 2015-05-20 13:57:15 +0000 differ |
3903 | === added file 'tests/unit/elpais/images/logo.png' |
3904 | Binary files tests/unit/elpais/images/logo.png 1970-01-01 00:00:00 +0000 and tests/unit/elpais/images/logo.png 2015-05-20 13:57:15 +0000 differ |
3905 | === added file 'tests/unit/elpais/scope.ini.in' |
3906 | --- tests/unit/elpais/scope.ini.in 1970-01-01 00:00:00 +0000 |
3907 | +++ tests/unit/elpais/scope.ini.in 2015-05-20 13:57:15 +0000 |
3908 | @@ -0,0 +1,16 @@ |
3909 | +[ScopeConfig] |
3910 | +DisplayName = EL PAÍS |
3911 | +Description = This is EL PAÍS scope |
3912 | +Author = Grupo Prisa |
3913 | +Art = ./images/default.png |
3914 | +Icon = ./images/logo.png |
3915 | +SearchHint = Titular de noticia |
3916 | +HotKey = ELPAISscope.HotKey |
3917 | +[Appearance] |
3918 | +background=color:///#FFFFFF |
3919 | +PageHeader.Logo=./images/EL_PAIS.png |
3920 | +backgroundColor=#F0F0F0 |
3921 | +PageHeader.Background=color:///#FFFFFF |
3922 | +PageHeader.ForegroundColor=#333333 |
3923 | +PageHeader.DividerColor=#333333 |
3924 | +PreviewButtonColor=#F0F0F0 |
3925 | |
3926 | === added directory 'tests/unit/euronews' |
3927 | === added file 'tests/unit/euronews/CMakeLists.txt' |
3928 | --- tests/unit/euronews/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
3929 | +++ tests/unit/euronews/CMakeLists.txt 2015-05-20 13:57:15 +0000 |
3930 | @@ -0,0 +1,23 @@ |
3931 | +# Put the ini file in the build directory next to the scope |
3932 | +# .so file so test tools can find both easily. |
3933 | +CONFIGURE_FILE( |
3934 | + rss-scope.ini.in |
3935 | + ${CMAKE_BINARY_DIR}/src/${SO_NAME}.ini |
3936 | +) |
3937 | + |
3938 | +INSTALL( |
3939 | + FILES ${CMAKE_BINARY_DIR}/src/${SO_NAME}.ini |
3940 | + DESTINATION ${INI_INSTALLDIR} |
3941 | +) |
3942 | +INSTALL( |
3943 | + FILES departments.json |
3944 | + DESTINATION ${SCOPE_INSTALLDIR} |
3945 | +) |
3946 | +INSTALL( |
3947 | + DIRECTORY "renderer" |
3948 | + DESTINATION ${SCOPE_INSTALLDIR} |
3949 | +) |
3950 | +INSTALL( |
3951 | + DIRECTORY "images" |
3952 | + DESTINATION ${SCOPE_INSTALLDIR} |
3953 | +) |
3954 | |
3955 | === added file 'tests/unit/euronews/feeds.json' |
3956 | --- tests/unit/euronews/feeds.json 1970-01-01 00:00:00 +0000 |
3957 | +++ tests/unit/euronews/feeds.json 2015-05-20 13:57:15 +0000 |
3958 | @@ -0,0 +1,26 @@ |
3959 | +[ |
3960 | + { |
3961 | + "label": "News", |
3962 | + "id": "http://127.0.0.1:9999/euronews/_partners/ubuntu/news.xml" |
3963 | + }, |
3964 | + { |
3965 | + "label": "Business", |
3966 | + "id": "http://127.0.0.1:9999/euronews/_partners/ubuntu/business.xml" |
3967 | + }, |
3968 | + { |
3969 | + "label": "Europe", |
3970 | + "id": "http://127.0.0.1:9999/euronews/_partners/ubuntu/europe.xml" |
3971 | + }, |
3972 | + { |
3973 | + "label": "Culture", |
3974 | + "id": "http://127.0.0.1:9999/euronews/_partners/ubuntu/culture.xml" |
3975 | + }, |
3976 | + { |
3977 | + "label": "Sci-tech", |
3978 | + "id": "http://127.0.0.1:9999/euronews/_partners/ubuntu/scitech.xml" |
3979 | + }, |
3980 | + { |
3981 | + "label": "No comment", |
3982 | + "id": "http://127.0.0.1:9999/euronews/_partners/ubuntu/nocomment.xml" |
3983 | + } |
3984 | +] |
3985 | |
3986 | === added file 'tests/unit/euronews/icon.svg' |
3987 | --- tests/unit/euronews/icon.svg 1970-01-01 00:00:00 +0000 |
3988 | +++ tests/unit/euronews/icon.svg 2015-05-20 13:57:15 +0000 |
3989 | @@ -0,0 +1,92 @@ |
3990 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
3991 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
3992 | +<svg |
3993 | + xmlns:svg="http://www.w3.org/2000/svg" |
3994 | + xmlns="http://www.w3.org/2000/svg" |
3995 | + version="1.0" |
3996 | + width="544.00006" |
3997 | + height="544" |
3998 | + id="svg2"> |
3999 | + <defs |
4000 | + id="defs4" /> |
4001 | + <g |
4002 | + transform="translate(-6.4712476,3.0971002)" |
4003 | + id="layer1"> |
4004 | + <g |
4005 | + transform="matrix(0.8880597,0,0,0.8880597,0.7243933,-0.3466903)" |
4006 | + id="g3208"> |
4007 | + <g |
4008 | + transform="matrix(34.669279,0,0,-34.669276,312.75001,137.48351)" |
4009 | + id="g17052"> |
4010 | + <path |
4011 | + d="M 0,0 C -1.891,0 -3.424,-1.533 -3.424,-3.425 C -3.424,-5.316 -1.891,-6.849 0,-6.849 C 1.891,-6.849 3.424,-5.316 3.424,-3.425 C 3.424,-1.533 1.891,0 0,0" |
4012 | + id="path17054" |
4013 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4014 | + </g> |
4015 | + <g |
4016 | + transform="matrix(34.669279,0,0,-34.669276,207.7853,422.93993)" |
4017 | + id="g17056"> |
4018 | + <path |
4019 | + d="M 0,0 L -0.005,0 L -0.005,-0.757 C -0.005,-0.85 -0.038,-0.935 -0.098,-0.996 C -0.155,-1.056 -0.232,-1.089 -0.314,-1.089 C -0.396,-1.089 -0.473,-1.056 -0.53,-0.996 C -0.59,-0.935 -0.622,-0.85 -0.622,-0.757 L -0.622,0 L -0.869,0 L -0.869,-0.757 C -0.869,-0.922 -0.815,-1.065 -0.711,-1.169 C -0.61,-1.27 -0.469,-1.325 -0.314,-1.325 C -0.159,-1.325 -0.018,-1.27 0.083,-1.169 C 0.187,-1.065 0.242,-0.922 0.242,-0.757 L 0.242,0 L 0.237,0" |
4020 | + id="path17058" |
4021 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4022 | + </g> |
4023 | + <g |
4024 | + transform="matrix(34.669279,0,0,-34.669276,280.39317,456.46858)" |
4025 | + id="g17060"> |
4026 | + <path |
4027 | + d="M 0,0 C -0.075,-0.079 -0.181,-0.122 -0.298,-0.122 C -0.416,-0.122 -0.522,-0.079 -0.597,0 C -0.673,0.079 -0.714,0.192 -0.714,0.317 C -0.714,0.442 -0.673,0.556 -0.597,0.635 C -0.522,0.714 -0.416,0.757 -0.298,0.757 C -0.181,0.757 -0.075,0.714 0,0.635 C 0.076,0.556 0.117,0.442 0.117,0.317 C 0.117,0.192 0.076,0.079 0,0 M 0.173,0.806 C 0.048,0.927 -0.121,0.994 -0.298,0.994 C -0.477,0.994 -0.645,0.927 -0.77,0.806 C -0.901,0.68 -0.972,0.507 -0.972,0.317 C -0.972,0.128 -0.901,-0.045 -0.77,-0.171 C -0.645,-0.292 -0.477,-0.358 -0.298,-0.358 C -0.121,-0.358 0.048,-0.292 0.173,-0.171 C 0.304,-0.045 0.375,0.128 0.375,0.317 C 0.375,0.507 0.304,0.68 0.173,0.806" |
4028 | + id="path17062" |
4029 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4030 | + </g> |
4031 | + <g |
4032 | + transform="matrix(34.669279,0,0,-34.669276,319.16729,422.00733)" |
4033 | + id="g17064"> |
4034 | + <path |
4035 | + d="M 0,0 C -0.155,0 -0.296,-0.055 -0.397,-0.157 C -0.5,-0.261 -0.556,-0.404 -0.556,-0.569 L -0.556,-1.326 L -0.309,-1.326 L -0.309,-0.569 C -0.309,-0.476 -0.276,-0.391 -0.217,-0.329 C -0.159,-0.269 -0.082,-0.237 0,-0.237 C 0.082,-0.237 0.159,-0.269 0.216,-0.329 C 0.276,-0.391 0.309,-0.476 0.309,-0.569 L 0.309,-1.326 L 0.556,-1.326 L 0.556,-0.569 C 0.556,-0.404 0.501,-0.261 0.397,-0.157 C 0.296,-0.055 0.155,0 0,0" |
4036 | + id="path17066" |
4037 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4038 | + </g> |
4039 | + <g |
4040 | + transform="matrix(34.669279,0,0,-34.669276,447.51643,422.93993)" |
4041 | + id="g17068"> |
4042 | + <path |
4043 | + d="M 0,0 L -0.005,0 L -0.005,-0.827 C -0.005,-0.986 -0.094,-1.089 -0.231,-1.089 C -0.395,-1.089 -0.478,-0.988 -0.478,-0.789 L -0.478,0 L -0.725,0 L -0.725,-0.789 C -0.725,-0.988 -0.808,-1.089 -0.972,-1.089 C -1.109,-1.089 -1.197,-0.986 -1.197,-0.827 L -1.197,0 L -1.444,0 L -1.444,-0.88 C -1.444,-1.13 -1.239,-1.325 -0.977,-1.325 C -0.819,-1.325 -0.683,-1.26 -0.601,-1.147 C -0.519,-1.26 -0.383,-1.325 -0.225,-1.325 C 0.036,-1.325 0.242,-1.13 0.242,-0.88 L 0.242,0 L 0.237,0" |
4044 | + id="path17070" |
4045 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4046 | + </g> |
4047 | + <g |
4048 | + transform="matrix(34.669279,0,0,-34.669276,482.0401,440.7114)" |
4049 | + id="g17072"> |
4050 | + <path |
4051 | + d="M 0,0 C -0.158,0.044 -0.294,0.082 -0.294,0.169 C -0.289,0.242 -0.265,0.277 -0.146,0.277 L 0.455,0.277 L 0.455,0.513 L -0.106,0.513 C -0.393,0.513 -0.552,0.387 -0.552,0.158 C -0.552,0.042 -0.497,-0.049 -0.384,-0.119 C -0.287,-0.179 -0.159,-0.216 -0.046,-0.249 C 0.119,-0.296 0.262,-0.337 0.262,-0.432 C 0.262,-0.514 0.216,-0.55 0.114,-0.55 L -0.552,-0.55 L -0.552,-0.787 L 0.114,-0.787 C 0.232,-0.787 0.332,-0.756 0.403,-0.697 C 0.479,-0.634 0.52,-0.538 0.52,-0.422 C 0.52,-0.145 0.232,-0.065 0,0" |
4052 | + id="path17074" |
4053 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4054 | + </g> |
4055 | + <g |
4056 | + transform="matrix(34.669279,0,0,-34.669276,223.62569,440.00761)" |
4057 | + id="g17076"> |
4058 | + <path |
4059 | + d="M 0,0 L 0,-0.796 L 0.23,-0.796 L 0.23,0 C 0.23,0.147 0.275,0.315 0.627,0.315 L 0.633,0.315 L 0.633,0.545 L 0.627,0.545 C 0.082,0.545 0,0.203 0,0" |
4060 | + id="path17078" |
4061 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4062 | + </g> |
4063 | + <g |
4064 | + transform="matrix(34.669279,0,0,-34.669276,162.68056,452.232)" |
4065 | + id="g17080"> |
4066 | + <path |
4067 | + d="M 0,0 L -0.005,0.002 L -0.007,-0.003 C -0.043,-0.07 -0.096,-0.129 -0.163,-0.171 C -0.371,-0.303 -0.648,-0.24 -0.779,-0.032 C -0.843,0.068 -0.864,0.188 -0.837,0.304 C -0.811,0.421 -0.741,0.52 -0.641,0.584 C -0.492,0.677 -0.303,0.675 -0.157,0.579 L -0.551,0.255 L -0.556,0.252 L -0.552,0.248 L -0.417,0.08 L -0.414,0.075 L -0.41,0.079 L 0.169,0.554 L 0.172,0.557 L 0.17,0.561 L 0.166,0.566 C 0.07,0.717 -0.079,0.822 -0.255,0.861 C -0.43,0.901 -0.61,0.87 -0.761,0.774 C -0.912,0.679 -1.018,0.53 -1.057,0.355 C -1.097,0.179 -1.066,-0.001 -0.97,-0.153 C -0.772,-0.466 -0.356,-0.56 -0.043,-0.362 C 0.056,-0.299 0.137,-0.212 0.192,-0.108 L 0.195,-0.103 L 0.19,-0.1" |
4068 | + id="path17082" |
4069 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4070 | + </g> |
4071 | + <g |
4072 | + transform="matrix(34.669279,0,0,-34.669276,381.92215,452.232)" |
4073 | + id="g17084"> |
4074 | + <path |
4075 | + d="M 0,0 L -0.005,0.002 L -0.008,-0.003 C -0.043,-0.07 -0.097,-0.129 -0.163,-0.171 C -0.371,-0.303 -0.648,-0.24 -0.78,-0.032 C -0.843,0.068 -0.864,0.188 -0.838,0.305 C -0.811,0.421 -0.741,0.52 -0.641,0.584 C -0.493,0.677 -0.304,0.675 -0.157,0.579 L -0.552,0.255 L -0.556,0.252 L -0.552,0.248 L -0.417,0.08 L -0.414,0.075 L -0.409,0.079 L 0.168,0.554 L 0.173,0.557 L 0.169,0.561 L 0.166,0.566 L 0.166,0.566 C -0.032,0.879 -0.448,0.972 -0.761,0.774 C -0.913,0.679 -1.018,0.53 -1.057,0.355 C -1.097,0.179 -1.066,-0.001 -0.971,-0.153 C -0.772,-0.466 -0.356,-0.56 -0.043,-0.362 C 0.056,-0.299 0.137,-0.212 0.192,-0.108 L 0.195,-0.103 L 0.19,-0.1" |
4076 | + id="path17086" |
4077 | + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" /> |
4078 | + </g> |
4079 | + </g> |
4080 | + </g> |
4081 | +</svg> |
4082 | |
4083 | === added directory 'tests/unit/euronews/images' |
4084 | === added file 'tests/unit/euronews/images/default.png' |
4085 | Binary files tests/unit/euronews/images/default.png 1970-01-01 00:00:00 +0000 and tests/unit/euronews/images/default.png 2015-05-20 13:57:15 +0000 differ |
4086 | === added file 'tests/unit/euronews/images/default.svg' |
4087 | --- tests/unit/euronews/images/default.svg 1970-01-01 00:00:00 +0000 |
4088 | +++ tests/unit/euronews/images/default.svg 2015-05-20 13:57:15 +0000 |
4089 | @@ -0,0 +1,322 @@ |
4090 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4091 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4092 | + |
4093 | +<svg |
4094 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4095 | + xmlns:cc="http://creativecommons.org/ns#" |
4096 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4097 | + xmlns:svg="http://www.w3.org/2000/svg" |
4098 | + xmlns="http://www.w3.org/2000/svg" |
4099 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4100 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4101 | + width="720" |
4102 | + height="330" |
4103 | + id="svg2" |
4104 | + sodipodi:version="0.32" |
4105 | + inkscape:version="0.48.4 r9939" |
4106 | + version="1.0" |
4107 | + sodipodi:docname="default.svg.old" |
4108 | + inkscape:output_extension="org.inkscape.output.svg.inkscape"> |
4109 | + <defs |
4110 | + id="defs4" /> |
4111 | + <sodipodi:namedview |
4112 | + id="base" |
4113 | + pagecolor="#ffffff" |
4114 | + bordercolor="#666666" |
4115 | + borderopacity="1.0" |
4116 | + gridtolerance="10000" |
4117 | + guidetolerance="10" |
4118 | + objecttolerance="10" |
4119 | + inkscape:pageopacity="0.0" |
4120 | + inkscape:pageshadow="2" |
4121 | + inkscape:zoom="0.88003809" |
4122 | + inkscape:cx="490.40724" |
4123 | + inkscape:cy="124.4655" |
4124 | + inkscape:document-units="px" |
4125 | + inkscape:current-layer="layer1" |
4126 | + height="24px" |
4127 | + width="24px" |
4128 | + showgrid="true" |
4129 | + inkscape:window-width="1366" |
4130 | + inkscape:window-height="744" |
4131 | + inkscape:window-x="0" |
4132 | + inkscape:window-y="24" |
4133 | + inkscape:snap-nodes="true" |
4134 | + inkscape:window-maximized="1" |
4135 | + fit-margin-top="0" |
4136 | + fit-margin-left="0" |
4137 | + fit-margin-right="0" |
4138 | + fit-margin-bottom="0" /> |
4139 | + <metadata |
4140 | + id="metadata7"> |
4141 | + <rdf:RDF> |
4142 | + <cc:Work |
4143 | + rdf:about=""> |
4144 | + <dc:format>image/svg+xml</dc:format> |
4145 | + <dc:type |
4146 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4147 | + <dc:title></dc:title> |
4148 | + </cc:Work> |
4149 | + </rdf:RDF> |
4150 | + </metadata> |
4151 | + <g |
4152 | + inkscape:label="Layer 1" |
4153 | + inkscape:groupmode="layer" |
4154 | + id="layer1" |
4155 | + transform="translate(-5.7571953,-706.0344)"> |
4156 | + <g |
4157 | + id="g15405" |
4158 | + clip-path="url(#id335)" |
4159 | + transform="matrix(1,0,0,-1,-328.30292,933.75171)"> |
4160 | + <g |
4161 | + id="g15407" |
4162 | + transform="matrix(0.0384521,0,0,-0.0384521,58.949158,55.939194)"> |
4163 | + <path |
4164 | + id="path15409" |
4165 | + d="m 0,0 -11.3,0 0,-11.5 -5,0 0,28.801 5,0 0,-12.301 0.5,-0.699 10.1,0 0.7,0.5 0,12.5 5,0 0,-28.801 -5,0 L 0,0 z" |
4166 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4167 | + inkscape:connector-curvature="0" /> |
4168 | + </g> |
4169 | + <g |
4170 | + id="g15411" |
4171 | + transform="matrix(0.0384521,0,0,-0.0384521,60.075806,56.381393)"> |
4172 | + <path |
4173 | + id="path15413" |
4174 | + d="m 0,0 -10.6,28.801 5.1,0 2.4,-6.5 11.5,0 2.4,6.5 L 16.1,28.5 5.5,0 0,0 z M -1,17.7 C -0.1,14 1.1,9.801 2.6,6 4.3,9.5 5.2,13.7 6.5,17.5 L -1,17.7" |
4175 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4176 | + inkscape:connector-curvature="0" /> |
4177 | + </g> |
4178 | + <g |
4179 | + id="g15415" |
4180 | + transform="matrix(0.0384521,0,0,-0.0384521,61.883057,55.550842)"> |
4181 | + <path |
4182 | + id="path15417" |
4183 | + d="m 0,0 c -4.3,-6.7 -6.8,-14.6 -10.8,-21.6 l -6,0 0,28.801 4.6,0 0.2,-21.601 c 3.8,6.9 7.3,14.3 10.6,21.601 l 6.201,0 0,-28.801 -4.5,0 L 0,0" |
4184 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4185 | + inkscape:connector-curvature="0" /> |
4186 | + </g> |
4187 | + <g |
4188 | + id="g15419" |
4189 | + transform="matrix(0.0384521,0,0,-0.0384521,63.478821,55.550842)"> |
4190 | + <path |
4191 | + id="path15421" |
4192 | + d="m 0,0 c -3.8,-7.1 -6.699,-14.5 -10.5,-21.6 l -6.3,0 0,28.801 4.8,0 0.301,-21.601 c 3.599,6.9 7.099,14.3 10.5,21.601 l 6.299,0 0,-28.801 -4.799,0.2 L 0,0" |
4193 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4194 | + inkscape:connector-curvature="0" /> |
4195 | + </g> |
4196 | + <g |
4197 | + id="g15423" |
4198 | + transform="matrix(0.0384521,0,0,-0.0384521,65.139938,56.223755)"> |
4199 | + <path |
4200 | + id="path15425" |
4201 | + d="m 0,0 -0.2,-4.1 -17.8,0 0,28.801 18,0 0,-4.301 -12.899,-0.3 0.199,-7.7 11.301,0 0,-3.8 -11.5,-0.5 L -12.7,0.201 0,0 z" |
4202 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4203 | + inkscape:connector-curvature="0" /> |
4204 | + </g> |
4205 | + <g |
4206 | + id="g15427" |
4207 | + transform="matrix(0.0384521,0,0,-0.0384521,66.06279,56.381393)"> |
4208 | + <path |
4209 | + id="path15429" |
4210 | + d="m 0,0 -4.8,0 0,28.801 16.3,0 0,-4.301 -11,0 L 0,0 z" |
4211 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4212 | + inkscape:connector-curvature="0" /> |
4213 | + </g> |
4214 | + </g> |
4215 | + <g |
4216 | + id="g35751" |
4217 | + clip-path="url(#id554)" |
4218 | + transform="matrix(1,0,0,-1,-328.30292,933.75171)"> |
4219 | + <g |
4220 | + id="g35753" |
4221 | + transform="matrix(0.0384521,0,0,-0.0384521,58.949158,55.939194)"> |
4222 | + <path |
4223 | + id="path35755" |
4224 | + d="m 0,0 -11.3,0 0,-11.5 -5,0 0,28.801 5,0 0,-12.301 0.5,-0.699 10.1,0 0.7,0.5 0,12.5 5,0 0,-28.801 -5,0 L 0,0 z" |
4225 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4226 | + inkscape:connector-curvature="0" /> |
4227 | + </g> |
4228 | + <g |
4229 | + id="g35757" |
4230 | + transform="matrix(0.0384521,0,0,-0.0384521,60.075806,56.381393)"> |
4231 | + <path |
4232 | + id="path35759" |
4233 | + d="m 0,0 -10.6,28.801 5.1,0 2.4,-6.5 11.5,0 2.4,6.5 L 16.1,28.5 5.5,0 0,0 z M -1,17.7 C -0.1,14 1.1,9.801 2.6,6 4.3,9.5 5.2,13.7 6.5,17.5 L -1,17.7" |
4234 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4235 | + inkscape:connector-curvature="0" /> |
4236 | + </g> |
4237 | + <g |
4238 | + id="g35761" |
4239 | + transform="matrix(0.0384521,0,0,-0.0384521,61.883057,55.550842)"> |
4240 | + <path |
4241 | + id="path35763" |
4242 | + d="m 0,0 c -4.3,-6.7 -6.8,-14.6 -10.8,-21.6 l -6,0 0,28.801 4.6,0 0.2,-21.601 c 3.8,6.9 7.3,14.3 10.6,21.601 l 6.201,0 0,-28.801 -4.5,0 L 0,0" |
4243 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4244 | + inkscape:connector-curvature="0" /> |
4245 | + </g> |
4246 | + <g |
4247 | + id="g35765" |
4248 | + transform="matrix(0.0384521,0,0,-0.0384521,63.478821,55.550842)"> |
4249 | + <path |
4250 | + id="path35767" |
4251 | + d="m 0,0 c -3.8,-7.1 -6.699,-14.5 -10.5,-21.6 l -6.3,0 0,28.801 4.8,0 0.301,-21.601 c 3.599,6.9 7.099,14.3 10.5,21.601 l 6.299,0 0,-28.801 -4.799,0.2 L 0,0" |
4252 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4253 | + inkscape:connector-curvature="0" /> |
4254 | + </g> |
4255 | + <g |
4256 | + id="g35769" |
4257 | + transform="matrix(0.0384521,0,0,-0.0384521,65.139938,56.223755)"> |
4258 | + <path |
4259 | + id="path35771" |
4260 | + d="m 0,0 -0.2,-4.1 -17.8,0 0,28.801 18,0 0,-4.301 -12.899,-0.3 0.199,-7.7 11.301,0 0,-3.8 -11.5,-0.5 L -12.7,0.201 0,0 z" |
4261 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4262 | + inkscape:connector-curvature="0" /> |
4263 | + </g> |
4264 | + <g |
4265 | + id="g35773" |
4266 | + transform="matrix(0.0384521,0,0,-0.0384521,66.06279,56.381393)"> |
4267 | + <path |
4268 | + id="path35775" |
4269 | + d="m 0,0 -4.8,0 0,28.801 16.3,0 0,-4.301 -11,0 L 0,0 z" |
4270 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4271 | + inkscape:connector-curvature="0" /> |
4272 | + </g> |
4273 | + </g> |
4274 | + <path |
4275 | + id="path52181" |
4276 | + d="m 5.7571953,706.0344 720.0000047,0 0,330 -720.0000047,0 0,-330 z" |
4277 | + style="fill:#b6b5b5;fill-rule:nonzero;stroke:none" |
4278 | + inkscape:connector-curvature="0" /> |
4279 | + <g |
4280 | + transform="matrix(2.1166696,0,0,2.2148216,250.77235,1223.5571)" |
4281 | + id="g52187"> |
4282 | + <path |
4283 | + inkscape:connector-curvature="0" |
4284 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4285 | + d="m 0,-170.06272 -0.101,0 0,0.1 0,13.828 c 0,1.705 -0.601,3.267 -1.695,4.404 -1.058,1.1 -2.476,1.707 -3.985,1.707 -1.509,0 -2.922,-0.607 -3.979,-1.707 -1.092,-1.135 -1.691,-2.699 -1.691,-4.404 l 0,-13.828 0,-0.1 -0.1,0 -4.345,0 -0.102,0 0,0.1 0,13.828 c 0,3.039 1.011,5.662 2.925,7.582 1.85,1.859 4.441,2.883 7.292,2.883 2.856,0 5.45,-1.024 7.305,-2.883 1.911,-1.92 2.923,-4.541 2.923,-7.582 l 0,-13.828 0,-0.1 -0.098,0 -4.349,0 z" |
4286 | + id="path52189" /> |
4287 | + </g> |
4288 | + <g |
4289 | + transform="matrix(2.1166696,0,0,2.2148216,332.31519,1262.9618)" |
4290 | + id="g52191"> |
4291 | + <path |
4292 | + inkscape:connector-curvature="0" |
4293 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4294 | + d="m 0,-170.06272 c -1.383,1.449 -3.334,2.248 -5.489,2.248 -2.156,0 -4.106,-0.799 -5.489,-2.248 -1.392,-1.463 -2.159,-3.533 -2.159,-5.832 0,-2.307 0.767,-4.385 2.159,-5.848 1.382,-1.453 3.331,-2.252 5.489,-2.252 2.155,0 4.106,0.799 5.489,2.252 1.396,1.465 2.162,3.541 2.162,5.848 0,2.299 -0.766,4.369 -2.162,5.832 m 3.186,-14.822 c -2.312,-2.23501 -5.395,-3.46301 -8.675,-3.46301 -3.285,0 -6.368,1.228 -8.682,3.46301 -2.394,2.312 -3.712,5.506 -3.712,8.99 0,3.481 1.318,6.668 3.712,8.979 2.313,2.228 5.397,3.455 8.682,3.455 3.28,0 6.363,-1.227 8.675,-3.455 2.401,-2.311 3.719,-5.498 3.719,-8.979 0,-3.482 -1.318,-6.676 -3.719,-8.99" |
4295 | + id="path52193" /> |
4296 | + </g> |
4297 | + <g |
4298 | + transform="matrix(2.1166696,0,0,2.2148216,375.87691,1222.4616)" |
4299 | + id="g52195"> |
4300 | + <path |
4301 | + inkscape:connector-curvature="0" |
4302 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4303 | + d="m 0,-170.06272 c -2.854,0 -5.448,1.023 -7.299,2.883 -1.914,1.92 -2.924,4.545 -2.924,7.592 l 0,13.828 0,0.099 0.1,0 4.343,0 0.1,0 0,-0.099 0,-13.828 c 0,-1.709 0.603,-3.278 1.696,-4.413 1.061,-1.103 2.476,-1.709 3.984,-1.709 1.508,0 2.925,0.606 3.982,1.709 1.094,1.135 1.693,2.704 1.693,4.413 l 0,13.828 0,0.099 0.1,0 4.355,0 0.101,0 0,-0.099 0,-13.828 c 0,-3.043 -1.012,-5.668 -2.926,-7.592 -1.857,-1.862 -4.45,-2.883 -7.305,-2.883" |
4304 | + id="path52197" /> |
4305 | + </g> |
4306 | + <g |
4307 | + transform="matrix(2.1166696,0,0,2.2148216,520.04351,1223.5571)" |
4308 | + id="g52199"> |
4309 | + <path |
4310 | + inkscape:connector-curvature="0" |
4311 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4312 | + d="m 0,-170.06272 -0.102,0 0,0.1 0,15.115 c 0,2.93 -1.627,4.824 -4.146,4.824 -3.014,0 -4.543,-1.857 -4.543,-5.519 l 0,-14.42 0,-0.1 -0.102,0 -4.339,0 -0.1,0 0,0.1 0,14.42 c 0,3.662 -1.529,5.519 -4.547,5.519 -2.517,0 -4.146,-1.894 -4.146,-4.824 l 0,-15.115 0,-0.1 -0.098,0 -4.35,0 -0.097,0 0,0.1 0,16.09 c 0,4.599 3.777,8.203 8.599,8.203 2.889,0 5.398,-1.202 6.916,-3.293 1.502,2.091 4.008,3.293 6.909,3.293 4.816,0 8.587,-3.604 8.587,-8.203 l 0,-16.09 0,-0.1 -0.096,0 -4.345,0 z" |
4313 | + id="path52201" /> |
4314 | + </g> |
4315 | + <g |
4316 | + transform="matrix(2.1166696,0,0,2.2148216,558.82208,1244.4554)" |
4317 | + id="g52203"> |
4318 | + <path |
4319 | + inkscape:connector-curvature="0" |
4320 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4321 | + d="m 0,-170.06272 c -2.902,-0.809 -5.408,-1.51 -5.408,-3.108 0.095,-1.344 0.525,-1.984 2.713,-1.984 l 10.966,0 0.098,0 0,-0.1 0,-4.144 0,-0.1 -0.098,0 -10.222,0 c -5.289,0 -8.201,2.315 -8.201,6.52 0,2.15 1.007,3.82 3.08,5.105 1.793,1.111 4.144,1.785 6.224,2.383 3.036,0.871 5.661,1.625 5.661,3.383 0,1.496 -0.838,2.164 -2.713,2.164 l -12.153,0 -0.099,0 0,0.099 0,4.155 0,0.099 0.099,0 12.153,0 c 2.175,0 4.013,-0.57 5.31,-1.65 1.403,-1.166 2.141,-2.916 2.141,-5.065 0,-5.091 -5.295,-6.57 -9.551,-7.757" |
4322 | + id="path52205" /> |
4323 | + </g> |
4324 | + <g |
4325 | + transform="matrix(2.1166696,0,0,2.2148216,268.56736,1243.6203)" |
4326 | + id="g52207"> |
4327 | + <path |
4328 | + inkscape:connector-curvature="0" |
4329 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4330 | + d="m 0,-170.06272 0,14.541 0,0.099 0.101,0 4.028,0 0.099,0 0,-0.099 0,-14.541 c 0,-2.702 0.832,-5.803 7.307,-5.803 l 0.1,0 0,-0.1 0,-4.021 0,-0.1 -0.1,0 c -10.037,0 -11.535,6.28 -11.535,10.024" |
4331 | + id="path52209" /> |
4332 | + </g> |
4333 | + <g |
4334 | + transform="matrix(2.1166696,0,0,2.2148216,200.10636,1257.9899)" |
4335 | + id="g52211"> |
4336 | + <path |
4337 | + inkscape:connector-curvature="0" |
4338 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4339 | + d="m 0,-170.06272 -0.089,-0.047 -0.045,0.09 c -0.65,1.246 -1.641,2.32 -2.866,3.105 -3.835,2.416 -8.919,1.268 -11.336,-2.558 -1.174,-1.85 -1.553,-4.049 -1.07,-6.194 0.484,-2.142 1.767,-3.968 3.619,-5.136 2.725,-1.721 6.201,-1.678 8.898,0.092 l -7.255,5.951 -0.077,0.062 0.062,0.076 2.484,3.09 0.064,0.078 0.078,-0.064 10.634,-8.736 0.074,-0.063 -0.059,-0.078 -0.068,-0.088 c -1.755,-2.775 -4.502,-4.70901 -7.729,-5.43401 -3.224,-0.726 -6.533,-0.154 -9.317,1.60801 -2.788,1.758 -4.723,4.5 -5.449,7.723 -0.732,3.228 -0.162,6.542 1.599,9.332 3.644,5.759 11.295,7.486 17.063,3.843 1.82,-1.148 3.315,-2.765 4.326,-4.674 l 0.047,-0.089 -0.089,-0.047 -3.499,-1.842 z" |
4340 | + id="path52213" /> |
4341 | + </g> |
4342 | + <g |
4343 | + transform="matrix(2.1166696,0,0,2.2148216,446.35715,1257.9899)" |
4344 | + id="g52215"> |
4345 | + <path |
4346 | + inkscape:connector-curvature="0" |
4347 | + style="fill:#ffffff;fill-rule:nonzero;stroke:none" |
4348 | + d="m 0,-170.06272 -0.088,-0.047 -0.045,0.09 c -0.652,1.246 -1.644,2.318 -2.869,3.105 -3.832,2.414 -8.919,1.268 -11.34,-2.558 -1.172,-1.852 -1.547,-4.051 -1.062,-6.196 0.482,-2.144 1.767,-3.966 3.614,-5.134 2.73,-1.721 6.204,-1.678 8.897,0.092 l -7.253,5.951 -0.077,0.062 0.065,0.076 2.485,3.09 0.064,0.078 0.077,-0.064 10.634,-8.736 0.076,-0.063 -0.061,-0.08 -0.07,-0.088 0.006,0.01 c -3.645,-5.75601 -11.294,-7.47701 -17.047,-3.834 -2.791,1.756 -4.731,4.498 -5.457,7.719 -0.731,3.23 -0.164,6.543 1.597,9.336 3.651,5.757 11.304,7.482 17.065,3.843 1.824,-1.148 3.322,-2.765 4.33,-4.674 l 0.045,-0.089 -0.09,-0.047 -3.496,-1.842 z" |
4349 | + id="path52217" /> |
4350 | + </g> |
4351 | + <g |
4352 | + id="g56347" |
4353 | + clip-path="url(#id786)" |
4354 | + transform="matrix(1,0,0,-1,-328.30292,933.75171)"> |
4355 | + <g |
4356 | + id="g56349" |
4357 | + transform="matrix(0.0384521,0,0,-0.0384521,58.949158,55.939194)"> |
4358 | + <path |
4359 | + id="path56351" |
4360 | + d="m 0,0 -11.3,0 0,-11.5 -5,0 0,28.801 5,0 0,-12.301 0.5,-0.699 10.1,0 0.7,0.5 0,12.5 5,0 0,-28.801 -5,0 L 0,0 z" |
4361 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4362 | + inkscape:connector-curvature="0" /> |
4363 | + </g> |
4364 | + <g |
4365 | + id="g56353" |
4366 | + transform="matrix(0.0384521,0,0,-0.0384521,60.075806,56.381393)"> |
4367 | + <path |
4368 | + id="path56355" |
4369 | + d="m 0,0 -10.6,28.801 5.1,0 2.4,-6.5 11.5,0 2.4,6.5 L 16.1,28.5 5.5,0 0,0 z M -1,17.7 C -0.1,14 1.1,9.801 2.6,6 4.3,9.5 5.2,13.7 6.5,17.5 L -1,17.7" |
4370 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4371 | + inkscape:connector-curvature="0" /> |
4372 | + </g> |
4373 | + <g |
4374 | + id="g56357" |
4375 | + transform="matrix(0.0384521,0,0,-0.0384521,61.883057,55.550842)"> |
4376 | + <path |
4377 | + id="path56359" |
4378 | + d="m 0,0 c -4.3,-6.7 -6.8,-14.6 -10.8,-21.6 l -6,0 0,28.801 4.6,0 0.2,-21.601 c 3.8,6.9 7.3,14.3 10.6,21.601 l 6.201,0 0,-28.801 -4.5,0 L 0,0" |
4379 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4380 | + inkscape:connector-curvature="0" /> |
4381 | + </g> |
4382 | + <g |
4383 | + id="g56361" |
4384 | + transform="matrix(0.0384521,0,0,-0.0384521,63.478821,55.550842)"> |
4385 | + <path |
4386 | + id="path56363" |
4387 | + d="m 0,0 c -3.8,-7.1 -6.699,-14.5 -10.5,-21.6 l -6.3,0 0,28.801 4.8,0 0.301,-21.601 c 3.599,6.9 7.099,14.3 10.5,21.601 l 6.299,0 0,-28.801 -4.799,0.2 L 0,0" |
4388 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4389 | + inkscape:connector-curvature="0" /> |
4390 | + </g> |
4391 | + <g |
4392 | + id="g56365" |
4393 | + transform="matrix(0.0384521,0,0,-0.0384521,65.139938,56.223755)"> |
4394 | + <path |
4395 | + id="path56367" |
4396 | + d="m 0,0 -0.2,-4.1 -17.8,0 0,28.801 18,0 0,-4.301 -12.899,-0.3 0.199,-7.7 11.301,0 0,-3.8 -11.5,-0.5 L -12.7,0.201 0,0 z" |
4397 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4398 | + inkscape:connector-curvature="0" /> |
4399 | + </g> |
4400 | + <g |
4401 | + id="g56369" |
4402 | + transform="matrix(0.0384521,0,0,-0.0384521,66.06279,56.381393)"> |
4403 | + <path |
4404 | + id="path56371" |
4405 | + d="m 0,0 -4.8,0 0,28.801 16.3,0 0,-4.301 -11,0 L 0,0 z" |
4406 | + style="fill:#1c4e9d;fill-rule:nonzero;stroke:none" |
4407 | + inkscape:connector-curvature="0" /> |
4408 | + </g> |
4409 | + </g> |
4410 | + </g> |
4411 | +</svg> |
4412 | |
4413 | === added file 'tests/unit/euronews/images/euronews-art.png' |
4414 | Binary files tests/unit/euronews/images/euronews-art.png 1970-01-01 00:00:00 +0000 and tests/unit/euronews/images/euronews-art.png 2015-05-20 13:57:15 +0000 differ |
4415 | === added file 'tests/unit/euronews/images/logo.png' |
4416 | Binary files tests/unit/euronews/images/logo.png 1970-01-01 00:00:00 +0000 and tests/unit/euronews/images/logo.png 2015-05-20 13:57:15 +0000 differ |
4417 | === added file 'tests/unit/euronews/preview-card-euronews.png' |
4418 | Binary files tests/unit/euronews/preview-card-euronews.png 1970-01-01 00:00:00 +0000 and tests/unit/euronews/preview-card-euronews.png 2015-05-20 13:57:15 +0000 differ |
4419 | === added directory 'tests/unit/euronews/renderer' |
4420 | === added file 'tests/unit/euronews/renderer/carousel.json' |
4421 | --- tests/unit/euronews/renderer/carousel.json 1970-01-01 00:00:00 +0000 |
4422 | +++ tests/unit/euronews/renderer/carousel.json 2015-05-20 13:57:15 +0000 |
4423 | @@ -0,0 +1,12 @@ |
4424 | +{ |
4425 | + "schema-version": 1, |
4426 | + "template": { |
4427 | + "category-layout": "carousel", |
4428 | + "card-size": "medium", |
4429 | + "overlay": true |
4430 | + }, |
4431 | + "components": { |
4432 | + "title": "title", |
4433 | + "art": "image" |
4434 | + } |
4435 | +} |
4436 | |
4437 | === added file 'tests/unit/euronews/renderer/hgrid.json' |
4438 | --- tests/unit/euronews/renderer/hgrid.json 1970-01-01 00:00:00 +0000 |
4439 | +++ tests/unit/euronews/renderer/hgrid.json 2015-05-20 13:57:15 +0000 |
4440 | @@ -0,0 +1,15 @@ |
4441 | +{ |
4442 | + "schema-version": 1, |
4443 | + "template": { |
4444 | + "category-layout": "grid", |
4445 | + "card-layout": "horizontal", |
4446 | + "card-size": "medium", |
4447 | + "collapsed-rows": 0 |
4448 | + }, |
4449 | + "components": { |
4450 | + "mascot": "image", |
4451 | + "title": "title", |
4452 | + "subtitle": "subtitle", |
4453 | + "summary": "summary" |
4454 | + } |
4455 | +} |
4456 | |
4457 | === added file 'tests/unit/euronews/renderer/journal.json' |
4458 | --- tests/unit/euronews/renderer/journal.json 1970-01-01 00:00:00 +0000 |
4459 | +++ tests/unit/euronews/renderer/journal.json 2015-05-20 13:57:15 +0000 |
4460 | @@ -0,0 +1,15 @@ |
4461 | +{ |
4462 | + "schema-version": 1, |
4463 | + "template": { |
4464 | + "category-layout": "vertical-journal", |
4465 | + "card-layout": "horizontal", |
4466 | + "card-size": "medium", |
4467 | + "collapsed-rows": 0 |
4468 | + }, |
4469 | + "components": { |
4470 | + "art": "image", |
4471 | + "title": "title", |
4472 | + "subtitle": "subtitle", |
4473 | + "summary": "summary" |
4474 | + } |
4475 | +} |
4476 | |
4477 | === added file 'tests/unit/euronews/renderer/large.json' |
4478 | --- tests/unit/euronews/renderer/large.json 1970-01-01 00:00:00 +0000 |
4479 | +++ tests/unit/euronews/renderer/large.json 2015-05-20 13:57:15 +0000 |
4480 | @@ -0,0 +1,14 @@ |
4481 | +{ |
4482 | + "schema-version": 1, |
4483 | + "template": { |
4484 | + "category-layout": "grid", |
4485 | + "card-size": "large", |
4486 | + "overlay": true, |
4487 | + "collapsed-rows": 0 |
4488 | + }, |
4489 | + "components": { |
4490 | + "art": "image", |
4491 | + "title": "title", |
4492 | + "subtitle": "subtitle" |
4493 | + } |
4494 | +} |
4495 | |
4496 | === added file 'tests/unit/euronews/renderer/wide-art.json' |
4497 | --- tests/unit/euronews/renderer/wide-art.json 1970-01-01 00:00:00 +0000 |
4498 | +++ tests/unit/euronews/renderer/wide-art.json 2015-05-20 13:57:15 +0000 |
4499 | @@ -0,0 +1,13 @@ |
4500 | +{ |
4501 | + "schema-version": 1, |
4502 | + "template": { |
4503 | + "category-layout": "grid", |
4504 | + "card-size": "large", |
4505 | + "overlay": true, |
4506 | + "collapsed-rows": 0 |
4507 | + }, |
4508 | + "components": { |
4509 | + "title": "title", |
4510 | + "art": { "field": "image", "aspect-ratio": 2.5 } |
4511 | + } |
4512 | +} |
4513 | |
4514 | === added file 'tests/unit/euronews/rss-scope.ini.in' |
4515 | --- tests/unit/euronews/rss-scope.ini.in 1970-01-01 00:00:00 +0000 |
4516 | +++ tests/unit/euronews/rss-scope.ini.in 2015-05-20 13:57:15 +0000 |
4517 | @@ -0,0 +1,12 @@ |
4518 | +[ScopeConfig] |
4519 | +DisplayName = @SCOPE_TITLE@ |
4520 | +Description = This is an Ubuntu search plugin that enables information from @SCOPE_TITLE@ to be searched and displayed in the Dash. If you do not wish to search this content source, you can disable this search plugin. |
4521 | +Author = @SCOPE_AUTHOR@ |
4522 | +Art = ./images/@SCOPE_NAME@-art.png |
4523 | +Icon = @SCOPE_ICON@ |
4524 | +SearchHint = Search @SCOPE_TITLE@ |
4525 | +[Appearance] |
4526 | +Background=@SCOPE_COLOR@ |
4527 | +PageHeader.Logo=./images/@SCOPE_LOGO@ |
4528 | +PageHeader.Background=@BG_COLOR@ |
4529 | +PageHeader.ForegroundColor=@FG_COLOR@ |
4530 | |
4531 | === added directory 'tests/unit/scope' |
4532 | === added file 'tests/unit/scope/test-scope.cpp' |
4533 | --- tests/unit/scope/test-scope.cpp 1970-01-01 00:00:00 +0000 |
4534 | +++ tests/unit/scope/test-scope.cpp 2015-05-20 13:57:15 +0000 |
4535 | @@ -0,0 +1,630 @@ |
4536 | +/* |
4537 | + * Copyright 2015 Canonical Ltd. |
4538 | + * |
4539 | + * This program is free software; you can redistribute it and/or modify |
4540 | + * it under the terms of the GNU General Public License as published by |
4541 | + * the Free Software Foundation; version 3. |
4542 | + * |
4543 | + * This program is distributed in the hope that it will be useful, |
4544 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4545 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4546 | + * GNU General Public License for more details. |
4547 | + * |
4548 | + * You should have received a copy of the GNU General Public License |
4549 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
4550 | + * |
4551 | + * Authors: |
4552 | + * Scott Sweeny |
4553 | + */ |
4554 | + |
4555 | +#include <scope/scope.h> |
4556 | + |
4557 | +#include <core/posix/exec.h> |
4558 | +#include <gtest/gtest.h> |
4559 | +#include <gmock/gmock.h> |
4560 | +#include <string> |
4561 | +#include <unity/scopes/SearchReply.h> |
4562 | +#include <unity/scopes/SearchReplyProxyFwd.h> |
4563 | +#include <unity/scopes/Variant.h> |
4564 | +#include <unity/scopes/testing/Category.h> |
4565 | +#include <unity/scopes/testing/MockSearchReply.h> |
4566 | +#include <unity/scopes/testing/TypedScopeFixture.h> |
4567 | + |
4568 | +using namespace std; |
4569 | +using namespace testing; |
4570 | +using namespace scope; |
4571 | + |
4572 | +namespace posix = core::posix; |
4573 | +namespace sc = unity::scopes; |
4574 | +namespace sct = unity::scopes::testing; |
4575 | + |
4576 | +/** |
4577 | + * Keep the tests in an anonymous namespace |
4578 | + */ |
4579 | +namespace { |
4580 | + |
4581 | +/** |
4582 | + * Custom matcher to check the properties of search results |
4583 | + */ |
4584 | +MATCHER_P2(ResultProp, prop, value, "") { |
4585 | + if (arg.contains(prop)) { |
4586 | + *result_listener << "result[" << prop << "] is " << arg[prop].serialize_json(); |
4587 | + } else { |
4588 | + *result_listener << "result[" << prop << "] is not set"; |
4589 | + } |
4590 | + return arg.contains(prop) && arg[prop] == sc::Variant(value); |
4591 | +} |
4592 | + |
4593 | +MATCHER_P2(ResultPropU8, prop, value, "") { |
4594 | + return arg.contains(prop) && arg[prop] == value; |
4595 | +} |
4596 | + |
4597 | +/** |
4598 | + * Custom matcher to check the presence of departments |
4599 | + */ |
4600 | +MATCHER_P(IsDepartment, department, "") { |
4601 | + return arg->serialize() == department->serialize(); |
4602 | +} |
4603 | + |
4604 | +bool server_started = false; |
4605 | + |
4606 | +typedef sct::TypedScopeFixture<Scope> TypedScopeFixtureScope; |
4607 | + |
4608 | +class TestScope: public TypedScopeFixtureScope { |
4609 | +protected: |
4610 | + void SetUp() override |
4611 | + { |
4612 | + // TODO: Fix weirdness with server starting |
4613 | + //if (!server_started) { |
4614 | + cout << "STARTING SERVER" << endl; |
4615 | + // Start up Python-based fake server |
4616 | + fake_server_ = posix::exec("/usr/bin/python3", { FAKE_SERVER }, |
4617 | + // Need to set LANG so that the server |
4618 | + // won't choke on UTF-8 files |
4619 | + {{"LANG", "en_US.UTF-8"} }, |
4620 | + posix::StandardStream::stdout); |
4621 | + |
4622 | + // Check it's running |
4623 | + //ASSERT_GT(fake_server_.pid(), 0); |
4624 | + |
4625 | + // The server will print out the port it is using |
4626 | + string port; |
4627 | + fake_server_.cout() >> port; |
4628 | + // Check we have a port |
4629 | + //ASSERT_FALSE(port.empty()); |
4630 | + |
4631 | + server_started = true; |
4632 | + //} else { |
4633 | + cout << "SERVER ALREADY STARTED" << endl; |
4634 | + // } |
4635 | + } |
4636 | + |
4637 | + void SetUp(string scope) |
4638 | + { |
4639 | + // Do the normal SetUp |
4640 | + TestScope::SetUp(); |
4641 | + |
4642 | + // Then do the parent SetUp with the path for our scope data |
4643 | + string dir = string(TEST_SCOPE_DIRECTORY) + '/' + scope; |
4644 | + cout << "TEST DIR: " << dir << endl; |
4645 | + TypedScopeFixture::set_scope_directory(dir); |
4646 | + TypedScopeFixtureScope::SetUp(); |
4647 | + } |
4648 | + |
4649 | + /** |
4650 | + * Start by assuming the server is invalid |
4651 | + */ |
4652 | + posix::ChildProcess fake_server_ = posix::ChildProcess::invalid(); |
4653 | +}; |
4654 | + |
4655 | +class TestScopeVox : public TestScope { |
4656 | +protected: |
4657 | + void SetUp() override |
4658 | + { |
4659 | + TestScope::SetUp("vox"); |
4660 | + } |
4661 | +}; |
4662 | + |
4663 | +TEST_F(TestScopeVox, empty_search_string) { |
4664 | + const sc::CategoryRenderer renderer; |
4665 | + NiceMock<sct::MockSearchReply> reply; |
4666 | + |
4667 | + // Build a query with an empty search string |
4668 | + sc::CannedQuery query(SCOPE_NAME, "", ""); |
4669 | + |
4670 | + // Expect the News category |
4671 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4672 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4673 | + |
4674 | + cout << "TESTING RESULTS"; |
4675 | + // With two results |
4676 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4677 | + ResultProp("title", "The New England Patriots' deflated footballs scandal, explained"), |
4678 | + ResultProp("art", "https://cdn3.vox-cdn.com/thumbor/3YPNccEVQeXUgjjqUexFC-LFOM0=/0x0:4915x3277/400x267/cdn0.vox-cdn.com/uploads/chorus_image/image/45507798/459836192.0.0.jpg"), |
4679 | + ResultProp("published", "2015-01-22T16:20:00-05:00"), |
4680 | + ResultProp("author", "Joseph Stromberg"), |
4681 | + ResultProp("summary", "\n\n\n\n <p>An NFL investigation has found that 11 of the 12 footballs used by the New England Patriots during the AFC Championship were under-inflated, according to ESPN's Chris Mortensen.</p>\n<p>Why might the Patriots want under-inflated footballs? In theory, it would have made the balls easier for quarterback Tom Brady to hold and for the team's receivers to catch during the game's rainy conditions. Because teams always use their own sets of footballs when they're on offense, this wouldn't have helped their opponents, the Indianapolis Colts. For better or worse, this scandal seems to have been unofficially named Deflate-gate.</p>\n<p>On Thursday, both Patriots coach Bill Belichick and Brady denied any involvement, and the league hasn't made any official comment yet. But if the allegations are true, it could mean serious penalties for the Patriots — possibly including fines and lost draft picks. And given previous instances of cheating by the team, it could further tarnish their legacy, even if they win Super Bowl XLIX, giving Brady and Belichick a fourth ring together.</p>\n<p>Here's what we know so far about the situation.</p>\n<h3>What did the Patriots do?</h3>\n\n<p class=\"caption\">Patriots coach Bill Belichick, on the sideline of the AFC Championship. (Elsa/Getty Images)</p>\n<p>In their game on Sunday, January 18 against the Indianapolis Colts — a game in which the winner would advance to the Super Bowl — the Patriots allegedly let a bit of air out of the footballs they were using on offense.</p>\n<p>Initially, it was reported that after catching an interception in the second quarter, Colts linebacker D'Qwell Jackson noticed the ball was less inflated than usual. On the sidelines, he passed it over to an equipment manager, and it eventually made its way to the team's general manager, then the NFL's director of football operations.</p>\n<p>However, Fox Sports' Jay Glazer has since reported that the Patriots' previous opponent (the Baltimore Ravens) tipped the Colts off to the fact that their balls might be under-inflated before the game, and the NFL was already planning to inspect them.</p>\n<p>In any event, officials checked the balls at halftime, and reportedly found that 11 of the 12 balls the Patriots were using were indeed under-inflated — with about two pounds per square inch less pressure than the minimum 12.5 psi mandated by the league. But we still don't know the full results of the investigation.</p>\n<h3>Why would the Patriots want to under-inflate footballs?</h3>\n\n<p class=\"caption\">Patriots quarterback Tom Brady passes during the first quarter against the Colts. (Jared Wickerham/Getty Images)</p>\n<p>The basic idea is that softer, less fully-inflated footballs are easier to hold and catch.</p>\n<p>Given that the game was played in slick, rainy conditions — and that different footballs are used by each team (more on that below) — this could provide a slight advantage to the Patriots offense, especially for quarterback Tom Brady. <span>Teams use their own sets of balls whenever they're on offense, so it wouldn't have benefitted the Colts.</span></p>\n<p>It might not make a huge difference, but materials scientists and players confirm that letting a bit of air out could make the balls somewhat easier to hold, especially for the quarterback.</p>\n<h3>How could the Patriots have done this?</h3>\n\n<p class=\"caption\">Game balls rest in a sideline bag during a December game. (Brett Carlsen/Getty Images)</p>\n<p>Here's how the NFL's system for game balls works: for each game, each team prepares a set of 12 balls for it to use on offense. Team equipment staff are allowed to scuff up brand-new balls, removing the factory shine, and allowing them to be gripped more easily by their quarterbacks.</p>\n<p>Before the game, these balls are delivered to the officials, who test to see if they're inflated to somewhere between 12.5 and 13.5 pounds per square inch. If they're under-inflated, the officials add some air themselves.</p>\n<p>Then, the balls are kept in a zipped bag on the sidelines. During the game, ball boys occasionally hand fresh balls to the officials, who put them in play.</p>\n<p>It's unclear how or when Patriots staff might have let some of the air out of their set of balls. It'd be extremely risky to do so on the sideline, in full view of the whole stadium, but in theory, they should have been properly inflated just before the game. During press conferences on Thursday, both Belichick and Brady denied any involvement or knowledge of deflating the balls.</p>\n<p>An even bigger mystery is how the officials — who handle the balls before every single play — didn't notice they were under-inflated, when one touch by Jackson caught his attention.</p>\n\n<p class=\"caption\">Umpire Carl Paganelli handles a ball during the game. (Elsa/Getty Images)</p>\n<h3>Could under-inflating the balls have let the Patriots win?</h3>\n<p>Almost certainly not. The Patriots beat the Colts 45 to 7 — an especially dominant win, even for the Patriots.</p>\n<p>Further, they scored mostly by running the ball, an area where under-inflated balls wouldn't make much of a difference.</p>\n<p>People aren't upset because the Patriots may have won this game by under-inflating their balls. They're upset because the Patriots have been remarkably dominant for 15 years — but during that time, have consistently pushed the envelope in terms of rules, and on at least one other occasion, have been caught cheating.</p>\n<p>If the team habitually under-inflates its game balls, it could provide a very real advantage — something that may have, in some cases, been the difference between a loss and a win.</p>\n<h3>Is this the first time the Patriots have been accused of cheating?</h3>\n\n<p class=\"caption\">Bill Belichick. (John Tlumacki/The Boston Globe via Getty Images)</p>\n<p>Nope.</p>\n<p>In 2007, the team was caught illegally filming the New York Jets coaching staff. Having tape of the coaches' hand signals — and being able to match them up with the actual plays run on the field — could provide a big advantage, essentially allowing Belichick and the Patriots' staff to decode opponents' signaling systems. Belichick later admitted that he'd been taping opposing coaching staffs ever since becoming a head coach in 2000, and thought it was permitted by league rules.</p>\n<p>It wasn't, and in response, the NFL fined Belichick $500,000, fined the team $250,000, and stripped the team of its first round draft pick. Around the same time, allegations surfaced that Belichick had also filmed a St. Louis Rams practice right before beating them in Super Bowl XXXVI, but he denied it.</p>\n<p>There have also been all other sorts of unproven allegations of cheating by the Patriots. Most recently, two weeks ago, some Baltimore Ravens felt that the kicking balls they used in their playoff loss to the Patriots (a separate set of game balls used solely for kicking and punting) were under-inflated, which would have made it more difficult to kick long field goals. And during a regular season game this past November, Colts players were reportedly suspicious that the Patriots were using under-inflated balls.</p>\n<p>Even when he's playing within the rules, Belichick — smartly — likes to push the envelope in ways that aren't part of conventional football practice. In the same game against the Ravens, he used unusual formations on several plays, for instance, and Ravens coach John Harbaugh complained that his team didn't have enough time to match up, as mandated by league rules.</p>\n<p>For many fans, all this raises a question: what else have Belichick and the Patriots gotten away with?</p>\n<h3>Is there a name for this new scandal?</h3>\n<p>Alas. Yes. Most people seem to be calling it Deflate-gate, the latest in a string of hundreds of scandals with the \"gate\" suffix tacked on, in an allusion to Watergate.</p>\n<p>It'd be great if we could figure out a more creative way to name our scandals, though, and some people have come up with the more imaginative \"Ballghazi.\" It remains to be seen if it will catch on.</p>\n<h3>What's going to happen next?</h3>\n<p>The NFL has said it's hoping to wrap up the investigation quickly, within a few days. That means the official results will likely be public soon — and the story will become a huge one in the week leading up to Super Bowl XLIX.</p>\n<p>However, this scandal won't impact the Super Bowl directly. Instead, if the Patriots are found guilty, the team or Belichick might have to pay fines, and perhaps give up a draft pick in the upcoming draft, which is in April. The punishments will likely be meted out after the Super Bowl.</p>\n\n<p class=\"caption\">Bill Belichick holds the Lombardi Trophy after Super Bowl XXXVIII. (JEFF HAYNES/AFP/Getty Images)</p>\n<p>The biggest consequence of all this is that, if found guilty, Deflate-gate could tarnish the Patriots' long-term legacy.</p>\n<p>If they win the Super Bowl, it could cement Belichick and Brady's legacy as one of the best coach-quarterback pairings of all time — they'd become one of only two duos to ever win four Super Bowls. But having a second instance of confirmed cheating during that remarkable run might change perceptions of it in the future.</p>\n<hr>\n<h4>Watch: Can the NFL survive its concussion crisis?</h4>"), |
4682 | + ResultProp("content", "\n\n\n\n <p>An NFL investigation has found that 11 of the 12 footballs used by the New England Patriots during the AFC Championship were under-inflated, according to ESPN's Chris Mortensen.</p>\n<p>Why might the Patriots want under-inflated footballs? In theory, it would have made the balls easier for quarterback Tom Brady to hold and for the team's receivers to catch during the game's rainy conditions. Because teams always use their own sets of footballs when they're on offense, this wouldn't have helped their opponents, the Indianapolis Colts. For better or worse, this scandal seems to have been unofficially named Deflate-gate.</p>\n<p>On Thursday, both Patriots coach Bill Belichick and Brady denied any involvement, and the league hasn't made any official comment yet. But if the allegations are true, it could mean serious penalties for the Patriots — possibly including fines and lost draft picks. And given previous instances of cheating by the team, it could further tarnish their legacy, even if they win Super Bowl XLIX, giving Brady and Belichick a fourth ring together.</p>\n<p>Here's what we know so far about the situation.</p>\n<h3>What did the Patriots do?</h3>\n\n<p class=\"caption\">Patriots coach Bill Belichick, on the sideline of the AFC Championship. (Elsa/Getty Images)</p>\n<p>In their game on Sunday, January 18 against the Indianapolis Colts — a game in which the winner would advance to the Super Bowl — the Patriots allegedly let a bit of air out of the footballs they were using on offense.</p>\n<p>Initially, it was reported that after catching an interception in the second quarter, Colts linebacker D'Qwell Jackson noticed the ball was less inflated than usual. On the sidelines, he passed it over to an equipment manager, and it eventually made its way to the team's general manager, then the NFL's director of football operations.</p>\n<p>However, Fox Sports' Jay Glazer has since reported that the Patriots' previous opponent (the Baltimore Ravens) tipped the Colts off to the fact that their balls might be under-inflated before the game, and the NFL was already planning to inspect them.</p>\n<p>In any event, officials checked the balls at halftime, and reportedly found that 11 of the 12 balls the Patriots were using were indeed under-inflated — with about two pounds per square inch less pressure than the minimum 12.5 psi mandated by the league. But we still don't know the full results of the investigation.</p>\n<h3>Why would the Patriots want to under-inflate footballs?</h3>\n\n<p class=\"caption\">Patriots quarterback Tom Brady passes during the first quarter against the Colts. (Jared Wickerham/Getty Images)</p>\n<p>The basic idea is that softer, less fully-inflated footballs are easier to hold and catch.</p>\n<p>Given that the game was played in slick, rainy conditions — and that different footballs are used by each team (more on that below) — this could provide a slight advantage to the Patriots offense, especially for quarterback Tom Brady. <span>Teams use their own sets of balls whenever they're on offense, so it wouldn't have benefitted the Colts.</span></p>\n<p>It might not make a huge difference, but materials scientists and players confirm that letting a bit of air out could make the balls somewhat easier to hold, especially for the quarterback.</p>\n<h3>How could the Patriots have done this?</h3>\n\n<p class=\"caption\">Game balls rest in a sideline bag during a December game. (Brett Carlsen/Getty Images)</p>\n<p>Here's how the NFL's system for game balls works: for each game, each team prepares a set of 12 balls for it to use on offense. Team equipment staff are allowed to scuff up brand-new balls, removing the factory shine, and allowing them to be gripped more easily by their quarterbacks.</p>\n<p>Before the game, these balls are delivered to the officials, who test to see if they're inflated to somewhere between 12.5 and 13.5 pounds per square inch. If they're under-inflated, the officials add some air themselves.</p>\n<p>Then, the balls are kept in a zipped bag on the sidelines. During the game, ball boys occasionally hand fresh balls to the officials, who put them in play.</p>\n<p>It's unclear how or when Patriots staff might have let some of the air out of their set of balls. It'd be extremely risky to do so on the sideline, in full view of the whole stadium, but in theory, they should have been properly inflated just before the game. During press conferences on Thursday, both Belichick and Brady denied any involvement or knowledge of deflating the balls.</p>\n<p>An even bigger mystery is how the officials — who handle the balls before every single play — didn't notice they were under-inflated, when one touch by Jackson caught his attention.</p>\n\n<p class=\"caption\">Umpire Carl Paganelli handles a ball during the game. (Elsa/Getty Images)</p>\n<h3>Could under-inflating the balls have let the Patriots win?</h3>\n<p>Almost certainly not. The Patriots beat the Colts 45 to 7 — an especially dominant win, even for the Patriots.</p>\n<p>Further, they scored mostly by running the ball, an area where under-inflated balls wouldn't make much of a difference.</p>\n<p>People aren't upset because the Patriots may have won this game by under-inflating their balls. They're upset because the Patriots have been remarkably dominant for 15 years — but during that time, have consistently pushed the envelope in terms of rules, and on at least one other occasion, have been caught cheating.</p>\n<p>If the team habitually under-inflates its game balls, it could provide a very real advantage — something that may have, in some cases, been the difference between a loss and a win.</p>\n<h3>Is this the first time the Patriots have been accused of cheating?</h3>\n\n<p class=\"caption\">Bill Belichick. (John Tlumacki/The Boston Globe via Getty Images)</p>\n<p>Nope.</p>\n<p>In 2007, the team was caught illegally filming the New York Jets coaching staff. Having tape of the coaches' hand signals — and being able to match them up with the actual plays run on the field — could provide a big advantage, essentially allowing Belichick and the Patriots' staff to decode opponents' signaling systems. Belichick later admitted that he'd been taping opposing coaching staffs ever since becoming a head coach in 2000, and thought it was permitted by league rules.</p>\n<p>It wasn't, and in response, the NFL fined Belichick $500,000, fined the team $250,000, and stripped the team of its first round draft pick. Around the same time, allegations surfaced that Belichick had also filmed a St. Louis Rams practice right before beating them in Super Bowl XXXVI, but he denied it.</p>\n<p>There have also been all other sorts of unproven allegations of cheating by the Patriots. Most recently, two weeks ago, some Baltimore Ravens felt that the kicking balls they used in their playoff loss to the Patriots (a separate set of game balls used solely for kicking and punting) were under-inflated, which would have made it more difficult to kick long field goals. And during a regular season game this past November, Colts players were reportedly suspicious that the Patriots were using under-inflated balls.</p>\n<p>Even when he's playing within the rules, Belichick — smartly — likes to push the envelope in ways that aren't part of conventional football practice. In the same game against the Ravens, he used unusual formations on several plays, for instance, and Ravens coach John Harbaugh complained that his team didn't have enough time to match up, as mandated by league rules.</p>\n<p>For many fans, all this raises a question: what else have Belichick and the Patriots gotten away with?</p>\n<h3>Is there a name for this new scandal?</h3>\n<p>Alas. Yes. Most people seem to be calling it Deflate-gate, the latest in a string of hundreds of scandals with the \"gate\" suffix tacked on, in an allusion to Watergate.</p>\n<p>It'd be great if we could figure out a more creative way to name our scandals, though, and some people have come up with the more imaginative \"Ballghazi.\" It remains to be seen if it will catch on.</p>\n<h3>What's going to happen next?</h3>\n<p>The NFL has said it's hoping to wrap up the investigation quickly, within a few days. That means the official results will likely be public soon — and the story will become a huge one in the week leading up to Super Bowl XLIX.</p>\n<p>However, this scandal won't impact the Super Bowl directly. Instead, if the Patriots are found guilty, the team or Belichick might have to pay fines, and perhaps give up a draft pick in the upcoming draft, which is in April. The punishments will likely be meted out after the Super Bowl.</p>\n\n<p class=\"caption\">Bill Belichick holds the Lombardi Trophy after Super Bowl XXXVIII. (JEFF HAYNES/AFP/Getty Images)</p>\n<p>The biggest consequence of all this is that, if found guilty, Deflate-gate could tarnish the Patriots' long-term legacy.</p>\n<p>If they win the Super Bowl, it could cement Belichick and Brady's legacy as one of the best coach-quarterback pairings of all time — they'd become one of only two duos to ever win four Super Bowls. But having a second instance of confirmed cheating during that remarkable run might change perceptions of it in the future.</p>\n<hr>\n<h4>Watch: Can the NFL survive its concussion crisis?</h4>") |
4683 | + )))).WillOnce(Return(true)); |
4684 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4685 | + ResultProp("title", "Read McDonald's workers' shocking harassment and discrimination complaints — and why they're so important"), |
4686 | + ResultProp("art", "https://cdn2.vox-cdn.com/thumbor/3YAMFCiMs4zJnJIty3Fl402tGhY=/0x40:2039x1399/400x267/cdn0.vox-cdn.com/uploads/chorus_image/image/45516554/112561118.0.jpg"), |
4687 | + ResultProp("published", "2015-01-22T15:40:02-05:00"), |
4688 | + ResultProp("author", "Danielle Kurtzleben"), |
4689 | + ResultProp("summary", "\n\n\n\n <p>Ten current and former McDonald's workers filed suit in a Virginia district court on Thursday, alleging racial discrimination and sexual harassment at McDonald's locations in two Virginia cities.</p>\n<p>In one store, for example, one supervisor allegedly would say it was \"too dark in the store\" at times when most workers were African-American. And the suit goes on to list some almost unfathomably degrading behavior on the part of supervisors:</p>\n<blockquote>\n<p>Plaintiffs were subjected to rampant racial and sexual harassment, committed by the restaurants' highest-ranking supervisors. Together, these supervisors demeaned African American workers; often complained that \"there are too many black people in the store;\" called African-American workers \"bitch,\" \"ghetto,\" and \"ratchet;\" called Hispanic workers \"dirty Mexican;\" disciplined African-American employees for rule infractions that were forgiven when committed by white employees; inappropriately touched female employees on their legs and buttocks; sent female employees sexual pictures; and solicited sexual relations from female employees.</p>\n</blockquote>\n<p>The allegations in the lawsuit are of course shocking on a basic level. But this suit is also important in a much subtler way, in that it's filed against both Soweva — the franchisee operating these stores — and the McDonald's corporation itself. Far more than being a simply discrimination and harassment suit, this case is another example of a question that has repeatedly been raised in labor law in the last year — when is an big chain a \"joint employer\" of people who work for one of its franchises?</p>\n<p>In other words, can McDonald's and other corporations be held legally accountable for the working conditions endured by front-line employees who wear their uniforms but are technically employees of independently owned franchises? This seemingly pedantic question actually has broad implications for many franchise-heavy industries (fast food, hotels, gyms) and how they relate to their workers — how they schedule employees and negotiate with unions, for example.</p>\n<h3>A bigger, nationwide debate</h3>\n<p>The franchising debate has heated up with a few high-profile cases. In California, for example, the supreme court last year ultimately ruled in favor of Domino's Pizza, saying it was not a joint employer along with its franchise operators. A yet-to-be-decided case before the National Labor Relations Board questions whether a waste management company is an employer along with its subcontractors. And in December, the NLRB decided to authorize complaints against both franchise operators and the McDonald's parent company, alleging retaliation against employees who participated in protests demanding $15-per-hour wages. Even though that was a preliminary decision, it was considered a big win for labor-rights advocates.</p>\n<p>These sorts of cases could strike at the heart of the franchisor-franchisee relationship, in which the franchisee runs the business according to certain specifications set by the parent company but operates independently in many other ways, like in how it treats its employees. That often means a franchisee acts as a sort of buffer between workers and the parent corporation.</p>\n<p>But the question of joint employership is being reconsidered lately. The NLRB, for example, appears willing to reconsider that definition, which currently says an employer must have \"direct and immediate impact\" on the terms and conditions of workers' employment — for example, having a say in hiring and firing, as well as wage-setting.</p>\n<p>In this case, plaintiffs are saying that McDonald's is partially liable because it had so much control over its stores. The lawsuit references McDonald's' detailed training manuals, control over menus, and routine visits from McDonald's mystery shoppers as examples of the parent company's control over stores. And in a call with reporters, plaintiff Katrina Stanfield said she complained to McDonald's about the harassment and discrimination and that they did nothing in response.</p>\n<h3>The repercussions of a new definition could be huge</h3>\n<p>According to one attorney, when the definition is murky, it makes operating those businesses difficult.</p>\n<p>\"If you don't know who the employer is, you can't allocate liability, and you really don't know how to run your business,\" says Michael Lotito, co-chair of the Workplace Policy Institute at law firm Littler Mendelson.</p>\n<p>And if pending cases do indeed find parent companies to be liable for their franchisees' wrongdoings, it could have repercussions far beyond McDonald's. <span>And the broader question of what, exactly, is an \"employer\" could even affect the relationships between, for example, retailers and suppliers, as well as employers and staffing agencies. </span><span>Of course, neither the NLRB nor Virginia's District Court has the last word. Settling this question could be a years-long process, says Lotito, and decisions could differ from jurisdiction to jurisdiction. And given that groups like SEIU and Fast Food Forward are fighting hard on this question, expect to hear more about the joint employer issue in the years to come.</span></p>"), |
4690 | + ResultProp("content", "\n\n\n\n <p>Ten current and former McDonald's workers filed suit in a Virginia district court on Thursday, alleging racial discrimination and sexual harassment at McDonald's locations in two Virginia cities.</p>\n<p>In one store, for example, one supervisor allegedly would say it was \"too dark in the store\" at times when most workers were African-American. And the suit goes on to list some almost unfathomably degrading behavior on the part of supervisors:</p>\n<blockquote>\n<p>Plaintiffs were subjected to rampant racial and sexual harassment, committed by the restaurants' highest-ranking supervisors. Together, these supervisors demeaned African American workers; often complained that \"there are too many black people in the store;\" called African-American workers \"bitch,\" \"ghetto,\" and \"ratchet;\" called Hispanic workers \"dirty Mexican;\" disciplined African-American employees for rule infractions that were forgiven when committed by white employees; inappropriately touched female employees on their legs and buttocks; sent female employees sexual pictures; and solicited sexual relations from female employees.</p>\n</blockquote>\n<p>The allegations in the lawsuit are of course shocking on a basic level. But this suit is also important in a much subtler way, in that it's filed against both Soweva — the franchisee operating these stores — and the McDonald's corporation itself. Far more than being a simply discrimination and harassment suit, this case is another example of a question that has repeatedly been raised in labor law in the last year — when is an big chain a \"joint employer\" of people who work for one of its franchises?</p>\n<p>In other words, can McDonald's and other corporations be held legally accountable for the working conditions endured by front-line employees who wear their uniforms but are technically employees of independently owned franchises? This seemingly pedantic question actually has broad implications for many franchise-heavy industries (fast food, hotels, gyms) and how they relate to their workers — how they schedule employees and negotiate with unions, for example.</p>\n<h3>A bigger, nationwide debate</h3>\n<p>The franchising debate has heated up with a few high-profile cases. In California, for example, the supreme court last year ultimately ruled in favor of Domino's Pizza, saying it was not a joint employer along with its franchise operators. A yet-to-be-decided case before the National Labor Relations Board questions whether a waste management company is an employer along with its subcontractors. And in December, the NLRB decided to authorize complaints against both franchise operators and the McDonald's parent company, alleging retaliation against employees who participated in protests demanding $15-per-hour wages. Even though that was a preliminary decision, it was considered a big win for labor-rights advocates.</p>\n<p>These sorts of cases could strike at the heart of the franchisor-franchisee relationship, in which the franchisee runs the business according to certain specifications set by the parent company but operates independently in many other ways, like in how it treats its employees. That often means a franchisee acts as a sort of buffer between workers and the parent corporation.</p>\n<p>But the question of joint employership is being reconsidered lately. The NLRB, for example, appears willing to reconsider that definition, which currently says an employer must have \"direct and immediate impact\" on the terms and conditions of workers' employment — for example, having a say in hiring and firing, as well as wage-setting.</p>\n<p>In this case, plaintiffs are saying that McDonald's is partially liable because it had so much control over its stores. The lawsuit references McDonald's' detailed training manuals, control over menus, and routine visits from McDonald's mystery shoppers as examples of the parent company's control over stores. And in a call with reporters, plaintiff Katrina Stanfield said she complained to McDonald's about the harassment and discrimination and that they did nothing in response.</p>\n<h3>The repercussions of a new definition could be huge</h3>\n<p>According to one attorney, when the definition is murky, it makes operating those businesses difficult.</p>\n<p>\"If you don't know who the employer is, you can't allocate liability, and you really don't know how to run your business,\" says Michael Lotito, co-chair of the Workplace Policy Institute at law firm Littler Mendelson.</p>\n<p>And if pending cases do indeed find parent companies to be liable for their franchisees' wrongdoings, it could have repercussions far beyond McDonald's. <span>And the broader question of what, exactly, is an \"employer\" could even affect the relationships between, for example, retailers and suppliers, as well as employers and staffing agencies. </span><span>Of course, neither the NLRB nor Virginia's District Court has the last word. Settling this question could be a years-long process, says Lotito, and decisions could differ from jurisdiction to jurisdiction. And given that groups like SEIU and Fast Food Forward are fighting hard on this question, expect to hear more about the joint employer issue in the years to come.</span></p>") |
4691 | + )))).WillOnce(Return(true)); |
4692 | + |
4693 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4694 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4695 | + |
4696 | + // Create a query object |
4697 | + auto search_query = scope->search(query, meta_data); |
4698 | + ASSERT_NE(nullptr, search_query); |
4699 | + |
4700 | + // Run the search |
4701 | + search_query->run(reply_proxy); |
4702 | + |
4703 | + // Google Mock will make assertions when the mocks are destructed. |
4704 | +} |
4705 | + |
4706 | +TEST_F(TestScopeVox, search) { |
4707 | + const sc::CategoryRenderer renderer; |
4708 | + NiceMock<sct::MockSearchReply> reply; |
4709 | + |
4710 | + // Build a query with a non-empty search string |
4711 | + sc::CannedQuery query(SCOPE_NAME, "worker", ""); |
4712 | + |
4713 | + // Expect the current weather category |
4714 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4715 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4716 | + |
4717 | + // With one result |
4718 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4719 | + ResultProp("title", "Read McDonald's workers' shocking harassment and discrimination complaints — and why they're so important"), |
4720 | + ResultProp("art", "https://cdn2.vox-cdn.com/thumbor/3YAMFCiMs4zJnJIty3Fl402tGhY=/0x40:2039x1399/400x267/cdn0.vox-cdn.com/uploads/chorus_image/image/45516554/112561118.0.jpg"), |
4721 | + ResultProp("published", "2015-01-22T15:40:02-05:00"), |
4722 | + ResultProp("author", "Danielle Kurtzleben"), |
4723 | + ResultProp("summary", "\n\n\n\n <p>Ten current and former McDonald's workers filed suit in a Virginia district court on Thursday, alleging racial discrimination and sexual harassment at McDonald's locations in two Virginia cities.</p>\n<p>In one store, for example, one supervisor allegedly would say it was \"too dark in the store\" at times when most workers were African-American. And the suit goes on to list some almost unfathomably degrading behavior on the part of supervisors:</p>\n<blockquote>\n<p>Plaintiffs were subjected to rampant racial and sexual harassment, committed by the restaurants' highest-ranking supervisors. Together, these supervisors demeaned African American workers; often complained that \"there are too many black people in the store;\" called African-American workers \"bitch,\" \"ghetto,\" and \"ratchet;\" called Hispanic workers \"dirty Mexican;\" disciplined African-American employees for rule infractions that were forgiven when committed by white employees; inappropriately touched female employees on their legs and buttocks; sent female employees sexual pictures; and solicited sexual relations from female employees.</p>\n</blockquote>\n<p>The allegations in the lawsuit are of course shocking on a basic level. But this suit is also important in a much subtler way, in that it's filed against both Soweva — the franchisee operating these stores — and the McDonald's corporation itself. Far more than being a simply discrimination and harassment suit, this case is another example of a question that has repeatedly been raised in labor law in the last year — when is an big chain a \"joint employer\" of people who work for one of its franchises?</p>\n<p>In other words, can McDonald's and other corporations be held legally accountable for the working conditions endured by front-line employees who wear their uniforms but are technically employees of independently owned franchises? This seemingly pedantic question actually has broad implications for many franchise-heavy industries (fast food, hotels, gyms) and how they relate to their workers — how they schedule employees and negotiate with unions, for example.</p>\n<h3>A bigger, nationwide debate</h3>\n<p>The franchising debate has heated up with a few high-profile cases. In California, for example, the supreme court last year ultimately ruled in favor of Domino's Pizza, saying it was not a joint employer along with its franchise operators. A yet-to-be-decided case before the National Labor Relations Board questions whether a waste management company is an employer along with its subcontractors. And in December, the NLRB decided to authorize complaints against both franchise operators and the McDonald's parent company, alleging retaliation against employees who participated in protests demanding $15-per-hour wages. Even though that was a preliminary decision, it was considered a big win for labor-rights advocates.</p>\n<p>These sorts of cases could strike at the heart of the franchisor-franchisee relationship, in which the franchisee runs the business according to certain specifications set by the parent company but operates independently in many other ways, like in how it treats its employees. That often means a franchisee acts as a sort of buffer between workers and the parent corporation.</p>\n<p>But the question of joint employership is being reconsidered lately. The NLRB, for example, appears willing to reconsider that definition, which currently says an employer must have \"direct and immediate impact\" on the terms and conditions of workers' employment — for example, having a say in hiring and firing, as well as wage-setting.</p>\n<p>In this case, plaintiffs are saying that McDonald's is partially liable because it had so much control over its stores. The lawsuit references McDonald's' detailed training manuals, control over menus, and routine visits from McDonald's mystery shoppers as examples of the parent company's control over stores. And in a call with reporters, plaintiff Katrina Stanfield said she complained to McDonald's about the harassment and discrimination and that they did nothing in response.</p>\n<h3>The repercussions of a new definition could be huge</h3>\n<p>According to one attorney, when the definition is murky, it makes operating those businesses difficult.</p>\n<p>\"If you don't know who the employer is, you can't allocate liability, and you really don't know how to run your business,\" says Michael Lotito, co-chair of the Workplace Policy Institute at law firm Littler Mendelson.</p>\n<p>And if pending cases do indeed find parent companies to be liable for their franchisees' wrongdoings, it could have repercussions far beyond McDonald's. <span>And the broader question of what, exactly, is an \"employer\" could even affect the relationships between, for example, retailers and suppliers, as well as employers and staffing agencies. </span><span>Of course, neither the NLRB nor Virginia's District Court has the last word. Settling this question could be a years-long process, says Lotito, and decisions could differ from jurisdiction to jurisdiction. And given that groups like SEIU and Fast Food Forward are fighting hard on this question, expect to hear more about the joint employer issue in the years to come.</span></p>"), |
4724 | + ResultProp("content", "\n\n\n\n <p>Ten current and former McDonald's workers filed suit in a Virginia district court on Thursday, alleging racial discrimination and sexual harassment at McDonald's locations in two Virginia cities.</p>\n<p>In one store, for example, one supervisor allegedly would say it was \"too dark in the store\" at times when most workers were African-American. And the suit goes on to list some almost unfathomably degrading behavior on the part of supervisors:</p>\n<blockquote>\n<p>Plaintiffs were subjected to rampant racial and sexual harassment, committed by the restaurants' highest-ranking supervisors. Together, these supervisors demeaned African American workers; often complained that \"there are too many black people in the store;\" called African-American workers \"bitch,\" \"ghetto,\" and \"ratchet;\" called Hispanic workers \"dirty Mexican;\" disciplined African-American employees for rule infractions that were forgiven when committed by white employees; inappropriately touched female employees on their legs and buttocks; sent female employees sexual pictures; and solicited sexual relations from female employees.</p>\n</blockquote>\n<p>The allegations in the lawsuit are of course shocking on a basic level. But this suit is also important in a much subtler way, in that it's filed against both Soweva — the franchisee operating these stores — and the McDonald's corporation itself. Far more than being a simply discrimination and harassment suit, this case is another example of a question that has repeatedly been raised in labor law in the last year — when is an big chain a \"joint employer\" of people who work for one of its franchises?</p>\n<p>In other words, can McDonald's and other corporations be held legally accountable for the working conditions endured by front-line employees who wear their uniforms but are technically employees of independently owned franchises? This seemingly pedantic question actually has broad implications for many franchise-heavy industries (fast food, hotels, gyms) and how they relate to their workers — how they schedule employees and negotiate with unions, for example.</p>\n<h3>A bigger, nationwide debate</h3>\n<p>The franchising debate has heated up with a few high-profile cases. In California, for example, the supreme court last year ultimately ruled in favor of Domino's Pizza, saying it was not a joint employer along with its franchise operators. A yet-to-be-decided case before the National Labor Relations Board questions whether a waste management company is an employer along with its subcontractors. And in December, the NLRB decided to authorize complaints against both franchise operators and the McDonald's parent company, alleging retaliation against employees who participated in protests demanding $15-per-hour wages. Even though that was a preliminary decision, it was considered a big win for labor-rights advocates.</p>\n<p>These sorts of cases could strike at the heart of the franchisor-franchisee relationship, in which the franchisee runs the business according to certain specifications set by the parent company but operates independently in many other ways, like in how it treats its employees. That often means a franchisee acts as a sort of buffer between workers and the parent corporation.</p>\n<p>But the question of joint employership is being reconsidered lately. The NLRB, for example, appears willing to reconsider that definition, which currently says an employer must have \"direct and immediate impact\" on the terms and conditions of workers' employment — for example, having a say in hiring and firing, as well as wage-setting.</p>\n<p>In this case, plaintiffs are saying that McDonald's is partially liable because it had so much control over its stores. The lawsuit references McDonald's' detailed training manuals, control over menus, and routine visits from McDonald's mystery shoppers as examples of the parent company's control over stores. And in a call with reporters, plaintiff Katrina Stanfield said she complained to McDonald's about the harassment and discrimination and that they did nothing in response.</p>\n<h3>The repercussions of a new definition could be huge</h3>\n<p>According to one attorney, when the definition is murky, it makes operating those businesses difficult.</p>\n<p>\"If you don't know who the employer is, you can't allocate liability, and you really don't know how to run your business,\" says Michael Lotito, co-chair of the Workplace Policy Institute at law firm Littler Mendelson.</p>\n<p>And if pending cases do indeed find parent companies to be liable for their franchisees' wrongdoings, it could have repercussions far beyond McDonald's. <span>And the broader question of what, exactly, is an \"employer\" could even affect the relationships between, for example, retailers and suppliers, as well as employers and staffing agencies. </span><span>Of course, neither the NLRB nor Virginia's District Court has the last word. Settling this question could be a years-long process, says Lotito, and decisions could differ from jurisdiction to jurisdiction. And given that groups like SEIU and Fast Food Forward are fighting hard on this question, expect to hear more about the joint employer issue in the years to come.</span></p>") |
4725 | + )))).WillOnce(Return(true)); |
4726 | + |
4727 | + |
4728 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4729 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4730 | + |
4731 | + // Create a query object |
4732 | + auto search_query = scope->search(query, meta_data); |
4733 | + ASSERT_NE(nullptr, search_query); |
4734 | + |
4735 | + // Run the search |
4736 | + search_query->run(reply_proxy); |
4737 | + |
4738 | + // Google Mock will make assertions when the mocks are destructed. |
4739 | +} |
4740 | + |
4741 | +class TestScopeBBC : public TestScope { |
4742 | +protected: |
4743 | + void SetUp() override |
4744 | + { |
4745 | + TestScope::SetUp("bbc"); |
4746 | + } |
4747 | +}; |
4748 | + |
4749 | +TEST_F(TestScopeBBC, empty_search_string) { |
4750 | + const sc::CategoryRenderer renderer; |
4751 | + NiceMock<sct::MockSearchReply> reply; |
4752 | + |
4753 | + // Build a query with an empty search string |
4754 | + sc::CannedQuery query(SCOPE_NAME, "", ""); |
4755 | + |
4756 | + // Expect the News category |
4757 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4758 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4759 | + |
4760 | + cout << "TESTING RESULTS"; |
4761 | + // With two results |
4762 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4763 | + ResultProp("title", "Dewani cleared of honeymoon murder"), |
4764 | + ResultProp("art", "http://news.bbcimg.co.uk/media/images/79581000/jpg/_79581909_78423657.jpg"), |
4765 | + ResultProp("published", "Mon, 08 Dec 2014 14:40:30 GMT"), |
4766 | + ResultProp("summary", "The family of Anni Dewani believe they have been failed by the justice system after millionaire businessman Shrien Dewani is cleared of the honeymoon murder."), |
4767 | + ResultProp("content", "The family of Anni Dewani believe they have been failed by the justice system after millionaire businessman Shrien Dewani is cleared of the honeymoon murder.") |
4768 | + )))).WillOnce(Return(true)); |
4769 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4770 | + ResultProp("title", "'Pay benefits faster' to cut hunger"), |
4771 | + ResultProp("art", "http://news.bbcimg.co.uk/media/images/79569000/jpg/_79569924_79569916.jpg"), |
4772 | + ResultProp("published", "Mon, 08 Dec 2014 10:56:04 GMT"), |
4773 | + ResultProp("summary", "An income squeeze, benefit delays and high utility bills are blamed by a cross-party committee of MPs for a rise in hunger in the UK."), |
4774 | + ResultProp("content", "An income squeeze, benefit delays and high utility bills are blamed by a cross-party committee of MPs for a rise in hunger in the UK.") |
4775 | + )))).WillOnce(Return(true)); |
4776 | + |
4777 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4778 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4779 | + |
4780 | + // Create a query object |
4781 | + auto search_query = scope->search(query, meta_data); |
4782 | + ASSERT_NE(nullptr, search_query); |
4783 | + |
4784 | + // Run the search |
4785 | + search_query->run(reply_proxy); |
4786 | + |
4787 | + // Google Mock will make assertions when the mocks are destructed. |
4788 | +} |
4789 | + |
4790 | +TEST_F(TestScopeBBC, search) { |
4791 | + const sc::CategoryRenderer renderer; |
4792 | + NiceMock<sct::MockSearchReply> reply; |
4793 | + |
4794 | + // Build a query with a non-empty search string |
4795 | + sc::CannedQuery query(SCOPE_NAME, "hunger", ""); |
4796 | + |
4797 | + // Expect the current weather category |
4798 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4799 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4800 | + |
4801 | + // With one result |
4802 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4803 | + ResultProp("title", "'Pay benefits faster' to cut hunger"), |
4804 | + ResultProp("art", "http://news.bbcimg.co.uk/media/images/79569000/jpg/_79569924_79569916.jpg"), |
4805 | + ResultProp("published", "Mon, 08 Dec 2014 10:56:04 GMT"), |
4806 | + ResultProp("summary", "An income squeeze, benefit delays and high utility bills are blamed by a cross-party committee of MPs for a rise in hunger in the UK."), |
4807 | + ResultProp("content", "An income squeeze, benefit delays and high utility bills are blamed by a cross-party committee of MPs for a rise in hunger in the UK.") |
4808 | + )))).WillOnce(Return(true)); |
4809 | + |
4810 | + |
4811 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4812 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4813 | + |
4814 | + // Create a query object |
4815 | + auto search_query = scope->search(query, meta_data); |
4816 | + ASSERT_NE(nullptr, search_query); |
4817 | + |
4818 | + // Run the search |
4819 | + search_query->run(reply_proxy); |
4820 | + |
4821 | + // Google Mock will make assertions when the mocks are destructed. |
4822 | +} |
4823 | + |
4824 | +class TestScopeCnet : public TestScope { |
4825 | +protected: |
4826 | + void SetUp() override |
4827 | + { |
4828 | + TestScope::SetUp("cnet"); |
4829 | + } |
4830 | +}; |
4831 | + |
4832 | +TEST_F(TestScopeCnet, empty_search_string) { |
4833 | + const sc::CategoryRenderer renderer; |
4834 | + NiceMock<sct::MockSearchReply> reply; |
4835 | + |
4836 | + // Build a query with an empty search string |
4837 | + sc::CannedQuery query(SCOPE_NAME, "", ""); |
4838 | + |
4839 | + // Expect the News category |
4840 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4841 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4842 | + |
4843 | + cout << "TESTING RESULTS"; |
4844 | + // With two results |
4845 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4846 | + ResultProp("title", "Cook with gas like a pro on the hardy Decor Renaissance range"), |
4847 | + ResultProp("art", "http://cnet3.cbsistatic.com/hub/i/r/2015/01/22/cf096def-ba6c-4fed-a624-5789eaa42cc1/thumbnail/300x230/84411a75f4fa59904efffe0cb1e9b371/fldacorrenaissanceprostylegasrange0.jpg"), |
4848 | + ResultProp("published", "Thu, 22 Jan 2015 14:52:46 GMT"), |
4849 | + ResultProp("author", "Brian Bennett"), |
4850 | + ResultProp("summary", "Dacor's new gas grilling monster is built to last and cook with lots of control."), |
4851 | + ResultProp("content", "Dacor's new gas grilling monster is built to last and cook with lots of control.") |
4852 | + )))).WillOnce(Return(true)); |
4853 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4854 | + ResultProp("title", "Dropbox app arrives on Windows tablets, phones"), |
4855 | + ResultProp("art", "http://cnet3.cbsistatic.com/hub/i/r/2015/01/22/8ea8815f-4595-4184-a65f-6a494ea16e00/thumbnail/300x230/21ab57c0ba05d8ceb5dcf00a468e63e8/dropbox-windows-app.jpg"), |
4856 | + ResultProp("published", "Thu, 22 Jan 2015 14:45:36 GMT"), |
4857 | + ResultProp("author", "Lance Whitney"), |
4858 | + ResultProp("summary", "Dropbox, Microsoft hope to win over more customers with improved work flow and compatibilty."), |
4859 | + ResultProp("content", "Dropbox, Microsoft hope to win over more customers with improved work flow and compatibilty.") |
4860 | + )))).WillOnce(Return(true)); |
4861 | + |
4862 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4863 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4864 | + |
4865 | + // Create a query object |
4866 | + auto search_query = scope->search(query, meta_data); |
4867 | + ASSERT_NE(nullptr, search_query); |
4868 | + |
4869 | + // Run the search |
4870 | + search_query->run(reply_proxy); |
4871 | + |
4872 | + // Google Mock will make assertions when the mocks are destructed. |
4873 | +} |
4874 | + |
4875 | +TEST_F(TestScopeCnet, search) { |
4876 | + const sc::CategoryRenderer renderer; |
4877 | + NiceMock<sct::MockSearchReply> reply; |
4878 | + |
4879 | + // Build a query with a non-empty search string |
4880 | + sc::CannedQuery query(SCOPE_NAME, "gas", ""); |
4881 | + |
4882 | + // Expect the current weather category |
4883 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4884 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4885 | + |
4886 | + // With one result |
4887 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4888 | + ResultProp("title", "Cook with gas like a pro on the hardy Decor Renaissance range"), |
4889 | + ResultProp("art", "http://cnet3.cbsistatic.com/hub/i/r/2015/01/22/cf096def-ba6c-4fed-a624-5789eaa42cc1/thumbnail/300x230/84411a75f4fa59904efffe0cb1e9b371/fldacorrenaissanceprostylegasrange0.jpg"), |
4890 | + ResultProp("published", "Thu, 22 Jan 2015 14:52:46 GMT"), |
4891 | + ResultProp("author", "Brian Bennett"), |
4892 | + ResultProp("summary", "Dacor's new gas grilling monster is built to last and cook with lots of control."), |
4893 | + ResultProp("content", "Dacor's new gas grilling monster is built to last and cook with lots of control.") |
4894 | + )))).WillOnce(Return(true)); |
4895 | + |
4896 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4897 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4898 | + |
4899 | + // Create a query object |
4900 | + auto search_query = scope->search(query, meta_data); |
4901 | + ASSERT_NE(nullptr, search_query); |
4902 | + |
4903 | + // Run the search |
4904 | + search_query->run(reply_proxy); |
4905 | + |
4906 | + // Google Mock will make assertions when the mocks are destructed. |
4907 | +} |
4908 | + |
4909 | +class TestScopeEuronews : public TestScope { |
4910 | +protected: |
4911 | + void SetUp() override |
4912 | + { |
4913 | + TestScope::SetUp("euronews"); |
4914 | + } |
4915 | +}; |
4916 | + |
4917 | +TEST_F(TestScopeEuronews, empty_search_string) { |
4918 | + const sc::CategoryRenderer renderer; |
4919 | + NiceMock<sct::MockSearchReply> reply; |
4920 | + |
4921 | + // Build a query with an empty search string |
4922 | + sc::CannedQuery query(SCOPE_NAME, "", ""); |
4923 | + |
4924 | + // Expect the News category |
4925 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4926 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4927 | + |
4928 | + // We expect the art will fall back to the icon file |
4929 | + const string ICON_FILE = string(TEST_SCOPE_DIRECTORY).append("/euronews/icon.png"); |
4930 | + |
4931 | + // With two results |
4932 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4933 | + ResultProp("title", "US and Cuba differ on migration policy on first day of talks"), |
4934 | + ResultProp("art", ICON_FILE), |
4935 | + ResultProp("published", "Wed, 21 Jan 2015 21:38:01 GMT"), |
4936 | + ResultProp("summary", "Migration has proved a divisive issue on the first day of historic talks in Havana between senior Cuban and US officials - the first since both…"), |
4937 | + ResultProp("content", "Migration has proved a divisive issue on the first day of historic talks in Havana between senior Cuban and US officials - the first since both…") |
4938 | + )))).WillOnce(Return(true)); |
4939 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4940 | + ResultProp("title", "PEGIDA leader quits amid 'Hitler' row"), |
4941 | + ResultProp("art", ICON_FILE), |
4942 | + ResultProp("published", "Wed, 21 Jan 2015 21:34:03 GMT"), |
4943 | + ResultProp("summary", "The leader of the anti-Islamisation PEGIDA party in Germany has quit amid a row over photo where he posed as Hitler and comments about immigrants on…"), |
4944 | + ResultProp("content", "The leader of the anti-Islamisation PEGIDA party in Germany has quit amid a row over photo where he posed as Hitler and comments about immigrants on…") |
4945 | + )))).WillOnce(Return(true)); |
4946 | + |
4947 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4948 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4949 | + |
4950 | + // Create a query object |
4951 | + auto search_query = scope->search(query, meta_data); |
4952 | + ASSERT_NE(nullptr, search_query); |
4953 | + |
4954 | + // Run the search |
4955 | + search_query->run(reply_proxy); |
4956 | + |
4957 | + // Google Mock will make assertions when the mocks are destructed. |
4958 | +} |
4959 | + |
4960 | +TEST_F(TestScopeEuronews, search) { |
4961 | + const sc::CategoryRenderer renderer; |
4962 | + NiceMock<sct::MockSearchReply> reply; |
4963 | + |
4964 | + // Build a query with a non-empty search string |
4965 | + sc::CannedQuery query(SCOPE_NAME, "talks", ""); |
4966 | + |
4967 | + // Expect the current weather category |
4968 | + EXPECT_CALL(reply, register_category("news", "", "", _)).Times(1) |
4969 | + .WillOnce(Return(make_shared<sct::Category>("news", "", "", renderer))); |
4970 | + |
4971 | + // We expect the art will fall back to the icon file |
4972 | + const string ICON_FILE = string(TEST_SCOPE_DIRECTORY).append("/euronews/icon.png"); |
4973 | + |
4974 | + // With one result |
4975 | + EXPECT_CALL(reply, push(Matcher<sc::CategorisedResult const&>(AllOf( |
4976 | + ResultProp("title", "US and Cuba differ on migration policy on first day of talks"), |
4977 | + ResultProp("art", ICON_FILE), |
4978 | + ResultProp("published", "Wed, 21 Jan 2015 21:38:01 GMT"), |
4979 | + ResultProp("summary", "Migration has proved a divisive issue on the first day of historic talks in Havana between senior Cuban and US officials - the first since both…"), |
4980 | + ResultProp("content", "Migration has proved a divisive issue on the first day of historic talks in Havana between senior Cuban and US officials - the first since both…") |
4981 | + )))).WillOnce(Return(true)); |
4982 | + |
4983 | + sc::SearchReplyProxy reply_proxy(&reply, [](sc::SearchReply*) {}); // note: this is a std::shared_ptr with empty deleter |
4984 | + sc::SearchMetadata meta_data("en_EN", "phone"); |
4985 | + |
4986 | + // Create a query object |
4987 | + auto search_query = scope->search(query, meta_data); |
4988 | + ASSERT_NE(nullptr, search_query); |
4989 | + |
4990 | + // Run the search |
4991 | + search_query->run(reply_proxy); |
4992 | + |
4993 | + // Google Mock will make assertions when the mocks are destructed. |
4994 | +} |
4995 | + |
4996 | +class TestScopeElpais : public TestScope { |
4997 | +protected: |
4998 | + void SetUp() override |
4999 | + { |
5000 | + TestScope::SetUp("elpais"); |
The diff has been truncated for viewing.