Skip to content

Commit 7789334

Browse files
authored
Merge pull request #50 from Automattic/release/1.0
Release/1.0
2 parents 5d3b797 + 2882a89 commit 7789334

File tree

414 files changed

+3930
-15230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

414 files changed

+3930
-15230
lines changed

.circleci/config.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
version: 2.1
22

33
orbs:
4-
# This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs
5-
ios: wordpress-mobile/ios@0.0.22
4+
# Using 1.0 of our Orbs means it will use the latest 1.0.x version from https://github.com/wordpress-mobile/circleci-orbs
5+
ios: wordpress-mobile/ios@1.0
66

77
workflows:
88
test_and_validate:
99
jobs:
1010
- ios/test:
1111
name: Test
12+
xcode-version: "11.2.1"
1213
workspace: Gridicons.xcworkspace
1314
scheme: Gridicons
14-
device: iPhone XS
15-
ios-version: "12.1"
16-
bundle-install: false
15+
device: iPhone 11
16+
ios-version: "13.2.2"
17+
bundle-install: true
1718
pod-install: false
1819
- ios/validate-podspec:
1920
name: Validate Podspec
21+
xcode-version: "11.2.1"
2022
podspec-path: Gridicons.podspec
23+
bundle-install: true
24+
- ios/publish-podspec:
25+
name: Publish to Trunk
26+
xcode-version: "11.2.1"
27+
podspec-path: Gridicons.podspec
28+
bundle-install: true
29+
post-to-slack: true
30+
filters:
31+
tags:
32+
only: /.*/
33+
branches:
34+
ignore: /.*/

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ xcuserdata/
2020
## Other
2121
*.moved-aside
2222
*.xcuserstate
23+
Pods/
24+
vendor/
2325

2426
## Obj-C/Swift specific
2527
*.hmap
@@ -30,4 +32,3 @@ timeline.xctimeline
3032
playground.xcworkspace
3133

3234
# Bundler
33-
vendor/

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.5.5

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
source 'https://rubygems.org' do
2-
gem 'cocoapods', '1.5.3'
2+
gem 'rake', '~> 13'
3+
gem 'cocoapods', '~> 1.8.0'
34
end

Gemfile.lock

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,73 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.0)
5-
activesupport (4.2.11)
4+
CFPropertyList (3.0.1)
5+
activesupport (4.2.11.1)
66
i18n (~> 0.7)
77
minitest (~> 5.1)
88
thread_safe (~> 0.3, >= 0.3.4)
99
tzinfo (~> 1.1)
10+
algoliasearch (1.27.1)
11+
httpclient (~> 2.8, >= 2.8.3)
12+
json (>= 1.5.1)
1013
atomos (0.1.3)
11-
claide (1.0.2)
12-
cocoapods (1.5.3)
14+
claide (1.0.3)
15+
cocoapods (1.8.4)
1316
activesupport (>= 4.0.2, < 5)
1417
claide (>= 1.0.2, < 2.0)
15-
cocoapods-core (= 1.5.3)
16-
cocoapods-deintegrate (>= 1.0.2, < 2.0)
17-
cocoapods-downloader (>= 1.2.0, < 2.0)
18+
cocoapods-core (= 1.8.4)
19+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
20+
cocoapods-downloader (>= 1.2.2, < 2.0)
1821
cocoapods-plugins (>= 1.0.0, < 2.0)
1922
cocoapods-search (>= 1.0.0, < 2.0)
2023
cocoapods-stats (>= 1.0.0, < 2.0)
21-
cocoapods-trunk (>= 1.3.0, < 2.0)
24+
cocoapods-trunk (>= 1.4.0, < 2.0)
2225
cocoapods-try (>= 1.1.0, < 2.0)
2326
colored2 (~> 3.1)
2427
escape (~> 0.0.4)
25-
fourflusher (~> 2.0.1)
28+
fourflusher (>= 2.3.0, < 3.0)
2629
gh_inspector (~> 1.0)
27-
molinillo (~> 0.6.5)
30+
molinillo (~> 0.6.6)
2831
nap (~> 1.0)
29-
ruby-macho (~> 1.1)
30-
xcodeproj (>= 1.5.7, < 2.0)
31-
cocoapods-core (1.5.3)
32+
ruby-macho (~> 1.4)
33+
xcodeproj (>= 1.11.1, < 2.0)
34+
cocoapods-core (1.8.4)
3235
activesupport (>= 4.0.2, < 6)
36+
algoliasearch (~> 1.0)
37+
concurrent-ruby (~> 1.1)
3338
fuzzy_match (~> 2.0.4)
3439
nap (~> 1.0)
35-
cocoapods-deintegrate (1.0.2)
40+
cocoapods-deintegrate (1.0.4)
3641
cocoapods-downloader (1.2.2)
3742
cocoapods-plugins (1.0.0)
3843
nap
3944
cocoapods-search (1.0.0)
4045
cocoapods-stats (1.1.0)
41-
cocoapods-trunk (1.3.1)
46+
cocoapods-trunk (1.4.1)
4247
nap (>= 0.8, < 2.0)
4348
netrc (~> 0.11)
4449
cocoapods-try (1.1.0)
4550
colored2 (3.1.2)
46-
concurrent-ruby (1.1.4)
51+
concurrent-ruby (1.1.5)
4752
escape (0.0.4)
48-
fourflusher (2.0.1)
53+
fourflusher (2.3.1)
4954
fuzzy_match (2.0.4)
5055
gh_inspector (1.1.3)
56+
httpclient (2.8.3)
5157
i18n (0.9.5)
5258
concurrent-ruby (~> 1.0)
53-
minitest (5.11.3)
59+
json (2.2.0)
60+
minitest (5.12.2)
5461
molinillo (0.6.6)
5562
nanaimo (0.2.6)
5663
nap (1.1.0)
5764
netrc (0.11.0)
58-
ruby-macho (1.3.1)
65+
rake (13.0.1)
66+
ruby-macho (1.4.0)
5967
thread_safe (0.3.6)
6068
tzinfo (1.2.5)
6169
thread_safe (~> 0.1)
62-
xcodeproj (1.8.0)
70+
xcodeproj (1.13.0)
6371
CFPropertyList (>= 2.3.3, < 4.0)
6472
atomos (~> 0.1.3)
6573
claide (>= 1.0.2, < 2.0)
@@ -70,7 +78,8 @@ PLATFORMS
7078
ruby
7179

