fog-proxmox 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/.bundle/config +4 -0
  3. data/.codeclimate.yml +14 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +35 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  6. data/.gitignore +5 -0
  7. data/.gitlab-ci.yml +42 -0
  8. data/.rubocop.yml +13 -0
  9. data/.ruby-gemset +1 -0
  10. data/.solargraph.yml +10 -0
  11. data/.travis.yml +26 -0
  12. data/.vscode/launch.json +114 -0
  13. data/.vscode/settings.json +45 -0
  14. data/.vscode/tasks.json +27 -0
  15. data/CODE_OF_CONDUCT.md +74 -0
  16. data/CONTRIBUTING.md +20 -0
  17. data/CONTRIBUTORS.md +9 -0
  18. data/Gemfile +23 -0
  19. data/Gemfile.lock +146 -0
  20. data/ISSUE_TEMPLATE.md +43 -0
  21. data/LICENSE +674 -0
  22. data/README.md +58 -0
  23. data/Rakefile +53 -0
  24. data/SUPPORT.md +9 -0
  25. data/bin/console +29 -0
  26. data/bin/setup +29 -0
  27. data/docs/compute.md +846 -0
  28. data/docs/connection_parameters.md +45 -0
  29. data/docs/getting_started.md +53 -0
  30. data/docs/identity.md +357 -0
  31. data/examples/compute.rb +279 -0
  32. data/examples/identity.rb +195 -0
  33. data/fog-proxmox.gemspec +63 -0
  34. data/fogproxmox.png +0 -0
  35. data/lib/fog/compute/proxmox.rb +131 -0
  36. data/lib/fog/compute/proxmox/models/container.rb +97 -0
  37. data/lib/fog/compute/proxmox/models/container_config.rb +90 -0
  38. data/lib/fog/compute/proxmox/models/containers.rb +40 -0
  39. data/lib/fog/compute/proxmox/models/disk.rb +67 -0
  40. data/lib/fog/compute/proxmox/models/disks.rb +49 -0
  41. data/lib/fog/compute/proxmox/models/interface.rb +50 -0
  42. data/lib/fog/compute/proxmox/models/interfaces.rb +46 -0
  43. data/lib/fog/compute/proxmox/models/node.rb +93 -0
  44. data/lib/fog/compute/proxmox/models/nodes.rb +45 -0
  45. data/lib/fog/compute/proxmox/models/server.rb +212 -0
  46. data/lib/fog/compute/proxmox/models/server_config.rb +116 -0
  47. data/lib/fog/compute/proxmox/models/servers.rb +70 -0
  48. data/lib/fog/compute/proxmox/models/snapshot.rb +70 -0
  49. data/lib/fog/compute/proxmox/models/snapshots.rb +55 -0
  50. data/lib/fog/compute/proxmox/models/storage.rb +61 -0
  51. data/lib/fog/compute/proxmox/models/storages.rb +60 -0
  52. data/lib/fog/compute/proxmox/models/task.rb +84 -0
  53. data/lib/fog/compute/proxmox/models/tasks.rb +71 -0
  54. data/lib/fog/compute/proxmox/models/volume.rb +61 -0
  55. data/lib/fog/compute/proxmox/models/volumes.rb +67 -0
  56. data/lib/fog/compute/proxmox/requests/action_server.rb +47 -0
  57. data/lib/fog/compute/proxmox/requests/check_vmid.rb +41 -0
  58. data/lib/fog/compute/proxmox/requests/clone_server.rb +46 -0
  59. data/lib/fog/compute/proxmox/requests/create_backup.rb +44 -0
  60. data/lib/fog/compute/proxmox/requests/create_server.rb +45 -0
  61. data/lib/fog/compute/proxmox/requests/create_snapshot.rb +47 -0
  62. data/lib/fog/compute/proxmox/requests/create_spice.rb +46 -0
  63. data/lib/fog/compute/proxmox/requests/create_term.rb +46 -0
  64. data/lib/fog/compute/proxmox/requests/create_vnc.rb +46 -0
  65. data/lib/fog/compute/proxmox/requests/delete_server.rb +47 -0
  66. data/lib/fog/compute/proxmox/requests/delete_snapshot.rb +48 -0
  67. data/lib/fog/compute/proxmox/requests/delete_volume.rb +40 -0
  68. data/lib/fog/compute/proxmox/requests/get_node.rb +44 -0
  69. data/lib/fog/compute/proxmox/requests/get_server_config.rb +45 -0
  70. data/lib/fog/compute/proxmox/requests/get_server_status.rb +45 -0
  71. data/lib/fog/compute/proxmox/requests/get_snapshot.rb +47 -0
  72. data/lib/fog/compute/proxmox/requests/get_storage.rb +44 -0
  73. data/lib/fog/compute/proxmox/requests/get_task.rb +44 -0
  74. data/lib/fog/compute/proxmox/requests/get_vnc.rb +46 -0
  75. data/lib/fog/compute/proxmox/requests/get_volume.rb +42 -0
  76. data/lib/fog/compute/proxmox/requests/list_nodes.rb +42 -0
  77. data/lib/fog/compute/proxmox/requests/list_servers.rb +42 -0
  78. data/lib/fog/compute/proxmox/requests/list_snapshots.rb +43 -0
  79. data/lib/fog/compute/proxmox/requests/list_storages.rb +42 -0
  80. data/lib/fog/compute/proxmox/requests/list_tasks.rb +42 -0
  81. data/lib/fog/compute/proxmox/requests/list_volumes.rb +42 -0
  82. data/lib/fog/compute/proxmox/requests/log_task.rb +45 -0
  83. data/lib/fog/compute/proxmox/requests/migrate_server.rb +44 -0
  84. data/lib/fog/compute/proxmox/requests/move_disk.rb +46 -0
  85. data/lib/fog/compute/proxmox/requests/move_volume.rb +46 -0
  86. data/lib/fog/compute/proxmox/requests/next_vmid.rb +39 -0
  87. data/lib/fog/compute/proxmox/requests/resize_container.rb +46 -0
  88. data/lib/fog/compute/proxmox/requests/resize_server.rb +43 -0
  89. data/lib/fog/compute/proxmox/requests/rollback_snapshot.rb +46 -0
  90. data/lib/fog/compute/proxmox/requests/status_task.rb +44 -0
  91. data/lib/fog/compute/proxmox/requests/stop_task.rb +41 -0
  92. data/lib/fog/compute/proxmox/requests/template_server.rb +43 -0
  93. data/lib/fog/compute/proxmox/requests/update_server.rb +46 -0
  94. data/lib/fog/compute/proxmox/requests/update_snapshot.rb +45 -0
  95. data/lib/fog/identity/proxmox.rb +132 -0
  96. data/lib/fog/identity/proxmox/models/activedirectory.rb +57 -0
  97. data/lib/fog/identity/proxmox/models/domain.rb +61 -0
  98. data/lib/fog/identity/proxmox/models/domains.rb +115 -0
  99. data/lib/fog/identity/proxmox/models/group.rb +60 -0
  100. data/lib/fog/identity/proxmox/models/groups.rb +50 -0
  101. data/lib/fog/identity/proxmox/models/ldap.rb +57 -0
  102. data/lib/fog/identity/proxmox/models/oath.rb +50 -0
  103. data/lib/fog/identity/proxmox/models/pam.rb +46 -0
  104. data/lib/fog/identity/proxmox/models/permission.rb +69 -0
  105. data/lib/fog/identity/proxmox/models/permissions.rb +61 -0
  106. data/lib/fog/identity/proxmox/models/pool.rb +84 -0
  107. data/lib/fog/identity/proxmox/models/pools.rb +50 -0
  108. data/lib/fog/identity/proxmox/models/principal.rb +47 -0
  109. data/lib/fog/identity/proxmox/models/pve.rb +46 -0
  110. data/lib/fog/identity/proxmox/models/role.rb +61 -0
  111. data/lib/fog/identity/proxmox/models/roles.rb +51 -0
  112. data/lib/fog/identity/proxmox/models/user.rb +74 -0
  113. data/lib/fog/identity/proxmox/models/users.rb +50 -0
  114. data/lib/fog/identity/proxmox/models/yubico.rb +51 -0
  115. data/lib/fog/identity/proxmox/requests/add_permission.rb +41 -0
  116. data/lib/fog/identity/proxmox/requests/change_password.rb +41 -0
  117. data/lib/fog/identity/proxmox/requests/check_permissions.rb +44 -0
  118. data/lib/fog/identity/proxmox/requests/create_domain.rb +40 -0
  119. data/lib/fog/identity/proxmox/requests/create_group.rb +40 -0
  120. data/lib/fog/identity/proxmox/requests/create_pool.rb +40 -0
  121. data/lib/fog/identity/proxmox/requests/create_role.rb +40 -0
  122. data/lib/fog/identity/proxmox/requests/create_user.rb +40 -0
  123. data/lib/fog/identity/proxmox/requests/delete_domain.rb +40 -0
  124. data/lib/fog/identity/proxmox/requests/delete_group.rb +40 -0
  125. data/lib/fog/identity/proxmox/requests/delete_pool.rb +39 -0
  126. data/lib/fog/identity/proxmox/requests/delete_role.rb +40 -0
  127. data/lib/fog/identity/proxmox/requests/delete_user.rb +39 -0
  128. data/lib/fog/identity/proxmox/requests/get_domain.rb +41 -0
  129. data/lib/fog/identity/proxmox/requests/get_group.rb +41 -0
  130. data/lib/fog/identity/proxmox/requests/get_pool.rb +41 -0
  131. data/lib/fog/identity/proxmox/requests/get_role.rb +41 -0
  132. data/lib/fog/identity/proxmox/requests/get_user.rb +40 -0
  133. data/lib/fog/identity/proxmox/requests/list_domains.rb +41 -0
  134. data/lib/fog/identity/proxmox/requests/list_groups.rb +41 -0
  135. data/lib/fog/identity/proxmox/requests/list_permissions.rb +41 -0
  136. data/lib/fog/identity/proxmox/requests/list_pools.rb +41 -0
  137. data/lib/fog/identity/proxmox/requests/list_roles.rb +41 -0
  138. data/lib/fog/identity/proxmox/requests/list_users.rb +42 -0
  139. data/lib/fog/identity/proxmox/requests/read_version.rb +43 -0
  140. data/lib/fog/identity/proxmox/requests/remove_permission.rb +42 -0
  141. data/lib/fog/identity/proxmox/requests/update_domain.rb +41 -0
  142. data/lib/fog/identity/proxmox/requests/update_group.rb +41 -0
  143. data/lib/fog/identity/proxmox/requests/update_pool.rb +41 -0
  144. data/lib/fog/identity/proxmox/requests/update_role.rb +41 -0
  145. data/lib/fog/identity/proxmox/requests/update_user.rb +41 -0
  146. data/lib/fog/network/proxmox.rb +83 -0
  147. data/lib/fog/network/proxmox/models/network.rb +82 -0
  148. data/lib/fog/network/proxmox/models/networks.rb +54 -0
  149. data/lib/fog/network/proxmox/models/node.rb +70 -0
  150. data/lib/fog/network/proxmox/models/nodes.rb +45 -0
  151. data/lib/fog/network/proxmox/requests/create_network.rb +44 -0
  152. data/lib/fog/network/proxmox/requests/delete_network.rb +45 -0
  153. data/lib/fog/network/proxmox/requests/get_network.rb +46 -0
  154. data/lib/fog/network/proxmox/requests/get_node.rb +44 -0
  155. data/lib/fog/network/proxmox/requests/list_networks.rb +43 -0
  156. data/lib/fog/network/proxmox/requests/list_nodes.rb +42 -0
  157. data/lib/fog/network/proxmox/requests/power_node.rb +46 -0
  158. data/lib/fog/network/proxmox/requests/update_network.rb +46 -0
  159. data/lib/fog/proxmox.rb +128 -0
  160. data/lib/fog/proxmox/core.rb +139 -0
  161. data/lib/fog/proxmox/errors.rb +64 -0
  162. data/lib/fog/proxmox/hash.rb +33 -0
  163. data/lib/fog/proxmox/helpers/controller_helper.rb +55 -0
  164. data/lib/fog/proxmox/helpers/cpu_helper.rb +45 -0
  165. data/lib/fog/proxmox/helpers/disk_helper.rb +84 -0
  166. data/lib/fog/proxmox/helpers/nic_helper.rb +62 -0
  167. data/lib/fog/proxmox/json.rb +32 -0
  168. data/lib/fog/proxmox/models/collection.rb +85 -0
  169. data/lib/fog/proxmox/models/model.rb +58 -0
  170. data/lib/fog/proxmox/variables.rb +40 -0
  171. data/lib/fog/proxmox/version.rb +24 -0
  172. data/lib/fog/storage/proxmox.rb +29 -0
  173. data/spec/compute_spec.rb +408 -0
  174. data/spec/fixtures/proxmox/compute/containers.yml +5398 -0
  175. data/spec/fixtures/proxmox/compute/identity_ticket.yml +40 -0
  176. data/spec/fixtures/proxmox/compute/servers.yml +10571 -0
  177. data/spec/fixtures/proxmox/compute/snapshots.yml +1228 -0
  178. data/spec/fixtures/proxmox/compute/storages.yml +120 -0
  179. data/spec/fixtures/proxmox/compute/tasks.yml +200 -0
  180. data/spec/fixtures/proxmox/identity/auth.yml +44 -0
  181. data/spec/fixtures/proxmox/identity/domains.yml +531 -0
  182. data/spec/fixtures/proxmox/identity/groups.yml +324 -0
  183. data/spec/fixtures/proxmox/identity/identity_ticket.yml +40 -0
  184. data/spec/fixtures/proxmox/identity/permissions.yml +565 -0
  185. data/spec/fixtures/proxmox/identity/pools.yml +488 -0
  186. data/spec/fixtures/proxmox/identity/read_version.yml +42 -0
  187. data/spec/fixtures/proxmox/identity/roles.yml +324 -0
  188. data/spec/fixtures/proxmox/identity/users.yml +646 -0
  189. data/spec/fixtures/proxmox/network/identity_ticket.yml +40 -0
  190. data/spec/fixtures/proxmox/network/networks.yml +413 -0
  191. data/spec/helpers/controller_helper_spec.rb +77 -0
  192. data/spec/helpers/cpu_helper_spec.rb +91 -0
  193. data/spec/helpers/disk_helper_spec.rb +104 -0
  194. data/spec/helpers/nic_helper_spec.rb +73 -0
  195. data/spec/identity_spec.rb +316 -0
  196. data/spec/network_spec.rb +67 -0
  197. data/spec/proxmox_vcr.rb +102 -0
  198. data/spec/spec_helper.rb +39 -0
  199. metadata +535 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 27e56a4d2d987cf9f1c2b3f32e029d21c4ed10eb
