berkshelf-store 0.2.0

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.
Files changed (89) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +2 -0
  3. data/Gemfile +5 -0
  4. data/README.md +83 -0
  5. data/Rakefile +44 -0
  6. data/berkshelf-store.gemspec +26 -0
  7. data/bin/berkshelf-store +49 -0
  8. data/lib/berkshelf-store/backends/filesystem.rb +138 -0
  9. data/lib/berkshelf-store/backends.rb +5 -0
  10. data/lib/berkshelf-store/webservice.rb +100 -0
  11. data/lib/berkshelf-store.rb +5 -0
  12. data/test/data/arbo/cookbooks/apache2/1.10.4/data.json +1 -0
  13. data/test/data/arbo/cookbooks/couchbase/1.1.0/data.json +1 -0
  14. data/test/data/arbo/cookbooks/couchbase/1.2.0/data.json +1 -0
  15. data/test/data/catalog.json +69 -0
  16. data/test/data/tarballs/apache2-v1.10.4.tar.gz +0 -0
  17. data/test/data/tarballs/couchbase-v1.1.0.tar.gz +0 -0
  18. data/test/data/tarballs/couchbase-v1.2.0.tar.gz +0 -0
  19. data/test/data/tarballs/not_a_cookbook.tgz +0 -0
  20. data/test/test_berkshelf-store_backends_filesystem.rb +76 -0
  21. data/ui/static/bootstrap/css/bootstrap-theme.css +347 -0
  22. data/ui/static/bootstrap/css/bootstrap-theme.css.map +1 -0
  23. data/ui/static/bootstrap/css/bootstrap-theme.min.css +7 -0
  24. data/ui/static/bootstrap/css/bootstrap.css +5785 -0
  25. data/ui/static/bootstrap/css/bootstrap.css.map +1 -0
  26. data/ui/static/bootstrap/css/bootstrap.min.css +7 -0
  27. data/ui/static/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  28. data/ui/static/bootstrap/fonts/glyphicons-halflings-regular.svg +229 -0
  29. data/ui/static/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  30. data/ui/static/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  31. data/ui/static/bootstrap/js/bootstrap.js +1951 -0
  32. data/ui/static/bootstrap/js/bootstrap.min.js +6 -0
  33. data/ui/static/jquery/jquery.min.js +4 -0
  34. data/ui/static/jquery_file_upload/CONTRIBUTING.md +42 -0
  35. data/ui/static/jquery_file_upload/Gruntfile.js +37 -0
  36. data/ui/static/jquery_file_upload/README.md +123 -0
  37. data/ui/static/jquery_file_upload/angularjs.html +211 -0
  38. data/ui/static/jquery_file_upload/basic-plus.html +226 -0
  39. data/ui/static/jquery_file_upload/basic.html +136 -0
  40. data/ui/static/jquery_file_upload/blueimp-file-upload.jquery.json +50 -0
  41. data/ui/static/jquery_file_upload/bower.json +85 -0
  42. data/ui/static/jquery_file_upload/cors/postmessage.html +75 -0
  43. data/ui/static/jquery_file_upload/cors/result.html +24 -0
  44. data/ui/static/jquery_file_upload/css/demo-ie8.css +21 -0
  45. data/ui/static/jquery_file_upload/css/demo.css +67 -0
  46. data/ui/static/jquery_file_upload/css/jquery.fileupload-noscript.css +22 -0
  47. data/ui/static/jquery_file_upload/css/jquery.fileupload-ui-noscript.css +17 -0
  48. data/ui/static/jquery_file_upload/css/jquery.fileupload-ui.css +57 -0
  49. data/ui/static/jquery_file_upload/css/jquery.fileupload.css +36 -0
  50. data/ui/static/jquery_file_upload/css/style.css +15 -0
  51. data/ui/static/jquery_file_upload/img/loading.gif +0 -0
  52. data/ui/static/jquery_file_upload/img/progressbar.gif +0 -0
  53. data/ui/static/jquery_file_upload/index.html +255 -0
  54. data/ui/static/jquery_file_upload/jquery-ui.html +250 -0
  55. data/ui/static/jquery_file_upload/js/app.js +101 -0
  56. data/ui/static/jquery_file_upload/js/cors/jquery.postmessage-transport.js +117 -0
  57. data/ui/static/jquery_file_upload/js/cors/jquery.xdr-transport.js +86 -0
  58. data/ui/static/jquery_file_upload/js/jquery.fileupload-angular.js +429 -0
  59. data/ui/static/jquery_file_upload/js/jquery.fileupload-audio.js +106 -0
  60. data/ui/static/jquery_file_upload/js/jquery.fileupload-image.js +315 -0
  61. data/ui/static/jquery_file_upload/js/jquery.fileupload-jquery-ui.js +152 -0
  62. data/ui/static/jquery_file_upload/js/jquery.fileupload-process.js +172 -0
  63. data/ui/static/jquery_file_upload/js/jquery.fileupload-ui.js +699 -0
  64. data/ui/static/jquery_file_upload/js/jquery.fileupload-validate.js +119 -0
  65. data/ui/static/jquery_file_upload/js/jquery.fileupload-video.js +106 -0
  66. data/ui/static/jquery_file_upload/js/jquery.fileupload.js +1426 -0
  67. data/ui/static/jquery_file_upload/js/jquery.iframe-transport.js +214 -0
  68. data/ui/static/jquery_file_upload/js/main.js +75 -0
  69. data/ui/static/jquery_file_upload/js/vendor/jquery.ui.widget.js +530 -0
  70. data/ui/static/jquery_file_upload/package.json +54 -0
  71. data/ui/static/jquery_file_upload/server/gae-go/app/main.go +296 -0
  72. data/ui/static/jquery_file_upload/server/gae-go/app.yaml +12 -0
  73. data/ui/static/jquery_file_upload/server/gae-go/static/favicon.ico +0 -0
  74. data/ui/static/jquery_file_upload/server/gae-go/static/robots.txt +2 -0
  75. data/ui/static/jquery_file_upload/server/gae-python/app.yaml +16 -0
  76. data/ui/static/jquery_file_upload/server/gae-python/main.py +170 -0
  77. data/ui/static/jquery_file_upload/server/gae-python/static/favicon.ico +0 -0
  78. data/ui/static/jquery_file_upload/server/gae-python/static/robots.txt +2 -0
  79. data/ui/static/jquery_file_upload/server/node/package.json +41 -0
  80. data/ui/static/jquery_file_upload/server/node/server.js +292 -0
  81. data/ui/static/jquery_file_upload/server/php/UploadHandler.php +1330 -0
  82. data/ui/static/jquery_file_upload/server/php/index.php +15 -0
  83. data/ui/static/jquery_file_upload/test/index.html +166 -0
  84. data/ui/static/jquery_file_upload/test/test.js +1288 -0
  85. data/ui/views/catalog.erb +20 -0
  86. data/ui/views/doc.erb +23 -0
  87. data/ui/views/layout.erb +47 -0
  88. data/ui/views/upload.erb +46 -0
  89. metadata +210 -0
