ghrepo 0.0.3 → 0.0.4
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/lib/ghrepo.rb +14 -1
- data/lib/ghrepo/version.rb +1 -1
- data/lib/html5-boilerplate.html +9 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NjY3MDU2NTM0ODI4OTgzNzg3MTgzOTRlMjgxODQ5MDc3YTQyNjc0Mg==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NzIwYWE2Y2ZmNzRkODRmMGM1ZTM1MGVkNDRmODI5ODVkNDZhYzdlNQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YjlkZmZjNWFhOWRlNWEzZmJlNDNjODg4NDM1YTc5M2JkNDg0NWZkZDBlZjg4
|
|
10
|
+
YTQ5NjA1OWMzYjkzYWU4Y2YwNDNjNmU5NjZlMmFkYjI4Nzg5NDNjYmVlZjJi
|
|
11
|
+
OTQ1YzA1ZDMzNGEyNzk3ZGNlZjFiZWU0NTliYjIwYTJmYmVhMWE=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MTkzOTA3NDM1NWE2Y2M2YzgxODMzY2NlZjZhNDc2NmJkMjM5NjMwMmU4NjY5
|
|
14
|
+
ZGUzMDk3NjcxOTI0NzhiNzU5NzM1OThjYWI0ZGQzMGYxMDZiYmFjNGQ4NThh
|
|
15
|
+
MjIyMzA1ZDkxN2U2ZGM0YmYwOGU0OTMwYmYyN2VlZjM0OGYxMzI=
|
data/lib/ghrepo.rb
CHANGED
|
@@ -16,6 +16,8 @@ module Ghrepo
|
|
|
16
16
|
git_url = JSON.parse(response)[credentials[:url]]
|
|
17
17
|
|
|
18
18
|
args.include?('-rails') ? include_rails(args, repo_name, git_url) : `git clone "#{git_url}"`
|
|
19
|
+
add_html(repo_name, git_url) if args.include?('-html')
|
|
20
|
+
|
|
19
21
|
else
|
|
20
22
|
puts "RTFM dummy!"
|
|
21
23
|
puts <<-eos
|
|
@@ -49,7 +51,7 @@ module Ghrepo
|
|
|
49
51
|
end
|
|
50
52
|
|
|
51
53
|
def set_url(args)
|
|
52
|
-
args.include?('-ssh') ? 'ssh_url' : 'clone_url'
|
|
54
|
+
ENV['GHREPO_SSH'] || args.include?('-ssh') ? 'ssh_url' : 'clone_url'
|
|
53
55
|
end
|
|
54
56
|
|
|
55
57
|
def set_username
|
|
@@ -69,6 +71,17 @@ module Ghrepo
|
|
|
69
71
|
{url: set_url(args), username: set_username, password: set_password}
|
|
70
72
|
end
|
|
71
73
|
|
|
74
|
+
def add_html(repo_name, git_url)
|
|
75
|
+
app_dir = "./#{repo_name}"
|
|
76
|
+
latest_ghrepo_gem = (Dir.entries(ENV["GEM_HOME"] + "/gems")).select {|l| l.start_with?('ghrep')}.last
|
|
77
|
+
html5_file = ENV["GEM_HOME"] += "/gems/" + latest_ghrepo_gem + "/lib/html5-boilerplate.html"
|
|
78
|
+
Dir.chdir(app_dir)
|
|
79
|
+
`cp #{html5_file} ./index.html`
|
|
80
|
+
`git add .`
|
|
81
|
+
`git commit -m "boilerplate html"`
|
|
82
|
+
`git push -u origin master`
|
|
83
|
+
end
|
|
84
|
+
|
|
72
85
|
def include_rails(args, repo_name, git_url)
|
|
73
86
|
add_rails(repo_name, git_url)
|
|
74
87
|
push_rails
|
data/lib/ghrepo/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ghrepo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris DeLauder
|
|
@@ -72,6 +72,7 @@ files:
|
|
|
72
72
|
- ghrepo.gemspec
|
|
73
73
|
- lib/ghrepo.rb
|
|
74
74
|
- lib/ghrepo/version.rb
|
|
75
|
+
- lib/html5-boilerplate.html
|
|
75
76
|
homepage: https://github.com/cdelauder/ghrepo
|
|
76
77
|
licenses:
|
|
77
78
|
- MIT
|