Skip to content

Commit 74f33f5

Browse files
committed
Merge branch 'release/1.2.1'
2 parents 379bc9b + d828465 commit 74f33f5

18 files changed

+239
-39
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright {yyyy} {name of copyright owner}
189+
Copyright 2017 Leanplum, Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

bump_version.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
#
3+
# LPM | Author: Ben Marten
4+
# Copyright (c) 2017 Leanplum Inc. All rights reserved.
5+
# Bumps the version in the constants file to a desired version.
6+
#
7+
8+
#######################################
9+
# Replaces a string in a file.
10+
# Globals:
11+
# None
12+
# Arguments:
13+
# None
14+
# Returns:
15+
# None
16+
#######################################
17+
replace() {
18+
sed -i '' -e "s|$2|$3|g" "$1"
19+
cd "$(dirname "$1")" || echo "Change to directory containing the file failed."
20+
if ! git status --porcelain 2>/dev/null | grep "$(basename "$1")"; then
21+
echo "${RED}Error patching file: $1${NORMAL}" && exit 1
22+
fi
23+
cd ~- || echo "Change back to original folder failed."
24+
echo "Updated file: $1"
25+
}
26+
27+
replace package.json "version\": \"$1\"" "version\": \"$2\""
28+
replace src/Constants.js "SDK_VERSION: '$1'" "SDK_VERSION: '$2'"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
},
4141
"name": "leanplum-javascript-sdk",
4242
"description": "This is the JavaScript SDK for Leanplum, allowing developers to access and integrate the functionality of Leanplum with applications and devices through JavaScript and HTML5. Leanplum is an application development platform that provides mobile A/B testing, messaging functionality, personalization, and more features for applications. ## Installation Add leanplum.js to your project: ```javascript <script type=\"text/javascript\" src=\"leanplum.js\"></script> ``` ## Usage Initialize Leanplum.",
43-
"version": "1.2.0",
44-
"main": "dist/leanplum.js",
43+
"version": "1.2.1",
44+
"main": "dist/leanplum.min.js",
4545
"directories": {
4646
"test": "test"
4747
},

src/ArgsBuilder.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
*
3+
* Copyright 2017 Leanplum Inc. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License
16+
*
17+
*/
118
import Constants from "./Constants";
219

320
/**

src/BrowserDetector.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
*
3+
* Copyright 2017 Leanplum Inc. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License
16+
*
17+
*/
118
const dataBrowser = [{
219
string: navigator.userAgent,
320
subString: 'Chrome',

src/Constants.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
*
3+
* Copyright 2017 Leanplum Inc. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License
16+
*
17+
*/
118
module.exports = {
219
METHODS: {
320
START: 'start',
@@ -18,7 +35,7 @@ module.exports = {
1835
REGISTER_DEVICE: 'registerDevice',
1936
},
2037

21-
SDK_VERSION: '1.2.0',
38+
SDK_VERSION: '1.2.1',
2239

2340
CLIENT: 'js',
2441

src/Leanplum.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
*
3+
* Copyright 2017 Leanplum Inc. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License
16+
*
17+
*/
118
import Constants from "./Constants";
219
import ArgsBuilder from "./ArgsBuilder";
320
import BrowserDetector from "./BrowserDetector";

src/LeanplumRequest.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
*
3+
* Copyright 2017 Leanplum Inc. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License
16+
*
17+
*/
118
let _batchEnabled = true;
219
let _batchCooldown = 5;
320
let _apiPath = 'https://www.leanplum.com/api';

src/PushManager.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
*
3+
* Copyright 2017 Leanplum Inc. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License
16+
*
17+
*/
118
import _ from "./underscore";
219
import Constants from "./Constants";
320

src/PushServiceWorker.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* limitations under the License
1717
*
1818
*/
19-
2019
const ACTION_NAME_KEY = '__name__';
2120
const OPEN_URL_ACTION = 'Open URL';
2221
const ARG_URL = 'URL';
@@ -43,7 +42,7 @@ self.addEventListener('push', function (event) {
4342
options.data.openAction.hasOwnProperty(ACTION_NAME_KEY) &&
4443
options.data.openAction[ACTION_NAME_KEY] === OPEN_URL_ACTION &&
4544
options.data.openAction.hasOwnProperty(ARG_URL)) {
46-
openActions[options.tag] = options.data.openAction.ARG_URL;
45+
openActions[options.tag] = options.data.openAction[ARG_URL];
4746
}
4847

4948
// Extract title and delete from options.

0 commit comments

Comments
 (0)