Skip to content

Commit

Permalink
Merge pull request #3 from griffin-stewie/fix/issue_2
Browse files Browse the repository at this point in the history
Can't override autocomplete
  • Loading branch information
griffin-stewie authored Mar 23, 2019
2 parents 42c0d50 + ce347f3 commit b7baee1
Show file tree
Hide file tree
Showing 37 changed files with 93 additions and 28 deletions.
11 changes: 11 additions & 0 deletions .appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
<title>SymbolNameAutocomplete</title>
<description>Autocomplete symbol name when create it.</description>
<language>en</language>
<item>
<title>Version 0.5.1</title>
<description>
<![CDATA[
<ul>
<li>Fix insertion behavior</li>
</ul>
]]>
</description>
<enclosure url="https://github.com/griffin-stewie/SymbolNameAutocomplete/releases/download/v0.5.1/SymbolNameAutocomplete.sketchplugin.zip" sparkle:version="0.5.1" />
</item>
<item>
<title>Version 0.5.0</title>
<description>
Expand Down
18 changes: 18 additions & 0 deletions Build-Phases/install_using_xcode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

if [ -n "$BUILD_FROM_FASTLANE" ]; then
echo "Build from fastlane. skip execute Install plugin phase."
exit 0
fi

## This script is for using inside Xcode's Run Script Phase to package framework as .sketchplugin and putitng it as symbolic link.
## It means that all you have to do to debug using Xcode is just "Run" then automatilcally install my sketchplugin.

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

## set a path for `bundler` if you have it on different path.
BUNDLER_PATH=~/.rbenv/shims/bundler

## run fastlane "install" lane
$BUNDLER_PATH exec fastlane mac install build_dir:$CONFIGURATION_BUILD_DIR
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source "https://rubygems.org"

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

gem "fastlane", "2.112.0"
gem "fastlane", "2.118.1"
40 changes: 20 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
addressable (2.5.2)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.3)
babosa (1.0.2)
Expand All @@ -16,26 +16,26 @@ GEM
digest-crc (0.4.1)
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.5.0)
emoji_regex (0.1.1)
dotenv (2.7.1)
emoji_regex (1.0.1)
excon (0.62.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
faraday (>= 0.7.4)
http-cookie (~> 1.0.0)
faraday_middleware (0.12.2)
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.112.0)
fastlane (2.118.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
bundler (>= 1.12.0, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (~> 0.1)
emoji_regex (>= 0.1, < 2.0)
excon (>= 0.45.0, < 1.0.0)
faraday (~> 0.9)
faraday-cookie_jar (~> 0.0.6)
Expand All @@ -56,12 +56,12 @@ GEM
security (= 0.1.3)
simctl (~> 1.6.3)
slack-notifier (>= 2.0.0, < 3.0.0)
terminal-notifier (>= 1.6.2, < 2.0.0)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.6.0, < 2.0.0)
xcodeproj (>= 1.8.1, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
Expand All @@ -73,15 +73,15 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
google-cloud-core (1.2.7)
google-cloud-core (1.3.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.0.5)
faraday (~> 0.11)
google-cloud-storage (1.15.0)
google-cloud-storage (1.16.0)
digest-crc (~> 0.4)
google-api-client (~> 0.23)
google-cloud-core (~> 1.2)
googleauth (~> 0.6.2)
googleauth (>= 0.6.2, < 0.10.0)
googleauth (0.6.7)
faraday (~> 0.12)
jwt (>= 1.4, < 3.0)
Expand All @@ -93,7 +93,7 @@ GEM
http-cookie (1.0.3)
domain_name (~> 0.5)
httpclient (2.8.3)
json (2.1.0)
json (2.2.0)
jwt (2.1.0)
memoist (0.16.0)
mime-types (3.2.2)
Expand All @@ -106,7 +106,7 @@ GEM
nanaimo (0.2.6)
naturally (2.2.0)
os (1.0.0)
plist (3.4.0)
plist (3.5.0)
public_suffix (2.0.5)
representable (3.0.4)
declarative (< 0.1.0)
Expand All @@ -125,20 +125,20 @@ GEM
CFPropertyList
naturally
slack-notifier (2.3.2)
terminal-notifier (1.8.0)
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tty-cursor (0.6.0)
tty-cursor (0.6.1)
tty-screen (0.6.5)
tty-spinner (0.9.0)
tty-cursor (~> 0.6.0)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unicode-display_width (1.4.0)
unicode-display_width (1.5.0)
word_wrap (1.0.0)
xcodeproj (1.7.0)
xcodeproj (1.8.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -153,7 +153,7 @@ PLATFORMS
ruby

DEPENDENCIES
fastlane (= 2.112.0)
fastlane (= 2.118.1)

BUNDLED WITH
1.17.1
1.17.2
22 changes: 22 additions & 0 deletions SymbolNameAutocomplete.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
D0FF4A8C21A69229000FA0DC /* Sources */,
D0FF4A8D21A69229000FA0DC /* Frameworks */,
D0FF4A8E21A69229000FA0DC /* Resources */,
E3695D78222A14E200FBA74E /* Install Plugin */,
);
buildRules = (
);
Expand Down Expand Up @@ -339,6 +340,27 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
E3695D78222A14E200FBA74E /* Install Plugin */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Install Plugin";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "sh Build-Phases/install_using_xcode.sh \n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
D0FF4A8C21A69229000FA0DC /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down
14 changes: 14 additions & 0 deletions SymbolNameAutocomplete/AnalyticsTrackingID.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// AnalyticsTrackingID.h
// SymbolNameAutocomplete
//
// Created by griffin-stewie on 2019/03/02.
// Copyright © 2019 cyan-stivy.net. All rights reserved.
//

#ifndef AnalyticsTrackingID_h
#define AnalyticsTrackingID_h

#define TRACKING_ID @"UA-1908606-9"

#endif /* AnalyticsTrackingID_h */
2 changes: 0 additions & 2 deletions SymbolNameAutocomplete/CSNSuggestionsWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ - (void)presentWithSuggestions:(NSArray<NSString *> *)suggestions positioningTex
name:NSWindowDidResignKeyNotification
object:positioningTextView.window];
}

