vagrant-lightsail 0.2.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ba1f77ceffe556ec6fd1a0ce5ae63caa9f62864b
4
- data.tar.gz: d5740a3fd4889b718aa970f947599adb15a59865
2
+ SHA256:
3
+ metadata.gz: 8457ae9a17737ef99bdb9f8aed6526a23f3726e6b17950fea0bc10f72bc841eb
4
+ data.tar.gz: 9e3bf901949e9d810bef30c5f6d2e3f2703ac7062239d1f463992f3a2764d9d8
5
5
  SHA512:
6
- metadata.gz: f0262c3f1677c1bd933a7d8115429aea232f05cbbdb2fd193e56cd32e1129e7dc5dc88d9593d981b73e96525db457ddf04f0ff34d3a0fb0ebdc6d94417b54929
7
- data.tar.gz: aa18a305de6327a944a6b789dcb6c350b31ef154ea480bbd5a4edc0cef9d765c15263aacb5bd3e963e278a58791d25b7e421b0e2bc7ea82b566cb8c5be0e9cbf
6
+ metadata.gz: 87a37f8e24e6df184ed8e6d77e6b196aeba528f68d611738e038dbeeab3a98865858459bf6d5eb2cf7cfc76a570a76a5a45e5b910ad63545d6733b918872314e
7
+ data.tar.gz: 11237193dbbccc3a010de974605d981656600442106e2873cb7b9efb33c90e066bdcf0231deac5874b948002d8a80cb6042e783437984fa0728095805d4b6adf
data/.rubocop.yml CHANGED
@@ -24,3 +24,9 @@ Metrics/ModuleLength:
24
24
 
25
25
  Style/Documentation:
26
26
  Enabled: false
27
+
28
+ Style/FrozenStringLiteralComment:
29
+ Enabled: false
30
+
31
+ Naming/UncommunicativeMethodParamName:
32
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.6
1
+ 2.5.1
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.0] - 2018-08-15
10
+ ### Changed
11
+ - Fix testing framework and update test gems
12
+ - Fixed translation information for vagrant states
13
+ - Updated rubocop dependency to address [CVE-2017-8418](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8418)
14
+
9
15
  ## [0.2.0] - 2017-01-24
10
16
  ### Added
11
17
  - Translation information for vagrant states
data/Gemfile CHANGED
@@ -1,12 +1,11 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development do
4
- gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', tag: 'v1.8.7'
4
+ gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
5
5
  end
6
6
 
7
7
  group :plugins do
8
8
  gem 'vagrant-lightsail', path: '.'
9
- gem 'vagrant-puppet-install', '~> 4.1'
10
9
  end
11
10
 
12
11
  gemspec
data/Rakefile CHANGED
@@ -15,6 +15,6 @@ task :shell_test do
15
15
  end
16
16
 
17
17
  desc 'Run all tests: rubocop, shell_test'
18
- task test: [:rubocop, :shell_test]
18
+ task test: %i[rubocop shell_test]
19
19
 
20
20
  task default: :test
@@ -7,7 +7,7 @@ module VagrantPlugins
7
7
  #
8
8
  # @return [Pathname]
9
9
  def self.source_root
10
- @source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
10
+ @source_root ||= Pathname.new(File.expand_path('..', __dir__))
11
11
  end
12
12
  end
13
13
  end
@@ -147,7 +147,7 @@ module VagrantPlugins
147
147
  end
148
148
 
149
149
  # The autload farm
150
- action_root = Pathname.new(File.expand_path('../action', __FILE__))
150
+ action_root = Pathname.new(File.expand_path('action', __dir__))
151
151
  autoload :ConfigurePorts, action_root.join('configure_ports')
152
152
  autoload :ConnectLightsail, action_root.join('connect_lightsail')
153
153
  autoload :IsCreated, action_root.join('is_created')
@@ -14,25 +14,23 @@ module VagrantPlugins
14
14
  port_info = env[:machine].provider_config.port_info
