spaceship 0.19.2 → 0.19.3

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: c3bf9dd05d81a6abd26ea7c1c92fe391a21fead6
4
- data.tar.gz: 8a3416e6fdc98ed27a59014dbb8a8f1a34bc668e
3
+ metadata.gz: eef0b3daccd7d674a5e4262b3e53ac22b217c45a
4
+ data.tar.gz: 3f880a9b11397d309969408d2c3cf3204692d446
5
5
  SHA512:
6
- metadata.gz: c46595feaf1b4c8e39f578eb271653b89617b0e15395ae4c949cafda4acf846a1fc443d8306da7056cd049468554123a5bebd7bcf8519acb4932f397ae264297
7
- data.tar.gz: 2fa7bf1a5c6297f4767318d80987cfafd8233a3ca936cffec85d9d873e08fb0b5694d4235b3402138f22a78152d67540866cd0011d6ff2982e3543c89c2d5ba9
6
+ metadata.gz: b793b4ec731b8f47a32cb97b44d8ee316424d2fcd55a642ebea0cb3275ca355eeac2acbc21afa799f0f0c42f647882de347ad8f2ba2cd270c825aae54576d2fe
7
+ data.tar.gz: 12f2544aecadb004e3ceb516c2a68ca420ebac1acb90589a5c22d691ccc4c8fc55fcd9910ee5403cfb815db12c2796e492f99f0a1dc6f8d4430683ffed19dd23
@@ -1,8 +1,8 @@
1
1
  require 'faraday' # HTTP Client
2
2
  require 'logger'
3
3
  require 'faraday_middleware'
4
+ require 'faraday-cookie_jar'
4
5
  require 'spaceship/ui'
5
- require 'spaceship/helper/cookie_jar_middleware'
6
6
  require 'spaceship/helper/plist_middleware'
7
7
  require 'spaceship/helper/net_http_generic_request'
8
8
 
@@ -66,12 +66,12 @@ module Spaceship
66
66
  end
67
67
 
68
68
  def initialize
69
- @cookie_jar = CookieJar::Jar.new
69
+ @cookie = HTTP::CookieJar.new
70
70
  @client = Faraday.new(self.class.hostname) do |c|
71
71
  c.response :json, content_type: /\bjson$/
72
72
  c.response :xml, content_type: /\bxml$/
73
73
  c.response :plist, content_type: /\bplist$/
74
- c.use :cookie_jar, jar: @cookie_jar
74
+ c.use :cookie_jar, jar: @cookie
75
75
  c.adapter Faraday.default_adapter
76
76
 
77
77
  if ENV['DEBUG']
@@ -108,8 +108,7 @@ module Spaceship
108
108
  #
109
109
  # @return (String) the cookie-string in the RFC6265 format: https://tools.ietf.org/html/rfc6265#section-4.2.1
110
110
  def cookie
111
- # this gets the cookie for allowed under the entire apple domain
112
- @cookie_jar.get_cookie_header('https://apple.com/')
111
+ @cookie.map(&:to_s).join(';')
113
112
  end
114
113
 
115
114
  #####################################################
@@ -1,3 +1,3 @@
1
1
  module Spaceship
2
- VERSION = "0.19.2"
2
+ VERSION = "0.19.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spaceship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2
4
+ version: 0.19.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-21 00:00:00.000000000 Z
12
+ date: 2016-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: credentials_manager
@@ -82,33 +82,33 @@ dependencies:
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0.9'
84
84
  - !ruby/object:Gem::Dependency
85
- name: fastimage
85
+ name: faraday-cookie_jar
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '1.6'
90
+ version: 0.0.6
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '1.6'
97
+ version: 0.0.6
98
98
  - !ruby/object:Gem::Dependency
99
- name: cookiejar
99
+ name: fastimage
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '0.3'
104
+ version: '1.6'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '0.3'
111
+ version: '1.6'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: pry
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -270,7 +270,6 @@ files:
270
270
  - lib/spaceship/du/du_client.rb
271
271
  - lib/spaceship/du/upload_file.rb
272
272
  - lib/spaceship/du/utilities.rb
273
- - lib/spaceship/helper/cookie_jar_middleware.rb
274
273
  - lib/spaceship/helper/net_http_generic_request.rb
275
274
  - lib/spaceship/helper/plist_middleware.rb
276
275
  - lib/spaceship/launcher.rb
@@ -329,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
328
  version: '0'
330
329
  requirements: []
331
330
  rubyforge_project:
332
- rubygems_version: 2.4.0
331
+ rubygems_version: 2.4.6
333
332
  signing_key:
334
333
  specification_version: 4
335
334
  summary: Because you would rather spend your time building stuff than fighting provisioning
@@ -1,34 +0,0 @@
1
- require 'cookiejar'
2
-
3
- module Faraday
4
- class CookieJar < Faraday::Middleware
5
- def initialize(app, options = {})
6
- super(app)
7
- @jar = options[:jar] || CookieJar::Jar.new
8
- end
9
-
10
- def call(env)
11
- cookies = @jar.get_cookies(env[:url])
12
-
13
- unless cookies.empty?
14
- if env[:request_headers]["Cookie"]
15
- env[:request_headers]["Cookie"] = @jar.get_cookie_header(env[:url]) + ";" + env[:request_headers]["Cookie"]
16
- else
17
- env[:request_headers]["Cookie"] = @jar.get_cookie_header(env[:url])
18
- end
19
- end
20
-
21
- @app.call(env).on_complete do |res|
22
- if res[:response_headers]
23
- @jar.set_cookies_from_headers(env[:url], res[:response_headers])
24
- end
25
- end
26
- end
27
- end
28
- end
29
-
30
- if Faraday.respond_to?(:register_middleware)
31
- Faraday.register_middleware cookie_jar: -> { Faraday::CookieJar }
32
- elsif Faraday::Middleware.respond_to?(:register_middleware)
33
- Faraday::Middleware.register_middleware cookie_jar: Faraday::CookieJar
34
- end