Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix search parameters #269

Merged
merged 4 commits into from May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- 🐛 Fix search parameters #269

## [v1.6.3] 🗒️ List Fix - 2019-03-31

- 🐛 Fix for list command on macOS 10.14.4 #228
Expand Down
1 change: 1 addition & 0 deletions Jenkinsfile
Expand Up @@ -30,6 +30,7 @@ pipeline {
LANG = 'en_US.UTF-8'
LANGUAGE = 'en_US.UTF-8'
LC_ALL = 'en_US.UTF-8'
DEVELOPER_DIR = '/Applications/Xcode-10.app'
}

stages {
Expand Down
2 changes: 1 addition & 1 deletion MasKit/Controllers/StoreSearch.swift
Expand Up @@ -29,7 +29,7 @@ extension StoreSearch {
/// - Returns: String URL for the search service or nil if appName can't be encoded.
func searchURLString(forApp appName: String) -> String? {
if let urlEncodedAppName = appName.URLEncodedString {
return "https://itunes.apple.com/search?entity=macSoftware&term=\(urlEncodedAppName)&attribute=allTrackTerm"
return "https://itunes.apple.com/search?media=software&entity=macSoftware&term=\(urlEncodedAppName)"
}
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions MasKit/SupportingFiles/Info.plist
Expand Up @@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.6.3</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>10603000</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018 Andrew Naylor. All rights reserved.</string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions MasKitTests/Controllers/StoreSearchSpec.swift
Expand Up @@ -25,14 +25,14 @@ class StoreSearchSpec: QuickSpec {
let appName = "myapp"
let urlString = storeSearch.searchURLString(forApp: appName)
expect(urlString) ==
"https://itunes.apple.com/search?entity=macSoftware&term=\(appName)&attribute=allTrackTerm"
"https://itunes.apple.com/search?media=software&entity=macSoftware&term=\(appName)"
}
it("contains the encoded app name") {
let appName = "My App"
let appNameEncoded = "My%20App"
let urlString = storeSearch.searchURLString(forApp: appName)
expect(urlString) ==
"https://itunes.apple.com/search?entity=macSoftware&term=\(appNameEncoded)&attribute=allTrackTerm"
"https://itunes.apple.com/search?media=software&entity=macSoftware&term=\(appNameEncoded)"
}
// Find a character that causes addingPercentEncoding(withAllowedCharacters to return nil
xit("is nil when app name cannot be url encoded") {
Expand Down
4 changes: 2 additions & 2 deletions MasKitTests/SupportingFiles/Info.plist
Expand Up @@ -15,8 +15,8 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.6.3</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>10603000</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>
6 changes: 4 additions & 2 deletions mas-cli.xcodeproj/project.pbxproj
Expand Up @@ -1125,7 +1125,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
CURRENT_PROJECT_VERSION = 10603000;
CURRENT_PROJECT_VERSION = 10604000;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -1152,6 +1152,7 @@
"$(SRCROOT)/App/PrivateHeaders",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 1.6.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli";
Expand Down Expand Up @@ -1190,7 +1191,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CREATE_INFOPLIST_SECTION_IN_BINARY = YES;
CURRENT_PROJECT_VERSION = 10603000;
CURRENT_PROJECT_VERSION = 10604000;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -1211,6 +1212,7 @@
"$(SRCROOT)/App/PrivateHeaders",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MARKETING_VERSION = 1.6.4;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.mphys.mas-cli";
SDKROOT = macosx;
Expand Down
4 changes: 3 additions & 1 deletion mas/mas-Info.plist
Expand Up @@ -11,6 +11,8 @@
<key>CFBundleName</key>
<string>mas-cli</string>
<key>CFBundleShortVersionString</key>
<string>1.6.3</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>