dyci 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -15
- data/lib/dyci.rb +3 -0
- data/lib/dyci/commands/install_command.rb +4 -2
- data/lib/dyci/commands/uninstall_command.rb +49 -0
- data/lib/dyci/version.rb +1 -1
- metadata +50 -33
- data/lib/dyci/commands/setup_command.rb +0 -13
data/README.md
CHANGED
@@ -1,20 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# DyCI
|
2
2
|
|
3
3
|
This gem helps you to install [DyCI](http://dyci.github.com/) on your computer.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
gem 'dyci'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install dyci
|
7
|
+
$ sudo gem install dyci
|
18
8
|
|
19
9
|
## Usage
|
20
10
|
|
@@ -22,9 +12,9 @@ Or install it yourself as:
|
|
22
12
|
|
23
13
|
### Parameters
|
24
14
|
|
25
|
-
|
26
|
-
|
27
|
-
|
15
|
+
as_proxy : replace Xcode's clang with fake script.
|
16
|
+
as_plugin : add new compiler to Xcode.
|
17
|
+
app_code : install AppCode DyCI plugin.
|
28
18
|
|
29
19
|
## Contributing
|
30
20
|
|
data/lib/dyci.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'dyci/version'
|
2
2
|
require 'dyci/commands/install_command'
|
3
|
+
require 'dyci/commands/uninstall_command'
|
3
4
|
|
4
5
|
module DyCI
|
5
6
|
class Runner
|
@@ -12,6 +13,8 @@ module DyCI
|
|
12
13
|
case arg
|
13
14
|
when 'install'
|
14
15
|
InstallCommand
|
16
|
+
when 'uninstall'
|
17
|
+
UninstallCommand
|
15
18
|
else
|
16
19
|
usage
|
17
20
|
exit 0
|
@@ -46,14 +46,16 @@ Available parameters:
|
|
46
46
|
|
47
47
|
def install_app_code
|
48
48
|
app_code_path = "#{File.expand_path '~'}/Library/Preferences/appCode10"
|
49
|
-
|
49
|
+
unless File.exists?(app_code_path) && File.directory?(app_code_path)
|
50
50
|
puts "AppCode preferences was not found at path '#{app_code_path}'"
|
51
51
|
return
|
52
52
|
end
|
53
53
|
app_code_plugin_path = "#{app_code_path}/tools/"
|
54
54
|
FileUtils.mkdir_p app_code_plugin_path
|
55
|
-
app_code_plugin = "#{self.root_path}/
|
55
|
+
app_code_plugin = "#{self.root_path}/lib/plugins/AppCode/DyCIPlugin.xml"
|
56
|
+
print "Installing AppCode plugin. "
|
56
57
|
FileUtils.cp app_code_plugin, app_code_plugin_path
|
58
|
+
puts "Done."
|
57
59
|
end
|
58
60
|
|
59
61
|
def backup_clang
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module DyCI
|
2
|
+
class UninstallCommand
|
3
|
+
def self.run args
|
4
|
+
uninstall_appcode_plugin
|
5
|
+
uninstall_xcode_plugin "DyCIFakeClang"
|
6
|
+
uninstall_xcode_plugin "DyCIHelper"
|
7
|
+
restore_clang
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.restore_clang
|
11
|
+
developer_path = %x[ xcode-select -print-path ].chomp
|
12
|
+
clang_path = "#{developer_path}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
|
13
|
+
clang_backup_path = "#{clang_path}.backup"
|
14
|
+
if File.exists? clang_backup_path
|
15
|
+
print "Restore clang."
|
16
|
+
%x[ sudo mv #{clang_backup_path} #{clang_path} ]
|
17
|
+
puts "Done."
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.uninstall_appcode_plugin
|
22
|
+
app_code_path = "#{File.expand_path '~'}/Library/Preferences/appCode10"
|
23
|
+
app_code_plugin_path = "#{app_code_path}/tools/DyCIPlugin.xml"
|
24
|
+
if File.exists? app_code_plugin_path
|
25
|
+
print "Removing AppCode plugin. "
|
26
|
+
FileUtils.remove_file app_code_plugin_path
|
27
|
+
puts "Done."
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.uninstall_xcode_plugin plugin_name
|
32
|
+
plugin_path = "#{plugins_dir}/#{plugin_name}.xcplugin"
|
33
|
+
if File.exists? plugin_path
|
34
|
+
print "Removing #{plugin_name}. "
|
35
|
+
FileUtils.rm_rf plugin_path
|
36
|
+
puts "Done."
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.plugins_dir
|
41
|
+
user_dir = File.expand_path("~")
|
42
|
+
plugins_dir = "#{user_dir}/Library/Application Support/Developer/Shared/Xcode/Plug-ins"
|
43
|
+
FileUtils.mkdir_p plugins_dir
|
44
|
+
plugins_dir
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
data/lib/dyci/version.rb
CHANGED
metadata
CHANGED
@@ -1,40 +1,47 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyci
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Alex Denisov
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-11-18 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: dyci-compiler
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0.1'
|
22
|
-
type: :runtime
|
23
22
|
prerelease: false
|
24
|
-
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
|
-
requirements:
|
25
|
+
requirements:
|
27
26
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 9
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 1
|
32
|
+
version: "0.1"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
30
35
|
description: Installation helper for DyCI
|
31
|
-
email:
|
36
|
+
email:
|
32
37
|
- 1101.debian@gmail.com
|
33
|
-
executables:
|
38
|
+
executables:
|
34
39
|
- dyci
|
35
40
|
extensions: []
|
41
|
+
|
36
42
|
extra_rdoc_files: []
|
37
|
-
|
43
|
+
|
44
|
+
files:
|
38
45
|
- .gitignore
|
39
46
|
- .rvmrc
|
40
47
|
- Gemfile
|
@@ -45,7 +52,7 @@ files:
|
|
45
52
|
- dyci.gemspec
|
46
53
|
- lib/dyci.rb
|
47
54
|
- lib/dyci/commands/install_command.rb
|
48
|
-
- lib/dyci/commands/
|
55
|
+
- lib/dyci/commands/uninstall_command.rb
|
49
56
|
- lib/dyci/version.rb
|
50
57
|
- lib/plugins/.DS_Store
|
51
58
|
- lib/plugins/AppCode/DyCIPlugin.xml
|
@@ -55,26 +62,36 @@ files:
|
|
55
62
|
- lib/plugins/DyCIHelper.xcplugin/Contents/MacOS/SFDCIHelper
|
56
63
|
homepage: https://github.com/DyCI/dyci-installer-rb
|
57
64
|
licenses: []
|
65
|
+
|
58
66
|
post_install_message:
|
59
67
|
rdoc_options: []
|
60
|
-
|
68
|
+
|
69
|
+
require_paths:
|
61
70
|
- lib
|
62
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
72
|
none: false
|
64
|
-
requirements:
|
65
|
-
- -
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
|
68
|
-
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 3
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
version: "0"
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
81
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
hash: 3
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
74
89
|
requirements: []
|
90
|
+
|
75
91
|
rubyforge_project:
|
76
92
|
rubygems_version: 1.8.24
|
77
93
|
signing_key:
|
78
94
|
specification_version: 3
|
79
95
|
summary: This tool helps you to install DyCI on your computer
|
80
96
|
test_files: []
|
97
|
+
|