7280
DEPENDENCIES
73-
cocoapods (= 1.5.3)!
81+
cocoapods (~> 1.8.0)!
82+
rake (~> 13)!
7483

7584
BUNDLED WITH
76-
1.17.2
85+
2.0.2

Gridicons.podspec

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
Pod::Spec.new do |s|
22
s.name = "Gridicons"
3-
s.version = "0.19"
3+
s.version = "1.0"
44
s.summary = "Gridicons is a tiny framework which generates Gridicon images at any resolution."
55

66
s.homepage = "http://apps.wordpress.com"
77
s.license = { :type => "GPLv2" }
88
s.author = { "Automattic" => "[email protected]" }
99
s.social_media_url = "http://twitter.com/WordPressiOS"
1010

11-
s.platform = :ios, "9.0"
11+
s.platform = :ios, "10.0"
1212
s.source = { :git => "https://github.com/Automattic/Gridicons-iOS.git", :tag => s.version.to_s }
1313

14-
s.source_files = "Gridicons/Gridicons/**/*.swift"
14+
s.source_files = "Gridicons/Gridicons/**/*.swift"
15+
s.resource_bundles = {
16+
'Gridicons': [
17+
'Gridicons/Gridicons/*.{xcassets}',
18+
]
19+
}
1520
s.requires_arc = true
1621
end

Gridicons.stencil

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen
2+
{% if catalogs %}
3+
{% set enumName %}{{param.enumName|default:"GridiconType"}}{% endset %}
4+
5+
{% macro enumBlock assets sp %}
6+
{{sp}} {% call casesBlock assets sp %}
7+
{% endmacro %}
8+
{% macro casesBlock assets sp %}
9+
{{sp}} {% for asset in assets %}
10+
{{sp}} {% if asset.type == "image" %}
11+
{{sp}} case {{asset.name|swiftIdentifier:"pretty"|lowerFirstWord|replace:"Ios","iOS"|escapeReservedKeywords}}
12+
{{sp}} {% endif %}
13+
{{sp}} {% endfor %}
14+
{% endmacro %}
15+
{% macro assetNamesBlock assets sp %}
16+
{{sp}} {% for asset in assets %}
17+
{{sp}} {% if asset.type == "image" %}
18+
{{sp}} case .{{asset.name|swiftIdentifier:"pretty"|lowerFirstWord|replace:"Ios","iOS"|escapeReservedKeywords}}: return "{{asset.name}}"
19+
{{sp}} {% endif %}
20+
{{sp}} {% endfor %}
21+
{% endmacro %}
22+
23+
@objc
24+
public enum {{enumName}}: Int {
25+
{% call enumBlock catalogs.first.assets " " %}
26+
}
27+
28+
extension {{enumName}} {
29+
var name: String {
30+
switch self {
31+
{% call assetNamesBlock catalogs.first.assets " " %}
32+
}
33+
}
34+
35+
var icon: UIImage {
36+
var bundle = Bundle(for: BundleToken.self)
37+
38+
if let url = bundle.url(forResource: "Gridicons", withExtension: "bundle"),
39+
let assetBundle = Bundle(url: url) {
40+
// When loaded through CocoaPods, assets reside in a separate resource bundle
41+
bundle = assetBundle
42+
}
43+
44+
let image = UIImage(named: name, in: bundle, compatibleWith: nil)
45+
guard let result = image else { fatalError("Unable to load image named \(name).") }
46+
return result
47+
}
48+
}
49+
50+
private final class BundleToken {}
51+
52+
{% else %}
53+
// No assets found
54+
{% endif %}

0 commit comments

Comments
 (0)