15
15
 
16
16
  port_info.each do |pi|
17
- begin
18
- env[:lightsail_client].open_instance_public_ports(
19
- port_info: pi,
20
- instance_name: env[:machine].id
21
- )
17
+ env[:lightsail_client].open_instance_public_ports(
18
+ port_info: pi,
19
+ instance_name: env[:machine].id
20
+ )
22
21
 
23
- env[:ui].info I18n.t 'vagrant_lightsail.port_open',
24
- proto: pi[:protocol],
25
- port_no_from: pi[:from_port],
26
- port_no_to: pi[:to_port]
27
- rescue Aws::Lightsail::Errors::InvalidInputException => e
28
- env[:ui].info I18n.t 'vagrant_lightsail.port_open_fail',
29
- proto: pi[:protocol],
30
- port_no_from: pi[:from_port],
31
- port_no_to: pi[:to_port],
32
- error: e.to_s
33
- rescue Aws::Lightsail::Errors => e
34
- raise Errors::LightailError, message: e
35
- end
22
+ env[:ui].info I18n.t 'vagrant_lightsail.port_open',
23
+ proto: pi[:protocol],
24
+ port_no_from: pi[:from_port],
25
+ port_no_to: pi[:to_port]
26
+ rescue Aws::Lightsail::Errors::InvalidInputException => e
27
+ env[:ui].info I18n.t 'vagrant_lightsail.port_open_fail',
28
+ proto: pi[:protocol],
29
+ port_no_from: pi[:from_port],
30
+ port_no_to: pi[:to_port],
31
+ error: e.to_s
32
+ rescue Aws::Lightsail::Errors => e
33
+ raise Errors::LightailError, message: e
36
34
  end
37
35
 
38
36
  @app.call(env)
@@ -26,7 +26,7 @@ module VagrantPlugins
26
26
  return machine_not_found(machine)
27
27
  end
28
28
 
29
- if [:'shutting-down', :terminated].include? server.state.name.to_sym
29
+ if %i[shutting-down terminated].include? server.state.name.to_sym
30
30
  return machine_not_found(machine)
31
31
  end
32
32
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Lightsail
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -1,93 +1,93 @@
1
1
  en:
2
- vagrant_lightsail:
2
+ vagrant_lightsail:
3
3
 
4
- config:
5
- aws_info_required: |-
6
- One or more of the needed AWS credentials are missing. No
7
- environment variables are set nor profile '%{profile}' exists
8
- at '%{location}'
9
- port_info_array: |-
10
- Port info must be an array. See plugin documentation.
11
- region_required: |-
12
- A region must be specified via "region"
4
+ config:
5
+ aws_info_required: |-
6
+ One or more of the needed AWS credentials are missing. No
7
+ environment variables are set nor profile '%{profile}' exists
8
+ at '%{location}'
9
+ port_info_array: |-
10
+ Port info must be an array. See plugin documentation.
11
+ region_required: |-
12
+ A region must be specified via "region"
13
13
 
14
- errors:
15
- lightsail_error: |-
16
- There was an error talking to AWS. The error message is shown
17
- below:
14
+ errors:
15
+ lightsail_error: |-
16
+ There was an error talking to AWS. The error message is shown
17
+ below:
18
18
 
19
- %{message}
20
- public_key: |-
21
- There was an issue reading the public key at:
19
+ %{message}
20
+ public_key: |-
21
+ There was an issue reading the public key at:
22
22
 
23
- Path: %{path}
23
+ Path: %{path}
24
24
 
25
- Please check the file's permissions.
25
+ Please check the file's permissions.
26
26
 
