knife-github 0.1.6 → 0.1.7
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.
- checksums.yaml +8 -8
- data/README.md +4 -3
- data/lib/chef/knife/github_clone.rb +10 -1
- data/lib/knife-github/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjllZDU0NzQ5NTgzNzExYzdiYTlhZGFkZjdiODhlYTUzOWEwZDk4Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWJlZTY4ZDkwZWJkZjU3YTUzMzQ3YzA2MmUyMjVjNWRjNjg4NTJmMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTE5YzUyNjNjNWMxNjcxNjQyN2MyNzc0ODI0YTlmMzg0ZGU4NjQ1ODQ3YTQw
|
10
|
+
ZTZkMjZjNmM1YTYxZjBmMWU4NGY0MDUxODE3ZjQ3NjA2ZDE4YzlkNzgwYTM5
|
11
|
+
ZjI3MzkyNDNjOWFjNDAwYTZkMDJjMjJjZTAyYTg5OGJmOTNiZTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGEyNWI0NzU5NTQyZDYzYmJmZWFjMzk4NzJmYjk0YjQyYTI1MzhhZTQ3MWQ1
|
14
|
+
YWY0ZWI2NWRlY2ViZjRiZDcxMzljZWU3MGRiZTk5MWUxZjM5ZTVjMGRlMzVk
|
15
|
+
NDQ3MDZjMmRiYzYzOWIxOWM5MjU2ZmIxODUzOTIwYTAzN2RkM2M=
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Configurations
|
|
10
10
|
When working on customer admin machines, it's recommended to used an central configuration file.
|
11
11
|
This file should be created in: /etc/githubrc.rb and can contain any attribute in the following structure:
|
12
12
|
|
13
|
-
github_url
|
13
|
+
github_url "https://github.schubergphilis.com"
|
14
14
|
github_link "ssh"
|
15
15
|
github_organizations [ "TLA-Cookbooks", "SBP-Cookbooks" ]
|
16
16
|
|
@@ -37,6 +37,9 @@ Here you can also use the github.com address if you don't have an internal appli
|
|
37
37
|
Here you specify the organizations that you want to taget when searching for cookbooks.
|
38
38
|
The first entry will have priority over the other entries.
|
39
39
|
|
40
|
+
###### github_proxy \<optional\>
|
41
|
+
You can specify a proxy server in case you don't have direct internet access. If you have defined a proxy, github_link needs to be set to either hhtp or https.
|
42
|
+
|
40
43
|
###### github_link \<optional\>
|
41
44
|
You can specify the link type that you would like to use to download your cookbooks, default is <tt>ssh</tt>.
|
42
45
|
Options are <tt>ssh</tt> <tt>git</tt> <tt>http</tt> <tt>https</tt> <tt>svn</tt>
|
@@ -52,8 +55,6 @@ Currently the options are: <tt>verify_peer</tt> <tt>verify_none</tt>
|
|
52
55
|
Token information is required when creating and deleting github repositories.
|
53
56
|
With the command <tt>knife github token create</tt> you are able to create token information.
|
54
57
|
|
55
|
-
###### github_proxy \<optional\>
|
56
|
-
Used for HTTP communication over a proxy.
|
57
58
|
|
58
59
|
Other
|
59
60
|
=====
|
@@ -91,6 +91,14 @@ require 'chef/knife'
|
|
91
91
|
end
|
92
92
|
|
93
93
|
github_url = repo[cookbook_name][repo_link]
|
94
|
+
token = get_github_token
|
95
|
+
if token.nil? || token.empty?
|
96
|
+
clone_url = github_url
|
97
|
+
else
|
98
|
+
uri = URI.parse(github_url)
|
99
|
+
uri.userinfo = "#{token}:x-oauth-basic"
|
100
|
+
clone_url = URI.join(uri)
|
101
|
+
end
|
94
102
|
cookbook_path = get_cookbook_path(cookbook_name)
|
95
103
|
if File.exists?(cookbook_path)
|
96
104
|
ui.info("Processing [ SKIP ] #{cookbook_name}")
|
@@ -98,7 +106,8 @@ require 'chef/knife'
|
|
98
106
|
else
|
99
107
|
ui.info("Processing [ CLONE ] #{cookbook_name}")
|
100
108
|
Chef::Log.info("Cloning repository to: #{cookbook_path}")
|
101
|
-
|
109
|
+
Chef::Log.debug("Using url: #{clone_url}")
|
110
|
+
shell_out!("git clone #{clone_url} #{cookbook_path}")
|
102
111
|
end
|
103
112
|
end
|
104
113
|
|
data/lib/knife-github/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sander Botman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-12-
|
12
|
+
date: 2014-12-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mixlib-versioning
|