xcinvoke 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +1 -1
- data/lib/xcinvoke/version.rb +1 -1
- data/lib/xcinvoke/xcode.rb +23 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bae7231afd1f410041f2cd6a06aa33a0649c9e6
|
4
|
+
data.tar.gz: 046dd15b60a8aa1ef6caeab70cd9927b6af3596a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56b5ab6ed2588eee66f8f3247b890d4ffd1e50bed5e3c94aef841d3be8b7ce6654b16d891b9f5adb89de2c2c4d779cf49ce2e66306bd30222d00024030006a0a
|
7
|
+
data.tar.gz: 0bf2bc085ac3f97d0bd51f815627d7a04256809a846cd129388634c10d35f6721d012877339d76f3e7811631040d8227ed02e0f5ff8687e8efbd2b9eb6ac718c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## 0.2.0
|
2
|
+
|
3
|
+
##### Enhancements
|
4
|
+
|
5
|
+
* Return `Xcode#swift_version` as a `Version` object.
|
6
|
+
[Samuel Giddins](https://github.com/segiddins)
|
7
|
+
|
8
|
+
##### Bug Fixes
|
9
|
+
|
10
|
+
* The entirety of `DYLD_FRAMEWORK_PATH` and `DYLD_LIBRARY_PATH` are no longer
|
11
|
+
overwritten in the generated Xcode environment.
|
12
|
+
[Samuel Giddins](https://github.com/segiddins)
|
13
|
+
|
14
|
+
|
1
15
|
## 0.1.0
|
2
16
|
|
3
17
|
##### Enhancements
|
data/Gemfile.lock
CHANGED
data/lib/xcinvoke/version.rb
CHANGED
data/lib/xcinvoke/xcode.rb
CHANGED
@@ -49,12 +49,13 @@ module XCInvoke
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.find_swift_version(swift_version)
|
52
|
+
swift_version = Gem::Version.create(swift_version)
|
52
53
|
select { |xc| xc.swift_version == swift_version }.sort.last
|
53
54
|
end
|
54
55
|
|
55
56
|
def swift_version
|
56
57
|
info = swift_info
|
57
|
-
info.first if info
|
58
|
+
Gem::Version.new(info.first) if info
|
58
59
|
end
|
59
60
|
|
60
61
|
def build_number
|
@@ -63,25 +64,34 @@ module XCInvoke
|
|
63
64
|
end
|
64
65
|
|
65
66
|
def version
|
66
|
-
|
67
|
+
build = build_number
|
68
|
+
Liferaft::Version.new(build) if build
|
67
69
|
end
|
68
70
|
|
69
71
|
def <=>(other)
|
70
72
|
version <=> other.version
|
71
73
|
end
|
72
74
|
|
73
|
-
def xcrun(cmd, env: {})
|
75
|
+
def xcrun(cmd, env: {}, err: false)
|
74
76
|
env = env.merge(as_env)
|
75
77
|
cmd = %w(xcrun) + cmd
|
76
|
-
|
77
|
-
|
78
|
+
case err
|
79
|
+
when :merge
|
80
|
+
oe, = Open3.capture2e(env, *cmd)
|
81
|
+
oe
|
82
|
+
else
|
83
|
+
o, e, = Open3.capture3(env, *cmd)
|
84
|
+
err ? [o, e] : o
|
85
|
+
end
|
78
86
|
end
|
79
87
|
|
80
88
|
def as_env
|
81
89
|
{
|
82
90
|
'DEVELOPER_DIR' => developer_dir.to_path,
|
83
|
-
'DYLD_FRAMEWORK_PATH' =>
|
84
|
-
|
91
|
+
'DYLD_FRAMEWORK_PATH' =>
|
92
|
+
unshift_path(ENV['DYLD_FRAMEWORK_PATH'], dyld_framework_path),
|
93
|
+
'DYLD_LIBRARY_PATH' =>
|
94
|
+
unshift_path(ENV['DYLD_LIBRARY_PATH'], dyld_library_path),
|
85
95
|
}
|
86
96
|
end
|
87
97
|
|
@@ -106,5 +116,11 @@ module XCInvoke
|
|
106
116
|
return unless xcrun(%w(swift --version)) =~ swift_info_regex
|
107
117
|
[Regexp.last_match(1), Regexp.last_match(2)]
|
108
118
|
end
|
119
|
+
|
120
|
+
def unshift_path(paths, path)
|
121
|
+
paths = (paths || '').split(File::PATH_SEPARATOR)
|
122
|
+
paths.unshift(path.to_s)
|
123
|
+
paths.join(File::PATH_SEPARATOR)
|
124
|
+
end
|
109
125
|
end
|
110
126
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcinvoke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel E. Giddins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liferaft
|