Skip to content

Commit

Permalink
Merge branch 'release/0.9.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
bcylin committed Apr 17, 2018
2 parents 21c3aaf + a444f17 commit bc193c7
Show file tree
Hide file tree
Showing 29 changed files with 214 additions and 104 deletions.
12 changes: 7 additions & 5 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
coverage:
ignore:
- "Carthage/**/*"
- "Example*/**/*"
- "*Tests/**/*"
- "Pods/**/*"
status:
patch: off
ignore:
- "Carthage/**/*"
- "Example*/**/*"
- "*Tests/**/*"
- "Pods/**/*"
2 changes: 1 addition & 1 deletion .jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ github_url: https://github.com/bcylin/QuickTableViewController
github_file_prefix: https://github.com/bcylin/QuickTableViewController/blob/develop
xcodebuild_arguments: [-project, QuickTableViewController.xcodeproj, -scheme, QuickTableViewController-iOS]
module: QuickTableViewController
module_version: 0.9.0
module_version: 0.9.1
output: docs/output
theme: fullwidth
skip_undocumented: true
12 changes: 0 additions & 12 deletions .slather.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.3
4.1
12 changes: 6 additions & 6 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ disabled_rules:
- cyclomatic_complexity
- force_cast
- function_body_length
- valid_docs
- identifier_name
- vertical_whitespace
opt_in_rules:
- attributes
- closure_end_indentation
- closure_spacing
- conditional_returns_on_newline
Expand All @@ -29,10 +28,11 @@ opt_in_rules:
- unneeded_parentheses_in_closure_argument
- vertical_parameter_alignment_on_call
included:
- Example
- ExampleUITests
- QuickTableViewControllerTests
- Source
- "Example-iOS"
- "Example-iOSUITests"
- "QuickTableViewController-iOS"
- "QuickTableViewController-iOSTests"
- "Source"
excluded:
- Carthage
- Pods
Expand Down
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.2
osx_image: xcode9.3beta
matrix:
include:
- env: VERSION=latest
Expand All @@ -16,9 +16,10 @@ install:
before_script:
- if [ -n "$DANGER_GITHUB_API_TOKEN" ]; then bundle exec danger; fi
script:
- bundle exec rake ci:test[QuickTableViewController-iOS]
- bundle exec rake "ci:build[QuickTableViewController-iOS, 3.0]"
- bundle exec rake "ci:test[QuickTableViewController-iOS]"
- bash <(curl -s https://codecov.io/bash) -cF ios -J "QuickTableViewController"
- bundle exec rake ci:test[Example-iOS]
- bundle exec rake "ci:test[Example-iOS]"
- make -B carthage
- make -B docs
after_success:
Expand Down
2 changes: 0 additions & 2 deletions Brewfile

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## v0.9.1

#### Fixes

* Fix the property setter in `RadioSection` and change `Row` to a class protocol, [#14](https://github.com/bcylin/QuickTableViewController/pull/14) by [@z3bi](https://github.com/z3bi)

## v0.9.0

#### Breaking
Expand Down
2 changes: 1 addition & 1 deletion Example-iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.0</string>
<string>0.9.1</string>
<key>CFBundleVersion</key>
<string>101</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
81 changes: 70 additions & 11 deletions Example-iOS/ViewControllers/CustomizationViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,83 @@ internal final class CustomizationViewController: QuickTableViewController {
debugging,

Section(title: "Switch", rows: [
SwitchRow<CustomSwitchCell>(title: "SwitchRow\n<CustomSwitchCell>", switchValue: true, action: weakify(self, type(of: self).log)),
CustomSwitchRow<SwitchCell>(title: "CustomSwitchRow\n<SwitchCell>", switchValue: false, action: weakify(self, type(of: self).log))
SwitchRow<CustomSwitchCell>(
title: "SwitchRow\n<CustomSwitchCell>",
switchValue: true,
customization: set(label: "0-0"),
action: weakify(self, type(of: self).log)
),
CustomSwitchRow<SwitchCell>(
title: "CustomSwitchRow\n<SwitchCell>",
switchValue: false,
customization: set(label: "0-1"),
action: weakify(self, type(of: self).log)
)
]),

Section(title: "Tap Action", rows: [
TapActionRow<CustomTapActionCell>(title: "TapActionRow\n<CustomTapActionCell>", action: weakify(self, type(of: self).log)),
CustomTapActionRow<TapActionCell>(title: "CustomTapActionRow\n<TapActionCell>", action: weakify(self, type(of: self).log))
TapActionRow<CustomTapActionCell>(
title: "TapActionRow\n<CustomTapActionCell>",
customization: set(label: "1-0"),
action: weakify(self, type(of: self).log)
),
CustomTapActionRow<TapActionCell>(
title: "CustomTapActionRow\n<TapActionCell>",
customization: set(label: "1-1"),
action: weakify(self, type(of: self).log)
)
]),

Section(title: "Navigation", rows: [
NavigationRow(title: "NavigationRow", subtitle: .none, action: weakify(self, type(of: self).log)),
NavigationRow<CustomCell>(title: "NavigationRow<CustomCell>", subtitle: .belowTitle(".subtitle"), action: weakify(self, type(of: self).log)),
CustomNavigationRow(title: "CustomNavigationRow", subtitle: .rightAligned(".value1"), action: weakify(self, type(of: self).log)),
CustomNavigationRow<CustomCell>(title: "CustomNavigationRow<CustomCell>", subtitle: .leftAligned(".value2"), action: weakify(self, type(of: self).log))
NavigationRow(
title: "NavigationRow",
subtitle: .none,
customization: set(label: "2-0"),
action: weakify(self, type(of: self).log)),
NavigationRow<CustomCell>(
title: "NavigationRow<CustomCell>",
subtitle: .belowTitle(".subtitle"),
customization: set(label: "2-1"),
action: weakify(self, type(of: self).log)
),
CustomNavigationRow(
title: "CustomNavigationRow",
subtitle: .rightAligned(".value1"),
customization: set(label: "2-2"),
action: weakify(self, type(of: self).log)
),
CustomNavigationRow<CustomCell>(
title: "CustomNavigationRow<CustomCell>",
subtitle: .leftAligned(".value2"),
customization: set(label: "2-3"),
action: weakify(self, type(of: self).log)
)
]),

RadioSection(title: "Radio Buttons", options: [
OptionRow(title: "OptionRow", isSelected: false, action: weakify(self, type(of: self).log)),
CustomOptionRow(title: "CustomOptionRow", isSelected: false, action: weakify(self, type(of: self).log)),
CustomOptionRow<CustomOptionCell>(title: "CustomOptionRow<CustomOptionCell>", isSelected: false, action: weakify(self, type(of: self).log))
OptionRow(
title: "OptionRow",
isSelected: false,
customization: set(label: "3-0"),
action: weakify(self, type(of: self).log)
),
CustomOptionRow(
title: "CustomOptionRow",
isSelected: false,
customization: set(label: "3-1"),
action: weakify(self, type(of: self).log)
),
CustomOptionRow<CustomOptionCell>(
title: "CustomOptionRow<CustomOptionCell>",
isSelected: false,
customization: set(label: "3-2"),
action: weakify(self, type(of: self).log)
)
]),

Section(title: nil, rows: [
NavigationRow(title: "Customization closure", subtitle: .none, customization: { cell, _ in
cell.accessibilityLabel = "4-0"
cell.accessoryView = UIImageView(image: #imageLiteral(resourceName: "iconmonstr-x-mark"))
})
])
Expand All @@ -96,6 +149,12 @@ internal final class CustomizationViewController: QuickTableViewController {

// MARK: - Private

private func set(label: String) -> ((UITableViewCell, Row & RowStyle) -> Void) {
return { cell, _ in
cell.accessibilityLabel = label
}
}

private func log(_ sender: Row) {
if let option = sender as? OptionRowCompatible, !option.isSelected {
return
Expand Down
22 changes: 11 additions & 11 deletions Example-iOSUITests/ExampleUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,47 +90,47 @@ internal final class ExampleUITests: XCTestCase {
let tables = XCUIApplication().tables
let existance = NSPredicate(format: "exists == true")

tables.switches["SwitchRow <CustomSwitchCell>"].tap()
tables.switches["0-0"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["CustomSwitchCell"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.switches["CustomSwitchRow <SwitchCell>"].tap()
tables.switches["0-1"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["SwitchCell"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["TapActionRow <CustomTapActionCell>"].tap()
tables.cells["1-0"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["CustomTapActionCell"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["CustomTapActionRow <TapActionCell>"].tap()
tables.cells["1-1"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["TapActionCell"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["NavigationRow"].tap()
tables.cells["2-0"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["UITableViewCell.default"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["NavigationRow<CustomCell>"].tap()
tables.cells["2-1"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["CustomCell.subtitle"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["CustomNavigationRow"].tap()
tables.cells["2-2"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["UITableViewCell.value1"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["CustomNavigationRow<CustomCell>"].tap()
tables.cells["2-3"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["CustomCell.value2"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["OptionRow"].tap()
tables.cells["3-0"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["UITableViewCell"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["CustomOptionRow"].tap()
tables.cells["3-1"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["UITableViewCell"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)

tables.staticTexts["CustomOptionRow<CustomOptionCell>"].tap()
tables.cells["3-2"].tap()
expectation(for: existance, evaluatedWith: tables.staticTexts["CustomOptionCell"], handler: nil)
waitForExpectations(timeout: 5, handler: nil)
}
Expand Down
2 changes: 1 addition & 1 deletion Example-iOSUITests/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>0.9.0</string>
<string>0.9.1</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
default: test

test:
bundle exec rake 'ci:test[QuickTableViewController-iOS]'
bundle exec rake 'ci:test[Example-iOS]'
bundle exec rake "ci:test[QuickTableViewController-iOS]"
bundle exec rake "ci:test[Example-iOS]"

ci-test: test
make -B carthage
Expand All @@ -21,7 +21,7 @@ carthage:
set -o pipefail && carthage build --no-skip-current --verbose | bundle exec xcpretty -c

coverage:
bundle exec slather coverage -s --input-format profdata --workspace QuickTableViewController.xcworkspace --scheme QuickTableViewController-iOS QuickTableViewController.xcodeproj
slather coverage -s --input-format profdata --workspace QuickTableViewController.xcworkspace --scheme QuickTableViewController-iOS QuickTableViewController.xcodeproj

docs:
test -d docs || git clone -b gh-pages --single-branch https://github.com/bcylin/QuickTableViewController.git docs
Expand All @@ -31,8 +31,9 @@ docs:

for file in "html" "css" "js" "json"; do \
echo "Cleaning whitespace in *."$$file ; \
find docs/output -name "*."$$file -exec sed -E -i '' -e 's/[[:blank:]]*$///' {} \; ; \
find docs/output -name "*."$$file -exec sed -E -i "" -e "s/[[:blank:]]*$$//" {} \; ; \
done
find docs -type f -execdir chmod 644 {} \;

cp -rfv docs/output/* docs
cd docs && \
Expand Down
2 changes: 1 addition & 1 deletion QuickTableViewController-iOS/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>0.9.0</string>
<string>0.9.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion QuickTableViewController-iOSTests/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>0.9.0</string>
<string>0.9.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
Loading

0 comments on commit bc193c7

Please sign in to comment.