27
- already_status: |-
28
- The machine is already %{status}.
29
- creating_key: |-
30
- Creating new SSH key %{name}...
31
- launching_instance: |-
32
- Launching an instance with the following settings...
33
- launch_no_keypair: |-
34
- Warning! You didn't specify a keypair to launch your instance with.
35
- This can sometimes result in not being able to access your instance.
36
- not_created: |-
37
- Instance is not created. Please run `vagrant up` first.
38
- port_open: |-
39
- Opened ports %{proto}:%{port_no_from} - %{proto}:%{port_no_to}
40
- port_open_fail: |-
41
- Unable to open ports %{proto}:%{port_no_from} - %{proto}:%{port_no_to}: %{error}
42
- ready: |-
43
- Machine is booted and ready for use!
44
- starting: |-
45
- Starting the instance...
46
- stopping: |-
47
- Stopping the instance...
48
- terminating: |-
49
- Terminating the instance...
50
- waiting_for_ready: |-
51
- Waiting for instance to become "ready"...
52
- waiting_for_ssh: |-
53
- Waiting for SSH to become available...
54
- will_not_destroy: |-
55
- The instance '%{name}' will not be destroyed, since the
56
- confirmation was declined.
27
+ already_status: |-
28
+ The machine is already %{status}.
29
+ creating_key: |-
30
+ Creating new SSH key %{name}...
31
+ launching_instance: |-
32
+ Launching an instance with the following settings...
33
+ launch_no_keypair: |-
34
+ Warning! You didn't specify a keypair to launch your instance with.
35
+ This can sometimes result in not being able to access your instance.
36
+ not_created: |-
37
+ Instance is not created. Please run `vagrant up` first.
38
+ port_open: |-
39
+ Opened ports %{proto}:%{port_no_from} - %{proto}:%{port_no_to}
40
+ port_open_fail: |-
41
+ Unable to open ports %{proto}:%{port_no_from} - %{proto}:%{port_no_to}: %{error}
42
+ ready: |-
43
+ Machine is booted and ready for use!
44
+ starting: |-
45
+ Starting the instance...
46
+ stopping: |-
47
+ Stopping the instance...
48
+ terminating: |-
49
+ Terminating the instance...
50
+ waiting_for_ready: |-
51
+ Waiting for instance to become "ready"...
52
+ waiting_for_ssh: |-
53
+ Waiting for SSH to become available...
54
+ will_not_destroy: |-
55
+ The instance '%{name}' will not be destroyed, since the
56
+ confirmation was declined.
57
57
 
58
- states:
59
- short_not_created: |-
60
- not created
61
- long_not_created: |-
62
- The Lightsail instance is not created. Run `vagrant up` to
63
- create it.
58
+ states:
59
+ short_not_created: |-
60
+ not created
61
+ long_not_created: |-
62
+ The Lightsail instance is not created. Run `vagrant up` to
63
+ create it.
64
64
 
65
- short_stopped: |-
66
- stopped
67
- long_stopped: |-
68
- The Lightsail instance is stopped. Run `vagrant up` to start it.
65
+ short_stopped: |-
66
+ stopped
67
+ long_stopped: |-
68
+ The Lightsail instance is stopped. Run `vagrant up` to start it.
69
69
 
70
- short_stopping: |-
71
- stopping
72
- long_stopping: |-
73
- The Lightsail instance is stopping. Wait until is completely
74
- stopped to run `vagrant up` and start it.
70
+ short_stopping: |-
71
+ stopping
72
+ long_stopping: |-
73
+ The Lightsail instance is stopping. Wait until is completely
74
+ stopped to run `vagrant up` and start it.
75
75
 
76
- short_pending: |-
77
- pending
78
- long_pending: |-
79
- The Lightsail instance is pending a start (i.e. this is a
80
- transition state).
76
+ short_pending: |-
77
+ pending
78
+ long_pending: |-
79
+ The Lightsail instance is pending a start (i.e. this is a
80
+ transition state).
81
81
 
82
- short_running: |-
83
- running
84
- long_running: |-
85
- The Lightsail instance is running. To stop this machine, you can
86
- run `vagrant halt`. To destroy the machine, you can run `vagrant
87
- destroy`.
82
+ short_running: |-
83
+ running
84
+ long_running: |-
85
+ The Lightsail instance is running. To stop this machine, you can
86
+ run `vagrant halt`. To destroy the machine, you can run `vagrant
87
+ destroy`.
88
88
 