4
+ data.tar.gz: ae9e2df54951e280bc7b587469d7b582686b9e84
5
+ SHA512:
6
+ metadata.gz: 14a71f0529b409f2a651eebbeb4a744271187bd6a4ab8106dc96f75783c937cb01cd1635f3e02ac147ffbb1cd70766c9064bb44ba62109a2742c4dd090e88007
7
+ data.tar.gz: 29969e9902412c88cdb8c9690f63095e4aab152d51eccdb1f7600f00e8ce273c9223be00c39b70b8b70e439e3466c23b2a28f3048ecc469b22b44f17133f46ef
data/.bundle/config ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ BUNDLE_BIN: "bin"
3
+ BUNDLE_PATH: "vendor/bundle"
4
+ BUNDLE_CACHE_ALL: "true"
data/.codeclimate.yml ADDED
@@ -0,0 +1,14 @@
1
+ ---
2
+ version: "2"
3
+ plugins:
4
+ rubocop:
5
+ enabled: true
6
+ reek:
7
+ enabled: true
8
+ exclude_patterns:
9
+ - "tests/"
10
+ - "spec/"
11
+ - "vendor/"
12
+ - "bin/"
13
+ - "coverage/"
14
+ - "examples/"
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+
5
+ ---
6
+
7
+ **Describe the bug**
8
+ A clear and concise description of what the bug is.
9
+
10
+ **To Reproduce**
11
+ Steps to reproduce the behavior:
12
+ 1. Go to '...'
13
+ 2. Click on '....'
14
+ 3. Scroll down to '....'
15
+ 4. See error
16
+
17
+ **Expected behavior**
18
+ A clear and concise description of what you expected to happen.
19
+
20
+ **Screenshots**
21
+ If applicable, add screenshots to help explain your problem.
22
+
23
+ **Desktop (please complete the following information):**
24
+ - OS: [e.g. iOS]
25
+ - Browser [e.g. chrome, safari]
26
+ - Version [e.g. 22]
27
+
28
+ **Smartphone (please complete the following information):**
29
+ - Device: [e.g. iPhone6]
30
+ - OS: [e.g. iOS8.1]
31
+ - Browser [e.g. stock browser, safari]
32
+ - Version [e.g. 22]
33
+
34
+ **Additional context**
35
+ Add any other context about the problem here.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+
5
+ ---
6
+
7
+ **Is your feature request related to a problem? Please describe.**
8
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
+
10
+ **Describe the solution you'd like**
11
+ A clear and concise description of what you want to happen.
12
+
13
+ **Describe alternatives you've considered**
14
+ A clear and concise description of any alternative solutions or features you've considered.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ vendor/
2
+ bin/
3
+ pkg/
4
+ spec/debug/
5
+ coverage/
data/.gitlab-ci.yml ADDED
@@ -0,0 +1,42 @@
1
+ dependency_scanning:
2
+ image: docker:stable
3
+ variables:
4
+ DOCKER_DRIVER: overlay2
5
+ allow_failure: true
6
+ services:
7
+ - docker:stable-dind
8
+ script:
9
+ - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
10
+ - docker run
11
+ --env DEP_SCAN_DISABLE_REMOTE_CHECKS="${DEP_SCAN_DISABLE_REMOTE_CHECKS:-false}"
12
+ --volume "$PWD:/code"
13
+ --volume /var/run/docker.sock:/var/run/docker.sock
14
+ "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$SP_VERSION" /code
15
+ artifacts:
16
+ paths: [gl-dependency-scanning-report.json]
17
+
18
+ rubocop:
19
+ script:
20
+ - bundle install --binstubs
21
+ - rubocop
22
+
23
+ test-ruby-2.3.7:
24
+ image: ruby:2.3.7
25
+ script:
26
+ - bundle install --binstubs
27
+ - bundle exec rake test
28
+ - bundle exec rake spec
29
+
30
+ test-ruby-2.4.4:
31
+ image: ruby:2.4.4
32
+ script:
33
+ - bundle install --binstubs
34
+ - bundle exec rake test
35
+ - bundle exec rake spec
36
+
37
+ test-ruby-2.5.1:
38
+ image: ruby:2.5.1
39
+ script:
40
+ - bundle install --binstubs
41
+ - bundle exec rake test
42
+ - bundle exec rake spec
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+ Include:
4
+ - '**/Rakefile'
5
+ Exclude:
6
+ - 'bin/**/*'
7
+ - 'vendor/**/*'
8
+ - 'coverage/**/*'
9
+ - '.bundle/**/*'
10
+ - '.vscode/**/*'
11
+ - '**/*.gemspec'
12
+ - 'Gemfile'
13
+ - 'spec/**/*'
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ fog-proxmox
data/.solargraph.yml ADDED
@@ -0,0 +1,10 @@
1
+ ---
2
+ include:
3
+ - "**/*.rb"
4
+ exclude:
5
+ - spec/**/*
6
+ - test/**/*
7
+ domains: []
8
+ required: []
9
+ plugins:
10
+ -runtime
data/.travis.yml ADDED
@@ -0,0 +1,26 @@
1
+ env:
2
+ global:
3
+ - CC_TEST_REPORTER_ID=1b8ec457c0c30f927f785b4a080eca5164140c5b84716f64809b5ce2f57f3554
4
+ - TASK=test
5
+ - TASK=spec
6
+ language: ruby
7
+ sudo: false
8
+ cache: bundler
9
+ rvm:
10
+ - 2.3.7
11
+ - 2.4.4
12
+ - 2.5.0
13
+ notifications:
14
+ email: false
15
+ slack:
16
+ secure: e79Y7mFzf+DwnQVg9kniuk9qwtWt1S+7iT8chNMPkugEdsgGt5vKsWvMd0fNmPGsmmHqTaVd4m8Xf4+CpR7nB4oG5pWADrKc4p/syPYWBl/MlC7U3W214oZG5U06hAyJIhpdsC3+ufGHcp3pWUS/SjCUTZgMlp5fNZSh/wzmZe2yWWheFObE2Zj/UAWw0g6WFCmO7ST44Yvy2jhECSIKT9l8ChWr1jXD3h9eDWDJmybySHzO7Tsf/l0gMy92TzqZpjcrPHZsDs+BfVRMucHuO2D72t3WgyJzoVUolYs2nboDUm2IbWzx7Ut/RuvdlG6wv98BJmImzt4ickIZPNzxus56bFHsJQMZ0wSsJR/rAfzwuXqyLd2gQBuSmS352q4w7h4WAVH+i9xhcR5VIazS9tLLGYHEQ7Df/K4fN9+qnOAg+ngDaUU26ChmfsgjXc1fW+9ipzlg7L6OlUOkpypuOGGWKxz0K/gercyJy3DsHS9i1SstgiAEZJ3rJIUUgA9kynuCOEQ8Lv3YodZ+ezqB6HOtk6tZVBpZKDPkvHuapDZikKycvTvyNxD/BugfpRgMub6ac9Ub6aXC2S3xWbD8BHjGWZzRI21LYK6jWBuSu6r5ce2rXWACTWFQbRrNa5iWPXGiTd3sSRoGMZK9yrMdpWJfkhBPHf+6R7RMgiJ499M=
17
+ before_install:
18
+ - gem update --system
19
+ - gem update bundler
20
+ before_script:
21
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
22
+ - chmod +x ./cc-test-reporter
23
+ - "./cc-test-reporter before-build"
24
+ script: bundle exec rake $TASK
25
+ after_script:
26
+ - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
@@ -0,0 +1,114 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+
5
+ {
6
+ "name": "Debug Local File",
7
+ "type": "Ruby",
8
+ "request": "launch",
9
+ "cwd": "${workspaceRoot}",
10
+ "program": "${workspaceRoot}/main.rb",
11
+ "useBundler": true,
12
+ "pathToBundler": "/home/tristan/.rbenv/shims/bundler", // linux rbenv
13
+ "pathToRDebugIDE": "/home/tristan/.rbenv/shims/rdebug-ide",
14
+ },
15
+ {
16
+ "name": "Listen for rdebug-ide",
17
+ "type": "Ruby",
18
+ "request": "attach",
19
+ "cwd": "${workspaceRoot}",
20
+ "remoteHost": "127.0.0.1",
21
+ "remotePort": "1234",
22
+ "remoteWorkspaceRoot": "${workspaceRoot}"
23
+ },
24
+ {
25
+ "name": "Rails server",
26
+ "type": "Ruby",
27
+ "request": "launch",
28
+ "cwd": "${workspaceRoot}",
29
+ "program": "${workspaceRoot}/bin/rails",
30
+ "args": [
31
+ "server"
32
+ ]
33
+ },
34
+ {
35
+ "name": "RSpec - all",
36
+ "type": "Ruby",
37
+ "request": "launch",
38
+ "cwd": "${workspaceRoot}",
39
+ "program": "${workspaceRoot}/bin/rspec",
40
+ "useBundler": true,
41
+ "pathToBundler": "/home/tristan/.rbenv/shims/bundler", // linux rbenv
42
+ "pathToRDebugIDE": "/home/tristan/.rbenv/shims/rdebug-ide",
43
+ "showDebuggerOutput": true,
44
+ "env": {
45
+ "DISABLE_PROXY": true,
46
+ "SSL_VERIFY_PEER": false,
47
+ "USE_VCR": false,
48
+ "PVE_URL": "https://192.168.56.101:8006/api2/json",
49
+ "PVE_USERNAME": "root@pam",
50
+ "PVE_PASSWORD": "proxmox01"
51
+ },
52
+ "args": [
53
+ "-I",
54
+ "${workspaceRoot}"
55
+ ]
56
+ },
57
+ {
58
+ "name": "RSpec - active spec file only",
59
+ "type": "Ruby",
60
+ "request": "launch",
61
+ "cwd": "${workspaceRoot}",
62
+ "program": "${workspaceRoot}/bin/rspec",
63
+ "useBundler": true,
64
+ "pathToBundler": "/home/tristan/.rbenv/shims/bundler", // linux rbenv
65
+ "pathToRDebugIDE": "/home/tristan/.rbenv/shims/rdebug-ide",
66
+ "showDebuggerOutput": true,
67
+ "env": {
68
+ "DISABLE_PROXY": true,
69
+ "SSL_VERIFY_PEER": false,
70
+ "USE_VCR": false,
71
+ "PVE_URL": "https://192.168.56.101:8006/api2/json",
72
+ "PVE_USERNAME": "root@pam",
73
+ "PVE_PASSWORD": "proxmox01"
74
+ },
75
+ "args": [
76
+ "-I",
77
+ "${workspaceRoot}",
78
+ "${file}"
79
+ ]
80
+ },
81
+ {
82
+ "name": "bundle exec rake spec - all",
83
+ "type": "Ruby",
84
+ "request": "launch",
85
+ "cwd": "${workspaceRoot}",
86
+ "program": "${workspaceRoot}/bin/rake",
87
+ "useBundler": true,
88
+ "pathToBundler": "/home/tristan/.rbenv/shims/bundler", // linux rbenv
89
+ "pathToRDebugIDE": "/home/tristan/.rbenv/shims/rdebug-ide",
90
+ "showDebuggerOutput": true,
91
+ "env": {
92
+ "DISABLE_PROXY": true,
93
+ "SSL_VERIFY_PEER": false,
94
+ "USE_VCR": false,
95
+ "PVE_URL": "https://192.168.56.101:8006/api2/json",
96
+ "PVE_USERNAME": "root@pam",
97
+ "PVE_PASSWORD": "proxmox01"
98
+ },
99
+ "args": [
100
+ "spec",
101
+ "-I",
102
+ "${workspaceRoot}",
103
+ "${file}"
104
+ ]
105
+ },
106
+ {
107
+ "name": "Cucumber",
108
+ "type": "Ruby",
109
+ "request": "launch",
110
+ "cwd": "${workspaceRoot}",
111
+ "program": "${workspaceRoot}/bin/cucumber"
112
+ }
113
+ ]
114
+ }
@@ -0,0 +1,45 @@
1
+ // Placez vos paramètres dans ce fichier pour remplacer les paramètres par défaut et les paramètres utilisateur.
2
+ {
3
+ "ruby.pathToBundler": "/home/tristan/.rbenv/shims/bundle",
4
+ "ruby.useBundler": true,
5
+ "solargraph.commandPath": "/home/tristan/.rbenv/shims/solargraph",
6
+ "solargraph.bundlerPath": "/home/tristan/.rbenv/shims/bundle",
7
+ "workbench.startupEditor": "newUntitledFile",
8
+ "workbench.iconTheme": "vscode-icons",
9
+ "git.autofetch": true,
10
+ "git.confirmSync": false,
11
+ "workbench.colorTheme": "Visual Studio Dark",
12
+ "solargraph.useBundler": true,
13
+ "ruby.lint": {
14
+ "reek": true,
15
+ "rubocop": {
16
+ "lint": true, //enable all lint cops.
17
+ "rails": true //Run extra rails cops
18
+ },
19
+ "ruby": true, //Runs ruby -wc
20
+ "fasterer": true,
21
+ "debride": true,
22
+ "ruby-lint": false
23
+ },
24
+ "ruby.locate": {
25
+ "include": "**/*.erb,**/*.rb,**/vendor/*.*",
26
+ "exclude": "{**/@(test|spec|tmp|.*),**/@(test|spec|tmp|.*)/**,**/*_spec.rb}"
27
+ },
28
+ "ruby.interpreter.commandPath": "/home/tristan/.rbenv/shims/ruby",
29
+ "ruby.pathToBundler": "/home/tristan/.rbenv/shims/bundle",
30
+ "ruby.useBundler": true,
31
+ "solargraph.commandPath": "/home/tristan/.rbenv/shims/solargraph",
32
+ "solargraph.bundlerPath": "/home/tristan/.rbenv/shims/bundle",
33
+ "gitlens.advanced.messages": {
34
+ "suppressCommitHasNoPreviousCommitWarning": false,
35
+ "suppressCommitNotFoundWarning": false,
36
+ "suppressFileNotUnderSourceControlWarning": false,
37
+ "suppressGitVersionWarning": false,
38
+ "suppressLineUncommittedWarning": false,
39
+ "suppressNoRepositoryWarning": false,
40
+ "suppressResultsExplorerNotice": false,
41
+ "suppressShowKeyBindingsNotice": true
42
+ },
43
+ "explorer.confirmDragAndDrop": false,
44
+ "ruby.format": "rubocop"
45
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+ // for the documentation about the tasks.json format
4
+ "version": "2.0.0",
5
+ "command": "bundler",
6
+ "args": ["exec"],
7
+ "echoCommand": true,
8
+ "tasks": [
9
+ {
10
+ "taskName": "echo",
11
+ "type": "shell",
12
+ "command": "echo Hello"
13
+ },
14
+ {
15
+ "taskName": "Run Script",
16
+ "args": ["ruby", "${file}"]
17
+ },
18
+ {
19
+ "taskName": "Exec",
20
+ "args": ["ruby", "main.rb"]
21
+ },
22
+ {
23
+ "taskName": "Test",
24
+ "args": ["rspec"]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team leader. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/