@@ -0,0 +1,20 @@
1
+ <h1>Cookbook catalog</h1>
2
+ Here are cookbooks available with this in your Berksfile
3
+ <pre>
4
+ source "<%=@site_prefix%><%=@ws_prefix%>/universe"
5
+ </pre>
6
+ <div id="cookbooks"></div>
7
+
8
+ <script>
9
+ $.getJSON('/v1/universe', {}, function(data) {
10
+ $.each(data, function (cookbook, versions) {
11
+ var cookbook_head = $('<h1>'+cookbook+'</h1>')
12
+ cookbook_head.appendTo('#cookbooks');
13
+ $.each(versions, function (version, detail) {
14
+ var version_head = $('<h2 align="right">'+version+'</h2>')
15
+ version_head.appendTo('#cookbooks');
16
+ $('<pre>'+JSON.stringify(detail, null, 2)+'</pre>').appendTo('#cookbooks');
17
+ });
18
+ });
19
+ });
20
+ </script>
data/ui/views/doc.erb ADDED
@@ -0,0 +1,23 @@
1
+ <h1>Documentation</h1>
2
+ <h2>Berkshelf</h2>
3
+ Use this service as Berkshelf source :
4
+ <pre>
5
+ source "<%=@site_prefix%><%=@ws_prefix%>/universe"
6
+ </pre>
7
+ <h2>Load cookbooks</h2>
8
+ <h3>by api</h3>
9
+ <pre>
10
+ POST <%=@site_prefix%><%=@ws_prefix%>/cookbooks/$NAME/$VERSION
11
+
12
+ with tgz content in "cookbook" param
13
+ </pre>
14
+ <h3>by curl</h3>
15
+ <pre>
16
+ curl -F cookbook=@/path/to/the/cookbook.tgz <%=@site_prefix%><%=@ws_prefix%>/cookbooks/$NAME/$VERSION
17
+ </pre>
18
+ free trick : copy a cookbook from opscode... in bash
19
+ <pre>
20
+ cookbook=apt; version=2.3.10; curl -L http://community.opscode.com/cookbooks/$cookbook/versions/${version//./_}/downloads | curl -F cookbook=@- http://<%=@site_prefix%><%=@ws_prefix%>/cookbooks/${cookbook}/${version}
21
+ </pre>
22
+ <h3>by upload form</h3>
23
+ <a href="upload.html">Upload page</a>
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <title>Berkshelf-store</title>
8
+
9
+ <!-- Bootstrap -->
10
+ <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
11
+ <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
12
+ <script src="jquery/jquery.min.js"></script>
13
+ <!-- Include all compiled plugins (below), or include individual files as needed -->
14
+ <script src="bootstrap/js/bootstrap.min.js"></script>
15
+
16
+ </head>
17
+ <body style="padding-top: 50px;">
18
+ <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
19
+ <div class="container">
20
+ <div class="navbar-header">
21
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
22
+ <span class="sr-only">Toggle navigation</span>
23
+ <span class="icon-bar"></span>
24
+ <span class="icon-bar"></span>
25
+ <span class="icon-bar"></span>
26
+ </button>
27
+ <a class="navbar-brand" href="#">Berkshelf-store</a>
28
+ </div>
29
+ <div class="collapse navbar-collapse">
30
+ <ul class="nav navbar-nav">
31
+ <li<%=@active=='index'?' class="active"':''%>><a href="index.html">Catalog</a></li>
32
+ <li<%=@active=='upload'?' class="active"':''%>><a href="upload.html">Upload</a></li>
33
+ <li<%=@active=='doc'?' class="active"':''%>><a href="doc.html">Doc</a></li>
34
+ </ul>
35
+ </div><!--/.nav-collapse -->
36
+ </div>
37
+ </div>
38
+
39
+ <div class="container">
40
+ <div class="content">
41
+ <%= yield %>
42
+ </div>
43
+
44
+ </div>
45
+ </body>
46
+ </html>
47
+
@@ -0,0 +1,46 @@
1
+ <br>
2
+ <link href="jquery_file_upload/css/jquery.fileupload.css" rel="stylesheet">
3
+ <form role="form" class="form-horizontal">
4
+ <div class="form-group">
5
+ <label class="col-sm-2 control-label" for="name">Cookbook name</label>
6
+ <input type="text" id="name">
7
+ </div>
8
+ <div class="form-group">
9
+ <label class="col-sm-2 control-label" for="version">Cookbook version</label>
10
+ <input type="text" id="version">
11
+ </div>
12
+ <span class="btn btn-success fileinput-button">
13
+ <i class="glyphicon glyphicon-plus"></i>
14
+ <span>Select TGZ</span>
15
+ <!-- The file input field used as target for the file upload widget -->
16
+ <input id="cookbook" type="file" name="cookbook">
17
+ </span>
18
+ </div>
19
+ <br>
20
+ <pre id="result">
21
+ </pre>
22
+ <script src="jquery_file_upload/js/vendor/jquery.ui.widget.js"></script>
23
+ <script src="jquery_file_upload/js/jquery.iframe-transport.js"></script>
24
+ <script src="jquery_file_upload/js/jquery.fileupload.js"></script>
25
+
26
+ <script>
27
+ $(function () {
28
+ $('#cookbook').fileupload({
29
+ add: function(e, data) {
30
+ data.url = '<%=@site_prefix%><%=@ws_prefix%>/cookbooks/'+$('input#name').val()+'/'+$('input#version').val()
31
+ if (data.autoUpload || (data.autoUpload !== false &&
32
+ $(this).fileupload('option', 'autoUpload'))) {
33
+ data.process().done(function () {
34
+ data.submit();
35
+ });
36
+ }
37
+ },
38
+ dataType: 'json',
39
+ done: function (e, data) {
40
+ $('pre#result').text(JSON.stringify(data.result, null, 2));
41
+ }
42
+ });
43
+ });
44
+
45
+ </script>
46
+
metadata ADDED
@@ -0,0 +1,210 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: berkshelf-store
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Guillaume Zitta
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: syslog-logger
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: ridley
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: sinatra
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: 1.4.5
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.4.5
55
+ - !ruby/object:Gem::Dependency
56
+ name: sinatra-contrib
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.4.2
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.4.2
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: A cookbook store based on the berkshelf API
84
+ email:
85
+ - github.guillaume@zitta.fr
86
+ executables:
87
+ - berkshelf-store
88
+ extensions: []
89
+ extra_rdoc_files: []
90
+ files:
91
+ - .gitignore
92
+ - Gemfile
93
+ - README.md
94
+ - Rakefile
95
+ - berkshelf-store.gemspec
96
+ - bin/berkshelf-store
97
+ - lib/berkshelf-store.rb
98
+ - lib/berkshelf-store/backends.rb
99
+ - lib/berkshelf-store/backends/filesystem.rb
100
+ - lib/berkshelf-store/webservice.rb
101
+ - test/data/arbo/cookbooks/apache2/1.10.4/data.json
102
+ - test/data/arbo/cookbooks/couchbase/1.1.0/data.json
103
+ - test/data/arbo/cookbooks/couchbase/1.2.0/data.json
104
+ - test/data/catalog.json
105
+ - test/data/tarballs/apache2-v1.10.4.tar.gz
106
+ - test/data/tarballs/couchbase-v1.1.0.tar.gz
107
+ - test/data/tarballs/couchbase-v1.2.0.tar.gz
108
+ - test/data/tarballs/not_a_cookbook.tgz
109
+ - test/test_berkshelf-store_backends_filesystem.rb
110
+ - ui/views/catalog.erb
111
+ - ui/views/doc.erb
112
+ - ui/views/layout.erb
113
+ - ui/views/upload.erb
114
+ - ui/static/bootstrap/js/bootstrap.js
115
+ - ui/static/bootstrap/js/bootstrap.min.js
116
+ - ui/static/bootstrap/css/bootstrap-theme.css.map
117
+ - ui/static/bootstrap/css/bootstrap.min.css
118
+ - ui/static/bootstrap/css/bootstrap.css.map
119
+ - ui/static/bootstrap/css/bootstrap-theme.min.css
120
+ - ui/static/bootstrap/css/bootstrap-theme.css
121
+ - ui/static/bootstrap/css/bootstrap.css
122
+ - ui/static/bootstrap/fonts/glyphicons-halflings-regular.woff
123
+ - ui/static/bootstrap/fonts/glyphicons-halflings-regular.eot
124
+ - ui/static/bootstrap/fonts/glyphicons-halflings-regular.svg
125
+ - ui/static/bootstrap/fonts/glyphicons-halflings-regular.ttf
126
+ - ui/static/jquery_file_upload/index.html
127
+ - ui/static/jquery_file_upload/Gruntfile.js
128
+ - ui/static/jquery_file_upload/angularjs.html
129
+ - ui/static/jquery_file_upload/blueimp-file-upload.jquery.json
130
+ - ui/static/jquery_file_upload/basic-plus.html
131
+ - ui/static/jquery_file_upload/js/jquery.fileupload-jquery-ui.js
132
+ - ui/static/jquery_file_upload/js/vendor/jquery.ui.widget.js
133
+ - ui/static/jquery_file_upload/js/jquery.fileupload-process.js
134
+ - ui/static/jquery_file_upload/js/jquery.iframe-transport.js
135
+ - ui/static/jquery_file_upload/js/jquery.fileupload-ui.js
136
+ - ui/static/jquery_file_upload/js/jquery.fileupload-video.js
137
+ - ui/static/jquery_file_upload/js/jquery.fileupload-image.js
138
+ - ui/static/jquery_file_upload/js/app.js
139
+ - ui/static/jquery_file_upload/js/jquery.fileupload.js
140
+ - ui/static/jquery_file_upload/js/jquery.fileupload-angular.js
141
+ - ui/static/jquery_file_upload/js/jquery.fileupload-validate.js
142
+ - ui/static/jquery_file_upload/js/cors/jquery.xdr-transport.js
143
+ - ui/static/jquery_file_upload/js/cors/jquery.postmessage-transport.js
144
+ - ui/static/jquery_file_upload/js/jquery.fileupload-audio.js
145
+ - ui/static/jquery_file_upload/js/main.js
146
+ - ui/static/jquery_file_upload/test/index.html
147
+ - ui/static/jquery_file_upload/test/test.js
148
+ - ui/static/jquery_file_upload/server/node/package.json
149
+ - ui/static/jquery_file_upload/server/node/server.js
150
+ - ui/static/jquery_file_upload/server/gae-go/static/favicon.ico
151
+ - ui/static/jquery_file_upload/server/gae-go/static/robots.txt
152
+ - ui/static/jquery_file_upload/server/gae-go/app/main.go
153
+ - ui/static/jquery_file_upload/server/gae-go/app.yaml
154
+ - ui/static/jquery_file_upload/server/gae-python/main.py
155
+ - ui/static/jquery_file_upload/server/gae-python/static/favicon.ico
156
+ - ui/static/jquery_file_upload/server/gae-python/static/robots.txt
157
+ - ui/static/jquery_file_upload/server/gae-python/app.yaml
158
+ - ui/static/jquery_file_upload/server/php/index.php
159
+ - ui/static/jquery_file_upload/server/php/UploadHandler.php
160
+ - ui/static/jquery_file_upload/README.md
161
+ - ui/static/jquery_file_upload/bower.json
162
+ - ui/static/jquery_file_upload/CONTRIBUTING.md
163
+ - ui/static/jquery_file_upload/basic.html
164
+ - ui/static/jquery_file_upload/img/loading.gif
165
+ - ui/static/jquery_file_upload/img/progressbar.gif
166
+ - ui/static/jquery_file_upload/css/jquery.fileupload.css
167
+ - ui/static/jquery_file_upload/css/jquery.fileupload-ui.css
168
+ - ui/static/jquery_file_upload/css/demo-ie8.css
169
+ - ui/static/jquery_file_upload/css/style.css
170
+ - ui/static/jquery_file_upload/css/jquery.fileupload-ui-noscript.css
171
+ - ui/static/jquery_file_upload/css/demo.css
172
+ - ui/static/jquery_file_upload/css/jquery.fileupload-noscript.css
173
+ - ui/static/jquery_file_upload/cors/result.html
174
+ - ui/static/jquery_file_upload/cors/postmessage.html
175
+ - ui/static/jquery_file_upload/package.json
176
+ - ui/static/jquery_file_upload/jquery-ui.html
177
+ - ui/static/jquery/jquery.min.js
178
+ homepage: https://github.com/gza/berkshelf-store
179
+ licenses: []
180
+ metadata: {}
181
+ post_install_message:
182
+ rdoc_options: []
183
+ require_paths:
184
+ - lib
185
+ required_ruby_version: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ required_rubygems_version: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ! '>='
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ requirements: []
196
+ rubyforge_project: berkshelf-store
197
+ rubygems_version: 2.0.3
198
+ signing_key:
199
+ specification_version: 4
200
+ summary: A cookbook store based on the berkshelf API
201
+ test_files:
202
+ - test/data/arbo/cookbooks/apache2/1.10.4/data.json
203
+ - test/data/arbo/cookbooks/couchbase/1.1.0/data.json
204
+ - test/data/arbo/cookbooks/couchbase/1.2.0/data.json
205
+ - test/data/catalog.json
206
+ - test/data/tarballs/apache2-v1.10.4.tar.gz
207
+ - test/data/tarballs/couchbase-v1.1.0.tar.gz
208
+ - test/data/tarballs/couchbase-v1.2.0.tar.gz
209
+ - test/data/tarballs/not_a_cookbook.tgz
210
+ - test/test_berkshelf-store_backends_filesystem.rb