Merge lp:~dpm/reminders-app/account-click into lp:reminders-app

Proposed by David Planella
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 238
Merged at revision: 261
Proposed branch: lp:~dpm/reminders-app/account-click
Merge into: lp:reminders-app
Diff against target: 429 lines (+114/-107)
13 files modified
CMakeLists.txt (+12/-0)
com.ubuntu.reminders_reminders.application.in (+2/-2)
debian/account-plugin-evernote-sandbox.install (+2/-2)
debian/account-plugin-evernote.install (+2/-2)
debian/control (+13/-13)
debian/reminders-app-autopilot.install (+1/-1)
debian/rules (+0/-4)
manifest.json.in (+19/-6)
src/CMakeLists.txt (+0/-2)
src/account-plugin/CMakeLists.txt (+53/-69)
src/app/qml/reminders.qml (+2/-2)
tests/autopilot/reminders/credentials.py (+4/-2)
tests/autopilot/reminders/tests/test_credentials.py (+4/-2)
To merge this branch: bzr merge lp:~dpm/reminders-app/account-click
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nicholas Skaggs (community) Needs Fixing
Michael Zanetti (community) code review Approve
Chris Wayne Approve
Alberto Mardegan (community) Approve
Review via email: mp+230768@code.launchpad.net

Commit message

Move the account plugin to the click package

Description of the change

Now that there is support for account plugins as click packages, I'd like to move away from the .deb package the app requires on the phone to have a self-contained click package that contains the app and the account plugin.

This will allow us as well to replace the Evernote API key behind Jenkins, while we can leave the current one in the code.

# Notes

- The click reviewers tools show validation errors: bug 1357211
- Click package available for testing at: http://people.canonical.com/~dpm/click/com.ubuntu.reminders_0.5.230_armhf.click
- The layout of the click package is as follows: http://pastebin.ubuntu.com/8044356/ - I'm not too sure about where the authentication plugin expects the account icon to be
- The layout of the installed click package: http://pastebin.ubuntu.com/8044350/
- The upload to the store should be coordinated with the removal of the Evernote account plugin from the seeds

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Chris Wayne (cwayne) wrote :

IIRC the .service file should actually technically be included in the app itself, rather than the account-plugin click. I'm not sure how much it matters since it's all 1 click package, but it may still be a good thing to change

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

I tested this out on device and had an error. Talking to Mardy, he suggested:-

14:53 <mardy> ah, right the manifest.json is wrong
14:53 <mardy> it says "account-qml-plugin": "@ACCOUNT_SERVICE_DIR@/evernote",
14:54 <popey> what should it be?
14:54 <mardy> s/ACCOUNT_SERVICE_DIR/ACCOUNT_QML_PLUGIN_DIR/
14:55 <mardy> if I can read the CMakeLists.txt correctly

lp:~dpm/reminders-app/account-click updated
221. By David Planella

Fixed manifest path for account qml plugin

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
lp:~dpm/reminders-app/account-click updated
222. By David Planella

Changed the manifest hooks according to jdstrand's feedback

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Chris, I've changed the hooks in the manifest as per jdstrand's feedback. Does that address your comment? Or were you suggesting any other changes?

Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi! I finally spotted what is the issue (sorry, I should have thought of it earlier, as it's quite obvious!): now that the .provider and qml files are shipped via a click package, their name is not just "evernote". The hooks we run will rename them to <click-package_application-name>.

So, in your case you should update the evernote code (the parts where you use the AccountServiceModel and the Setup elements) to use this as provider: "com.ubuntu.reminders_evernote-account-plugin".

lp:~dpm/reminders-app/account-click updated
223. By David Planella

Added changes recommended by mardy

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~dpm/reminders-app/account-click updated
224. By David Planella

Added ability to switch between account providers

Revision history for this message
David Planella (dpm) wrote :

Ok, I've added all the changes recommended by mardy:

http://bazaar.launchpad.net/~dpm/reminders-app/account-click/revision/223

Except for one, which is not essential and I will address separately to keep the changes to a minimum:

- Rename the provider file to com.ubuntu.reminders_evernote-account-plugin in the deb as well, to simplify the building

There is now a new .click package available for testing at: http://people.canonical.com/~dpm/click/com.ubuntu.reminders_0.5.224_armhf.click

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~dpm/reminders-app/account-click updated
225. By David Planella

Merged from trunk, fixed manifest file conflict

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Mardegan (mardy) wrote :

This looks correct :-)

review: Approve
Revision history for this message
Chris Wayne (cwayne) wrote :

LGTM

