provise 0.0.2 → 0.0.3

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: dad5d5179c3d1afd36717680f63598e85615a50f
4
- data.tar.gz: 78724260ae17944dbc304ce676a55ed69d85d99e
3
+ metadata.gz: eca468569eb1046cbd75c11f69f75b344c51cf39
4
+ data.tar.gz: e83be68ca588040482d0de752d1b4e7d89ca9ee1
5
5
  SHA512:
6
- metadata.gz: 0c13af65294834c4384e8548d84dae8f50456743664fea0042440a4bf6dfbf4904842189554f017dab178cae7827cf80f5ad8515fefc92e626c963fac9c4585f
7
- data.tar.gz: 21ba826923263546288d59829afc4fc98b7bd5286fa29e795df9d2ecbb3bd8a4e0f4904178fd1f3080e172ea0e8ffb76ec276dd8d36f821315e0e50c380a0a22
6
+ metadata.gz: a6b6d5711ce1d547b598d38fd41e9b4efa99df3f3e0aa6eb10fab043eff1cc9c971c4b2e04fdce8c7cc790cd7ecae60173960b3d18dd542e9dee0dd8f3b18f3b
7
+ data.tar.gz: 000fc2ecc9805333c9f96d0d53feaaa56f6a4a0e4e445982d502394853572e94575b35edc6fa03ac432d33166373d7292ef2ac7011165c1839abe901473ecd2a
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Provise
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/provise.svg)](http://badge.fury.io/rb/provise)
4
+
3
5
  CLI used to change the provisioning profile of an iOS App (.ipa file). Also makes possible changing the bundle identifier if the new provisioning has a different one.
4
6
 
5
7
  ## Installation
@@ -1,3 +1,3 @@
1
1
  module Provise
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
@@ -40,23 +40,24 @@ command :ipa do |c|
40
40
  system "mkdir #{@tmp_dir}"
41
41
  system "unzip -q #{@ipa_path} -d #{@tmp_dir}"
42
42
 
43
+ @app_filename = Dir["#{@tmp_dir}/Payload/*.app"][0]
43
44
 
44
45
  say "Removing old code signatures" unless options.quiet
45
- system "rm -rf #{@tmp_dir}/Payload/*.app/_CodeSignature #{@tmp_dir}/Payload/*.app/CodeResources"
46
+ system "rm -rf #{@app_filename}/_CodeSignature #{@app_filename}/CodeResources"
46
47
 
47
48
  if @new_bundle_identifier
48
49
  say "Changing bundle identifier to #{@new_bundle_identifier}" unless options.quiet
49
- system "/usr/libexec/PlistBuddy -c \"Set :CFBundleIdentifier #{@new_bundle_identifier}\" #{@tmp_dir}/Payload/*.app/Info.plist"
50
+ system "/usr/libexec/PlistBuddy -c \"Set :CFBundleIdentifier #{@new_bundle_identifier}\" #{@app_filename}/Info.plist"
50
51
  end
51
52
 
52
53
  if @version_short
53
54
  say "Changing CFBundleShortVersionString to #{@version_short}" unless options.quiet
54
- system "/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString #{@version_short}\" #{@tmp_dir}/Payload/*.app/Info.plist"
55
+ system "/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString #{@version_short}\" #{@app_filename}/Info.plist"
55
56
  end
56
57
 
57
58
  if @bundle_version
58
59
  say "Changing CFBundleVersion to #{@bundle_version}" unless options.quiet
59
- system "/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion #{@bundle_version}\" #{@tmp_dir}/Payload/*.app/Info.plist"
60
+ system "/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion #{@bundle_version}\" #{@app_filename}/Info.plist"
60
61
  end
61
62
 
62
63
  @entitlement_parameter = "";
@@ -66,11 +67,14 @@ command :ipa do |c|
66
67
  end
67
68
 
68
69
  say "Replacing provisioning profile" unless options.quiet
69
- system "cp #{@provisioning_path} #{@tmp_dir}/Payload/*.app/embedded.mobileprovision"
70
+ system "cp #{@provisioning_path} #{@app_filename}/embedded.mobileprovision"
70
71
 
71
72
  say "Replacing existing signatures" unless options.quiet
72
- system "/usr/bin/codesign -f -s \"#{@certificate_name}\" #{@entitlement_parameter} --resource-rules #{@tmp_dir}/Payload/*.app/ResourceRules.plist #{@tmp_dir}/Payload/*.app"
73
-
73
+ if File.exist? "#{@app_filename}/ResourceRules.plist"
74
+ system "/usr/bin/codesign -f -s \"#{@certificate_name}\" #{@entitlement_parameter} --resource-rules #{@app_filename}/ResourceRules.plist #{@app_filename}"
75
+ else
76
+ system "/usr/bin/codesign -f -s \"#{@certificate_name}\" #{@entitlement_parameter} #{@app_filename}"
77
+ end
74
78
 
75
79
  new_ipa_file = "#{@ipa_filename}.resigned.ipa"
76
80
 
@@ -101,4 +105,4 @@ command :ipa do |c|
101
105
 
102
106
  end
103
107
 
104
- end
108
+ end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: provise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Sabino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-16 00:00:00.000000000 Z
11
+ date: 2014-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.1.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.1.2
27
27
  description: CLI for re-signing iOS Apps (.ipa files)
@@ -31,7 +31,7 @@ executables:
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - .gitignore
34
+ - ".gitignore"
35
35
  - Gemfile
36
36
  - Gemfile.lock
37
37
  - LICENSE.txt
@@ -51,12 +51,12 @@ require_paths:
51
51
  - lib
52
52
  required_ruby_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  requirements: []