roger_sneakpeek 0.1.1 → 0.1.2

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: aa55b7c6c3bdcf517df37357a74cf1fa31c7bf05
4
- data.tar.gz: 91e23f8a5eef4c486d59fd6f5f7974833b01c561
3
+ metadata.gz: cc7f5974e7036c2cdde3a425d6a4a822aa89d518
4
+ data.tar.gz: 435830c9c02c5f31e5d070fc1a8af018383d9712
5
5
  SHA512:
6
- metadata.gz: 0f5c6118d8420fba5b9ea6575fad9edcd2d07e6aaf78d136ef8bc23e79faac31ef72ed295824f695211175a67da03eb969b4a47aa4a7b4db1e60780c3866775a
7
- data.tar.gz: ad471cd8cad7d3e49b8f0236bc8cd3fa03d2afb20e7669c88f18492f05c8105c3d18c5e376c32e26b807bcf37450674f5b35fca45cb7409eba60bac7526980a9
6
+ metadata.gz: af0aad7175234c24f8d0430b0654634c38f73ce4d0c3d11005fa80b0b748aca9e44f872ed471e1fd84df2ede2d1466e2a518d32accf868345802c71e4a1491b1
7
+ data.tar.gz: 9abcf7b66320f90251da6e363a937c2acfb5a8c50a192858a8503b16f44f7230816b799156a01249d3c32ad82a7f36270c14384242c0dfbf85e3c8fe8e8251c4
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- roger_sneakpeek (0.0.2)
4
+ roger_sneakpeek (0.1.1)
5
5
  faraday (~> 0.8, >= 0.8.11)
6
- roger (~> 1.4, >= 1.0.0)
6
+ roger (~> 1.7, >= 1.0.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.2.0)
12
- faraday (0.9.1)
12
+ faraday (0.13.1)
13
13
  multipart-post (>= 1.2, < 3)
14
14
  hpricot (0.8.4)
15
15
  metaclass (0.0.4)
16
- mime-types (2.99.1)
16
+ mime-types (2.99.3)
17
17
  mocha (1.1.0)
18
18
  metaclass (~> 0.0.1)
19
19
  multipart-post (2.0.0)
@@ -21,11 +21,11 @@ GEM
21
21
  ast (~> 2.2)
22
22
  power_assert (0.2.7)
23
23
  powerpack (0.1.1)
24
- rack (1.6.4)
24
+ rack (2.0.3)
25
25
  rainbow (2.0.0)
26
26
  rake (10.5.0)
27
- redcarpet (3.3.4)
28
- roger (1.6.0)
27
+ redcarpet (3.4.0)
28
+ roger (1.8.0)
29
29
  hpricot (= 0.8.4)
30
30
  mime-types (~> 2.2)
31
31
  rack (>= 1.0.0)
@@ -43,7 +43,7 @@ GEM
43
43
  power_assert
44
44
  test_construct (2.0.1)
45
45
  thor (0.19.1)
46
- tilt (2.0.2)
46
+ tilt (2.0.8)
47
47
 
48
48
  PLATFORMS
49
49
  ruby
@@ -57,4 +57,4 @@ DEPENDENCIES
57
57
  thor (~> 0)
58
58
 
59
59
  BUNDLED WITH
60
- 1.10.6
60
+ 1.13.7
@@ -71,11 +71,11 @@ module RogerSneakpeek
71
71
  end
72
72
 
73
73
  def upload_release(zip_path)
74
- if CI.ci?
75
- git = CI.new()
76
- else
77
- git = Git.new(path: @release.project.path)
78
- end
74
+ git = if CI.ci?
75
+ CI.new
76
+ else
77
+ Git.new(path: @release.project.path)
78
+ end
79
79
 
80
80
  data = perform_upload(
81
81
  sneakpeek_url(git),
@@ -111,8 +111,16 @@ module RogerSneakpeek
111
111
  data = params.dup
112
112
  data[:file] = Faraday::UploadIO.new(zip_path, "application/zip")
113
113
 
114
- result = conn.post(url, data)
114
+ result = conn.post do |req|
115
+ req.url url
116
+ req.body = data
117
+ req.options.timeout = 300
118
+ end
119
+
120
+ handle_result(result)
121
+ end
115
122
 
123
+ def handle_result(result)
116
124
  case result.status
117
125
  when 201
118
126
  JSON.parse(result.body)
@@ -1,4 +1,5 @@
1
1
  # Roger main namespace
2
+ # frozen_string_literal: true
2
3
  module RogerSneakpeek
3
- VERSION = "0.1.1".freeze
4
+ VERSION = "0.1.2".freeze
4
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger_sneakpeek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-02 00:00:00.000000000 Z
11
+ date: 2017-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roger