nixenvironment 0.0.60 → 0.0.61

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: 2aa2f98507cfc5e717a474d16adaeac6c4206f1f
4
- data.tar.gz: 113800dfc11914fc8cc2a365b4bbecc2f9435950
3
+ metadata.gz: 15a73175ee07edbc0f5170d24a202e060ce8e40a
4
+ data.tar.gz: b243443f10988191b70644fed2d8f851a143d6f5
5
5
  SHA512:
6
- metadata.gz: bbe944c4fd02071dd11211b6d2ef0014512f8aee77fe889da00878a211450b731adb7f025786b985ec6a282f7ff675a428d30fed7c4ade712a9f072bdd802ff1
7
- data.tar.gz: 8b806a793a2a35778c1d9607c570956d59e01237af82971fc463a27ced7eb4b4d04dff530e1ede4a1371b3fd4d41091461b84df25ce1ee5cf7864dda82f391c6
6
+ metadata.gz: 856086dd0722b9fe336935b619b59498de7145f1039af48c9a2945ee7996d87bf1ea162567afb0d9be0d0285cea816fe232db23195e918316b4531f41676ad7f
7
+ data.tar.gz: 48a96dfc1bf496fdfb93ea58677ae746a4e4b3069a96c3ccf247a50e8ff446e35f824a5f536ee0052c8be122e3d0b096b0ea631828d2191f5971df3408e27965
data/bin/nixenvironment CHANGED
@@ -70,6 +70,7 @@ command :build do |c|
70
70
  c.option '--key_alias_password PASSWORD', String, 'Specify the password for accessing an alias name'
71
71
  c.option '--unity_platform TARGET PLATFORM', String, 'Select target platform for unity build (ios or android)'
72
72
  c.option '--ndsym', 'Disable .dsym generation for ios project'
73
+ c.option '--ci_build', 'Deprecated' # TODO: remove
73
74
  c.option '--icon_tagger MODE', String, 'Set XcodeIconTagger mode (full, short, off)'
74
75
  c.action do |_args, options|
75
76
  options.default :config => 'Debug', :ipa => 'device', :icon_tagger => 'full', :unity_path => 'UNITY'
@@ -145,19 +146,28 @@ end
145
146
  command :test do |c|
146
147
  c.syntax = 'nixenvironment test'
147
148
  c.description = 'Build xctest unit tests and run them in simulator'
148
- c.action { read_config_settings and test }
149
+ c.action do
150
+ read_config_settings
151
+ test
152
+ end
149
153
  end
150
154
 
151
155
  command :code_coverage do |c|
152
156
  c.syntax = 'nixenvironment code_coverage'
153
157
  c.description = 'Generate xctest unit tests code coverage report'
154
- c.action { read_config_settings and code_coverage }
158
+ c.action do
159
+ read_config_settings
160
+ code_coverage
161
+ end
155
162
  end
156
163
 
157
164
  command :code_duplication_report do |c|
158
165
  c.syntax = 'nixenvironment code_duplication_report'
159
166
  c.description = 'Generate code duplication report'
160
- c.action { read_config_settings and code_duplication_report }
167
+ c.action do
168
+ read_config_settings
169
+ code_duplication_report
170
+ end
161
171
  end
162
172
 
163
173
  command :tag do |c|
@@ -466,9 +476,6 @@ def unity_build(configuration, unity_platform, unity_path, development_build, ke
466
476
  success('IOS project was generated.')
467
477
 
468
478
  clean_working_copy(false)
469
-
470
- $project_to_build = 'Unity-iPhone.xcodeproj'
471
- $project_target_to_build = 'Unity-iPhone'
472
479
  when 'android'
473
480
  development_build_arg = development_build ? '--development-build' : ''
474
481
  keystore_path_arg = keystore_path ? "--keystore-path #{keystore_path}" : ''
@@ -643,20 +650,21 @@ def test
643
650
  code_coverage_config = File.join(@config_settings[CONFIGURATION_FILES_PATH_KEY], @config_settings[CODE_COVERAGE_CONFIGURATION_KEY])
644
651
 
645
652
  Xcodebuild.test(@config_settings[SDK_FOR_TESTS_KEY], 'Debug', @config_settings[WORKSPACE_TO_BUILD_KEY],
646
- @config_settings[WORKSPACE_SCHEME_TO_TEST_KEY], code_coverage_config)
653
+ @config_settings[WORKSPACE_SCHEME_TO_TEST_KEY], code_coverage_config,
654
+ TESTS_AND_COVERAGE_TIMEOUT, @config_settings[XCTEST_DESTINATION_DEVICE_KEY])
647
655
 
