Skip to content

Commit

Permalink
extractURL made public
Browse files Browse the repository at this point in the history
Close #52
  • Loading branch information
LeonardoCardoso committed Jun 8, 2017
1 parent 3d33d67 commit c679757
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 29 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Change Log

#### 2.x Releases
- `2.0.x` Releases - [2.0.0](#200) | [2.0.1](#201) | [2.0.2](#202) | [2.0.3](#203) | [2.0.4](#204)
- `2.0.x` Releases - [2.0.0](#200) | [2.0.1](#201) | [2.0.2](#202) | [2.0.3](#203) | [2.0.4](#204) | [2.0.5](#205)

#### 1.x Releases
- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101)
Expand All @@ -12,6 +12,14 @@

---

## [2.0.5](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/2.0.5)
Released on 2017-06-08.

#### Changed

- `extractURL` made public - issue [#52](https://github.com/LeonardoCardoso/SwiftLinkPreview/issues/52).
- Changed by [Leonardo Cardoso](https://github.com/LeonardoCardoso).

## [2.0.4](https://github.com/LeonardoCardoso/Swift-Link-Preview/releases/tag/2.0.4)
Released on 2017-04-15.

Expand Down
Binary file added Example/.DS_Store
Binary file not shown.
10 changes: 1 addition & 9 deletions Example/SwiftLinkPreviewExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@
path = Storyboards;
sourceTree = "<group>";
};
98348AB71D09B50C003FA2B3 /* Builder Interface */ = {
isa = PBXGroup;
children = (
);
path = "Builder Interface";
sourceTree = "<group>";
};
9848164E1D89967300CD6350 /* ThirdParty */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -134,7 +127,6 @@
children = (
98CC36BA1DEE68B900D4C8CA /* Sources */,
9848164E1D89967300CD6350 /* ThirdParty */,
98348AB71D09B50C003FA2B3 /* Builder Interface */,
98348AB51D09B4E8003FA2B3 /* Controllers */,
98348AB41D09B4E2003FA2B3 /* Delegates */,
98348AB61D09B4EF003FA2B3 /* Storyboards */,
Expand Down Expand Up @@ -258,7 +250,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
E7541FE4E6A19220BD9B9CDA /* [CP] Embed Pods Frameworks */ = {
Expand Down
6 changes: 3 additions & 3 deletions Example/SwiftLinkPreviewExample/AlamofireSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ public class AlamofireSource: NSObject, InputSource {
}
}

public func load(to imageView: UIImageView, with callback: @escaping (UIImage) -> ()) {
public func load(to imageView: UIImageView, with callback: @escaping (UIImage?) -> Void) {

imageView.af_setImage(withURL: self.url as URL, placeholderImage: nil, filter: nil, progress: nil) { (response) in

imageView.image = response.result.value

if let value = response.result.value { callback(value) }

}
}

Expand Down
2 changes: 1 addition & 1 deletion Example/SwiftLinkPreviewExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
> It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.
[![Platform](https://img.shields.io/badge/platform-iOS%20|%20macOS%20|%20watchOS%20|%20tvOS-orange.svg)](https://github.com/LeonardoCardoso/SwiftLinkPreview#requirements-and-details)
[![CocoaPods](https://img.shields.io/badge/pod-v2.0.4-red.svg)](https://github.com/LeonardoCardoso/SwiftLinkPreview#cocoapods)
[![CocoaPods](https://img.shields.io/badge/pod-v2.0.5-red.svg)](https://github.com/LeonardoCardoso/SwiftLinkPreview#cocoapods)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/LeonardoCardoso/SwiftLinkPreview#carthage)
[![Swift Package Manager](https://img.shields.io/badge/SPM-compatible-orange.svg)](https://github.com/LeonardoCardoso/SwiftLinkPreview#swift-package-manager)
[![Build Status](https://travis-ci.org/LeonardoCardoso/SwiftLinkPreview.svg?branch=master)](https://travis-ci.org/LeonardoCardoso/SwiftLinkPreview)
Expand Down Expand Up @@ -59,7 +59,7 @@ To use **SwiftLinkPreview** as a pod package just add the following in your **Po
target 'Your Target Name' do
use_frameworks!
// ...
pod 'SwiftLinkPreview', '~> 2.0.4'
pod 'SwiftLinkPreview', '~> 2.0.5'
// ...
end
```
Expand All @@ -70,7 +70,7 @@ To use **SwiftLinkPreview** as a Carthage module package just add the following

```ruby
// ...
github "LeonardoCardoso/SwiftLinkPreview" ~> 2.0.4
github "LeonardoCardoso/SwiftLinkPreview" ~> 2.0.5
// ...
```

Expand All @@ -85,7 +85,7 @@ let package = Package(
name: "Your Target Name",
dependencies: [
// ...
.Package(url: "https://github.com/LeonardoCardoso/SwiftLinkPreview.git", "2.0.4")
.Package(url: "https://github.com/LeonardoCardoso/SwiftLinkPreview.git", "2.0.5")
// ...
]
)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info-macOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info-tvOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info-watchOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftLinkPreview.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ open class SwiftLinkPreview : NSObject {
extension SwiftLinkPreview {

// Extract first URL from text
internal func extractURL(text: String) -> URL? {
open func extractURL(text: String) -> URL? {
let pieces: [String] = text.components(separatedBy: .whitespacesAndNewlines).filter { $0.trim.isValidURL() }
if pieces.count > 0, let url = URL(string: pieces[0]) {
return url
Expand Down
2 changes: 1 addition & 1 deletion SwiftLinkPreview.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Pod::Spec.new do |s|
s.name = "SwiftLinkPreview"
s.summary = "It makes a preview from an url, grabbing all the information such as title, relevant texts and images."
s.requires_arc = true
s.version = "2.0.4"
s.version = "2.0.5"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Leonardo Cardoso" => "[email protected]" }
s.homepage = "https://github.com/LeonardoCardoso/SwiftLinkPreview"
Expand Down
2 changes: 1 addition & 1 deletion SwiftLinkPreviewTests/Info-macOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion SwiftLinkPreviewTests/Info-tvOS.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion SwiftLinkPreviewTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.4</string>
<string>2.0.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions update-version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
grep -rl '2\.0\.3' . --exclude-dir={"Build","libs","Pods",".git"} --exclude={"Podfile.lock","CHANGELOG.md","update-version.sh"} | xargs sed -i.bak 's/2\.0\.3/2\.0\.4/g';
grep -rl '2\.0\.4' . --exclude-dir={"Build","libs","Pods",".git"} --exclude={"Podfile.lock","CHANGELOG.md","update-version.sh"} | xargs sed -i.bak 's/2\.0\.4/2\.0\.5/g';

find . -type f -name '*.bak' -delete
find . -type f -name '*.bak' -delete

0 comments on commit c679757

Please sign in to comment.