cupertino 1.2.1 → 1.2.2
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 +4 -4
 - data/Gemfile.lock +5 -3
 - data/README.md +1 -1
 - data/cupertino-1.2.1.gem +0 -0
 - data/cupertino.gemspec +1 -1
 - data/lib/cupertino/provisioning_portal/agent.rb +17 -7
 - data/lib/cupertino/provisioning_portal/commands/app_ids.rb +2 -2
 - data/lib/cupertino/provisioning_portal.rb +2 -2
 - data/lib/cupertino/version.rb +1 -1
 - metadata +5 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 116d6e378e9e2ac18481ad6afd760083cd92ba29
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: e29f9fa655e9fc362abe2f0717799463ce2200b4
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 119fa0f8f046d2eb9265bb12b10a9cc931274c5ddaf622c6a1705a0e6ac2b1e7508834e1efb465c29a0642917125b83ee8d9929e4407fc3e78730c1dace57e12
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: fdeb13c4d80cd80b7b99480e4547f8f975d54a44768e4c587eb8cb493efa3323a903b9ce1e2150d93777841272150a5aad3c2e34bf7b7ff52e7a5d49f6d55958
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,11 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                cupertino (1.2. 
     | 
| 
      
 4 
     | 
    
         
            +
                cupertino (1.2.2)
         
     | 
| 
       5 
5 
     | 
    
         
             
                  certified (>= 0.1.0)
         
     | 
| 
       6 
6 
     | 
    
         
             
                  commander (~> 4.2.0)
         
     | 
| 
       7 
7 
     | 
    
         
             
                  mechanize (~> 2.5.1)
         
     | 
| 
       8 
     | 
    
         
            -
                  nokogiri (~> 1. 
     | 
| 
      
 8 
     | 
    
         
            +
                  nokogiri (~> 1.6.3)
         
     | 
| 
       9 
9 
     | 
    
         
             
                  security (~> 0.1.2)
         
     | 
| 
       10 
10 
     | 
    
         
             
                  term-ansicolor (~> 1.0.7)
         
     | 
| 
       11 
11 
     | 
    
         
             
                  terminal-table (~> 1.4.5)
         
     | 
| 
         @@ -29,9 +29,11 @@ GEM 
     | 
|
| 
       29 
29 
     | 
    
         
             
                  ntlm-http (~> 0.1, >= 0.1.1)
         
     | 
| 
       30 
30 
     | 
    
         
             
                  webrobots (~> 0.0, >= 0.0.9)
         
     | 
| 
       31 
31 
     | 
    
         
             
                mime-types (1.25.1)
         
     | 
| 
      
 32 
     | 
    
         
            +
                mini_portile (0.6.0)
         
     | 
| 
       32 
33 
     | 
    
         
             
                net-http-digest_auth (1.4)
         
     | 
| 
       33 
34 
     | 
    
         
             
                net-http-persistent (2.9.4)
         
     | 
| 
       34 
     | 
    
         
            -
                nokogiri (1. 
     | 
| 
      
 35 
     | 
    
         
            +
                nokogiri (1.6.3.1)
         
     | 
| 
      
 36 
     | 
    
         
            +
                  mini_portile (= 0.6.0)
         
     | 
| 
       35 
37 
     | 
    
         
             
                ntlm-http (0.1.1)
         
     | 
| 
       36 
38 
     | 
    
         
             
                rake (10.3.2)
         
     | 
| 
       37 
39 
     | 
    
         
             
                rspec (3.0.0)
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Automate administrative tasks that you would normally have to do through the Apple Dev Center websites. Life's too short to manage device identifiers by hand!
         
     | 
| 
       4 
4 
     | 
    
         | 
    
        data/cupertino-1.2.1.gem
    ADDED
    
    | 
         Binary file 
     | 
    
        data/cupertino.gemspec
    CHANGED
    
    | 
         @@ -18,7 +18,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       18 
18 
     | 
    
         
             
              s.add_dependency "terminal-table", "~> 1.4.5"
         
     | 
| 
       19 
19 
     | 
    
         
             
              s.add_dependency "term-ansicolor", "~> 1.0.7"
         
     | 
| 
       20 
20 
     | 
    
         
             
              s.add_dependency "mechanize", "~> 2.5.1"
         
     | 
| 
       21 
     | 
    
         
            -
              s.add_dependency "nokogiri", "~> 1. 
     | 
| 
      
 21 
     | 
    
         
            +
              s.add_dependency "nokogiri", "~> 1.6.3"
         
     | 
| 
       22 
22 
     | 
    
         
             
              s.add_dependency "security", "~> 0.1.2"
         
     | 
| 
       23 
23 
     | 
    
         
             
              s.add_dependency "certified", ">= 0.1.0"
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
         @@ -13,7 +13,7 @@ module Cupertino 
     | 
|
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                  def initialize
         
     | 
| 
       15 
15 
     | 
    
         
             
                    super
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
      
 16 
     | 
    
         
            +
                    @profile_csrf_headers = {}
         
     | 
| 
       17 
17 
     | 
    
         
             
                    self.user_agent_alias = 'Mac Safari'
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
                    self.log ||= Logger.new(STDOUT)
         
     | 
| 
         @@ -193,6 +193,15 @@ module Cupertino 
     | 
|
| 
       193 
193 
     | 
    
         
             
                                        end
         
     | 
| 
       194 
194 
     | 
    
         | 
| 
       195 
195 
     | 
    
         
             
                    post(profile_data_url)
         
     | 
| 
      
 196 
     | 
    
         
            +
                    @profile_csrf_headers = {
         
     | 
| 
      
 197 
     | 
    
         
            +
                      'csrf' => page.response['csrf'],
         
     | 
| 
      
 198 
     | 
    
         
            +
                      'csrf_ts' => page.response['csrf_ts']
         
     | 
| 
      
 199 
     | 
    
         
            +
                    }
         
     | 
| 
      
 200 
     | 
    
         
            +
             
     | 
| 
      
 201 
     | 
    
         
            +
                    @profile_csrf_headers = {
         
     | 
| 
      
 202 
     | 
    
         
            +
                      'csrf' => page.response['csrf'],
         
     | 
| 
      
 203 
     | 
    
         
            +
                      'csrf_ts' => page.response['csrf_ts']
         
     | 
| 
      
 204 
     | 
    
         
            +
                    }
         
     | 
| 
       196 
205 
     | 
    
         | 
| 
       197 
206 
     | 
    
         
             
                    profile_data = page.content
         
     | 
| 
       198 
207 
     | 
    
         
             
                    parsed_profile_data = JSON.parse(profile_data)
         
     | 
| 
         @@ -202,11 +211,11 @@ module Cupertino 
     | 
|
| 
       202 
211 
     | 
    
         
             
                      profile = ProvisioningProfile.new
         
     | 
| 
       203 
212 
     | 
    
         
             
                      profile.name = row['name']
         
     | 
| 
       204 
213 
     | 
    
         
             
                      profile.type = type
         
     | 
| 
       205 
     | 
    
         
            -
                      profile.app_id = row['appId']['appIdId']
         
     | 
| 
       206 
214 
     | 
    
         
             
                      profile.status = row['status']
         
     | 
| 
       207 
215 
     | 
    
         
             
                      profile.expiration = (Time.parse(row['dateExpire']) rescue nil)
         
     | 
| 
       208 
216 
     | 
    
         
             
                      profile.download_url = "https://developer.apple.com/account/ios/profile/profileContentDownload.action?displayId=#{row['provisioningProfileId']}"
         
     | 
| 
       209 
217 
     | 
    
         
             
                      profile.edit_url = "https://developer.apple.com/account/ios/profile/profileEdit.action?provisioningProfileId=#{row['provisioningProfileId']}"
         
     | 
| 
      
 218 
     | 
    
         
            +
                      profile.identifier = row['appId']['identifier']
         
     | 
| 
       210 
219 
     | 
    
         
             
                      profiles << profile
         
     | 
| 
       211 
220 
     | 
    
         
             
                    end
         
     | 
| 
       212 
221 
     | 
    
         | 
| 
         @@ -258,7 +267,7 @@ module Cupertino 
     | 
|
| 
       258 
267 
     | 
    
         
             
                    form.add_field!('adssuv-value', Mechanize::Util::uri_unescape(adssuv.value))
         
     | 
| 
       259 
268 
     | 
    
         | 
| 
       260 
269 
     | 
    
         
             
                    form.method = 'POST'
         
     | 
| 
       261 
     | 
    
         
            -
                    form.submit
         
     | 
| 
      
 270 
     | 
    
         
            +
                    form.submit(nil, @profile_csrf_headers)
         
     | 
| 
       262 
271 
     | 
    
         
             
                  end
         
     | 
| 
       263 
272 
     | 
    
         | 
| 
       264 
273 
     | 
    
         
             
                  def list_devices_for_profile(profile)
         
     | 
| 
         @@ -292,9 +301,9 @@ module Cupertino 
     | 
|
| 
       292 
301 
     | 
    
         
             
                    form.method = 'POST'
         
     | 
| 
       293 
302 
     | 
    
         
             
                    form.action = "https://developer.apple.com/account/ios/identifiers/bundle/bundleConfirm.action"
         
     | 
| 
       294 
303 
     | 
    
         
             
                    form.field_with(:name => "appIdName").value = app_id.description
         
     | 
| 
       295 
     | 
    
         
            -
                    form.field_with(:name => "explicitIdentifier").value = app_id. 
     | 
| 
      
 304 
     | 
    
         
            +
                    form.field_with(:name => "explicitIdentifier").value = app_id.identifier
         
     | 
| 
       296 
305 
     | 
    
         
             
                    form.checkbox_with(:name => "push").check()
         
     | 
| 
       297 
     | 
    
         
            -
                    form.add_field!("appIdentifierString", app_id. 
     | 
| 
      
 306 
     | 
    
         
            +
                    form.add_field!("appIdentifierString", app_id.identifier)
         
     | 
| 
       298 
307 
     | 
    
         
             
                    form.add_field!("formID", "#{rand(10000000)}")
         
     | 
| 
       299 
308 
     | 
    
         
             
                    form.add_field!("clientToken", "undefined")
         
     | 
| 
       300 
309 
     | 
    
         
             
                    form.submit
         
     | 
| 
         @@ -309,8 +318,8 @@ module Cupertino 
     | 
|
| 
       309 
318 
     | 
    
         
             
                      form.add_field!("gameCenter", "on")
         
     | 
| 
       310 
319 
     | 
    
         
             
                      form.add_field!("push", "on")
         
     | 
| 
       311 
320 
     | 
    
         | 
| 
       312 
     | 
    
         
            -
                      form.add_field!("explicitIdentifier", app_id. 
     | 
| 
       313 
     | 
    
         
            -
                      form.add_field!("appIdentifierString", app_id. 
     | 
| 
      
 321 
     | 
    
         
            +
                      form.add_field!("explicitIdentifier", app_id.identifier)
         
     | 
| 
      
 322 
     | 
    
         
            +
                      form.add_field!("appIdentifierString", app_id.identifier)
         
     | 
| 
       314 
323 
     | 
    
         
             
                      form.add_field!("appIdName", app_id.description)
         
     | 
| 
       315 
324 
     | 
    
         
             
                      form.add_field!("type", "explicit")
         
     | 
| 
       316 
325 
     | 
    
         | 
| 
         @@ -337,6 +346,7 @@ module Cupertino 
     | 
|
| 
       337 
346 
     | 
    
         
             
                      app_id = AppID.new
         
     | 
| 
       338 
347 
     | 
    
         
             
                      app_id.bundle_seed_id = [row['prefix'], row['identifier']].join(".")
         
     | 
| 
       339 
348 
     | 
    
         
             
                      app_id.description = row['name']
         
     | 
| 
      
 349 
     | 
    
         
            +
                      app_id.identifier = row['identifier']
         
     | 
| 
       340 
350 
     | 
    
         | 
| 
       341 
351 
     | 
    
         
             
                      app_id.development_properties, app_id.distribution_properties = [], []
         
     | 
| 
       342 
352 
     | 
    
         
             
                      row['features'].each do |feature, value|
         
     | 
| 
         @@ -48,9 +48,9 @@ command :'app_ids:add' do |c| 
     | 
|
| 
       48 
48 
     | 
    
         
             
                  say_warning "Invalid argument #{arg}, must be in form NAME=BUNDLE_ID" and next unless components.length == 2
         
     | 
| 
       49 
49 
     | 
    
         
             
                  app_id = AppID.new
         
     | 
| 
       50 
50 
     | 
    
         
             
                  app_id.description = components.first
         
     | 
| 
       51 
     | 
    
         
            -
                  app_id. 
     | 
| 
      
 51 
     | 
    
         
            +
                  app_id.identifier = components.last
         
     | 
| 
       52 
52 
     | 
    
         
             
                  agent.add_app_id(app_id)
         
     | 
| 
       53 
     | 
    
         
            -
                  say_ok "Successfully added App ID #{app_id. 
     | 
| 
      
 53 
     | 
    
         
            +
                  say_ok "Successfully added App ID #{app_id.identifier}"
         
     | 
| 
       54 
54 
     | 
    
         
             
                end
         
     | 
| 
       55 
55 
     | 
    
         
             
              end
         
     | 
| 
       56 
56 
     | 
    
         
             
            end
         
     | 
| 
         @@ -20,13 +20,13 @@ module Cupertino 
     | 
|
| 
       20 
20 
     | 
    
         
             
                  end
         
     | 
| 
       21 
21 
     | 
    
         
             
                end
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
     | 
    
         
            -
                class AppID < Struct.new(:bundle_seed_id, :description, :development_properties, :distribution_properties)
         
     | 
| 
      
 23 
     | 
    
         
            +
                class AppID < Struct.new(:bundle_seed_id, :description, :development_properties, :distribution_properties, :identifier)
         
     | 
| 
       24 
24 
     | 
    
         
             
                  def to_s
         
     | 
| 
       25 
25 
     | 
    
         
             
                    "#{self.bundle_seed_id}"
         
     | 
| 
       26 
26 
     | 
    
         
             
                  end
         
     | 
| 
       27 
27 
     | 
    
         
             
                end
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
     | 
    
         
            -
                class ProvisioningProfile < Struct.new(:name, :type, :app_id, :status, :expiration, :download_url, :edit_url)
         
     | 
| 
      
 29 
     | 
    
         
            +
                class ProvisioningProfile < Struct.new(:name, :type, :app_id, :status, :expiration, :download_url, :edit_url, :identifier)
         
     | 
| 
       30 
30 
     | 
    
         
             
                  def to_s
         
     | 
| 
       31 
31 
     | 
    
         
             
                    "#{self.name}"
         
     | 
| 
       32 
32 
     | 
    
         
             
                  end
         
     | 
    
        data/lib/cupertino/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: cupertino
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.2.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Mattt Thompson
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-11-17 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: commander
         
     | 
| 
         @@ -72,14 +72,14 @@ dependencies: 
     | 
|
| 
       72 
72 
     | 
    
         
             
                requirements:
         
     | 
| 
       73 
73 
     | 
    
         
             
                - - ~>
         
     | 
| 
       74 
74 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       75 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 75 
     | 
    
         
            +
                    version: 1.6.3
         
     | 
| 
       76 
76 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       77 
77 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       78 
78 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       79 
79 
     | 
    
         
             
                requirements:
         
     | 
| 
       80 
80 
     | 
    
         
             
                - - ~>
         
     | 
| 
       81 
81 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       82 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 82 
     | 
    
         
            +
                    version: 1.6.3
         
     | 
| 
       83 
83 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       84 
84 
     | 
    
         
             
              name: security
         
     | 
| 
       85 
85 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -143,6 +143,7 @@ executables: 
     | 
|
| 
       143 
143 
     | 
    
         
             
            extensions: []
         
     | 
| 
       144 
144 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       145 
145 
     | 
    
         
             
            files:
         
     | 
| 
      
 146 
     | 
    
         
            +
            - ./cupertino-1.2.1.gem
         
     | 
| 
       146 
147 
     | 
    
         
             
            - ./cupertino.gemspec
         
     | 
| 
       147 
148 
     | 
    
         
             
            - ./Gemfile
         
     | 
| 
       148 
149 
     | 
    
         
             
            - ./Gemfile.lock
         
     |