shipit-engine 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/shipit/commit_deployment.rb +2 -0
- data/app/models/shipit/user.rb +5 -1
- data/lib/shipit.rb +10 -2
- data/lib/shipit/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee64f554f8b69bafd115203bc2cecc33521d5a7a
|
4
|
+
data.tar.gz: 7c8029319509f59e820d7923e9ecc6eaf226d8e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 950959a1195778f0e3113db087b7e999866467ad79a095a70843a309f09bd212566e2d91679ee1b72d85854ae2b00a54189b33433051d46461f6aa880652af4e
|
7
|
+
data.tar.gz: 5a9a53f97e460c4fc189220b6f028d9a2851bd6298542491a295fe1a7949fe981b3090dee882960b49aa05b275d9a70cfdec0142a761efab06fdd4bb29332f97
|
data/app/models/shipit/user.rb
CHANGED
@@ -38,7 +38,11 @@ module Shipit
|
|
38
38
|
def github_api
|
39
39
|
return Shipit.github_api unless github_access_token
|
40
40
|
|
41
|
-
@github_api ||=
|
41
|
+
@github_api ||= begin
|
42
|
+
client = Octokit::Client.new(access_token: github_access_token)
|
43
|
+
client.middleware = Shipit.new_faraday_stack
|
44
|
+
client
|
45
|
+
end
|
42
46
|
end
|
43
47
|
|
44
48
|
def identifiers_for_ping
|
data/lib/shipit.rb
CHANGED
@@ -83,14 +83,22 @@ module Shipit
|
|
83
83
|
def github_api
|
84
84
|
@github_api ||= begin
|
85
85
|
client = Octokit::Client.new(github_api_credentials)
|
86
|
-
client.middleware
|
86
|
+
client.middleware = new_faraday_stack
|
87
|
+
client
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def new_faraday_stack
|
92
|
+
Faraday::RackBuilder.new do |builder|
|
93
|
+
builder.use(
|
87
94
|
Faraday::HttpCache,
|
88
95
|
shared_cache: false,
|
89
96
|
store: Rails.cache,
|
90
97
|
logger: Rails.logger,
|
91
98
|
serializer: NullSerializer,
|
92
99
|
)
|
93
|
-
|
100
|
+
builder.use Octokit::Response::RaiseError
|
101
|
+
builder.adapter Faraday.default_adapter
|
94
102
|
end
|
95
103
|
end
|
96
104
|
|
data/lib/shipit/version.rb
CHANGED
Binary file
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipit-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|