89
- short_pending: |-
90
- pending
91
- long_pending: |-
92
- The Lightsail instance is still being initialized. To destroy
93
- this machine, you can run `vagrant destroy`.
89
+ short_pending: |-
90
+ pending
91
+ long_pending: |-
92
+ The Lightsail instance is still being initialized. To destroy
93
+ this machine, you can run `vagrant destroy`.
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,2 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2
2
  require 'vagrant-lightsail'
data/test/Vagrantfile CHANGED
@@ -3,7 +3,8 @@ Vagrant.require_plugin('vagrant-lightsail')
3
3
  Vagrant.configure('2') do |config|
4
4
  config.ssh.private_key_path = '~/.ssh/id_rsa'
5
5
 
6
- config.vm.synced_folder '.', '/vagrant', disabled: true
6
+ config.vm.allowed_synced_folder_types = [:rsync]
7
+ config.vm.synced_folder '.', '/vagrant', disabled: true, type: 'rsync'
7
8
 
8
9
  config.vm.provider :lightsail do |provider, override|
9
10
  override.vm.box = 'lightsail'
@@ -25,9 +26,9 @@ Vagrant.configure('2') do |config|
25
26
  end
26
27
 
27
28
  config.vm.provision :shell, path: 'scripts/provision.sh'
28
- config.puppet_install.puppet_version = :latest
29
29
  config.vm.provision 'puppet' do |puppet|
30
- puppet.environment_path = 'puppet'
31
- puppet.environment = 'lightsail'
30
+ puppet.synced_folder_type = 'rsync'
31
+ puppet.environment_path = 'puppet'
32
+ puppet.environment = 'lightsail'
32
33
  end
33
34
  end
@@ -1,3 +1,6 @@
1
1
  #!/bin/bash
2
2
 
3
+ apt-get update
4
+ apt-get install -y puppet
5
+
3
6
  echo 'Testing 1 2 3!'
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'vagrant-lightsail/version'
5
4
  require 'English'
@@ -21,7 +20,7 @@ Gem::Specification.new do |spec|
21
20
  spec.add_runtime_dependency 'aws-sdk', '~> 2.6'
22
21
  spec.add_runtime_dependency 'iniparse', '~> 1.4'
23
22
 
24
- spec.add_development_dependency 'bundler', '~> 1.12'
23
+ spec.add_development_dependency 'bundler', '1.12.5'
25
24
  spec.add_development_dependency 'rake', '~> 12.0'
26
- spec.add_development_dependency 'rubocop', '~> 0.46'
25
+ spec.add_development_dependency 'rubocop', '~> 0.58'
27
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-lightsail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Figueroa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2018-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: '1.12'
47
+ version: 1.12.5
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.12'
54
+ version: 1.12.5
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.46'
75
+ version: '0.58'
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: '0.46'
82
+ version: '0.58'
83
83
  description: Enables Vagrant to manage machines in AWS Lightsail.
84
84
  email:
85
85
  - alejandro@ideasftw.com
@@ -91,7 +91,6 @@ files:
91
91
  - ".rspec"
92
92
  - ".rubocop.yml"
93
93
  - ".ruby-version"
94
- - ".travis.yml"
95
94
  - CHANGELOG.md
96
95
  - Gemfile
97
96
  - LICENSE.txt
@@ -149,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
148
  version: '0'
150
149
  requirements: []
151
150
  rubyforge_project:
152
- rubygems_version: 2.4.5.2
151
+ rubygems_version: 2.7.6
153
152
  signing_key:
154
153
  specification_version: 4
155
154
  summary: Enables Vagrant to manage machines in AWS Lightsail.
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.3
5
- before_install: gem install bundler -v 1.13.6