Skip to content

Commit a7bb85d

Browse files
authored
Merge pull request #1025 from crossroads/master
[0.22.0] Release
2 parents b3cfbff + 29a426b commit a7bb85d

36 files changed

+532
-77
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
www-deploy:
147147
<<: *defaults
148148
docker:
149-
- image: circleci/ruby:2.5.5
149+
- image: cimg/ruby:2.7.3
150150
steps:
151151
- restore-cache: *restore-repo-cache
152152
- restore-cache: *restore-bundle-cache
@@ -294,7 +294,7 @@ jobs:
294294

295295
ios_build_and_deploy:
296296
macos:
297-
xcode: "11.0.0"
297+
xcode: "12.0.1"
298298
working_directory: ~/code
299299
shell: /bin/bash --login -eo pipefail
300300
environment:

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-2.5.5
1+
ruby-2.7.3

Gemfile.lock

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ GEM
99
tzinfo (~> 1.1)
1010
addressable (2.7.0)
1111
public_suffix (>= 2.0.2, < 5.0)
12-
algoliasearch (1.27.4)
12+
algoliasearch (1.27.5)
1313
httpclient (~> 2.8, >= 2.8.3)
1414
json (>= 1.5.1)
1515
artifactory (3.0.15)
1616
atomos (0.1.3)
1717
aws-eventstream (1.1.1)
18-
aws-partitions (1.446.0)
18+
aws-partitions (1.461.0)
1919
aws-sdk-core (3.114.0)
2020
aws-eventstream (~> 1, >= 1.0.2)
2121
aws-partitions (~> 1, >= 1.239.0)
@@ -24,7 +24,7 @@ GEM
2424
aws-sdk-kms (1.43.0)
2525
aws-sdk-core (~> 3, >= 3.112.0)
2626
aws-sigv4 (~> 1.1)
27-
aws-sdk-s3 (1.93.1)
27+
aws-sdk-s3 (1.95.0)
2828
aws-sdk-core (~> 3, >= 3.112.0)
2929
aws-sdk-kms (~> 1)
3030
aws-sigv4 (~> 1.1)
@@ -73,9 +73,9 @@ GEM
7373
cocoapods-try (1.2.0)
7474
colored (1.2)
7575
colored2 (3.1.2)
76-
commander-fastlane (4.4.6)
77-
highline (~> 1.7.2)
78-
concurrent-ruby (1.1.5)
76+
commander (4.6.0)
77+
highline (~> 2.0.0)
78+
concurrent-ruby (1.1.8)
7979
declarative (0.0.20)
8080
digest-crc (0.6.3)
8181
rake (>= 12.0.0, < 14.0.0)
@@ -84,8 +84,10 @@ GEM
8484
dotenv (2.7.6)
8585
emoji_regex (3.2.2)
8686
escape (0.0.4)
87-
excon (0.80.1)
88-
faraday (1.4.1)
87+
excon (0.81.0)
88+
faraday (1.4.2)
89+
faraday-em_http (~> 1.0)
90+
faraday-em_synchrony (~> 1.0)
8991
faraday-excon (~> 1.1)
9092
faraday-net_http (~> 1.0)
9193
faraday-net_http_persistent (~> 1.1)
@@ -94,21 +96,23 @@ GEM
9496
faraday-cookie_jar (0.0.7)
9597
faraday (>= 0.8.0)
9698
http-cookie (~> 1.0.0)
99+
faraday-em_http (1.0.0)
100+
faraday-em_synchrony (1.0.0)
97101
faraday-excon (1.1.0)
98102
faraday-net_http (1.0.1)
99103
faraday-net_http_persistent (1.1.0)
100104
faraday_middleware (1.0.0)
101105
faraday (~> 1.0)
102106
fastimage (2.2.3)
103-
fastlane (2.181.0)
107+
fastlane (2.184.0)
104108
CFPropertyList (>= 2.3, < 4.0.0)
105109
addressable (>= 2.3, < 3.0.0)
106110
artifactory (~> 3.0)
107111
aws-sdk-s3 (~> 1.0)
108112
babosa (>= 1.0.3, < 2.0.0)
109113
bundler (>= 1.12.0, < 3.0.0)
110114
colored
111-
commander-fastlane (>= 4.4.6, < 5.0.0)
115+
commander (~> 4.6)
112116
dotenv (>= 2.1.1, < 3.0.0)
113117
emoji_regex (>= 0.1, < 4.0)
114118
excon (>= 0.71.0, < 1.0.0)
@@ -117,9 +121,10 @@ GEM
117121
faraday_middleware (~> 1.0)
118122
fastimage (>= 2.1.0, < 3.0.0)
119123
gh_inspector (>= 1.1.2, < 2.0.0)
120-
google-api-client (>= 0.37.0, < 0.39.0)
121-
google-cloud-storage (>= 1.15.0, < 2.0.0)
122-
highline (>= 1.7.2, < 2.0.0)
124+
google-apis-androidpublisher_v3 (~> 0.1)
125+
google-apis-playcustomapp_v1 (~> 0.1)
126+
google-cloud-storage (~> 1.31)
127+
highline (~> 2.0)
123128
json (< 3.0.0)
124129
jwt (>= 2.1.0, < 3)
125130
mini_magick (>= 4.9.4, < 5.0.0)
@@ -129,7 +134,6 @@ GEM
129134
rubyzip (>= 2.0.0, < 3.0.0)
130135
security (= 0.1.3)
131136
simctl (~> 1.6.3)
132-
slack-notifier (>= 2.0.0, < 3.0.0)
133137
terminal-notifier (>= 2.0.0, < 3.0.0)
134138
terminal-table (>= 1.4.5, < 2.0.0)
135139
tty-screen (>= 0.6.3, < 1.0.0)
@@ -141,14 +145,8 @@ GEM
141145
fourflusher (2.3.1)
142146
fuzzy_match (2.0.4)
143147
gh_inspector (1.1.3)
144-
google-api-client (0.38.0)
145-
addressable (~> 2.5, >= 2.5.1)
146-
googleauth (~> 0.9)
147-
httpclient (>= 2.8.1, < 3.0)
148-
mini_mime (~> 1.0)
149-
representable (~> 3.0)
150-
retriable (>= 2.0, < 4.0)
151-
signet (~> 0.12)
148+
google-apis-androidpublisher_v3 (0.4.0)
149+
google-apis-core (~> 0.1)
152150
google-apis-core (0.3.0)
153151
addressable (~> 2.5, >= 2.5.1)
154152
googleauth (~> 0.14)
@@ -159,32 +157,34 @@ GEM
159157
rexml
160158
signet (~> 0.14)
161159
webrick
162-
google-apis-iamcredentials_v1 (0.3.0)
160+
google-apis-iamcredentials_v1 (0.4.0)
161+
google-apis-core (~> 0.1)
162+
google-apis-playcustomapp_v1 (0.3.0)
163163
google-apis-core (~> 0.1)
164-
google-apis-storage_v1 (0.3.0)
164+
google-apis-storage_v1 (0.4.0)
165165
google-apis-core (~> 0.1)
166166
google-cloud-core (1.6.0)
167167
google-cloud-env (~> 1.0)
168168
google-cloud-errors (~> 1.0)
169169
google-cloud-env (1.5.0)
170170
faraday (>= 0.17.3, < 2.0)
171171
google-cloud-errors (1.1.0)
172-
google-cloud-storage (1.31.0)
172+
google-cloud-storage (1.31.1)
173173
addressable (~> 2.5)
174174
digest-crc (~> 0.4)
175175
google-apis-iamcredentials_v1 (~> 0.1)
176176
google-apis-storage_v1 (~> 0.1)
177177
google-cloud-core (~> 1.2)
178178
googleauth (~> 0.9)
179179
mini_mime (~> 1.0)
180-
googleauth (0.16.1)
180+
googleauth (0.16.2)
181181
faraday (>= 0.17.3, < 2.0)
182182
jwt (>= 1.4, < 3.0)
183183
memoist (~> 0.16)
184184
multi_json (~> 1.11)
185185
os (>= 0.9, < 2.0)
186186
signet (~> 0.14)
187-
highline (1.7.10)
187+
highline (2.0.3)
188188
http-cookie (1.0.3)
189189
domain_name (~> 0.5)
190190
httpclient (2.8.3)
@@ -196,23 +196,25 @@ GEM
196196
memoist (0.16.2)
197197
mini_magick (4.11.0)
198198
mini_mime (1.1.0)
199-
mini_portile2 (2.4.0)
200-
minitest (5.14.2)
199+
mini_portile2 (2.5.1)
200+
minitest (5.14.4)
201201
molinillo (0.6.6)
202202
multi_json (1.15.0)
203203
multipart-post (2.0.0)
204204
nanaimo (0.3.0)
205205
nap (1.1.0)
206206
naturally (2.2.1)
207-
net-scp (2.0.0)
208-
net-ssh (>= 2.6.5, < 6.0.0)
209-
net-ssh (5.2.0)
207+
net-scp (3.0.0)
208+
net-ssh (>= 2.6.5, < 7.0.0)
209+
net-ssh (6.1.0)
210210
netrc (0.11.0)
211-
nokogiri (1.10.10)
212-
mini_portile2 (~> 2.4.0)
211+
nokogiri (1.11.3)
212+
mini_portile2 (~> 2.5.0)
213+
racc (~> 1.4)
213214
os (1.1.1)
214215
plist (3.6.0)
215216
public_suffix (4.0.6)
217+
racc (1.5.2)
216218
rake (13.0.3)
217219
representable (3.1.1)
218220
declarative (< 0.1.0)
@@ -233,8 +235,7 @@ GEM
233235
simctl (1.6.8)
234236
CFPropertyList
235237
naturally
236-
slack-notifier (2.3.2)
237-
sshkit (1.18.2)
238+
sshkit (1.21.2)
238239
net-scp (>= 1.1.2)
239240
net-ssh (>= 2.8.0)
240241
terminal-notifier (2.0.0)
@@ -246,7 +247,7 @@ GEM
246247
tty-screen (0.8.1)
247248
tty-spinner (0.9.3)
248249
tty-cursor (~> 0.7)
249-
tzinfo (1.2.7)
250+
tzinfo (1.2.9)
250251
thread_safe (~> 0.1)
251252
uber (0.1.0)
252253
unf (0.1.4)
@@ -278,4 +279,4 @@ DEPENDENCIES
278279
rake
279280

