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 cli for compatibility with xcodeproj 1.0.0 #10

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

bsorrentino
Copy link

In version 1.0.0 of gem xcodeproj the module PlistHelper no longer exists and it has been replaced by Plist


/// String description of the enum value
public var description: String {
guard let value = Self.get(self) else { return "nil" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


Settings.subscribe(.EnableAnalytics) { (newValue) -> Void in
Settings.subscribe(setting: .EnableAnalytics) { (newValue) -> Void in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused Closure Parameter Violation: Unused parameter "newValue" in a closure should be replaced with _. (unused_closure_parameter)


let result = Settings.get(.ApiEnvironment) as! String
let result = Settings.get(setting: .ApiEnvironment) as! String

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)


let result = Settings.get(.LuckyNumber) as! Int
let result = Settings.get(setting: .LuckyNumber) as! Int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)


let result = Settings.get(.CityState) as! [ String: String ]
let result = Settings.get(setting: .CityState) as! [ String: String ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)


let result = Settings.get(.DateOfBirth) as! NSDate
let result = Settings.get(setting: .DateOfBirth) as! NSDate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)


let result = NSUserDefaults.standardUserDefaults().objectForKey(identifier) as! NSDate
let result = UserDefaults.standard.object(forKey: identifier) as! NSDate

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)


let result = NSUserDefaults.standardUserDefaults().objectForKey(identifier) as! NSData
let result = UserDefaults.standard.object(forKey: identifier) as! NSData

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)


expect(result) == value
}

it("can store data") {
let identifier = Settings.EncodedString.identifier
let value = NSData(base64EncodedString: "SGVsbG8gV29ybGQ=", options: []) as NSData!
let value = NSData(base64Encoded: "SGVsbG8gV29ybGQ=", options: []) as! NSData

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)


let result = NSUserDefaults.standardUserDefaults().arrayForKey(identifier) as! [String]
let result = UserDefaults.standard.array(forKey: identifier) as! [String]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force Cast Violation: Force casts should be avoided. (force_cast)

center.addObserverForName(NSUserDefaultsDidChangeNotification, object: defaults, queue: nil) { (notif) -> Void in
if let defaults = notif.object as? NSUserDefaults {
onChange(newValue: defaults.objectForKey(self.identifier))
center.addObserver(forName: UserDefaults.didChangeNotification, object: defaults, queue: nil) { (notif) -> Void in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discarded Notification Center Observer Violation: When registering for a notification using a block, the opaque observer that is returned should be stored so it can be removed later. (discarded_notification_center_observer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants