nixenvironment 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff1906202875cba18a757ba4d864e3551fd2ccbc
4
- data.tar.gz: 717a97c9c607fdfe10193ed3c99c6ec7a7378964
3
+ metadata.gz: c8e10a7d9686670b1093431a67d39ddd963dc8d0
4
+ data.tar.gz: 80d645f70b7b7427537c920ee38c9d0c950162df
5
5
  SHA512:
6
- metadata.gz: b45796f9c38ea46ecb0612866fe013f3c74a132643485d6319789cb9f1cfa7bef279920e4034d1f0f841a67513808324146ce26d15761a948cb60f4b6fa41215
7
- data.tar.gz: 0cdc033a109e7894b4f824b2c63967fd496e27be63d9b61f87f3243248d46995eaee779194ddf08e247487d4070e6b3790669c441cc0757edfd2481a53da2676
6
+ metadata.gz: 63256541ce4ef7749110e819e2e2e0334ed2d8fcec75590fdbc90618ae6ed0c29df114453d39be5ba668d41a7f72882e6f4f7ecbae7ae18614c984af13d0956f
7
+ data.tar.gz: d5701088f788ace9216aed0b0a30371da673ae56ec28b1820362429c60d3831dbd731fba8d2d921d62d4f2cd8baa6263f39103fa486cbcfe867572cb25682a50
@@ -5,6 +5,7 @@ require 'nixenvironment'
5
5
  require 'commander/import'
6
6
  require 'yaml'
7
7
  require 'fileutils'
8
+ require 'shellwords'
8
9
 
9
10
  include Nixenvironment
10
11
 
@@ -75,12 +76,12 @@ command :build do |c|
75
76
  if unity and unity.length > 0
76
77
  case unity
77
78
  when 'ios'
78
- ios_project_path = File.join(Dir.pwd, 'Builds/iOS')
79
+ ios_project_path = File.join(Dir.pwd, 'Builds/iOS').shellescape
79
80
 
80
81
  unity_success = system("unity -executeMethod NIXBuilder.MakeiOSBuild -batchmode -quit -customArgs:path='#{ios_project_path}'")
81
82
  abort('Build unity error!') unless unity_success
82
83
 
83
- root_working_directory = Dir.pwd
84
+ root_working_directory = Dir.pwd.shellescape
84
85
  need_chdir_to_root_working_directory = true
85
86
 
86
87
  Dir.chdir(ios_project_path)
@@ -181,7 +182,7 @@ command :clean_working_copy do |c|
181
182
  end
182
183
 
183
184
  def update(ninbas)
184
- root_working_directory = Dir.pwd
185
+ root_working_directory = Dir.pwd.shellescape
185
186
  target_directory = File.join(Dir.home, NIXENV_ROOT)
186
187
 
187
188
  begin
@@ -304,7 +305,7 @@ end
304
305
  def setup(config)
305
306
  # Parse information about project
306
307
  cmd_output = %x[ xcodebuild -list ]
307
- cmd_output = cmd_output.lines.to_a[1..-1].join
308
+ cmd_output = cmd_output.lines.to_a[1..-1].join # TODO: handle if to_a returns 0 or count less than expected
308
309
  info = {}
309
310
  cmd_output.split(/\n\n/).each do |pair|
310
311
  key,value = pair.split(/:/)
@@ -350,12 +351,12 @@ def setup(config)
350
351
  if key and value
351
352
  stripped_key = key.strip
352
353
  stripped_value = value.strip
353
- build_settings[stripped_key] = stripped_value
354
+ build_settings[stripped_key] = stripped_value.shellescape
354
355
  end
355
356
  end
356
357
  end
357
358
 
358
- build_directory = File.join(Dir.pwd, 'build')
359
+ build_directory = File.join(Dir.pwd, 'build').shellescape
359
360
  build_settings['CONFIGURATION_BUILD_DIR'] = build_directory
360
361
  build_settings['BUILT_PRODUCTS_DIR'] = build_directory
361
362
  build_settings['DWARF_DSYM_FOLDER_PATH'] = build_directory
@@ -364,25 +365,25 @@ def setup(config)
364
365
  end
365
366
 
