Skip to content

Commit b7baee1

Browse files
Merge pull request #3 from griffin-stewie/fix/issue_2
Can't override autocomplete
2 parents 42c0d50 + ce347f3 commit b7baee1

37 files changed

+93
-28
lines changed

.appcast.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
<title>SymbolNameAutocomplete</title>
55
<description>Autocomplete symbol name when create it.</description>
66
<language>en</language>
7+
<item>
8+
<title>Version 0.5.1</title>
9+
<description>
10+
<![CDATA[
11+
<ul>
12+
<li>Fix insertion behavior</li>
13+
</ul>
14+
]]>
15+
</description>
16+
<enclosure url="https://github.com/griffin-stewie/SymbolNameAutocomplete/releases/download/v0.5.1/SymbolNameAutocomplete.sketchplugin.zip" sparkle:version="0.5.1" />
17+
</item>
718
<item>
819
<title>Version 0.5.0</title>
920
<description>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
if [ -n "$BUILD_FROM_FASTLANE" ]; then
4+
echo "Build from fastlane. skip execute Install plugin phase."
5+
exit 0
6+
fi
7+
8+
## This script is for using inside Xcode's Run Script Phase to package framework as .sketchplugin and putitng it as symbolic link.
9+
## It means that all you have to do to debug using Xcode is just "Run" then automatilcally install my sketchplugin.
10+
11+
export LC_ALL=en_US.UTF-8
12+
export LANG=en_US.UTF-8
13+
14+
## set a path for `bundler` if you have it on different path.
15+
BUNDLER_PATH=~/.rbenv/shims/bundler
16+
17+
## run fastlane "install" lane
18+
$BUNDLER_PATH exec fastlane mac install build_dir:$CONFIGURATION_BUILD_DIR

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ source "https://rubygems.org"
44

55
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
66

7-
gem "fastlane", "2.112.0"
7+
gem "fastlane", "2.118.1"

Gemfile.lock

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
CFPropertyList (3.0.0)
5-
addressable (2.5.2)
5+
addressable (2.6.0)
66
public_suffix (>= 2.0.2, < 4.0)
77
atomos (0.1.3)
88
babosa (1.0.2)
@@ -16,26 +16,26 @@ GEM
1616
digest-crc (0.4.1)
1717
domain_name (0.5.20180417)
1818
unf (>= 0.0.5, < 1.0.0)
19-
dotenv (2.5.0)
20-
emoji_regex (0.1.1)
19+
dotenv (2.7.1)
20+
emoji_regex (1.0.1)
2121
excon (0.62.0)
2222
faraday (0.15.4)
2323
multipart-post (>= 1.2, < 3)
2424
faraday-cookie_jar (0.0.6)
2525
faraday (>= 0.7.4)
2626
http-cookie (~> 1.0.0)
27-
faraday_middleware (0.12.2)
27+
faraday_middleware (0.13.1)
2828
faraday (>= 0.7.4, < 1.0)
2929
fastimage (2.1.5)
30-
fastlane (2.112.0)
30+
fastlane (2.118.1)
3131
CFPropertyList (>= 2.3, < 4.0.0)
3232
addressable (>= 2.3, < 3.0.0)
3333
babosa (>= 1.0.2, < 2.0.0)
34-
bundler (>= 1.12.0, < 2.0.0)
34+
bundler (>= 1.12.0, < 3.0.0)
3535
colored
3636
commander-fastlane (>= 4.4.6, < 5.0.0)
3737
dotenv (>= 2.1.1, < 3.0.0)
38-
emoji_regex (~> 0.1)
38+
emoji_regex (>= 0.1, < 2.0)
3939
excon (>= 0.45.0, < 1.0.0)
4040
faraday (~> 0.9)
4141
faraday-cookie_jar (~> 0.0.6)
@@ -56,12 +56,12 @@ GEM
5656
security (= 0.1.3)
5757
simctl (~> 1.6.3)
5858
slack-notifier (>= 2.0.0, < 3.0.0)
59-
terminal-notifier (>= 1.6.2, < 2.0.0)
59+
terminal-notifier (>= 2.0.0, < 3.0.0)
6060
terminal-table (>= 1.4.5, < 2.0.0)
6161
tty-screen (>= 0.6.3, < 1.0.0)
6262
tty-spinner (>= 0.8.0, < 1.0.0)
6363
word_wrap (~> 1.0.0)
64-
xcodeproj (>= 1.6.0, < 2.0.0)
64+
xcodeproj (>= 1.8.1, < 2.0.0)
6565
xcpretty (~> 0.3.0)
6666
xcpretty-travis-formatter (>= 0.0.3)
6767
gh_inspector (1.1.3)
@@ -73,15 +73,15 @@ GEM
7373
representable (~> 3.0)
7474
retriable (>= 2.0, < 4.0)
7575
signet (~> 0.9)
76-
google-cloud-core (1.2.7)
76+
google-cloud-core (1.3.0)
7777
google-cloud-env (~> 1.0)
7878
google-cloud-env (1.0.5)
7979
faraday (~> 0.11)
80-
google-cloud-storage (1.15.0)
80+
google-cloud-storage (1.16.0)
8181
digest-crc (~> 0.4)
8282
google-api-client (~> 0.23)
8383
google-cloud-core (~> 1.2)
84-
googleauth (~> 0.6.2)
84+
googleauth (>= 0.6.2, < 0.10.0)
8585
googleauth (0.6.7)
8686
faraday (~> 0.12)
8787
jwt (>= 1.4, < 3.0)
@@ -93,7 +93,7 @@ GEM
9393
http-cookie (1.0.3)
9494
domain_name (~> 0.5)
9595
httpclient (2.8.3)
96-
json (2.1.0)
96+
json (2.2.0)
9797
jwt (2.1.0)
9898
memoist (0.16.0)
9999
mime-types (3.2.2)
@@ -106,7 +106,7 @@ GEM
106106
nanaimo (0.2.6)
107107
naturally (2.2.0)
108108
os (1.0.0)
109-
plist (3.4.0)
109+
plist (3.5.0)
110110
public_suffix (2.0.5)
111111
representable (3.0.4)
112112
declarative (< 0.1.0)
@@ -125,20 +125,20 @@ GEM
125125
CFPropertyList
126126
naturally
127127
slack-notifier (2.3.2)
128-
terminal-notifier (1.8.0)
128+
terminal-notifier (2.0.0)
129129
terminal-table (1.8.0)
130130
unicode-display_width (~> 1.1, >= 1.1.1)
131-
tty-cursor (0.6.0)
131+
tty-cursor (0.6.1)
132132
tty-screen (0.6.5)
133133
tty-spinner (0.9.0)
134134
tty-cursor (~> 0.6.0)
135135
uber (0.1.0)
136136
unf (0.1.4)
137137
unf_ext
138138
unf_ext (0.0.7.5)
139-
unicode-display_width (1.4.0)
139+
unicode-display_width (1.5.0)
140140
word_wrap (1.0.0)
141-
xcodeproj (1.7.0)
141+
xcodeproj (1.8.1)
142142
CFPropertyList (>= 2.3.3, < 4.0)
143143
atomos (~> 0.1.3)
144144
claide (>= 1.0.2, < 2.0)
@@ -153,7 +153,7 @@ PLATFORMS
153153
ruby
154154

155155
DEPENDENCIES
156-
fastlane (= 2.112.0)
156+
fastlane (= 2.118.1)
157157

158158
BUNDLED WITH
159-
1.17.1
159+
1.17.2

SymbolNameAutocomplete.xcodeproj/project.pbxproj

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@
258258
D0FF4A8C21A69229000FA0DC /* Sources */,
259259
D0FF4A8D21A69229000FA0DC /* Frameworks */,
260260
D0FF4A8E21A69229000FA0DC /* Resources */,
261+
E3695D78222A14E200FBA74E /* Install Plugin */,
261262
);
262263
buildRules = (
263264
);
@@ -339,6 +340,27 @@
339340
};
340341
/* End PBXResourcesBuildPhase section */
341342

343+
/* Begin PBXShellScriptBuildPhase section */
344+
E3695D78222A14E200FBA74E /* Install Plugin */ = {
345+
isa = PBXShellScriptBuildPhase;
346+
buildActionMask = 2147483647;
347+
files = (
348+
);
349+
inputFileListPaths = (
350+
);
351+
inputPaths = (
352+
);
353+
name = "Install Plugin";
354+
outputFileListPaths = (
355+
);
356+
outputPaths = (
357+
);
358+
runOnlyForDeploymentPostprocessing = 0;
359+
shellPath = /bin/sh;
360+
shellScript = "sh Build-Phases/install_using_xcode.sh \n";
361+
};
362+
/* End PBXShellScriptBuildPhase section */
363+
342364
/* Begin PBXSourcesBuildPhase section */
343365
D0FF4A8C21A69229000FA0DC /* Sources */ = {
344366
isa = PBXSourcesBuildPhase;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// AnalyticsTrackingID.h
3+
// SymbolNameAutocomplete
4+
//
5+
// Created by griffin-stewie on 2019/03/02.
6+
// Copyright © 2019 cyan-stivy.net. All rights reserved.
7+
//
8+
9+
#ifndef AnalyticsTrackingID_h
10+
#define AnalyticsTrackingID_h
11+
12+
#define TRACKING_ID @"UA-1908606-9"
13+
14+
#endif /* AnalyticsTrackingID_h */

SymbolNameAutocomplete/CSNSuggestionsWindowController.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ - (void)presentWithSuggestions:(NSArray<NSString *> *)suggestions positioningTex
114114
name:NSWindowDidResignKeyNotification
115115
object:positioningTextView.window];
116116
}
117-
118-
[self selectRowAtIndex:0];
119117
}
120118

121119
- (void)cancelSuggestions

fastlane/Fastfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ platform :mac do
1212
build: true,
1313
scheme: "SymbolNameAutocomplete",
1414
configuration: "Debug",
15-
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR}"
15+
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR} BUILD_FROM_FASTLANE=true"
1616
)
1717

1818
File.expand_path(File.join("..", BUILD_DIR))
@@ -26,21 +26,23 @@ platform :mac do
2626
build: true,
2727
scheme: "SymbolNameAutocomplete",
2828
configuration: "Release",
29-
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR}"
29+
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR} BUILD_FROM_FASTLANE=true "
3030
)
3131

3232
File.expand_path(File.join("..", BUILD_DIR))
3333
end
3434

3535
desc "Package plugin, building framework unless provided"
3636
lane :package do |options|
37-
require "fileutils"
37+
fastlane_require "fileutils"
3838

3939
build_dir = options[:build_dir]
4040
unless build_dir
4141
build_dir = build
4242
end
4343

44+
puts "⚡️"
45+
4446
plugin_dir = File.join(build_dir, PLUGIN_NAME)
4547
FileUtils.rm_rf(plugin_dir)
4648

@@ -73,7 +75,7 @@ platform :mac do
7375

7476
desc "Package and install plugin to Sketch"
7577
lane :install do |options|
76-
require "fileutils"
78+
fastlane_require "fileutils"
7779

7880
plugin_dir = package(options)
7981
plugin_link = File.join(Dir.home, "Library", "Application Support", "com.bohemiancoding.sketch3", "Plugins", PLUGIN_NAME)

plugin/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "This plugin gives you autocompletion of symbol names when creating a symbol.",
44
"author": "griffin-stewie",
55
"homepage": "https://griffin-stewie.github.io/",
6-
"version": "0.5.0",
6+
"version": "0.5.1",
77
"identifier": "net.cyan-stivy.sketchPlugin.symbol-name-autocomplete",
88
"icon": "icon.png",
99
"appcast": "https://github.com/griffin-stewie/SymbolNameAutocomplete/blob/master/.appcast.xml",

vendor/cache/addressable-2.5.2.gem

-102 KB
Binary file not shown.

0 commit comments

Comments
 (0)