Skip to content

Commit c31484d

Browse files
Gerard HickeyGerard Hickey
authored andcommitted
Added progamatic info and some layout improvements
1 parent 7925c39 commit c31484d

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

lib/puppet_forge_server/app/public/css/puppetlabs.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ body {
135135
.clearfix {
136136
display: block;
137137
}
138+
.code-block {
139+
margin: 1em;
140+
}
141+
input[type=file]{
142+
display: inline-block;
143+
}
138144
input[type=search] {
139145
width: 80%;
140146
max-width: 650px;

lib/puppet_forge_server/app/views/upload.haml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,35 @@
1818
1919
/ TODO Need better formatting
2020
/ TODO Better error notification
21-
/ TODO Information on programatic uploads
2221
%h3 Upload Puppet Module
2322

24-
Specify below the location of the Puppet module .tar.gz file that you wish to publish.
23+
%div.section.site-width#content
24+
Specify below the location of the Puppet module .tar.gz file that you wish to publish.
2525

26-
The Puppet module .tar.gz file should be generated by executing
26+
The Puppet module .tar.gz file should be generated by executing
2727

28-
%div
29-
%pre
30-
puppet module build
28+
%div.code-block
29+
%pre
30+
puppet module build
3131

32-
The result will be a pkg directory at the top level of the module with the .tag.gz within it.
32+
The result will be a pkg directory at the top level of the module with the .tag.gz within it.
33+
Once the .tar.gz has been generated, it can be uploaded to this Puppet Forge server through the
34+
form below or by executing the following curl command line.
3335

34-
%span.search_error
35-
-if upload_status
36-
-case upload_status
37-
-when '200'
38-
File has been uploaded
39-
-when ''
40-
-else
41-
Upload has failed. #{upload_status}
36+
%div.code-block
37+
%pre
38+
:markdown
39+
curl -F "file=@pkg/_<name>_-_<version>_.tar.gz" #{request.env['REQUEST_URI']}
4240

43-
%form{:action => '/upload', :method=>'post', :enctype=>'multipart/form-data' }
44-
%input{ :type => 'file', :name=>'file'}
45-
%input{ :type=>'submit', :value=>'Upload'}
41+
%span.search_error
42+
-if upload_status
43+
-case upload_status
44+
-when '200'
45+
File has been uploaded
46+
-when ''
47+
-else
48+
Upload has failed. #{upload_status}
49+
50+
%form{:action => '/upload', :method=>'post', :enctype=>'multipart/form-data' }
51+
%input{ :type => 'file', :name=>'file'}
52+
%input{ :type=>'submit', :value=>'Upload'}

0 commit comments

Comments
 (0)