366
367
  def save_build_env_vars(build_settings)
367
- app_product = "#{build_settings['BUILT_PRODUCTS_DIR']}/#{build_settings['EXECUTABLE_NAME']}.app"
368
+ app_product = File.join(build_settings['BUILT_PRODUCTS_DIR'], build_settings['EXECUTABLE_NAME']) + '.app'
368
369
 
369
370
  system("
370
371
  echo \"#!/bin/sh\
371
372
  ### AUTOGENERATED BY Nixenvironment; DO NOT EDIT ###
372
- PROJECT=\"#{build_settings['PROJECT']}\"
373
- BUILT_PRODUCTS_DIR=\"#{build_settings['BUILT_PRODUCTS_DIR']}\"
374
- OBJECTS_NORMAL_DIR=\"#{build_settings['OBJECT_FILE_DIR_normal']}\"
375
- EXECUTABLE_NAME=\"#{build_settings['EXECUTABLE_NAME']}\"
376
- APP_PRODUCT=\"#{app_product}\"
377
- APP_DSYM=\"#{app_product}.dSYM\"
378
- APP_INFOPLIST_FILE=\"#{@config['INFOPLIST_PATH']}\"
379
- EMBEDDED_PROFILE=\"##{app_product}/#{build_settings['EMBEDDED_PROFILE_NAME']}\"
380
- TARGET_NAME=\"#{build_settings['TARGET_NAME']}\"
381
- CONFIGURATION=\"#{build_settings['CONFIGURATION']}\"
382
- SDK_NAME=\"#{build_settings['SDK_NAME']}\"
383
- RESIGNED_BUNDLE_ID=\"#{build_settings['RESIGNED_BUNDLE_ID']}\"
384
- RESIGNED_BUNDLE_NAME=\"#{build_settings['RESIGNED_BUNDLE_NAME']}\"
385
- RESIGNED_ENTITLEMENTS_PATH=\"#{build_settings['RESIGNED_ENTITLEMENTS_PATH']}\"\" > _last_build_vars.sh
373
+ PROJECT=#{build_settings['PROJECT']}
374
+ BUILT_PRODUCTS_DIR=#{build_settings['BUILT_PRODUCTS_DIR']}
375
+ OBJECTS_NORMAL_DIR=#{build_settings['OBJECT_FILE_DIR_normal']}
376
+ EXECUTABLE_NAME=#{build_settings['EXECUTABLE_NAME']}
377
+ APP_PRODUCT=#{app_product}
378
+ APP_DSYM=#{app_product}.dSYM
379
+ APP_INFOPLIST_FILE=#{@config['INFOPLIST_PATH']}
380
+ EMBEDDED_PROFILE=#{app_product}/#{build_settings['EMBEDDED_PROFILE_NAME']}
381
+ TARGET_NAME=#{build_settings['TARGET_NAME']}
382
+ CONFIGURATION=#{build_settings['CONFIGURATION']}
383
+ SDK_NAME=#{build_settings['SDK_NAME']}
384
+ RESIGNED_BUNDLE_ID=#{build_settings['RESIGNED_BUNDLE_ID']}
385
+ RESIGNED_BUNDLE_NAME=#{build_settings['RESIGNED_BUNDLE_NAME']}
386
+ RESIGNED_ENTITLEMENTS_PATH=#{build_settings['RESIGNED_ENTITLEMENTS_PATH']}\" > _last_build_vars.sh
386
387
  ")
387
388
  end
388
389
 
@@ -576,7 +577,7 @@ def code_duplication_report
576
577
  end
577
578
 
578
579
  def tag
579
- make_tag = File.join(BUILD_SCRIPTS_PATH, 'MakeTag.sh ')
580
+ make_tag = File.join(BUILD_SCRIPTS_PATH, 'MakeTag.sh')
580
581
  tag_success = system("#{make_tag} \"#{ENV['SCM_USERNAME']}\" \"#{ENV['SCM_PASSWORD']}\"")
581
582
  abort('Make tag error!') unless tag_success
582
583
  end
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.21'
2
+ VERSION = '0.0.22'
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.21
4
+ version: 0.0.22
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-17 00:00:00.000000000 Z
11
+ date: 2014-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler