git-feats 0.0.1 → 0.0.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.
- data/HISTORY.md +8 -0
- data/lib/git-feats/api.rb +13 -7
- data/lib/git-feats/runner.rb +2 -2
- data/lib/git-feats/version.rb +1 -1
- metadata +2 -1
data/HISTORY.md
ADDED
data/lib/git-feats/api.rb
CHANGED
|
@@ -6,27 +6,33 @@ module GitFeats
|
|
|
6
6
|
|
|
7
7
|
extend self
|
|
8
8
|
|
|
9
|
-
URL = 'http://
|
|
9
|
+
URL = 'http://gitfeats.com'
|
|
10
10
|
|
|
11
11
|
def upload_feats
|
|
12
12
|
# Post json to git-feats
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
begin
|
|
14
|
+
conn.post do |req|
|
|
15
|
+
req.url '/api/post_feats'
|
|
16
|
+
req.headers['Content-Type'] = 'application/json'
|
|
17
|
+
req.body = upload_feats_body.to_json
|
|
18
|
+
end
|
|
19
|
+
rescue
|
|
17
20
|
end
|
|
18
21
|
end
|
|
19
22
|
|
|
20
23
|
private
|
|
21
24
|
|
|
22
|
-
# Return the faraday connection or
|
|
25
|
+
# Return the faraday connection or create one
|
|
23
26
|
def conn
|
|
24
27
|
@conn ||= new_connection
|
|
25
28
|
end
|
|
26
29
|
|
|
27
30
|
def new_connection
|
|
28
31
|
# Create git-feats connection
|
|
29
|
-
Faraday.new(:url => URL)
|
|
32
|
+
Faraday.new(:url => URL) do |faraday|
|
|
33
|
+
faraday.request :url_encoded
|
|
34
|
+
faraday.adapter Faraday.default_adapter
|
|
35
|
+
end
|
|
30
36
|
end
|
|
31
37
|
|
|
32
38
|
# Construct the body for the upload feats post
|
data/lib/git-feats/runner.rb
CHANGED
data/lib/git-feats/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: git-feats
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -73,6 +73,7 @@ extra_rdoc_files: []
|
|
|
73
73
|
files:
|
|
74
74
|
- .travis.yml
|
|
75
75
|
- Gemfile
|
|
76
|
+
- HISTORY.md
|
|
76
77
|
- LICENSE.txt
|
|
77
78
|
- README.md
|
|
78
79
|
- Rakefile
|