review: Approve
Revision history for this message
David Planella (dpm) wrote :

#blocked by bug 1368763

Revision history for this message
David Planella (dpm) wrote :

#blocked by bug 1369941

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~dpm/reminders-app/account-click updated
226. By David Planella

Merged from trunk

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

So the app now works, but its .deb packaged version used by Jenkins fails the tests.

I can't figure out what's different and could be causing the .deb packages to fail. Unlike the click counterpart, the .deb packaging has remained the same, and only some ids have been redefined.

Here's a diff of the changes in the .deb packages:

http://pastebin.ubuntu.com/8417102/

lp:~dpm/reminders-app/account-click updated
227. By David Planella

Renamed .service and .provider files to make the desktop version work

228. By David Planella

Fixed installation names in the debian packaging

229. By David Planella

Updated service and provider names in the manifest file

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~dpm/reminders-app/account-click updated
230. By David Planella

Fixed names of services

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~dpm/reminders-app/account-click updated
231. By David Planella

Fixed the service file path in the manifest

232. By David Planella

Really really really fix the manifest now

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I'll note this works fine locally after dpm's latest tweaks, but fails at this step in jenkins:

        session = Signon.AuthSession.new(identity, method)
        session.process(
            session_data, mechanism, self._on_login_processed, None)

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

We can see a bit more detail here about what's happening locally (which works) and what is happening in jenkins:

http://paste.ubuntu.com/8467742/

In short, the authentication data is blank because it appears the initial account creation

        account = self._manager.create_account('evernote-sandbox')

is blank, instead of having the oauth details and keys.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

I can confirm I can recreate what is occurring in jenkins locally but using the installed binaries instead of the local build. This rules out something specific to jenkins.

This points to something in the cmake or debian build as the potential issue.

Revision history for this message
David Planella (dpm) wrote :

Thanks a lot Nick. Do you think you could create a small python file to
reproduce the failure?

I'd then test the file with locally installed packages: first the ones from
trunk, and then the ones from this branch. I'd use this to point mardy to
the failure (rather than having to start the test suite to reproduce).

On Tue, Sep 30, 2014 at 9:51 PM, Nicholas Skaggs <
<email address hidden>> wrote:

> I can confirm I can recreate what is occurring in jenkins locally but
> using the installed binaries instead of the local build. This rules out
> something specific to jenkins.
>
> This points to something in the cmake or debian build as the potential
> issue.
> --
> https://code.launchpad.net/~dpm/reminders-app/account-click/+merge/230768
> You are the owner of lp:~dpm/reminders-app/account-click.
>

Revision history for this message
Alberto Mardegan (mardy) wrote :

At least one reason for the failure is quite obvious: the provider was renamed from "evernote-sandbox" to "com.ubuntu.reminders_evernote-account-plugin-sandbox".

lp:~dpm/reminders-app/account-click updated
233. By David Planella

Updated provider and service IDs in the tests too

Revision history for this message
David Planella (dpm) wrote :

Ok, updated the tests to use the right service and provider IDs now. Fingers crossed!

lp:~dpm/reminders-app/account-click updated
234. By David Planella

Added -sandbox suffix to service ID in the tests

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~dpm/reminders-app/account-click updated
235. By David Planella

Make flake8 happy

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~dpm/reminders-app/account-click updated
236. By David Planella

Fixed typo in variable name

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

code changes look ok to me, didn't test it though

review: Approve (code review)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Can you wrap-and-sort the debian/control file David? I notice there is some duplicated depends in the list. account-plugin-evernote-sandbox is listed twice for instance under reminders-app-autopilot

review: Needs Fixing
Revision history for this message
David Planella (dpm) wrote :

It now works for me on the RTM images too. As per mardy's instructions, I needed to uninstall and reinstall the app after the u-s-s-o-a package got updated in my system. So I think that's finally good to go.

lp:~dpm/reminders-app/account-click updated
237. By David Planella

Added CMake command to determine the bzr revno upon build

238. By David Planella

Ran wrap-and-sort on debian files

Revision history for this message
David Planella (dpm) wrote :

On Wed, Oct 1, 2014 at 5:18 PM, Nicholas Skaggs <
<email address hidden>> wrote:

> Review: Needs Fixing
>
> Can you wrap-and-sort the debian/control file David? I notice there is
> some duplicated depends in the list. account-plugin-evernote-sandbox is
> listed twice for instance under reminders-app-autopilot
>

