Skip to content

Commit

Permalink
Merge pull request #1025 from crossroads/master
Browse files Browse the repository at this point in the history
[0.22.0] Release
  • Loading branch information
patrixr authored May 28, 2021
2 parents b3cfbff + 29a426b commit a7bb85d
Show file tree
Hide file tree
Showing 36 changed files with 532 additions and 77 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
www-deploy:
<<: *defaults
docker:
- image: circleci/ruby:2.5.5
- image: cimg/ruby:2.7.3
steps:
- restore-cache: *restore-repo-cache
- restore-cache: *restore-bundle-cache
Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:

ios_build_and_deploy:
macos:
xcode: "11.0.0"
xcode: "12.0.1"
working_directory: ~/code
shell: /bin/bash --login -eo pipefail
environment:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.5.5
ruby-2.7.3
77 changes: 39 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ GEM
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.4)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.1)
aws-partitions (1.446.0)
aws-partitions (1.461.0)
aws-sdk-core (3.114.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
Expand All @@ -24,7 +24,7 @@ GEM
aws-sdk-kms (1.43.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.93.1)
aws-sdk-s3 (1.95.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
Expand Down Expand Up @@ -73,9 +73,9 @@ GEM
cocoapods-try (1.2.0)
colored (1.2)
colored2 (3.1.2)
commander-fastlane (4.4.6)
highline (~> 1.7.2)
concurrent-ruby (1.1.5)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.1.8)
declarative (0.0.20)
digest-crc (0.6.3)
rake (>= 12.0.0, < 14.0.0)
Expand All @@ -84,8 +84,10 @@ GEM
dotenv (2.7.6)
emoji_regex (3.2.2)
escape (0.0.4)
excon (0.80.1)
faraday (1.4.1)
excon (0.81.0)
faraday (1.4.2)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
Expand All @@ -94,21 +96,23 @@ GEM
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.3)
fastlane (2.181.0)
fastlane (2.184.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
Expand All @@ -117,9 +121,10 @@ GEM
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-api-client (>= 0.37.0, < 0.39.0)
google-cloud-storage (>= 1.15.0, < 2.0.0)
highline (>= 1.7.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.1)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
Expand All @@ -129,7 +134,6 @@ GEM
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
Expand All @@ -141,14 +145,8 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-api-client (0.38.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-apis-androidpublisher_v3 (0.4.0)
google-apis-core (~> 0.1)
google-apis-core (0.3.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
Expand All @@ -159,32 +157,34 @@ GEM
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.3.0)
google-apis-iamcredentials_v1 (0.4.0)
google-apis-core (~> 0.1)
google-apis-playcustomapp_v1 (0.3.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.3.0)
google-apis-storage_v1 (0.4.0)
google-apis-core (~> 0.1)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.1.0)
google-cloud-storage (1.31.0)
google-cloud-storage (1.31.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.16.1)
googleauth (0.16.2)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
highline (1.7.10)
highline (2.0.3)
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
Expand All @@ -196,23 +196,25 @@ GEM
memoist (0.16.2)
mini_magick (4.11.0)
mini_mime (1.1.0)
mini_portile2 (2.4.0)
minitest (5.14.2)
mini_portile2 (2.5.1)
minitest (5.14.4)
molinillo (0.6.6)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
net-scp (2.0.0)
net-ssh (>= 2.6.5, < 6.0.0)
net-ssh (5.2.0)
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
netrc (0.11.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.11.3)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
os (1.1.1)
plist (3.6.0)
public_suffix (4.0.6)
racc (1.5.2)
rake (13.0.3)
representable (3.1.1)
declarative (< 0.1.0)
Expand All @@ -233,8 +235,7 @@ GEM
simctl (1.6.8)
CFPropertyList
naturally
slack-notifier (2.3.2)
sshkit (1.18.2)
sshkit (1.21.2)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
terminal-notifier (2.0.0)
Expand All @@ -246,7 +247,7 @@ GEM
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
tzinfo (1.2.7)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
Expand Down Expand Up @@ -278,4 +279,4 @@ DEPENDENCIES
rake

BUNDLED WITH
1.17.3
2.1.4
3 changes: 3 additions & 0 deletions app/components/goodcity/code-search-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export default Ember.Component.extend(SearchMixin, AsyncMixin, {

init() {
this._super("code-search-overlay");
this.get("router").addObserver("currentRouteName", () =>
this.closeOverlay()
);
},

recentPackageTypes: Ember.computed("open", function() {
Expand Down
7 changes: 7 additions & 0 deletions app/components/goodcity/item-search-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export default Ember.Component.extend(SearchMixin, AsyncMixin, {
i18n: Ember.inject.service(),
requireFocus: false,

init() {
this._super(...arguments);
this.get("router").addObserver("currentRouteName", () =>
this.closeOverlay()
);
},

inputmode: Ember.computed("searchMode", function() {
if (this.get("searchMode") === "numeric") {
return "numeric";
Expand Down
7 changes: 7 additions & 0 deletions app/components/goodcity/offers-search-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export default Ember.Component.extend(SearchMixin, {
},
searchText: "",

init() {
this._super(...arguments);
this.get("router").addObserver("currentRouteName", () =>
this.send("closeOverlay")
);
},

actions: {
clearSearch() {
this.set("searchText", "");
Expand Down
7 changes: 7 additions & 0 deletions app/components/goodcity/organisation-search-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ export default Ember.Component.extend(SearchMixin, {
displayResults: false,
store: Ember.inject.service(),

init() {
this._super(...arguments);
this.get("router").addObserver("currentRouteName", () =>
this.send("cancelSearch")
);
},

onSearchTextChange: Ember.observer("searchText", function() {
this.hideResults();

Expand Down
28 changes: 27 additions & 1 deletion app/controllers/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,39 @@ import config from "../config/environment";
import preloadDataMixin from "../mixins/preload_data";
import GoodcityController from "./goodcity_controller";
import _ from "lodash";
const { getOwner } = Ember;
let timeout;

export default GoodcityController.extend(preloadDataMixin, {
messageBox: Ember.inject.service(),
authService: Ember.inject.service(),
subscription: Ember.inject.service(),
attemptedTransition: null,
pin: "",
timer: config.APP.OTP_RESEND_TIME,
pinAlreadySent: false,
isMobileApp: config.cordova.enabled,

mobile: Ember.computed("mobilePhone", function() {
return config.APP.HK_COUNTRY_CODE + this.get("mobilePhone");
}),

timerFunction() {
let waitTime = this.get("timer");
if (waitTime === 0) {
this.resetTimerParameters();
return false;
}
this.set("timer", waitTime - 1);
timeout = setTimeout(() => {
this.timerFunction();
}, 1000);
},

resetTimerParameters() {
this.set("pinAlreadySent", false);
this.set("timer", config.APP.OTP_RESEND_TIME);
},

actions: {
authenticateUser() {
let pin = this.get("pin");
Expand All @@ -26,10 +46,13 @@ export default GoodcityController.extend(preloadDataMixin, {
this.get("authService")
.verify(pin, otpAuthKey)
.then(({ jwt_token, user }) => {
clearTimeout(timeout);
this.resetTimerParameters();
this.set("pin", null);
this.set("session.authToken", jwt_token);
this.set("session.otpAuthKey", null);
this.store.pushPayload(user);
this.get("subscription").wire();
return this.preloadData();
})
.then(() => {
Expand All @@ -54,15 +77,18 @@ export default GoodcityController.extend(preloadDataMixin, {
},

resendPin() {
this.set("pinAlreadySent", true);
this.showLoadingSpinner();
this.get("authService")
.sendPin(this.get("mobile"))
.then(data => {
this.set("session.otpAuthKey", data.otp_auth_key);
this.set("pin", null);
this.transitionToRoute("/authenticate");
this.timerFunction();
})
.catch(error => {
this.set("pinAlreadySent", false);
if ([401].includes(error.status)) {
this.get("messageBox").alert("You are not authorized.", () => {
this.transitionToRoute("/");
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/items/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default GoodcityController.extend(
function() {
return (
this.get("settings.disableBoxPalletItemAddition") ||
!this.get("item.onHandQuantity")
!this.get("model.onHandQuantity")
);
}
),
Expand Down
Loading

0 comments on commit a7bb85d

Please sign in to comment.