airservice_build_tools 0.0.3 → 0.0.4

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: adea1ed03567c9a482ac46df1fcb5b7ff650feb3
4
- data.tar.gz: 70e7c0ebf663f25a242b83f68eceaf69773ace46
3
+ metadata.gz: bef2301134341d74dcc3311b844206b2c993de09
4
+ data.tar.gz: de76dee7b4bf8f797f68589cda79e75cfd63adae
5
5
  SHA512:
6
- metadata.gz: 3dd9995bdac6bed771c2d94697fccf36b30fde7a1cac949cf1aee61b2d67670b28ad7347f86de1f8b501498097e80a4e3d79d16bf1e81b45385dddbd920e1d0b
7
- data.tar.gz: bcc9fa3bae2798a65bdffc18fba09b218f4cbccc2c1b9d6574dec1b0a5a06dfd0dbf25d363b72e667edf4f3c8ee5fecab63da17057b189fbd8099da91420896f
6
+ metadata.gz: c956d3e129bedd7aeb6b6e5455b6ea67ecb62b325f7334f7186f569943c5065c52a65395a2fb0f2b898b8f081ce81a35ce85a842f204c4e5bf68cb8d9bf439e2
7
+ data.tar.gz: 854871514802cb2c10cb3a7fe47374b3184b0cb1d6be7034ca91c66c495c8204f1cce2e3540eac21ba352446f897ea06a003217a322b9d7e5f385eeb32213b94
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- airservice_build_tools (0.0.2)
4
+ airservice_build_tools (0.0.4)
5
5
  plist
6
6
 
7
7
  GEM
@@ -12,9 +12,9 @@ module AirService
12
12
  plist = Plist::parse_xml(plist_file_path)
13
13
 
14
14
  build_version = options[:build_version]
15
- plist['CFBundleVersion'] = build_version
15
+ plist['CFBundleVersion'] = build_version if build_version
16
16
  version = options[:version]
17
- plist['CFBundleShortVersionString'] = version
17
+ plist['CFBundleShortVersionString'] = version if version
18
18
 
19
19
  log "Updating plist to #{plist.inspect}"
20
20
  new_plist_content = plist.to_plist
@@ -1,5 +1,5 @@
1
1
  module AirService
2
2
  module BuildTools
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -15,8 +15,9 @@ describe AirService::BuildTools::ObjC do
15
15
  expect(error.message).to include('exists')
16
16
  end
17
17
  end
18
- it 'adds version and build number in plist' do
19
- plist_file = <<-plist
18
+ context 'when updating without errors' do
19
+ let(:plist_file) {
20
+ <<-plist
20
21
  <?xml version="1.0" encoding="UTF-8"?>
21
22
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
22
23
  <plist version="1.0">
@@ -25,15 +26,29 @@ describe AirService::BuildTools::ObjC do
25
26
  <string>en</string>
26
27
  </dict>
27
28
  </plist>
28
- plist
29
- file_path = 'test_plist.plist'
30
- File.open(file_path, 'w+') {|f| f.write( plist_file) }
29
+ plist
30
+ }
31
31
 
32
- update_plist_version(file_path: file_path, build_version: '345', version: '1.1.345')
32
+ it 'adds version and build number in plist' do
33
+ file_path = 'test_plist.plist'
34
+ File.open(file_path, 'w+') { |f| f.write(plist_file) }
33
35
 
34
- actual = Plist::parse_xml(file_path)
35
- actual['CFBundleVersion'].should eq('345')
36
- actual['CFBundleShortVersionString'].should eq('1.1.345')
36
+ update_plist_version(file_path: file_path, build_version: '345', version: '1.1.345')
37
+
38
+ actual = Plist::parse_xml(file_path)
39
+ actual['CFBundleVersion'].should eq('345')
40
+ actual['CFBundleShortVersionString'].should eq('1.1.345')
41
+ end
42
+ it 'ignores not specified version' do
43
+ file_path = 'test_plist.plist'
44
+ File.open(file_path, 'w+') { |f| f.write(plist_file) }
45
+
46
+ update_plist_version(file_path: file_path)
47
+
48
+ actual = File.read(file_path)
49
+ actual.should_not include('CFBundleVersion')
50
+ actual.should_not include('CFBundleShortVersionString')
51
+ end
37
52
  end
38
53
  end
39
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airservice_build_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - AirService