[self selectRowAtIndex:0];
}

- (void)cancelSuggestions
Expand Down
10 changes: 6 additions & 4 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ platform :mac do
build: true,
scheme: "SymbolNameAutocomplete",
configuration: "Debug",
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR}"
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR} BUILD_FROM_FASTLANE=true"
)

File.expand_path(File.join("..", BUILD_DIR))
Expand All @@ -26,21 +26,23 @@ platform :mac do
build: true,
scheme: "SymbolNameAutocomplete",
configuration: "Release",
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR}"
xcargs: "CONFIGURATION_BUILD_DIR=#{BUILD_DIR} BUILD_FROM_FASTLANE=true "
)

File.expand_path(File.join("..", BUILD_DIR))
end

desc "Package plugin, building framework unless provided"
lane :package do |options|
require "fileutils"
fastlane_require "fileutils"

build_dir = options[:build_dir]
unless build_dir
build_dir = build
end

puts "⚡️"

plugin_dir = File.join(build_dir, PLUGIN_NAME)
FileUtils.rm_rf(plugin_dir)

Expand Down Expand Up @@ -73,7 +75,7 @@ platform :mac do

desc "Package and install plugin to Sketch"
lane :install do |options|
require "fileutils"
fastlane_require "fileutils"

plugin_dir = package(options)
plugin_link = File.join(Dir.home, "Library", "Application Support", "com.bohemiancoding.sketch3", "Plugins", PLUGIN_NAME)
Expand Down
2 changes: 1 addition & 1 deletion plugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "This plugin gives you autocompletion of symbol names when creating a symbol.",
"author": "griffin-stewie",
"homepage": "https://griffin-stewie.github.io/",
"version": "0.5.0",
"version": "0.5.1",
"identifier": "net.cyan-stivy.sketchPlugin.symbol-name-autocomplete",
"icon": "icon.png",
"appcast": "https://github.com/griffin-stewie/SymbolNameAutocomplete/blob/master/.appcast.xml",
Expand Down
Binary file removed vendor/cache/addressable-2.5.2.gem
Binary file not shown.
Binary file added vendor/cache/addressable-2.6.0.gem
Binary file not shown.
Binary file removed vendor/cache/dotenv-2.5.0.gem
Binary file not shown.
Binary file added vendor/cache/dotenv-2.7.1.gem
Binary file not shown.
Binary file removed vendor/cache/emoji_regex-0.1.1.gem
Binary file not shown.
Binary file added vendor/cache/emoji_regex-1.0.1.gem
Binary file not shown.
Binary file removed vendor/cache/faraday_middleware-0.12.2.gem
Binary file not shown.
Binary file added vendor/cache/faraday_middleware-0.13.1.gem
Binary file not shown.
Binary file removed vendor/cache/fastlane-2.112.0.gem
Binary file not shown.
Binary file added vendor/cache/fastlane-2.117.1.gem
Binary file not shown.
Binary file added vendor/cache/fastlane-2.118.1.gem
Binary file not shown.
Binary file removed vendor/cache/google-cloud-core-1.2.7.gem
Binary file not shown.
Binary file added vendor/cache/google-cloud-core-1.3.0.gem
Binary file not shown.
Binary file removed vendor/cache/google-cloud-storage-1.15.0.gem
Binary file not shown.
Binary file added vendor/cache/google-cloud-storage-1.16.0.gem
Binary file not shown.
Binary file removed vendor/cache/json-2.1.0.gem
Binary file not shown.
Binary file added vendor/cache/json-2.2.0.gem
Binary file not shown.
Binary file removed vendor/cache/plist-3.4.0.gem
Binary file not shown.
Binary file added vendor/cache/plist-3.5.0.gem
Binary file not shown.
Binary file removed vendor/cache/terminal-notifier-1.8.0.gem
Binary file not shown.
Binary file added vendor/cache/terminal-notifier-2.0.0.gem
Binary file not shown.
Binary file removed vendor/cache/tty-cursor-0.6.0.gem
Binary file not shown.
Binary file added vendor/cache/tty-cursor-0.6.1.gem
Binary file not shown.
Binary file removed vendor/cache/unicode-display_width-1.4.0.gem
Binary file not shown.
Binary file added vendor/cache/unicode-display_width-1.4.1.gem
Binary file not shown.
Binary file added vendor/cache/unicode-display_width-1.5.0.gem
Binary file not shown.
Binary file removed vendor/cache/xcodeproj-1.7.0.gem
Binary file not shown.
Binary file added vendor/cache/xcodeproj-1.8.1.gem
Binary file not shown.

0 comments on commit b7baee1

Please sign in to comment.