Done, thanks for the review and the hint at wrap-and-sort!

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-09-28 09:10:46 +0000
+++ CMakeLists.txt 2014-10-01 20:48:08 +0000
@@ -22,6 +22,11 @@
22set(EXEC "reminders")22set(EXEC "reminders")
23set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")23set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
2424
25set(ACCOUNT_ICON_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps)
26set(ACCOUNT_PROVIDER_DIR ${CMAKE_INSTALL_DATADIR}/accounts/providers)
27set(ACCOUNT_SERVICE_DIR ${CMAKE_INSTALL_DATADIR}/accounts/services)
28set(ACCOUNT_QML_PLUGIN_DIR ${CMAKE_INSTALL_DATADIR}/accounts/qml-plugins)
29
25if(CLICK_MODE)30if(CLICK_MODE)
26 if(NOT DEFINED BZR_SOURCE)31 if(NOT DEFINED BZR_SOURCE)
27 set(BZR_SOURCE "lp:${APP_HARDCODE}")32 set(BZR_SOURCE "lp:${APP_HARDCODE}")
@@ -38,6 +43,13 @@
38 set(DATA_DIR /)43 set(DATA_DIR /)
39 set(DESKTOP_DIR ${DATA_DIR})44 set(DESKTOP_DIR ${DATA_DIR})
40 set(APPLICATION_DIR ${DATA_DIR})45 set(APPLICATION_DIR ${DATA_DIR})
46
47 # Sets BZR_REVNO
48 execute_process(
49 COMMAND bzr revno ${CMAKE_SOURCE_DIR}
50 OUTPUT_VARIABLE BZR_REVNO
51 OUTPUT_STRIP_TRAILING_WHITESPACE
52 )
41 if(NOT BZR_REVNO)53 if(NOT BZR_REVNO)
42 set(BZR_REVNO "latest")54 set(BZR_REVNO "latest")
43 endif(NOT BZR_REVNO)55 endif(NOT BZR_REVNO)
4456
=== modified file 'com.ubuntu.reminders_reminders.application.in'
--- com.ubuntu.reminders_reminders.application.in 2014-06-27 14:32:32 +0000
+++ com.ubuntu.reminders_reminders.application.in 2014-10-01 20:48:08 +0000
@@ -4,10 +4,10 @@
4 <description>Reminders</description>4 <description>Reminders</description>
55
6 <services>6 <services>
7 <service id="evernote">7 <service id="com.ubuntu.reminders_reminders">
8 <description>Synchronize your notes with Evernote</description>8 <description>Synchronize your notes with Evernote</description>
9 </service>9 </service>
10 <service id="evernote-sandbox">10 <service id="com.ubuntu.reminders_reminders-sandbox">
11 <description>Synchronize your notes with the Evernote Sandbox</description>11 <description>Synchronize your notes with the Evernote Sandbox</description>
12 </service>12 </service>
13 </services>13 </services>
1414
=== modified file 'debian/account-plugin-evernote-sandbox.install'
--- debian/account-plugin-evernote-sandbox.install 2014-06-27 17:26:38 +0000
+++ debian/account-plugin-evernote-sandbox.install 2014-10-01 20:48:08 +0000
@@ -1,4 +1,4 @@
1usr/share/accounts/providers/evernote-sandbox.provider1usr/share/accounts/providers/com.ubuntu.reminders_evernote-account-plugin-sandbox.provider
2usr/share/accounts/qml-plugins/evernote-sandbox/Main.qml2usr/share/accounts/qml-plugins/evernote-sandbox/Main.qml
3usr/share/accounts/services/evernote-sandbox.service3usr/share/accounts/services/com.ubuntu.reminders_reminders-sandbox.service
4usr/share/icons/hicolor/32x32/apps/evernote-sandbox.png4usr/share/icons/hicolor/32x32/apps/evernote-sandbox.png
55
=== modified file 'debian/account-plugin-evernote.install'
--- debian/account-plugin-evernote.install 2014-06-27 15:57:59 +0000
+++ debian/account-plugin-evernote.install 2014-10-01 20:48:08 +0000
@@ -1,7 +1,7 @@
1#!/usr/bin/dh-exec1#!/usr/bin/dh-exec
22
3usr/share/accounts/providers/evernote.provider3usr/share/accounts/providers/com.ubuntu.reminders_evernote-account-plugin.provider
4usr/share/accounts/qml-plugins/evernote/Main.qml4usr/share/accounts/qml-plugins/evernote/Main.qml
5usr/share/accounts/services/evernote.service5usr/share/accounts/services/com.ubuntu.reminders_reminders.service
6usr/share/icons/hicolor/32x32/apps/evernote.png6usr/share/icons/hicolor/32x32/apps/evernote.png
7usr/lib/*/qt5/qml/Evernote usr/lib/${DEB_HOST_MULTIARCH}/ubuntu-system-settings/private7usr/lib/*/qt5/qml/Evernote usr/lib/${DEB_HOST_MULTIARCH}/ubuntu-system-settings/private
88
=== modified file 'debian/control'
--- debian/control 2014-09-28 08:31:38 +0000
+++ debian/control 2014-10-01 20:48:08 +0000
@@ -10,7 +10,7 @@
10 libssl-dev,10 libssl-dev,
11 python3-all,11 python3-all,
12 qt5-default,12 qt5-default,
13 qtdeclarative5-dev,13 qtdeclarative5-dev
14Standards-Version: 3.9.514Standards-Version: 3.9.5
15Section: misc15Section: misc
16Homepage: https://launchpad.net/reminders-app16Homepage: https://launchpad.net/reminders-app
@@ -18,24 +18,24 @@
1818
19Package: reminders-app19Package: reminders-app
20Architecture: any20Architecture: any
21Depends: ${misc:Depends}, ${shlibs:Depends},21Depends: account-plugin-evernote,
22 account-plugin-evernote,
23 qtdeclarative5-accounts-plugin,22 qtdeclarative5-accounts-plugin,
24 qtdeclarative5-evernote0.1,23 qtdeclarative5-evernote0.1,
25 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
26 qtdeclarative5-localstorage-plugin,24 qtdeclarative5-localstorage-plugin,
27 qtdeclarative5-online-accounts-client0.1 (>= 0.3+14.10.20140506),25 qtdeclarative5-online-accounts-client0.1 (>= 0.3+14.10.20140506),
26 qtdeclarative5-qtquick2-plugin,
28 qtdeclarative5-quicklayouts-plugin,27 qtdeclarative5-quicklayouts-plugin,
29 qtdeclarative5-qtquick2-plugin,28 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
30 signon-plugin-oauth2 (>= 0.19-0~57~),29 signon-plugin-oauth2 (>= 0.19-0~57~),
31 suru-icon-theme | ubuntu-mobile-icons,30 suru-icon-theme | ubuntu-mobile-icons,
31 ${misc:Depends},
32 ${shlibs:Depends}
32Description: Reminders application33Description: Reminders application
33 Note taking application powered by Evernote34 Note taking application powered by Evernote
3435
35Package: qtdeclarative5-evernote0.136Package: qtdeclarative5-evernote0.1
36Architecture: any37Architecture: any
37Depends: ${misc:Depends},38Depends: ${misc:Depends}, ${shlibs:Depends}
38 ${shlibs:Depends},
39Description: Expose the Evernote API to QML applications39Description: Expose the Evernote API to QML applications
40 This module provides access to the Evernote API from QML applications.40 This module provides access to the Evernote API from QML applications.
4141
@@ -44,7 +44,7 @@
44Depends: libaccount-plugin-generic-oauth,44Depends: libaccount-plugin-generic-oauth,
45 qtdeclarative5-online-accounts-client0.1,45 qtdeclarative5-online-accounts-client0.1,
46 ${misc:Depends},46 ${misc:Depends},
47 ${shlibs:Depends},47 ${shlibs:Depends}
48Description: Allow Ubuntu applications to access Evernote accounts48Description: Allow Ubuntu applications to access Evernote accounts
49 This plugin enables users to authenticate to their Evernote accounts,49 This plugin enables users to authenticate to their Evernote accounts,
50 providing syncing of Evernote notes across Ubuntu devices.50 providing syncing of Evernote notes across Ubuntu devices.
@@ -55,16 +55,14 @@
55 libaccount-plugin-generic-oauth,55 libaccount-plugin-generic-oauth,
56 qtdeclarative5-online-accounts-client0.1,56 qtdeclarative5-online-accounts-client0.1,
57 ${misc:Depends},57 ${misc:Depends},
58 ${shlibs:Depends},58 ${shlibs:Depends}
59Description: Allow Ubuntu applications to access Evernote sandbox accounts59Description: Allow Ubuntu applications to access Evernote sandbox accounts
60 This plugin enables developers to authenticate to their Evernote developer60 This plugin enables developers to authenticate to their Evernote developer
61 sandbox account, which allows syncing of Evernote notes across Ubuntu devices.61 sandbox account, which allows syncing of Evernote notes across Ubuntu devices.
6262
63Package: reminders-app-autopilot63Package: reminders-app-autopilot
64Architecture: all64Architecture: all
65Depends: ${misc:Depends},65Depends: account-plugin-evernote-sandbox,
66 reminders-app (>= ${source:Version}), reminders-app (<< ${source:Version}.1~),
67 account-plugin-evernote-sandbox,
68 libautopilot-qt,66 libautopilot-qt,
69 libclick-0.4-0,67 libclick-0.4-0,
70 libqt5test5,68 libqt5test5,
@@ -73,7 +71,9 @@
73 python3-fixtures,71 python3-fixtures,
74 python3-oauthlib,72 python3-oauthlib,
75 python3-requests-oauthlib,73 python3-requests-oauthlib,
74 reminders-app (<< ${source:Version}.1~),
75 reminders-app (>= ${source:Version}),
76 ubuntu-ui-toolkit-autopilot,76 ubuntu-ui-toolkit-autopilot,
77 account-plugin-evernote-sandbox77 ${misc:Depends}
78Description: Test package for the Reminders app78Description: Test package for the Reminders app
79 Autopilot tests for the Reminders app package79 Autopilot tests for the Reminders app package
8080
=== modified file 'debian/reminders-app-autopilot.install'
--- debian/reminders-app-autopilot.install 2014-06-26 15:43:02 +0000
+++ debian/reminders-app-autopilot.install 2014-10-01 20:48:08 +0000
@@ -1,3 +1,3 @@
1usr/lib/*/dist-packages/evernote/
1usr/lib/*/dist-packages/reminders/2usr/lib/*/dist-packages/reminders/
2usr/lib/*/dist-packages/thrift/3usr/lib/*/dist-packages/thrift/
3usr/lib/*/dist-packages/evernote/
44
=== modified file 'debian/rules'
--- debian/rules 2014-09-08 15:39:00 +0000
+++ debian/rules 2014-10-01 20:48:08 +0000
@@ -9,10 +9,6 @@
99
10override_dh_auto_configure:10override_dh_auto_configure:
11 dh_auto_configure -- \11 dh_auto_configure -- \
12 -DEVERNOTE_SANDBOX_CONSUMER_KEY="ubuntu" \
13 -DEVERNOTE_SANDBOX_CONSUMER_SECRET="44f8ee81a8359500" \
14 -DEVERNOTE_CONSUMER_KEY="canonicalis" \
15 -DEVERNOTE_CONSUMER_SECRET="174a72ce5bffbcad" \
16 -DCLICK_MODE=OFF12 -DCLICK_MODE=OFF
1713
18override_dh_install:14override_dh_install:
1915
=== modified file 'manifest.json.in'
--- manifest.json.in 2014-09-23 07:35:24 +0000
+++ manifest.json.in 2014-10-01 20:48:08 +0000
@@ -5,8 +5,13 @@
5 "hooks": {5 "hooks": {
6 "reminders": {6 "reminders": {
7 "account-application": "com.ubuntu.reminders_reminders.application",7 "account-application": "com.ubuntu.reminders_reminders.application",
8 "account-service": "@ACCOUNT_SERVICE_DIR@/com.ubuntu.reminders_reminders.service",
8 "apparmor": "reminders.apparmor",9 "apparmor": "reminders.apparmor",
9 "desktop": "com.ubuntu.reminders.desktop"10 "desktop": "com.ubuntu.reminders.desktop"
11 },
12 "evernote-account-plugin": {
13 "account-qml-plugin": "@ACCOUNT_QML_PLUGIN_DIR@/evernote",
14 "account-provider": "@ACCOUNT_PROVIDER_DIR@/com.ubuntu.reminders_evernote-account-plugin.provider"
10 }15 }
11 },16 },
12 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",17 "maintainer": "Ubuntu App Cats <ubuntu-touch-coreapps@lists.launchpad.net>",
@@ -17,10 +22,18 @@
17 "vcs-bzr": "lp:reminders-app",22 "vcs-bzr": "lp:reminders-app",
18 "vcs-bzr-revno": "@BZR_REVNO@"23 "vcs-bzr-revno": "@BZR_REVNO@"
19 },24 },
20 "x-test": {25 "x-test": {
21 "autopilot": {26 "autopilot": {
22 "autopilot_module": "@AUTOPILOT_DIR@",27 "autopilot_module": "@AUTOPILOT_DIR@",
23 "depends": ["account-plugin-evernote-sandbox", "libclick-0.4-0", "python3-dbus", "python3-dbusmock", "python3-fixtures", "python3-oauthlib", "python3-requests-oauthlib"]28 "depends": [
24 }29 "account-plugin-evernote-sandbox",
25 }30 "libclick-0.4-0",
31 "python3-dbus",
32 "python3-dbusmock",
33 "python3-fixtures",
34 "python3-oauthlib",
35 "python3-requests-oauthlib"
36 ]
37 }
38 }
26}39}
2740
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2014-01-30 13:53:15 +0000
+++ src/CMakeLists.txt 2014-10-01 20:48:08 +0000
@@ -1,5 +1,3 @@
1if(NOT CLICK_MODE)
2add_subdirectory(account-plugin)1add_subdirectory(account-plugin)
3endif(NOT CLICK_MODE)
4add_subdirectory(plugin)2add_subdirectory(plugin)
5add_subdirectory(app)3add_subdirectory(app)
64
=== modified file 'src/account-plugin/CMakeLists.txt'
--- src/account-plugin/CMakeLists.txt 2014-07-01 13:27:32 +0000
+++ src/account-plugin/CMakeLists.txt 2014-10-01 20:48:08 +0000
@@ -1,70 +1,54 @@
1set(EVERNOTE_SANDBOX_CONSUMER_KEY "ubuntu")
2set(EVERNOTE_SANDBOX_CONSUMER_SECRET "44f8ee81a8359500")
3set(EVERNOTE_CONSUMER_KEY "canonicalis")
4set(EVERNOTE_CONSUMER_SECRET "174a72ce5bffbcad")
5
6function(EvernoteOnlineAccountSetup account_display_name account_name provider_id service_id hostname consumer_key consumer_secret)
7
8 set(EVERNOTE_DATA_FILENAME evernote)
9 set(EVERNOTE_CONSUMER_KEY ${consumer_key})
10 set(EVERNOTE_CONSUMER_SECRET ${consumer_secret})
11
12 set(EVERNOTE_ACCOUNT_DISPLAY_NAME ${account_display_name})
13 set(EVERNOTE_ACCOUNT_NAME ${account_name})
14 set(EVERNOTE_HOSTNAME ${hostname})
15
16 set(EVERNOTE_PROVIDER_ID ${provider_id})
17 set(EVERNOTE_SERVICE_ID ${service_id})
18 set(EVERNOTE_ICON_NAME ${account_name})
19
20 set(ICON_FILE data/icons/${EVERNOTE_ICON_NAME}.png)
21 set(PROVIDER_FILE_IN data/providers/${EVERNOTE_DATA_FILENAME}.provider.in)
22 set(SERVICE_FILE_IN data/services/${EVERNOTE_DATA_FILENAME}.service.in)
23 set(QML_PLUGIN_FILE_IN qml/${EVERNOTE_DATA_FILENAME}/Main.qml.in)
24
25 set(PROVIDER_FILE data/providers/${EVERNOTE_PROVIDER_ID}.provider)
26 set(SERVICE_FILE data/services/${EVERNOTE_SERVICE_ID}.service)
27 set(QML_PLUGIN_FILE qml/${account_name}/Main.qml)
28
29 install(FILES ${ICON_FILE} DESTINATION ${ACCOUNT_ICON_DIR})
30
31 configure_file(${PROVIDER_FILE_IN} ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE})
32 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE}
33 DESTINATION ${ACCOUNT_PROVIDER_DIR})
34
35 configure_file(${SERVICE_FILE_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_FILE})
36 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_FILE}
37 DESTINATION ${ACCOUNT_SERVICE_DIR})
38
39 configure_file(${QML_PLUGIN_FILE_IN} ${CMAKE_CURRENT_BINARY_DIR}/${QML_PLUGIN_FILE})
40 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${QML_PLUGIN_FILE}
41 DESTINATION ${ACCOUNT_QML_PLUGIN_DIR}/${EVERNOTE_ACCOUNT_NAME})
42
43endfunction()
44
1# Build and install the files for the production plugin45# Build and install the files for the production plugin
246EvernoteOnlineAccountSetup(Evernote evernote com.ubuntu.reminders_evernote-account-plugin com.ubuntu.reminders_reminders www.evernote.com
3set(EVERNOTE_ACCOUNT_DISPLAY_NAME Evernote)47 ${EVERNOTE_CONSUMER_KEY} ${EVERNOTE_CONSUMER_SECRET})
4set(EVERNOTE_ACCOUNT_NAME evernote)48
5set(EVERNOTE_HOSTNAME www.evernote.com)49if(NOT CLICK_MODE)
650 # Build and install the files for the sandbox plugin
7set(EVERNOTE_PROVIDER_ID ${EVERNOTE_ACCOUNT_NAME})51 # We're only building it as a .deb package for Jenkins, we don't need it in the click package
8set(EVERNOTE_SERVICE_ID ${EVERNOTE_ACCOUNT_NAME})52 EvernoteOnlineAccountSetup("Evernote Developer Sandbox" evernote-sandbox com.ubuntu.reminders_evernote-account-plugin-sandbox com.ubuntu.reminders_reminders-sandbox sandbox.evernote.com
9set(EVERNOTE_ICON_NAME ${EVERNOTE_ACCOUNT_NAME})53 ${EVERNOTE_SANDBOX_CONSUMER_KEY} ${EVERNOTE_SANDBOX_CONSUMER_SECRET})
1054endif(NOT CLICK_MODE)
11set(ICON data/icons/${EVERNOTE_ICON_NAME}.png)
12set(PROVIDER_FILE data/providers/${EVERNOTE_ACCOUNT_NAME}.provider)
13set(SERVICE_FILE data/services/${EVERNOTE_ACCOUNT_NAME}.service)
14set(QML_PLUGIN_FILE qml/${EVERNOTE_ACCOUNT_NAME}/Main.qml)
15set(QML_PLUGIN_DIR ${CMAKE_INSTALL_DATADIR}/accounts/qml-plugins)
16
17set(ICON_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps)
18set(PROVIDER_DIR ${CMAKE_INSTALL_DATADIR}/accounts/providers)
19set(SERVICE_DIR ${CMAKE_INSTALL_DATADIR}/accounts/services)
20
21install(FILES ${ICON} DESTINATION ${ICON_DIR})
22
23configure_file(${PROVIDER_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE})
24install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE}
25 DESTINATION ${PROVIDER_DIR})
26
27configure_file(${SERVICE_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_FILE})
28install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_FILE}
29 DESTINATION ${SERVICE_DIR})
30
31configure_file(${QML_PLUGIN_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${QML_PLUGIN_FILE})
32install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${QML_PLUGIN_FILE}
33 DESTINATION ${QML_PLUGIN_DIR}/${EVERNOTE_ACCOUNT_NAME})
34
35# Build and install the files for the sandbox plugin
36
37set(EVERNOTE_ACCOUNT_DISPLAY_NAME "Evernote Developer Sandbox")
38set(EVERNOTE_ACCOUNT_NAME evernote-sandbox)
39set(EVERNOTE_HOSTNAME sandbox.evernote.com)
40set(EVERNOTE_CONSUMER_KEY ${EVERNOTE_SANDBOX_CONSUMER_KEY})
41set(EVERNOTE_CONSUMER_SECRET ${EVERNOTE_SANDBOX_CONSUMER_SECRET})
42
43set(EVERNOTE_PROVIDER_ID ${EVERNOTE_ACCOUNT_NAME})
44set(EVERNOTE_SERVICE_ID ${EVERNOTE_ACCOUNT_NAME})
45set(EVERNOTE_ICON_NAME ${EVERNOTE_ACCOUNT_NAME})
46
47set(PROVIDER_FILE_SANDBOX data/providers/${EVERNOTE_ACCOUNT_NAME}.provider)
48set(SERVICE_FILE_SANDBOX data/services/${EVERNOTE_ACCOUNT_NAME}.service)
49set(QML_PLUGIN_FILE_SANDBOX qml/${EVERNOTE_ACCOUNT_NAME}/Main.qml)
50set(QML_PLUGIN_DIR ${CMAKE_INSTALL_DATADIR}/accounts/qml-plugins)
51
52install(FILES ${ICON}
53 DESTINATION ${ICON_DIR}
54 RENAME ${EVERNOTE_ACCOUNT_NAME}.png)
55
56configure_file(${PROVIDER_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE_SANDBOX})
57install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE_SANDBOX}
58 DESTINATION ${PROVIDER_DIR})
59
60configure_file(${PROVIDER_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE_SANDBOX})
61install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROVIDER_FILE_SANDBOX}
62 DESTINATION ${PROVIDER_DIR})
63
64configure_file(${SERVICE_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_FILE_SANDBOX})
65install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_FILE_SANDBOX}
66 DESTINATION ${SERVICE_DIR})
67
68configure_file(${QML_PLUGIN_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${QML_PLUGIN_FILE_SANDBOX})
69install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${QML_PLUGIN_FILE_SANDBOX}
70 DESTINATION ${QML_PLUGIN_DIR}/${EVERNOTE_ACCOUNT_NAME})
7155
=== added file 'src/account-plugin/data/icons/evernote-sandbox.png'
72Binary files src/account-plugin/data/icons/evernote-sandbox.png 1970-01-01 00:00:00 +0000 and src/account-plugin/data/icons/evernote-sandbox.png 2014-10-01 20:48:08 +0000 differ56Binary files src/account-plugin/data/icons/evernote-sandbox.png 1970-01-01 00:00:00 +0000 and src/account-plugin/data/icons/evernote-sandbox.png 2014-10-01 20:48:08 +0000 differ
=== modified file 'src/app/qml/reminders.qml'
--- src/app/qml/reminders.qml 2014-09-23 12:39:27 +0000
+++ src/app/qml/reminders.qml 2014-10-01 20:48:08 +0000
@@ -130,7 +130,7 @@
130130
131 AccountServiceModel {131 AccountServiceModel {
132 id: accounts132 id: accounts
133 service: useSandbox ? "evernote-sandbox" : "evernote"133 applicationId: "com.ubuntu.reminders_reminders"
134 }134 }
135135
136 AccountService {136 AccountService {
@@ -336,7 +336,7 @@
336 Setup {336 Setup {
337 id: setup337 id: setup
338 applicationId: "com.ubuntu.reminders_reminders"338 applicationId: "com.ubuntu.reminders_reminders"
339 providerId: "evernote"339 providerId: useSandbox ? "com.ubuntu.reminders_evernote-account-plugin-sandbox" : "com.ubuntu.reminders_evernote-account-plugin"
340 }340 }
341341
342 Button {342 Button {
343343
=== modified file 'tests/autopilot/reminders/credentials.py'
--- tests/autopilot/reminders/credentials.py 2014-09-01 23:10:54 +0000
+++ tests/autopilot/reminders/credentials.py 2014-10-01 20:48:08 +0000
@@ -81,7 +81,8 @@
8181
82 def _create_account(self):82 def _create_account(self):
83 logger.debug('Creating the Evernote account.')83 logger.debug('Creating the Evernote account.')
84 account = self._manager.create_account('evernote-sandbox')84 provider_id = 'com.ubuntu.reminders_evernote-account-plugin-sandbox'
85 account = self._manager.create_account(provider_id)
85 account.set_enabled(True)86 account.set_enabled(True)
86 account.store(self._on_account_created, None)87 account.store(self._on_account_created, None)
87 return account88 return account
@@ -143,7 +144,8 @@
143144
144 def _enable_evernote_service(self, account):145 def _enable_evernote_service(self, account):
145 logger.debug('Enabling evernote service.')146 logger.debug('Enabling evernote service.')
146 service = self._manager.get_service('evernote-sandbox')147 service_id = 'com.ubuntu.reminders_reminders-sandbox'
148 service = self._manager.get_service(service_id)
147 account.select_service(service)149 account.select_service(service)
148 account.set_enabled(True)150 account.set_enabled(True)
149 account.store(self._on_service_enabled, None)151 account.store(self._on_service_enabled, None)
150152
=== modified file 'tests/autopilot/reminders/tests/test_credentials.py'
--- tests/autopilot/reminders/tests/test_credentials.py 2014-07-30 17:23:26 +0000
+++ tests/autopilot/reminders/tests/test_credentials.py 2014-10-01 20:48:08 +0000
@@ -51,14 +51,16 @@
51 def test_add_evernote_account_must_set_provider(self):51 def test_add_evernote_account_must_set_provider(self):
52 account = self.add_evernote_account()52 account = self.add_evernote_account()
5353
54 self.assertEqual(account.get_provider_name(), 'evernote-sandbox')54 provider_id = 'com.ubuntu.reminders_evernote-account-plugin-sandbox'
55 self.assertEqual(account.get_provider_name(), provider_id)
5556
56 def test_add_evernote_account_must_enable_evernote_service(self):57 def test_add_evernote_account_must_enable_evernote_service(self):
57 account = self.add_evernote_account()58 account = self.add_evernote_account()
58 services = account.list_services()59 services = account.list_services()
5960
60 self.assertThat(services, HasLength(1))61 self.assertThat(services, HasLength(1))
61 self.assertEqual(services[0].get_name(), 'evernote-sandbox')62 service_id = 'com.ubuntu.reminders_reminders-sandbox'
63 self.assertEqual(services[0].get_name(), service_id)
62 service = Accounts.AccountService.new(account, services[0])64 service = Accounts.AccountService.new(account, services[0])
63 self.assertTrue(service.get_enabled())65 self.assertTrue(service.get_enabled())
6466

Subscribers

People subscribed via source and target branches