ventriloquist 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -4
  3. data/CHANGELOG.md +31 -0
  4. data/DEVELOPMENT.md +37 -0
  5. data/Gemfile +13 -13
  6. data/Gemfile.lock +48 -50
  7. data/LICENSE.txt +1 -1
  8. data/README.md +65 -114
  9. data/development/Vagrantfile +20 -55
  10. data/lib/ventriloquist/cap/platforms/debian/elixir_install.rb +23 -16
  11. data/lib/ventriloquist/cap/platforms/debian/erlang_install.rb +13 -10
  12. data/lib/ventriloquist/cap/platforms/debian/go_install.rb +18 -3
  13. data/lib/ventriloquist/cap/platforms/debian/phantomjs_install.rb +22 -4
  14. data/lib/ventriloquist/cap/platforms/debian/python.rb +2 -0
  15. data/lib/ventriloquist/cap/platforms/linux/nvm_install_nodejs.rb +2 -0
  16. data/lib/ventriloquist/cap/platforms/linux/rvm_install_ruby.rb +2 -0
  17. data/lib/ventriloquist/cap/services/debian/ventriloquist_containers_upstart.rb +1 -1
  18. data/lib/ventriloquist/cap/utils/debian/prepare_container_for_docker.rb +35 -0
  19. data/lib/ventriloquist/cap/utils/linux/download.rb +24 -10
  20. data/lib/ventriloquist/cap/utils.rb +5 -0
  21. data/lib/ventriloquist/config.rb +1 -1
  22. data/lib/ventriloquist/platforms/elixir.rb +7 -2
  23. data/lib/ventriloquist/platforms/erlang.rb +3 -0
  24. data/lib/ventriloquist/platforms/go.rb +7 -2
  25. data/lib/ventriloquist/platforms/nodejs.rb +9 -2
  26. data/lib/ventriloquist/platforms/phantomjs.rb +7 -2
  27. data/lib/ventriloquist/platforms/python.rb +9 -2
  28. data/lib/ventriloquist/platforms/ruby.rb +9 -2
  29. data/lib/ventriloquist/platforms_builder.rb +7 -2
  30. data/lib/ventriloquist/plugin.rb +0 -4
  31. data/lib/ventriloquist/provisioner.rb +10 -5
  32. data/lib/ventriloquist/service.rb +4 -5
  33. data/lib/ventriloquist/services/elastic_search.rb +1 -1
  34. data/lib/ventriloquist/services/mail_catcher.rb +1 -1
  35. data/lib/ventriloquist/services/memcached.rb +1 -1
  36. data/lib/ventriloquist/services/mysql.rb +1 -1
  37. data/lib/ventriloquist/services/postgresql.rb +1 -1
  38. data/lib/ventriloquist/services/redis.rb +2 -2
  39. data/lib/ventriloquist/services/rethink_db.rb +1 -5
  40. data/lib/ventriloquist/services_builder.rb +10 -7
  41. data/lib/ventriloquist/version.rb +1 -1
  42. data/services/base/Dockerfile +19 -11
  43. data/services/build-all.sh +11 -11
  44. data/services/elasticsearch/Dockerfile +4 -1
  45. data/services/mailcatcher/Dockerfile +11 -1
  46. data/services/memcached/Dockerfile +9 -4
  47. data/services/mysql/5.5/Dockerfile +1 -0
  48. data/services/mysql/5.6/Dockerfile +8 -4
  49. data/services/openjdk7/Dockerfile +6 -1
  50. data/services/postgresql/9.1/Dockerfile +8 -5
  51. data/services/postgresql/9.1/config/bin/prepare-postgres +2 -0
  52. data/services/postgresql/9.2/Dockerfile +7 -5
  53. data/services/postgresql/9.2/config/bin/prepare-postgres +2 -0
  54. data/services/postgresql/9.3/Dockerfile +5 -5
  55. data/services/postgresql/9.3/config/bin/prepare-postgres +2 -0
  56. data/services/redis/Dockerfile +7 -4
  57. data/services/rethinkdb/Dockerfile +8 -1
  58. data/spec/spec_helper.rb +7 -9
  59. data/spec/unit/platforms_builder_spec.rb +5 -9
  60. data/spec/unit/service_spec.rb +14 -16
  61. data/spec/unit/services_builder_spec.rb +10 -20
  62. data/ventriloquist.gemspec +0 -2
  63. metadata +11 -23
@@ -1,24 +1,22 @@
1
1
  require 'spec_helper'
2
2
 
3
- require 'vocker/docker_client'
3
+ require Vagrant.source_root.join('plugins/provisioners/docker/client')
4
4
  require 'ventriloquist/services_builder'
5
5
 
6
6
  describe VagrantPlugins::Ventriloquist::ServicesBuilder do
7
7
  Service = VagrantPlugins::Ventriloquist::Service
8
8
 
9
- verify_contract(:services_builder)
9
+ let(:docker_client) { instance_double(VagrantPlugins::Docker::Client, container_running?: false, run_container: false) }
10
10
 
