diff --git a/.circleci/config.yml b/.circleci/config.yml index 99c73ad1..63cf976d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,12 +95,12 @@ jobs: - store_test_results: *xcpretty-reports - build-and-test-ios10-iphone7plus: + build-and-test-ios10-iphone7: <<: *defaults environment: - DESTINATION: platform=iOS Simulator,OS=10.3.1,name=iPhone 7 Plus - SIMULATOR: iPhone 7 Plus (10.3.1) [ + DESTINATION: platform=iOS Simulator,OS=10.3.1,name=iPhone 7 + SIMULATOR: iPhone 7 (10.3.1) [ steps: - checkout @@ -150,7 +150,7 @@ jobs: - run: name: Build Documentation - command: bundle exec rake build_documentation + command: bundle exec rake generate_documentation swiftlint: @@ -199,6 +199,6 @@ workflows: - lint-podspec - swiftlint - build-and-test-ios11-iphonex - - build-and-test-ios10-iphone7plus + - build-and-test-ios10-iphone7 - build-documentation - push-podspec: *filter-version-tags-only diff --git a/.codeclimate.yml b/.codeclimate.yml index 6968b86f..803f1aca 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,4 +1,26 @@ version: "2" +checks: + argument-count: + config: + threshold: 4 + complex-logic: + config: + threshold: 4 + file-lines: + config: + threshold: 1000 + method-complexity: + config: + threshold: 5 + method-count: + config: + threshold: 20 + method-lines: + config: + threshold: 40 + nested-control-flow: + config: + threshold: 4 exclude_patterns: - - "Example/Tests/" + - "Example/" - "docs/" diff --git a/Example/JJFloatingActionButton.xcodeproj/project.pbxproj b/Example/JJFloatingActionButton.xcodeproj/project.pbxproj index 2caf337d..4bac27ff 100644 --- a/Example/JJFloatingActionButton.xcodeproj/project.pbxproj +++ b/Example/JJFloatingActionButton.xcodeproj/project.pbxproj @@ -27,9 +27,11 @@ 199592AC1FD73F070058BEFC /* JJFloatingActionButton.xib in Resources */ = {isa = PBXBuildFile; fileRef = 199592AB1FD73F070058BEFC /* JJFloatingActionButton.xib */; }; 19B10AD81FFCEF0800D70C32 /* JJFloationgActionButtonDelegateMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B10AD71FFCEF0800D70C32 /* JJFloationgActionButtonDelegateMock.swift */; }; 19B10ADA1FFD1F5600D70C32 /* JJFloatingActionButtonPlacementSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B10AD91FFD1F5600D70C32 /* JJFloatingActionButtonPlacementSpec.swift */; }; - 19D311DD200F8A630023477D /* CircularPopExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D311DC200F8A630023477D /* CircularPopExampleViewController.swift */; }; + 19D311DD200F8A630023477D /* CircularExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D311DC200F8A630023477D /* CircularExampleViewController.swift */; }; + 19D6CE7D2046C35F009F486D /* .codeclimate.yml in Resources */ = {isa = PBXBuildFile; fileRef = 19D6CE7C2046C35F009F486D /* .codeclimate.yml */; }; 19E247E61FD7E6F6009A7BA1 /* JJActionItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = 19E247E41FD7E6B5009A7BA1 /* JJActionItem.xib */; }; 19E247E81FD83CA7009A7BA1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 198B66091FBAE904009A17F2 /* Assets.xcassets */; }; + 19EDBD4520285DF100559C37 /* AnimationConfigurationSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19EDBD4420285DF100559C37 /* AnimationConfigurationSpec.swift */; }; 2239EB8C92AD42AB79A037CA /* Pods_JJFloatingActionButton_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75526023A5E4A843EAE2F986 /* Pods_JJFloatingActionButton_Example.framework */; }; D9B3C9FC35FD2B2E58308A4C /* Pods_JJFloatingActionButton_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47ADD51D359629C3321DB781 /* Pods_JJFloatingActionButton_Tests.framework */; }; /* End PBXBuildFile section */ @@ -72,7 +74,7 @@ 198B66231FBAEDD6009A17F2 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; lineEnding = 0; name = LICENSE; path = ../LICENSE; sourceTree = SOURCE_ROOT; tabWidth = 2; }; 198B66241FBAEDD6009A17F2 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = net.daringfireball.markdown; lineEnding = 0; name = README.md; path = ../README.md; sourceTree = SOURCE_ROOT; tabWidth = 2; }; 198B66261FBAEDD6009A17F2 /* Gemfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; indentWidth = 2; lineEnding = 0; name = Gemfile; path = ../Gemfile; sourceTree = SOURCE_ROOT; tabWidth = 2; }; - 198B66271FBAEDD7009A17F2 /* JJFloatingActionButton.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; indentWidth = 2; lineEnding = 0; name = JJFloatingActionButton.podspec; path = ../JJFloatingActionButton.podspec; sourceTree = SOURCE_ROOT; tabWidth = 2; }; + 198B66271FBAEDD7009A17F2 /* JJFloatingActionButton.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; indentWidth = 2; lineEnding = 0; name = JJFloatingActionButton.podspec; path = ../JJFloatingActionButton.podspec; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 198B662D1FBAEE16009A17F2 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; lineEnding = 0; name = .gitignore; path = ../.gitignore; sourceTree = SOURCE_ROOT; tabWidth = 2; }; 198B662E1FBAEE16009A17F2 /* .swift-version */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = text; lineEnding = 0; name = ".swift-version"; path = "../.swift-version"; sourceTree = SOURCE_ROOT; tabWidth = 2; }; 198EA7E31FD73F6D00F7DA3E /* JJCircleView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = JJCircleView.xib; sourceTree = ""; }; @@ -81,11 +83,13 @@ 19B10AD71FFCEF0800D70C32 /* JJFloationgActionButtonDelegateMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JJFloationgActionButtonDelegateMock.swift; sourceTree = ""; }; 19B10AD91FFD1F5600D70C32 /* JJFloatingActionButtonPlacementSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JJFloatingActionButtonPlacementSpec.swift; sourceTree = ""; }; 19B10ADB1FFE692100D70C32 /* Rakefile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; fileEncoding = 4; indentWidth = 2; name = Rakefile; path = ../../Rakefile; sourceTree = ""; tabWidth = 2; }; - 19D311DC200F8A630023477D /* CircularPopExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircularPopExampleViewController.swift; sourceTree = ""; }; + 19D311DC200F8A630023477D /* CircularExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircularExampleViewController.swift; sourceTree = ""; }; + 19D6CE7C2046C35F009F486D /* .codeclimate.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = .codeclimate.yml; path = ../../.codeclimate.yml; sourceTree = ""; }; 19DF53B81FF59AE5006E292F /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Package.swift; path = ../../Package.swift; sourceTree = ""; }; 19E247E41FD7E6B5009A7BA1 /* JJActionItem.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = JJActionItem.xib; sourceTree = ""; }; 19E247E91FD854B1009A7BA1 /* .github_changelog_generator */ = {isa = PBXFileReference; lastKnownFileType = text; name = .github_changelog_generator; path = ../../.github_changelog_generator; sourceTree = ""; }; 19E247EA1FD93525009A7BA1 /* .swiftlint.yml */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = text; name = .swiftlint.yml; path = ../../.swiftlint.yml; sourceTree = ""; tabWidth = 2; }; + 19EDBD4420285DF100559C37 /* AnimationConfigurationSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationConfigurationSpec.swift; sourceTree = ""; }; 47ADD51D359629C3321DB781 /* Pods_JJFloatingActionButton_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JJFloatingActionButton_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6332F06691AC394EF8E25D29 /* Pods-JJFloatingActionButton_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JJFloatingActionButton_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-JJFloatingActionButton_Tests/Pods-JJFloatingActionButton_Tests.release.xcconfig"; sourceTree = ""; }; 75526023A5E4A843EAE2F986 /* Pods_JJFloatingActionButton_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JJFloatingActionButton_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -140,7 +144,7 @@ 198B66001FBAE904009A17F2 /* AppDelegate.swift */, 198B66021FBAE904009A17F2 /* BasicsExampleViewController.swift */, 192D1B6F2003CB8A0093064F /* ConfigurationExampleViewController.swift */, - 19D311DC200F8A630023477D /* CircularPopExampleViewController.swift */, + 19D311DC200F8A630023477D /* CircularExampleViewController.swift */, 198B66041FBAE904009A17F2 /* InterfaceBuilderExampleViewController.swift */, 192D1B712003CB930093064F /* SingleItemExampleViewController.swift */, 192D1B6D2003C7440093064F /* Helper.swift */, @@ -161,6 +165,7 @@ 1952693F1FD7E4CD0053C785 /* JJCircleViewSpec.swift */, 19B10AD91FFD1F5600D70C32 /* JJFloatingActionButtonPlacementSpec.swift */, 198B66171FBAE904009A17F2 /* JJFloatingActionButtonSpec.swift */, + 19EDBD4420285DF100559C37 /* AnimationConfigurationSpec.swift */, 1957C8C920128AD200F1574B /* JJFloatingActionButtonDelegateSpec.swift */, 1957C8C42012815000F1574B /* JJFloatingActionButtonAppearanceSpec.swift */, 1957C8C7201283EF00F1574B /* JJActionItemAppearanceSpec.swift */, @@ -175,6 +180,7 @@ isa = PBXGroup; children = ( 193808CF1FBCA063002EF4C0 /* .codecov.yml */, + 19D6CE7C2046C35F009F486D /* .codeclimate.yml */, 19E247E91FD854B1009A7BA1 /* .github_changelog_generator */, 198B662D1FBAEE16009A17F2 /* .gitignore */, 19B10AC21FF7BDDD00D70C32 /* .jazzy.yaml */, @@ -321,6 +327,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 19D6CE7D2046C35F009F486D /* .codeclimate.yml in Resources */, 194504D42003D499003B205F /* LaunchScreen.storyboard in Resources */, 198B660A1FBAE904009A17F2 /* Assets.xcassets in Resources */, 198B66081FBAE904009A17F2 /* Main.storyboard in Resources */, @@ -462,7 +469,7 @@ 198B66031FBAE904009A17F2 /* BasicsExampleViewController.swift in Sources */, 192D1B702003CB8A0093064F /* ConfigurationExampleViewController.swift in Sources */, 192D1B6E2003C7440093064F /* Helper.swift in Sources */, - 19D311DD200F8A630023477D /* CircularPopExampleViewController.swift in Sources */, + 19D311DD200F8A630023477D /* CircularExampleViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -472,6 +479,7 @@ files = ( 198B66181FBAE904009A17F2 /* JJFloatingActionButtonSpec.swift in Sources */, 19B10AD81FFCEF0800D70C32 /* JJFloationgActionButtonDelegateMock.swift in Sources */, + 19EDBD4520285DF100559C37 /* AnimationConfigurationSpec.swift in Sources */, 195269411FD7E53B0053C785 /* JJCircleViewSpec.swift in Sources */, 195269431FD7E6200053C785 /* UIColorExtensionsSpec.swift in Sources */, 1957C8CA20128AD200F1574B /* JJFloatingActionButtonDelegateSpec.swift in Sources */, diff --git a/Example/JJFloatingActionButton/AppDelegate.swift b/Example/JJFloatingActionButton/AppDelegate.swift index 4db57679..1de01044 100644 --- a/Example/JJFloatingActionButton/AppDelegate.swift +++ b/Example/JJFloatingActionButton/AppDelegate.swift @@ -26,7 +26,6 @@ import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { - var window: UIWindow? func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { diff --git a/Example/JJFloatingActionButton/Base.lproj/Main.storyboard b/Example/JJFloatingActionButton/Base.lproj/Main.storyboard index 1e7f035d..86ae115a 100644 --- a/Example/JJFloatingActionButton/Base.lproj/Main.storyboard +++ b/Example/JJFloatingActionButton/Base.lproj/Main.storyboard @@ -27,7 +27,7 @@ -