git-feats 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.md +5 -0
- data/lib/git-feats/api.rb +3 -3
- data/lib/git-feats/config.rb +7 -13
- data/lib/git-feats/feats/feats.yml +4 -4
- data/lib/git-feats/runner.rb +9 -1
- data/lib/git-feats/version.rb +1 -1
- metadata +2 -2
data/HISTORY.md
CHANGED
data/lib/git-feats/api.rb
CHANGED
@@ -6,7 +6,7 @@ module GitFeats
|
|
6
6
|
|
7
7
|
extend self
|
8
8
|
|
9
|
-
URL = 'http://gitfeats.com'
|
9
|
+
URL = 'http://www.gitfeats.com'
|
10
10
|
|
11
11
|
def upload_feats
|
12
12
|
# Post json to git-feats
|
@@ -38,8 +38,8 @@ module GitFeats
|
|
38
38
|
# Construct the body for the upload feats post
|
39
39
|
def upload_feats_body
|
40
40
|
{
|
41
|
-
:username => Config.
|
42
|
-
:key => Config.
|
41
|
+
:username => Config.name,
|
42
|
+
:key => Config.key,
|
43
43
|
:history => History.data
|
44
44
|
}
|
45
45
|
end
|
data/lib/git-feats/config.rb
CHANGED
@@ -3,28 +3,22 @@ module GitFeats
|
|
3
3
|
|
4
4
|
extend self
|
5
5
|
|
6
|
-
|
6
|
+
CONFIG_USER_CMD = "git config --global github.user"
|
7
|
+
CONFIG_KEY_CMD = "git config --global feats.key"
|
7
8
|
|
8
9
|
# Returns the config value for username
|
9
|
-
def
|
10
|
-
@
|
10
|
+
def name
|
11
|
+
@name ||= `#{CONFIG_USER_CMD}`.chomp
|
11
12
|
end
|
12
13
|
|
13
14
|
# Returns the config value for api key
|
14
|
-
def
|
15
|
-
@
|
15
|
+
def key
|
16
|
+
@key ||= `#{CONFIG_KEY_CMD}`.chomp
|
16
17
|
end
|
17
18
|
|
18
19
|
# Check if config exists and is configured properly
|
19
20
|
def exists?
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
# loads the config value from the global git config file
|
26
|
-
def config_value
|
27
|
-
@config_value ||= `#{CONFIG_CMD}`
|
21
|
+
name && key
|
28
22
|
end
|
29
23
|
end
|
30
24
|
end
|
@@ -148,8 +148,8 @@
|
|
148
148
|
:count: 1
|
149
149
|
|
150
150
|
"pull":
|
151
|
-
:
|
152
|
-
:name: "
|
151
|
+
:archer:
|
152
|
+
:name: "Archer"
|
153
153
|
:desc: "Fetched from and merged with another repository with git pull"
|
154
154
|
:count: 1
|
155
155
|
|
@@ -244,8 +244,8 @@
|
|
244
244
|
:count: 1
|
245
245
|
|
246
246
|
"whatchanged":
|
247
|
-
:
|
248
|
-
:name: "
|
247
|
+
:forgetful:
|
248
|
+
:name: "Forgetful"
|
249
249
|
:desc: "Showed the difference each commit introduced with git whatchanged"
|
250
250
|
:count: 1
|
251
251
|
---
|
data/lib/git-feats/runner.rb
CHANGED
@@ -17,7 +17,15 @@ module GitFeats
|
|
17
17
|
|
18
18
|
# Execute git command
|
19
19
|
def run
|
20
|
-
|
20
|
+
puts @args[0]
|
21
|
+
case @args[0]
|
22
|
+
when "update-feats"
|
23
|
+
if Config.exists?
|
24
|
+
API.upload_feats
|
25
|
+
end
|
26
|
+
else
|
27
|
+
exec(*@args.to_exec)
|
28
|
+
end
|
21
29
|
end
|
22
30
|
end
|
23
31
|
end
|
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.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|