11
- fake(:docker_client)
12
-
13
- let(:pg_cfg) { {image: 'user/pg', tag: '9.2'} }
11
+ let(:pg_cfg) { {image: 'user/pg-9.2'} }
14
12
  let(:custom_mapping) { {'mysql' => custom_service} }
15
13
  let(:custom_service) { Class.new(Service) }
16
14
  let(:svcs_configs) { [
17
15
  {pg: pg_cfg},
18
16
  ['some-service'],
19
- 'mysql:1.2',
17
+ 'mysql-1.2',
20
18
  {name: {type: 'mysql'}},
21
- {api_db: {vimage: 'mysql'}}
19
+ {api_db: {vimage: 'mysql-2.1'}}
22
20
  ] }
23
21
 
24
22
  let(:services) { described_class.new(svcs_configs, custom_mapping).build(docker_client) }
@@ -29,8 +27,8 @@ describe VagrantPlugins::Ventriloquist::ServicesBuilder do
29
27
  let(:vimage_ex) { services[4] }
30
28
 
31
29
  it 'builds a list of service objects' do
32
- expect(services).to have(5).items
33
- expect(services.all?{|s| s.is_a?(Service)}).to be_true
30
+ expect(services.size).to eq(5)
31
+ expect(services.all?{|s| s.is_a?(Service)}).to be_truthy
34
32
  end
35
33
 
36
34
  it 'uses container name as type' do
@@ -49,24 +47,16 @@ describe VagrantPlugins::Ventriloquist::ServicesBuilder do
49
47
  expect(pg.config).to eq(pg_cfg)
50
48
  end
51
49
 
52
- it 'extracts tag from image name' do
53
- expect(mysql.config[:tag]).to eq('1.2')
54
- end
55
-
56
- it 'defaults tag to "latest"' do
57
- expect(other.config[:tag]).to eq('latest')
58
- end
59
-
60
50
  it 'prepends "fgrehm/ventriloquist-" to image names if image config is not provided' do
61
- expect(mysql.config[:image]).to eq('fgrehm/ventriloquist-mysql:1.2')
51
+ expect(mysql.config[:image]).to eq('fgrehm/ventriloquist-mysql-1.2')
62
52
  end
63
53
 
64
54
  it 'expands vimage' do
65
- expect(vimage_ex.config[:image]).to eq('fgrehm/ventriloquist-mysql:latest')
55
+ expect(vimage_ex.config[:image]).to eq('fgrehm/ventriloquist-mysql-2.1')
66
56
  end
67
57
 
68
58
  it 'sets the service name' do
69
59
  expect(pg.name).to eq('pg')
70
- expect(mysql.name).to eq('mysql')
60
+ expect(mysql.name).to eq('mysql-1.2')
71
61
  end
72
62
  end
@@ -17,6 +17,4 @@ Gem::Specification.new do |spec|
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
-
21
- spec.add_dependency 'vocker', '~> 0.4.1'
22
20
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ventriloquist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-13 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: vocker
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: 0.4.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ~>
25
- - !ruby/object:Gem::Version
26
- version: 0.4.1
11
+ date: 2014-04-07 00:00:00.000000000 Z
12
+ dependencies: []
27
13
  description: Vagrant development environments made easy
28
14
  email:
29
15
  - fgrehm@gmail.com
@@ -31,10 +17,11 @@ executables: []
31
17
  extensions: []
32
18
  extra_rdoc_files: []
33
19
  files:
34
- - .gitignore
35
- - .rspec
36
- - .travis.yml
20
+ - ".gitignore"
21
+ - ".rspec"
22
+ - ".travis.yml"
37
23
  - CHANGELOG.md
24
+ - DEVELOPMENT.md
38
25
  - Gemfile
39
26
  - Gemfile.lock
40
27
  - Guardfile
@@ -68,6 +55,7 @@ files:
68
55
  - lib/ventriloquist/cap/utils/debian/install_build_tools.rb
69
56
  - lib/ventriloquist/cap/utils/debian/install_packages.rb
70
57
  - lib/ventriloquist/cap/utils/debian/mercurial_install.rb
58
+ - lib/ventriloquist/cap/utils/debian/prepare_container_for_docker.rb
71
59
  - lib/ventriloquist/cap/utils/linux/download.rb
72
60
  - lib/ventriloquist/cap/utils/linux/make.rb
73
61
  - lib/ventriloquist/cap/utils/linux/untar.rb
@@ -136,17 +124,17 @@ require_paths:
136
124
  - lib
137
125
  required_ruby_version: !ruby/object:Gem::Requirement
138
126
  requirements:
139
- - - '>='
127
+ - - ">="
140
128
  - !ruby/object:Gem::Version
141
129
  version: '0'
142
130
  required_rubygems_version: !ruby/object:Gem::Requirement
143
131
  requirements:
144
- - - '>='
132
+ - - ">="
145
133
  - !ruby/object:Gem::Version
146
134
  version: '0'
147
135
  requirements: []
148
136
  rubyforge_project:
149
- rubygems_version: 2.1.5
137
+ rubygems_version: 2.2.2
150
138
  signing_key:
151
139
  specification_version: 4
152
140
  summary: Vagrant development environments made easy