648
656
  error('Run test error!') unless Xcodebuild.last_cmd_success?
649
657
  end
650
658
 
651
659
  def code_coverage
652
- code_coverage_configuration = File.join(@config_settings[CONFIGURATION_FILES_PATH_KEY], @config_settings[CODE_COVERAGE_CONFIGURATION_KEY])
660
+ code_coverage_config = File.join(@config_settings[CONFIGURATION_FILES_PATH_KEY], @config_settings[CODE_COVERAGE_CONFIGURATION_KEY])
653
661
 
654
662
  # TODO: move to Xcodebuild class
655
663
  report_success = system("#{CODE_COVERAGE_REPORT_SCRIPT_PATH} -workspace \"#{@config_settings[WORKSPACE_TO_BUILD_KEY]}\"\
656
664
  -scheme \"#{@config_settings[WORKSPACE_SCHEME_TO_TEST_KEY]}\"\
657
665
  -configuration \"Debug\"\
658
666
  -sdk \"#{@config_settings[SDK_FOR_TESTS_KEY]}\"\
659
- -xcconfig \"#{code_coverage_configuration}\"\
667
+ -xcconfig \"#{code_coverage_config}\"\
660
668
  -exclude \"#{@config_settings[EXCLUDE_PATTERN_FOR_CODE_COVERAGE_KEY]}\"\
661
669
  -output \"#{@config_settings[CODE_COVERAGE_OUTPUT_DIRECTORY_KEY]}\"\
662
670
  -destination-timeout \"#{TESTS_AND_COVERAGE_TIMEOUT}\"\
@@ -666,7 +666,8 @@ NAME_FOR_DEPLOYMENT='#{configuration}'
666
666
  keychain_name = 'XCodeKeys'
667
667
  keychain_path = %x[ security list | grep '#{keychain_name}' | sed 's/\"//g' | xargs ].strip
668
668
  security_report = %x[ #{IDENTITIESLIST_UTILITY_PATH} -k #{keychain_path} ]
669
- entries = security_report.split(/\n/)
669
+ # TODO: investigate encoding issues without implicit .encode('UTF-8')
670
+ entries = security_report.encode('UTF-8').split(/\n/)
670
671
  entries.to_set
671
672
  end
672
673
 
@@ -8,7 +8,13 @@ module Nixenvironment
8
8
  FORMAT_AUTO = CFPropertyList::List::FORMAT_AUTO
9
9
 
10
10
  def self.from_file(path)
11
- new(CFPropertyList::List.new(:file => path))
11
+ # FIXME
12
+ # used instead of new(CFPropertyList::List.new(:file => path))
13
+ # because of odd <ArgumentError: invalid byte sequence in US-ASCII>
14
+ plist = CFPropertyList::List.new
15
+ plist.load_str(File.read(path))
16
+ plist.filename = path
17
+ new(plist)
12
18
  end
13
19
 
14
20
  def self.from_hash(hash)
@@ -1,3 +1,3 @@
1
1
  module Nixenvironment
2
- VERSION = '0.0.60'
2
+ VERSION = '0.0.61'
3
3
  end
@@ -51,13 +51,14 @@ module Nixenvironment
51
51
  # set "Precompile Prefix Header" flag to "NO";
52
52
  # otherwise it can throw error ".pch.pch has been modified since the precompiled header"
53
53
  build_args << 'GCC_PRECOMPILE_PREFIX_HEADER=NO'
54
+ build_args << 'ENABLE_BITCODE=NO' # need this in order to build unity <= 5.2.0 generated projects. TODO: remove me!
54
55
  build_args << other.map { |key, value| "#{key}='#{value}'" }.join(' ')
55
56
  build_args << '| xcpretty -c; exit ${PIPESTATUS[0]}'
56
57
 
57
58
  execute(nil, build_args)
58
59
  end
59
60
 
60
- def self.test(sdk = nil, config = nil, workspace = nil, scheme = nil, code_coverage_config = nil)
61
+ def self.test(sdk = nil, config = nil, workspace = nil, scheme = nil, code_coverage_config = nil, timeout = nil, destination = nil)
61
62
  build_args = []
62
63
  build_args << "-sdk '#{sdk}'" if sdk.present?
63
64
  build_args << "-configuration '#{config}'" if config.present?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nixenvironment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.60
4
+ version: 0.0.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen