nixenvironment 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0d484fda2d02d621a0d3bda97065fe96489acf5
4
- data.tar.gz: 516d7d978a0d1c54eaec572d7840ba07eae46ef6
3
+ metadata.gz: 14a4e20f25d487a08feeeee1d985755e00119824
4
+ data.tar.gz: 8d054a18b4438174ba6f0695b69e83a3fb95b7f0
5
5
  SHA512:
6
- metadata.gz: 6428eee8a7ebd241bbca830723588a69083dcf137a74f0b9d07400c7623b5eb2e9ff9b4283c225b6e627213f5eb6052b29eaad6f98da32d9cbbbda3694af1d96
7
- data.tar.gz: 2a19e68f22d68f82848d8e18b27b37f9a93493c27f9f77f18187477d3fa64911459ae444471d56e798305301b48e53e582f7d6bddaebf7f9b712334ac0599f80
6
+ metadata.gz: 04848693e8798fee6e009ed4b082848a4fe9a3e180d3afa62ab2237e55ca18718774285fe3a4ee518148197f0da0ea096eeca13a3e1874a6d1e2d1340fb55b0e
7
+ data.tar.gz: e2c0a8e16c347a58f7526bda7322ef1fcb908fa320fb0d8b2f56a2b460cf4f6ef281901296e42ee15a945a1ea976ba09857e4507fef0976cb51a0acf0e43909f
data/bin/nixenvironment CHANGED
@@ -255,7 +255,19 @@ def working_copy_is_clean?
255
255
  end
256
256
 
257
257
  def setup(config)
258
- cmd_output = nil
258
+ # Parse information about project
259
+ cmd_output = %x[ xcodebuild -list ]
260
+ cmd_output = cmd_output.lines.to_a[1..-1].join
261
+ info = {}
262
+ cmd_output.split(/\n\n/).each do |pair|
263
+ key,value = pair.split(/:/)
264
+ next unless key and value
265
+ lines = value.lines.map { |line| line.strip }
266
+ lines.reject! { |line| line.empty? }
267
+ info[key.strip] = lines
268
+ end
269
+
270
+ abort("Build error! Configuration #{config} doesn't exist") unless info['Build Configurations'].include?(config)
259
271
 
260
272
  if @config['PROJECT_TO_BUILD'] and @config['PROJECT_TO_BUILD'].length > 0
261
273
  cmd_output = %x[ xcodebuild -project #{@config['PROJECT_TO_BUILD']}\
@@ -269,6 +281,8 @@ def setup(config)
269
281
  -configuration #{config}\
270
282
  -sdk #{@config['SDK']}\
271
283
  -showBuildSettings ]
284
+ else
285
+ abort('Build error! Either PROJECT_TO_BUILD or WORKSPACE_TO_BUILD must be specified!')
272
286
  end
273
287
 
274
288
  env_vars_list = cmd_output.split(/\n/).reject(&:empty?)
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nixenvironment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Arzumanian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-02 00:00:00.000000000 Z
11
+ date: 2014-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler