community-zero 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6365dd0adfe1bee925f49a26bc815a1711539134
4
- data.tar.gz: 944715fb62f1c8e301885deb15648fa30848e99e
3
+ metadata.gz: 425f091c947d1971901f380570e80637eefce300
4
+ data.tar.gz: ab73f8d4f6a36a647353824ad320cd64a8128389
5
5
  SHA512:
6
- metadata.gz: c5743a126349eb8994ee3fba8a34223e678d77162ddcbc9ea799c9585bbc065d7ad531651b0c9c51ca7913929b51b4a86f2f309b2b6f4b27ed3bfcacca204b30
7
- data.tar.gz: 89a55c0ef618d29ea06ee05c2c94e622a9b9abd45490f671b9ff32bd5885692d586cc8749c909a75fa5b40f01f42a1ff6503e3a227e8056285c63d2df0fb37d3
6
+ metadata.gz: 78643707d0c64818683db9508b6e32d4679fea4c44c127b0cdee6a1e32bbf2e64b722f3f00d6af6442defc6a0d1fd4847af18b099f6092290cebbb6d66cfb2a2
7
+ data.tar.gz: 945958daab56f3ca57e5afe17408371ac977ebe9edb39d3a1deb52971488339e267794bdaff9d364fd9d5cb61c4083b02d7d3c5dae9dcea76419b6260eba3c12
@@ -46,7 +46,7 @@ module CommunityZero
46
46
  # POST /cookbooks
47
47
  def post(request)
48
48
  params = Rack::Utils::Multipart.parse_multipart(request.env)
49
- cookbook = params['cookbook']
49
+ cookbook = JSON.parse(params['cookbook'], symbolize_names: true)
50
50
  tarball = params['tarball']
51
51
 
52
52
  metadata = Metadata.new(read_tarball(tarball))
@@ -59,7 +59,7 @@ module CommunityZero
59
59
  }
60
60
  )
61
61
  else
62
- respond(create_cookbook(metadata).to_hash)
62
+ respond(create_cookbook(metadata, cookbook).to_hash)
63
63
  end
64
64
  end
65
65
 
@@ -68,14 +68,14 @@ module CommunityZero
68
68
  #
69
69
  # @param [CommunityZero::Metadata] metadata
70
70
  # the metadata to create the cookbook from
71
- def create_cookbook(metadata)
72
- Cookbook.create(
71
+ def create_cookbook(metadata, overrides = {})
72
+ Cookbook.create({
73
73
  :name => metadata.name,
74
74
  :category => nil,
75
75
  :maintainer => metadata.maintainer,
76
76
  :description => metadata.description,
77
77
  :version => metadata.version
78
- )
78
+ }.merge(overrides))
79
79
  end
80
80
 
81
81
  # Parse the metadata from the tarball.
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module CommunityZero
19
- VERSION = '1.1.0'
19
+ VERSION = '1.1.1'
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: community-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-21 00:00:00.000000000 Z
11
+ date: 2013-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puma
@@ -30,56 +30,56 @@ dependencies:
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3.2
33
+ version: '1.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3.2
40
+ version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json_spec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 1.1.1
47
+ version: '1.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 1.1.1
54
+ version: '1.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rack-test
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.6.2
61
+ version: '0.6'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: 0.6.2
68
+ version: '0.6'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: 2.13.0
75
+ version: '2.13'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: 2.13.0
82
+ version: '2.13'
83
83
  description: Self-contained, easy-setup, fast-start in-memory Chef Community Site
84
84
  for testing.
85
85
  email: sethvargo@gmail.com