Merge lp:~ted/url-dispatcher/ubuntu-app-launch into lp:url-dispatcher/14.10

Proposed by Ted Gould
Status: Merged
Approved by: Ted Gould
Approved revision: 53
Merged at revision: 52
Proposed branch: lp:~ted/url-dispatcher/ubuntu-app-launch
Merge into: lp:url-dispatcher/14.10
Diff against target: 416 lines (+69/-69)
10 files modified
CMakeLists.txt (+2/-2)
debian/control (+2/-2)
service/CMakeLists.txt (+1/-1)
service/dispatcher.c (+4/-4)
tests/CMakeLists.txt (+5/-5)
tests/app-id-test.cc (+26/-26)
tests/dispatcher-test.cc (+20/-20)
tests/service-test.cc (+1/-1)
tests/ubuntu-app-launch-mock.c (+6/-6)
tests/ubuntu-app-launch-mock.h (+2/-2)
To merge this branch: bzr merge lp:~ted/url-dispatcher/ubuntu-app-launch
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+220955@code.launchpad.net

Commit message

Changing to Ubuntu App Launch

Description of the change

We have a name

To post a comment you must log in.
53. By Ted Gould

Missed a build variable

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Jenkins won't be happy with this without the rest of the train.

The code looks alright; approving despite Jenkins' disapproval.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-01-08 22:30:15 +0000
3+++ CMakeLists.txt 2014-05-26 13:09:13 +0000
4@@ -29,8 +29,8 @@
5
6 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
7
8-pkg_check_modules(UPSTART_APP_LAUNCH REQUIRED upstart-app-launch-2)
9-include_directories(${UPSTART_APP_LAUNCH_INCLUDE_DIRS})
10+pkg_check_modules(UBUNTU_APP_LAUNCH REQUIRED ubuntu-app-launch-2)
11+include_directories(${UBUNTU_APP_LAUNCH_INCLUDE_DIRS})
12
13 pkg_check_modules(GLIB2 REQUIRED glib-2.0)
14 include_directories(${GLIB2_INCLUDE_DIRS})
15
16=== modified file 'debian/control'
17--- debian/control 2014-01-29 14:55:59 +0000
18+++ debian/control 2014-05-26 13:09:13 +0000
19@@ -15,7 +15,7 @@
20 libjson-glib-dev,
21 libgtest-dev,
22 libsqlite3-dev,
23- libupstart-app-launch2-dev (>= 0.3),
24+ libubuntu-app-launch2-dev (>= 0.3),
25 python,
26 python3-dbusmock,
27 sqlite3,
28@@ -31,7 +31,7 @@
29 Architecture: any
30 Multi-Arch: same
31 Pre-Depends: ${misc:Pre-Depends},
32-Depends: upstart-app-launch,
33+Depends: ubuntu-app-launch,
34 ${misc:Depends},
35 ${shlibs:Depends},
36 Description: service to allow sending of URLs and get handlers started
37
38=== modified file 'service/CMakeLists.txt'
39--- service/CMakeLists.txt 2014-03-14 19:47:07 +0000
40+++ service/CMakeLists.txt 2014-05-26 13:09:13 +0000
41@@ -84,7 +84,7 @@
42
43 set_target_properties(service-exec PROPERTIES OUTPUT_NAME "url-dispatcher")
44
45-target_link_libraries(service-exec dispatcher-lib ${UPSTART_APP_LAUNCH_LIBRARIES})
46+target_link_libraries(service-exec dispatcher-lib ${UBUNTU_APP_LAUNCH_LIBRARIES})
47
48 ###########################
49 # Update Directory
50
51=== modified file 'service/dispatcher.c'
52--- service/dispatcher.c 2014-03-14 19:51:28 +0000
53+++ service/dispatcher.c 2014-05-26 13:09:13 +0000
54@@ -19,7 +19,7 @@
55
56 #include <gio/gio.h>
57 #include <json-glib/json-glib.h>
58-#include <upstart-app-launch.h>
59+#include <ubuntu-app-launch.h>
60 #include "dispatcher.h"
61 #include "service-iface.h"
62 #include "recoverable-problem.h"
63@@ -131,7 +131,7 @@
64 NULL
65 };
66
67- if (!upstart_app_launch_start_application(app_id, urls)) {
68+ if (!ubuntu_app_launch_start_application(app_id, urls)) {
69 g_warning("Unable to start application '%s' with URL '%s'", app_id, url);
70 }
71
72@@ -170,7 +170,7 @@
73 gchar * appid = NULL;
74 gboolean retval = FALSE;
75
76- appid = upstart_app_launch_triplet_to_app_id(package, app, version);
77+ appid = ubuntu_app_launch_triplet_to_app_id(package, app, version);
78 if (appid != NULL) {
79 pass_url_to_app(appid, NULL);
80 retval = TRUE;
81@@ -205,7 +205,7 @@
82 gboolean retval = FALSE;
83 gchar * appid = NULL;
84
85- appid = upstart_app_launch_triplet_to_app_id("com.ubuntu.music", "music", NULL);
86+ appid = ubuntu_app_launch_triplet_to_app_id("com.ubuntu.music", "music", NULL);
87 if (appid != NULL) {
88 pass_url_to_app(appid, url);
89 retval = TRUE;
90
91=== modified file 'tests/CMakeLists.txt'
92--- tests/CMakeLists.txt 2014-03-24 20:37:42 +0000
93+++ tests/CMakeLists.txt 2014-05-26 13:09:13 +0000
94@@ -25,8 +25,8 @@
95
96 add_library(mock-lib STATIC
97 recoverable-problem-mock.c
98- upstart-app-launch-mock.h
99- upstart-app-launch-mock.c)
100+ ubuntu-app-launch-mock.h
101+ ubuntu-app-launch-mock.c)
102
103 target_link_libraries(mock-lib
104 ${GLIB2_LIBRARIES}
105@@ -43,7 +43,7 @@
106 dispatcher-lib
107 mock-lib
108 gtest
109- ${UPSTART_APP_LAUNCH_LIBRARIES}
110+ ${UBUNTU_APP_LAUNCH_LIBRARIES}
111 ${GTEST_LIBS})
112
113 add_test (dispatcher-test dispatcher-test)
114@@ -62,7 +62,7 @@
115 dispatcher-lib
116 mock-lib
117 gtest
118- ${UPSTART_APP_LAUNCH_LIBRARIES}
119+ ${UBUNTU_APP_LAUNCH_LIBRARIES}
120 ${GTEST_LIBS})
121
122 add_test (app-id-test app-id-test)
123@@ -91,7 +91,7 @@
124 dispatcher
125 gtest
126 ${DBUSTEST_LIBRARIES}
127- ${UPSTART_APP_LAUNCH_LIBRARIES}
128+ ${UBUNTU_APP_LAUNCH_LIBRARIES}
129 ${GTEST_LIBS})
130
131 add_test (service-test service-test)
132
133=== modified file 'tests/app-id-test.cc'
134--- tests/app-id-test.cc 2014-03-24 20:43:29 +0000
135+++ tests/app-id-test.cc 2014-05-26 13:09:13 +0000
136@@ -19,7 +19,7 @@
137 #include <gio/gio.h>
138 #include <gtest/gtest.h>
139 #include "dispatcher.h"
140-#include "upstart-app-launch-mock.h"
141+#include "ubuntu-app-launch-mock.h"
142
143 class AppIdTest : public ::testing::Test
144 {
145@@ -55,7 +55,7 @@
146
147 g_main_loop_unref(mainloop);
148
149- upstart_app_launch_mock_clear_last_app_id();
150+ ubuntu_app_launch_mock_clear_last_app_id();
151
152 g_test_dbus_down(testbus);
153 g_object_unref(testbus);
154@@ -72,41 +72,41 @@
155 {
156 /* Good sanity check */
157 dispatch_url("appid://com.test.good/app1/1.2.3");
158- ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id());
159- upstart_app_launch_mock_clear_last_app_id();
160+ ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
161+ ubuntu_app_launch_mock_clear_last_app_id();
162
163 /* No version at all */
164 dispatch_url("appid://com.test.good/app1");
165- ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id());
166- upstart_app_launch_mock_clear_last_app_id();
167+ ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id());
168+ ubuntu_app_launch_mock_clear_last_app_id();
169 }
170
171 TEST_F(AppIdTest, WildcardUrl)
172 {
173 /* Version wildcard */
174 dispatch_url("appid://com.test.good/app1/current-user-version");
175- ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id());
176- upstart_app_launch_mock_clear_last_app_id();
177+ ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
178+ ubuntu_app_launch_mock_clear_last_app_id();
179
180 /* First app */
181 dispatch_url("appid://com.test.good/first-listed-app/current-user-version");
182- ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id());
183- upstart_app_launch_mock_clear_last_app_id();
184+ ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
185+ ubuntu_app_launch_mock_clear_last_app_id();
186
187 /* Last app */
188 dispatch_url("appid://com.test.good/last-listed-app/current-user-version");
189- ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id());
190- upstart_app_launch_mock_clear_last_app_id();
191+ ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
192+ ubuntu_app_launch_mock_clear_last_app_id();
193
194 /* Only app */
195 dispatch_url("appid://com.test.good/only-listed-app/current-user-version");
196- ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id());
197- upstart_app_launch_mock_clear_last_app_id();
198+ ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
199+ ubuntu_app_launch_mock_clear_last_app_id();
200
201 /* Wild app fixed version */
202 dispatch_url("appid://com.test.good/only-listed-app/1.2.3");
203- ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id());
204- upstart_app_launch_mock_clear_last_app_id();
205+ ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
206+ ubuntu_app_launch_mock_clear_last_app_id();
207
208 return;
209 }
210@@ -114,16 +114,16 @@
211 TEST_F(AppIdTest, OrderingUrl)
212 {
213 dispatch_url("appid://com.test.multiple/first-listed-app/current-user-version");
214- ASSERT_STREQ("com.test.multiple_app-first_1.2.3", upstart_app_launch_mock_get_last_app_id());
215- upstart_app_launch_mock_clear_last_app_id();
216+ ASSERT_STREQ("com.test.multiple_app-first_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
217+ ubuntu_app_launch_mock_clear_last_app_id();
218
219 dispatch_url("appid://com.test.multiple/last-listed-app/current-user-version");
220- ASSERT_STREQ("com.test.multiple_app-last_1.2.3", upstart_app_launch_mock_get_last_app_id());
221- upstart_app_launch_mock_clear_last_app_id();
222+ ASSERT_STREQ("com.test.multiple_app-last_1.2.3", ubuntu_app_launch_mock_get_last_app_id());
223+ ubuntu_app_launch_mock_clear_last_app_id();
224
225 dispatch_url("appid://com.test.multiple/only-listed-app/current-user-version");
226- ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id());
227- upstart_app_launch_mock_clear_last_app_id();
228+ ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id());
229+ ubuntu_app_launch_mock_clear_last_app_id();
230
231 return;
232 }
233@@ -133,8 +133,8 @@
234 g_setenv("TEST_CLICK_DB", "not-click-db", TRUE);
235
236 dispatch_url("appid://com.test.good/app1/current-user-version");
237- ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id());
238- upstart_app_launch_mock_clear_last_app_id();
239+ ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id());
240+ ubuntu_app_launch_mock_clear_last_app_id();
241
242 return;
243 }
244@@ -144,6 +144,6 @@
245 g_setenv("TEST_CLICK_USER", "not-test-user", TRUE);
246
247 dispatch_url("appid://com.test.good/app1/current-user-version");
248- ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id());
249- upstart_app_launch_mock_clear_last_app_id();
250+ ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id());
251+ ubuntu_app_launch_mock_clear_last_app_id();
252 }
253
254=== modified file 'tests/dispatcher-test.cc'
255--- tests/dispatcher-test.cc 2014-03-31 17:17:07 +0000
256+++ tests/dispatcher-test.cc 2014-05-26 13:09:13 +0000
257@@ -19,7 +19,7 @@
258 #include <gio/gio.h>
259 #include <gtest/gtest.h>
260 #include "dispatcher.h"
261-#include "upstart-app-launch-mock.h"
262+#include "ubuntu-app-launch-mock.h"
263 #include "url-db.h"
264
265 class DispatcherTest : public ::testing::Test
266@@ -64,7 +64,7 @@
267
268 g_main_loop_unref(mainloop);
269
270- upstart_app_launch_mock_clear_last_app_id();
271+ ubuntu_app_launch_mock_clear_last_app_id();
272
273 /* let other threads settle */
274 g_usleep(500000);
275@@ -84,28 +84,28 @@
276 {
277 /* Good sanity check */
278 dispatch_url("application:///foo.desktop");
279- ASSERT_STREQ("foo", upstart_app_launch_mock_get_last_app_id());
280- upstart_app_launch_mock_clear_last_app_id();
281+ ASSERT_STREQ("foo", ubuntu_app_launch_mock_get_last_app_id());
282+ ubuntu_app_launch_mock_clear_last_app_id();
283
284 /* No .desktop */
285 dispatch_url("application:///foo");
286- ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id());
287- upstart_app_launch_mock_clear_last_app_id();
288+ ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id());
289+ ubuntu_app_launch_mock_clear_last_app_id();
290
291 /* Missing a / */
292 dispatch_url("application://foo.desktop");
293- ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id());
294- upstart_app_launch_mock_clear_last_app_id();
295+ ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id());
296+ ubuntu_app_launch_mock_clear_last_app_id();
297
298 /* Good with hyphens */
299 dispatch_url("application:///my-really-cool-app.desktop");
300- ASSERT_STREQ("my-really-cool-app", upstart_app_launch_mock_get_last_app_id());
301- upstart_app_launch_mock_clear_last_app_id();
302+ ASSERT_STREQ("my-really-cool-app", ubuntu_app_launch_mock_get_last_app_id());
303+ ubuntu_app_launch_mock_clear_last_app_id();
304
305 /* Good Click Style */
306 dispatch_url("application:///com.test.foo_bar-app_0.3.4.desktop");
307- ASSERT_STREQ("com.test.foo_bar-app_0.3.4", upstart_app_launch_mock_get_last_app_id());
308- upstart_app_launch_mock_clear_last_app_id();
309+ ASSERT_STREQ("com.test.foo_bar-app_0.3.4", ubuntu_app_launch_mock_get_last_app_id());
310+ ubuntu_app_launch_mock_clear_last_app_id();
311
312 return;
313 }
314@@ -114,13 +114,13 @@
315 {
316 /* Base Calendar */
317 dispatch_url("calendar:///?starttime=196311221830Z");
318- ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", upstart_app_launch_mock_get_last_app_id());
319- upstart_app_launch_mock_clear_last_app_id();
320+ ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", ubuntu_app_launch_mock_get_last_app_id());
321+ ubuntu_app_launch_mock_clear_last_app_id();
322
323 /* Two Slash, nothing else */
324 dispatch_url("calendar://");
325- ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", upstart_app_launch_mock_get_last_app_id());
326- upstart_app_launch_mock_clear_last_app_id();
327+ ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", ubuntu_app_launch_mock_get_last_app_id());
328+ ubuntu_app_launch_mock_clear_last_app_id();
329
330 return;
331 }
332@@ -130,13 +130,13 @@
333 {
334 /* File Video */
335 dispatch_url("file:///home/bar/Videos/foo.mp4");
336- ASSERT_STREQ("mediaplayer-app", upstart_app_launch_mock_get_last_app_id());
337- upstart_app_launch_mock_clear_last_app_id();
338+ ASSERT_STREQ("mediaplayer-app", ubuntu_app_launch_mock_get_last_app_id());
339+ ubuntu_app_launch_mock_clear_last_app_id();
340
341 /* File Video */
342 dispatch_url("file:///home/bar/Music/The_Bars_Live.mp3");
343- ASSERT_STREQ("com.ubuntu.music_music_1.5.4", upstart_app_launch_mock_get_last_app_id());
344- upstart_app_launch_mock_clear_last_app_id();
345+ ASSERT_STREQ("com.ubuntu.music_music_1.5.4", ubuntu_app_launch_mock_get_last_app_id());
346+ ubuntu_app_launch_mock_clear_last_app_id();
347
348 return;
349 }
350
351=== modified file 'tests/service-test.cc'
352--- tests/service-test.cc 2014-02-13 17:01:05 +0000
353+++ tests/service-test.cc 2014-05-26 13:09:13 +0000
354@@ -32,7 +32,7 @@
355 GDBusConnection * bus = NULL;
356
357 virtual void SetUp() {
358- g_setenv("UPSTART_APP_LAUNCH_USE_SESSION", "1", TRUE);
359+ g_setenv("UBUNTU_APP_LAUNCH_USE_SESSION", "1", TRUE);
360 g_setenv("URL_DISPATCHER_DISABLE_RECOVERABLE_ERROR", "1", TRUE);
361
362 service = dbus_test_service_new(NULL);
363
364=== renamed file 'tests/upstart-app-launch-mock.c' => 'tests/ubuntu-app-launch-mock.c'
365--- tests/upstart-app-launch-mock.c 2013-09-26 16:04:51 +0000
366+++ tests/ubuntu-app-launch-mock.c 2014-05-26 13:09:13 +0000
367@@ -15,21 +15,21 @@
368 *
369 */
370
371-#include <upstart-app-launch.h>
372-#include "upstart-app-launch-mock.h"
373+#include <ubuntu-app-launch.h>
374+#include "ubuntu-app-launch-mock.h"
375
376 static gchar * last_appid = NULL;
377
378 gboolean
379-upstart_app_launch_start_application (const gchar * appid, const gchar * const * uris)
380+ubuntu_app_launch_start_application (const gchar * appid, const gchar * const * uris)
381 {
382- upstart_app_launch_mock_clear_last_app_id();
383+ ubuntu_app_launch_mock_clear_last_app_id();
384 last_appid = g_strdup(appid);
385 return TRUE;
386 }
387
388 void
389-upstart_app_launch_mock_clear_last_app_id (void)
390+ubuntu_app_launch_mock_clear_last_app_id (void)
391 {
392 g_free(last_appid);
393 last_appid = NULL;
394@@ -37,7 +37,7 @@
395 }
396
397 gchar *
398-upstart_app_launch_mock_get_last_app_id (void)
399+ubuntu_app_launch_mock_get_last_app_id (void)
400 {
401 return last_appid;
402 }
403
404=== renamed file 'tests/upstart-app-launch-mock.h' => 'tests/ubuntu-app-launch-mock.h'
405--- tests/upstart-app-launch-mock.h 2013-09-26 16:01:14 +0000
406+++ tests/ubuntu-app-launch-mock.h 2014-05-26 13:09:13 +0000
407@@ -22,8 +22,8 @@
408
409 G_BEGIN_DECLS
410
411-void upstart_app_launch_mock_clear_last_app_id (void);
412-gchar * upstart_app_launch_mock_get_last_app_id (void);
413+void ubuntu_app_launch_mock_clear_last_app_id (void);
414+gchar * ubuntu_app_launch_mock_get_last_app_id (void);
415
416 G_END_DECLS
417

Subscribers

People subscribed via source and target branches