-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,427 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
language: objective-c | ||
before_install: | ||
# - brew update | ||
# - brew upgrade xctool | ||
- gem install cocoapods | ||
before_script: | ||
- export QINIU_TEST_ENV="travis" | ||
script: | ||
- xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS iOS" -sdk iphonesimulator -configuration Release test -test-sdk iphonesimulator7.0 -freshInstall -freshSimulator | ||
- xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS Mac" -sdk macosx -configuration Release test -test-sdk macosx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#Changelog | ||
|
||
## 0.0.1 (2015-06-21) | ||
|
||
### 增加 | ||
* localdns | ||
* httpdns | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# 贡献代码指南 | ||
|
||
我们非常欢迎大家来贡献代码,我们会向贡献者致以最诚挚的敬意。 | ||
|
||
一般可以通过在Github上提交[Pull Request](https://github.com/qiniu/happy-dns-objc)来贡献代码。 | ||
|
||
## Pull Request要求 | ||
|
||
- **代码规范** 参考 https://github.com/NYTimes/objective-c-style-guide。 | ||
|
||
- **代码格式** 提交前请使用Xcode格式化插件 BBUncrustifyPlugin 默认风格进行格式化。 | ||
|
||
- **必须添加测试!** - 如果没有测试(单元测试、集成测试都可以),那么提交的补丁是不会通过的。 | ||
|
||
- **记得更新文档** - 保证`README.md`以及其他相关文档及时更新,和代码的变更保持一致性。 | ||
|
||
- **考虑我们的发布周期** - 我们的版本号会服从[SemVer v2.0.0](http://semver.org/),我们绝对不会随意变更对外的API。 | ||
|
||
- **创建feature分支** - 最好不要从你的master分支提交 pull request。 | ||
|
||
- **一个feature提交一个pull请求** - 如果你的代码变更了多个操作,那就提交多个pull请求吧。 | ||
|
||
- **清晰的commit历史** - 保证你的pull请求的每次commit操作都是有意义的。如果你开发中需要执行多次的即时commit操作,那么请把它们放到一起再提交pull请求。 | ||
|
||
## 运行测试 | ||
|
||
``` bash | ||
$ xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS iOS" -sdk iphonesimulator -configuration Release test -test-sdk iphonesimulator7.0 -freshInstall -freshSimulator | ||
$ xctool -workspace HappyDNS.xcworkspace -scheme "HappyDNS Mac" -sdk macosx -configuration Release test -test-sdk macosx | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Pod::Spec.new do |s| | ||
s.name = 'HappyDNS' | ||
s.version = '0.0.1' | ||
s.summary = 'DNS library for iOS and Mac' | ||
s.homepage = 'https://github.com/qiniu/happy-dns-objc' | ||
s.social_media_url = 'http://weibo.com/qiniutek' | ||
s.author = 'Qiniu => [email protected]' | ||
s.source = {:git => 'https://github.com/qiniu/happy-dns-objc.git', :tag => "v#{s.version}"} | ||
|
||
s.ios.deployment_target = '6.0' | ||
s.osx.deployment_target = '10.8' | ||
|
||
s.source_files = 'HappyDNS/**/*.{h,m}' | ||
s.requires_arc = true | ||
s.license = { :type => 'MIT', :text => <<-LICENSE | ||
The MIT License (MIT) | ||
Copyright (c) 2012-2015 qiniu.com | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
LICENSE | ||
} | ||
|
||
end |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// QNDnsManager.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface QNDnsManager : NSObject | ||
-(NSArray*)query:(NSString*)domain; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// QNDnsManager.m | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import "QNDnsManager.h" | ||
|
||
@implementation QNDnsManager | ||
-(NSArray*)query:(NSString*)domain{ | ||
return nil; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// QNDomain.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface QNDomain : NSObject | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// QNDomain.m | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import "QNDomain.h" | ||
|
||
@implementation QNDomain | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// QNRecord.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface QNRecord : NSObject | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// QNRecord.m | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import "QNRecord.h" | ||
|
||
@implementation QNRecord | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// QNResolverDelegate.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@class QNDomain; | ||
@protocol QNResolverDelegate <NSObject> | ||
-(NSArray*)query:(QNDomain*)domain; | ||
@end |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// HappyDNS.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/24. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface HappyDNS : NSObject | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// HappyDNS.m | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/24. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import "HappyDNS.h" | ||
|
||
@implementation HappyDNS | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// QNDnspodFree.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "QNResolverDelegate.h" | ||
|
||
@interface QNDnspodFree : NSObject <QNResolverDelegate> | ||
-(NSArray*)query:(QNDomain*)domain; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// QNDnspodFree.m | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import "QNDnspodFree.h" | ||
|
||
@implementation QNDnspodFree | ||
-(NSArray*)query:(QNDomain*)domain{ | ||
return nil; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// QNDnsMessage.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface QNDnsMessage : NSObject | ||
|
||
+(int)buildQuery; | ||
+(int)parseResponse; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// QNDnsMessage.m | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import "QNDnsMessage.h" | ||
|
||
@implementation QNDnsMessage | ||
+(int)buildQuery{ | ||
return 0; | ||
} | ||
|
||
+(int)parseResponse{ | ||
return 0; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// QNHosts.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "QNResolverDelegate.h" | ||
|
||
@interface QNHosts : NSObject <QNResolverDelegate> | ||
-(NSArray*)query:(QNDomain*)domain; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// QNHosts.m | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import "QNHosts.h" | ||
|
||
@implementation QNHosts | ||
-(NSArray*)query:(QNDomain*)domain{ | ||
return nil; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// QNResolver.h | ||
// HappyDNS | ||
// | ||
// Created by bailong on 15/6/23. | ||
// Copyright (c) 2015年 Qiniu Cloud Storage. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "QNResolverDelegate.h" | ||
|
||
@interface QNResolver : NSObject <QNResolverDelegate> | ||
-(NSArray*)query:(QNDomain*)domain; | ||
-(instancetype)initWithAddres:(NSString *)address; | ||
@end |
Oops, something went wrong.