280281
BUNDLED WITH
281-
1.17.3
282+
2.1.4

app/components/goodcity/code-search-overlay.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export default Ember.Component.extend(SearchMixin, AsyncMixin, {
2222

2323
init() {
2424
this._super("code-search-overlay");
25+
this.get("router").addObserver("currentRouteName", () =>
26+
this.closeOverlay()
27+
);
2528
},
2629

2730
recentPackageTypes: Ember.computed("open", function() {

app/components/goodcity/item-search-overlay.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ export default Ember.Component.extend(SearchMixin, AsyncMixin, {
1919
i18n: Ember.inject.service(),
2020
requireFocus: false,
2121

22+
init() {
23+
this._super(...arguments);
24+
this.get("router").addObserver("currentRouteName", () =>
25+
this.closeOverlay()
26+
);
27+
},
28+
2229
inputmode: Ember.computed("searchMode", function() {
2330
if (this.get("searchMode") === "numeric") {
2431
return "numeric";

app/components/goodcity/offers-search-overlay.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ export default Ember.Component.extend(SearchMixin, {
2626
},
2727
searchText: "",
2828

29+
init() {
30+
this._super(...arguments);
31+
this.get("router").addObserver("currentRouteName", () =>
32+
this.send("closeOverlay")
33+
);
34+
},
35+
2936
actions: {
3037
clearSearch() {
3138
this.set("searchText", "");

app/components/goodcity/organisation-search-overlay.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ export default Ember.Component.extend(SearchMixin, {
99
displayResults: false,
1010
store: Ember.inject.service(),
1111

12+
init() {
13+
this._super(...arguments);
14+
this.get("router").addObserver("currentRouteName", () =>
15+
this.send("cancelSearch")
16+
);
17+
},
18+
1219
onSearchTextChange: Ember.observer("searchText", function() {
1320
this.hideResults();
1421

app/controllers/authenticate.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,39 @@ import config from "../config/environment";
44
import preloadDataMixin from "../mixins/preload_data";
55
import GoodcityController from "./goodcity_controller";
66
import _ from "lodash";
7-
const { getOwner } = Ember;
7+
let timeout;
88

99
export default GoodcityController.extend(preloadDataMixin, {
1010
messageBox: Ember.inject.service(),
1111
authService: Ember.inject.service(),
12+
subscription: Ember.inject.service(),
1213
attemptedTransition: null,
1314
pin: "",
15+
timer: config.APP.OTP_RESEND_TIME,
16+
pinAlreadySent: false,
1417
isMobileApp: config.cordova.enabled,
1518

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

23+
timerFunction() {
24+
let waitTime = this.get("timer");
25+
if (waitTime === 0) {
26+
this.resetTimerParameters();
27+
return false;
28+
}
29+
this.set("timer", waitTime - 1);
30+
timeout = setTimeout(() => {
31+
this.timerFunction();
32+
}, 1000);
33+
},
34+
35+
resetTimerParameters() {
36+
this.set("pinAlreadySent", false);
37+
this.set("timer", config.APP.OTP_RESEND_TIME);
38+
},
39+
2040
actions: {
2141
authenticateUser() {
2242
let pin = this.get("pin");
@@ -26,10 +46,13 @@ export default GoodcityController.extend(preloadDataMixin, {
2646
this.get("authService")
2747
.verify(pin, otpAuthKey)
2848
.then(({ jwt_token, user }) => {
49+
clearTimeout(timeout);
50+
this.resetTimerParameters();
2951
this.set("pin", null);
3052
this.set("session.authToken", jwt_token);
3153
this.set("session.otpAuthKey", null);
3254
this.store.pushPayload(user);
55+
this.get("subscription").wire();
3356
return this.preloadData();
3457
})
3558
.then(() => {
@@ -54,15 +77,18 @@ export default GoodcityController.extend(preloadDataMixin, {
5477
},
5578

5679
resendPin() {
80+
this.set("pinAlreadySent", true);
5781
this.showLoadingSpinner();
5882
this.get("authService")
5983
.sendPin(this.get("mobile"))
6084
.then(data => {
6185
this.set("session.otpAuthKey", data.otp_auth_key);
6286
this.set("pin", null);
6387
this.transitionToRoute("/authenticate");
88+
this.timerFunction();
6489
})
6590
.catch(error => {
91+
this.set("pinAlreadySent", false);
6692
if ([401].includes(error.status)) {
6793
this.get("messageBox").alert("You are not authorized.", () => {
6894
this.transitionToRoute("/");

app/controllers/items/detail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default GoodcityController.extend(
106106
function() {
107107
return (
108108
this.get("settings.disableBoxPalletItemAddition") ||
109-
!this.get("item.onHandQuantity")
109+
!this.get("model.onHandQuantity")
110110
);
111111
}
112112
),

0 commit comments

Comments
 (0)