-
Notifications
You must be signed in to change notification settings - Fork 3
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
GitLabKit –> TanukiKit #10
Conversation
# Conflicts: # .gitignore # Cartfile # Cartfile.private # Cartfile.resolved # Gemfile # Gemfile.lock # LICENSE # Makefile # README.md # TanukiKit.podspec # TanukiKit.xcodeproj/project.pbxproj # TanukiKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata # TanukiKit.xcodeproj/xcshareddata/xcschemes/TanukiKit Mac.xcscheme # TanukiKit.xcodeproj/xcshareddata/xcschemes/TanukiKit tvOS.xcscheme # TanukiKit.xcodeproj/xcshareddata/xcschemes/TanukiKit watchOS.xcscheme # TanukiKit.xcodeproj/xcshareddata/xcschemes/TanukiKit.xcscheme # TanukiKit/Configuration.swift # TanukiKit/Info.plist # TanukiKit/Keys.swift # TanukiKit/TanukiKit.h # TanukiKit/User.swift # TanukiKitTests/ConfigurationTests.swift # TanukiKitTests/Fixtures/Repositories.json # TanukiKitTests/Fixtures/User.json # TanukiKitTests/Fixtures/public_key.json # TanukiKitTests/Info.plist # TanukiKitTests/KeysTests.swift # TanukiKitTests/TestHelper.swift # fastlane/.env # fastlane/.env.default # fastlane/.env.deploy # fastlane/.env.ios92 # fastlane/.env.osx # fastlane/.env.tvos91 # fastlane/Fastfile
Hey Tiago, first of all thank you for your Pull Request! There are a couple of things I would like you to clean up before I start to review:
There is also an outstanding architectural changes in #6, just a heads up but nothing to worry about yet. |
Thanks for the heads up @pietbrauer:
class User {
var login: String = ""
var bio: String? = nil
var name: String = ""
var email: String = ""
var privateToken: String = ""
var avatarURL: String? = nil
var webURL: String = ""
var websiteURL: String? = nil
var skype: String? = nil
var linkedin: String? = nil
var twitter: String? = nil
var isAdmin = false
var projectsLimit = 0
var canCreateProject = false
var canCreateGroup = false
func addUserData(someAPIUser: APIUserClass) {
name = someAPIUser.name!
login = someAPIUser.login!
bio = someAPIUser.bio
email = someAPIUser.email!
privateToken = someAPIUser.privateToken!
avatarURL = someAPIUser.avatarURL
webURL = someAPIUser.webURL!
websiteURL = someAPIUser.websiteURL
skype = someAPIUser.skype
linkedin = someAPIUser.linkedin
twitter = someAPIUser.twitter
isAdmin = someAPIUser.isAdmin!
projectsLimit = someAPIUser.projectsLimit!
canCreateGroup = someAPIUser.canCreateGroup!
canCreateProject = someAPIUser.canCreateProject!
listOfUserData.append(User())
}
} As you can see this is quite a popular scenario, and the user would prefer to be able to call their class User instead of something else just because Finally, I also usually work with Tiago PS: Was thinking of doing a |
@pietbrauer, commit 11cc33e (Fixed points 1, 2 and 3. (pull request #10)), fixes the permissions, updated the class names to point 3 until I wait for you to evaluate my request on naming. I don't think I actually broke the tests, firstly because I didn't change the code, I literally just fixed the indentation because it was a bit messed up. I did find however that travis seems to be failing because of a The noise on the project file is because of A) the name change to Tiago |
I use Carthage simply install using Regarding the error just cherry-pick c822abb into your branch. I understand your point about the Regarding the class naming: Swift has modules and names have to be exclusive in a module, e.g. TanukiKit. If your app defines a class |
Yup got it, will start by removing cocoa pods and use carthage, then I will do a pull request with the Got it, will use the normal class names then. Tiago |
Alright, @pietbrauer, this will be the Tiago |
Hm, why exactly did you update to RequestKit 1.0? There is a pull request which was just waiting for this here to finish. Have a look at #11. That's multiple changes in one again. Also please don't change the file order. Please open a new pull request and change the name from GitLabKit to TanukiKit. |
Got it, sorry, third time's the charm right? |
This is the pull request for issue #8
( @pietbrauer Sorry about deleting the old one and opening this one, had to do some house cleaning on the branches.)
For anyone else, the idea of this pull request will be to basically extend TanukiKit to cover basically the entire GitLab API. We'll start by adding the
GET
requests, then thePOST
, then theDELETE
and finally thePUT
requests.@pietbrauer , I was thinking of creating a standard structure for each file:
// MARK: Router
the router segment.GET
, just use the name of what you're getting, for example:Builds.swift
orCommits.swift
.POST
, start withSend
and then the name of what you're posting, for example:SendKeys.swift
.DELETE
, start withRemove
and then the name of what you're deleting, for example:RemoveKeys.swift
.PUT
, start withUpdate
and then the name of what you're updating, for example:UpdateKeys.swift
.api
+ name capitalised and on singular form +Class
, for example:apiBuildClass
, not, or for aapiBuildsClass
POST
,apiSendKeyClass
.(Open to suggestions)