yadecli 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +13 -0
  4. data/.rspec +3 -0
  5. data/.travis.yml +7 -0
  6. data/CODE_OF_CONDUCT.md +74 -0
  7. data/Gemfile +6 -0
  8. data/Gemfile.lock +172 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +43 -0
  11. data/Rakefile +13 -0
  12. data/bin/yadecli +10 -0
  13. data/config-example.yml +14 -0
  14. data/lib/.DS_Store +0 -0
  15. data/lib/yadecli/.DS_Store +0 -0
  16. data/lib/yadecli/cli/application.rb +40 -0
  17. data/lib/yadecli/cli/composer.rb +68 -0
  18. data/lib/yadecli/cli/host.rb +28 -0
  19. data/lib/yadecli/cli/module.rb +24 -0
  20. data/lib/yadecli/cli/project.rb +42 -0
  21. data/lib/yadecli/cli/task.rb +21 -0
  22. data/lib/yadecli/client/authentication_client.rb +24 -0
  23. data/lib/yadecli/client/base_client.rb +78 -0
  24. data/lib/yadecli/client/composer_container_client.rb +27 -0
  25. data/lib/yadecli/client/composer_project_client.rb +27 -0
  26. data/lib/yadecli/client/composer_service_client.rb +27 -0
  27. data/lib/yadecli/client/domain_client.rb +23 -0
  28. data/lib/yadecli/client/host_client.rb +45 -0
  29. data/lib/yadecli/client/maven_build_step_client.rb +23 -0
  30. data/lib/yadecli/client/maven_build_task_client.rb +23 -0
  31. data/lib/yadecli/client/nvm_runtime_client.rb +23 -0
  32. data/lib/yadecli/client/project_client.rb +28 -0
  33. data/lib/yadecli/client/project_module_client.rb +35 -0
  34. data/lib/yadecli/client/pyenv_runtime_client.rb +23 -0
  35. data/lib/yadecli/client/role_client.rb +23 -0
  36. data/lib/yadecli/client/rvm_runtime_client.rb +23 -0
  37. data/lib/yadecli/client/sdk_package_client.rb +28 -0
  38. data/lib/yadecli/client/vcs_client.rb +23 -0
  39. data/lib/yadecli/config/app_config.rb +69 -0
  40. data/lib/yadecli/io/user_input.rb +21 -0
  41. data/lib/yadecli/model/composer_container.rb +19 -0
  42. data/lib/yadecli/model/composer_project.rb +30 -0
  43. data/lib/yadecli/model/composer_service.rb +19 -0
  44. data/lib/yadecli/model/domain.rb +24 -0
  45. data/lib/yadecli/model/git_status.rb +8 -0
  46. data/lib/yadecli/model/host.rb +24 -0
  47. data/lib/yadecli/model/ide_type.rb +7 -0
  48. data/lib/yadecli/model/installation_status.rb +7 -0
  49. data/lib/yadecli/model/maven_build_step.rb +19 -0
  50. data/lib/yadecli/model/maven_build_task.rb +19 -0
  51. data/lib/yadecli/model/nvm_runtime.rb +18 -0
  52. data/lib/yadecli/model/project.rb +26 -0
  53. data/lib/yadecli/model/project_module.rb +29 -0
  54. data/lib/yadecli/model/pyenv_runtime.rb +18 -0
  55. data/lib/yadecli/model/role.rb +24 -0
  56. data/lib/yadecli/model/rvm_runtime.rb +18 -0
  57. data/lib/yadecli/model/sdk_package.rb +18 -0
  58. data/lib/yadecli/model/vcs.rb +19 -0
  59. data/lib/yadecli/service/authentication_service.rb +31 -0
  60. data/lib/yadecli/service/build_step_service.rb +24 -0
  61. data/lib/yadecli/service/build_task_service.rb +70 -0
  62. data/lib/yadecli/service/composer_service.rb +395 -0
  63. data/lib/yadecli/service/connect_service.rb +19 -0
  64. data/lib/yadecli/service/host_service.rb +191 -0
  65. data/lib/yadecli/service/module_service.rb +78 -0
  66. data/lib/yadecli/service/project_service.rb +198 -0
  67. data/lib/yadecli/util/cli_util.rb +22 -0
  68. data/lib/yadecli/util/file_util.rb +46 -0
  69. data/lib/yadecli/util/nvm_util.rb +14 -0
  70. data/lib/yadecli/util/pyenv_util.rb +14 -0
  71. data/lib/yadecli/util/rvm_util.rb +38 -0
  72. data/lib/yadecli/util/sdk_util.rb +23 -0
  73. data/lib/yadecli/util/system_util.rb +22 -0
  74. data/lib/yadecli/version.rb +3 -0
  75. data/lib/yadecli.rb +69 -0
  76. data/scripts/nvm-install-node.sh +6 -0
  77. data/scripts/rvm-gemset-import.sh +8 -0
  78. data/scripts/rvm-install-ruby.sh +6 -0
  79. data/scripts/sdk-install-candidate.sh +6 -0
  80. data/scripts/setup-terminal.sh +3 -0
  81. data/scripts/start-ide.sh +3 -0
  82. data/yadecli.gemspec +55 -0
  83. metadata +379 -0
@@ -0,0 +1,198 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tty-table'
4
+ require 'tty-prompt'
5
+ require 'colorize'
6
+
7
+ # yadecli cli
8
+ module Yadecli
9
+ module Service
10
+
11
+ # project
12
+ class ProjectService
13
+
14
+ def initialize
15
+ @project_client = Yadecli::Client::ProjectClient.new
16
+ @vcs_client = Yadecli::Client::VcsClient.new
17
+ @module_client = Yadecli::Client::ProjectModuleClient.new
18
+ @sdk_package_client = Yadecli::Client::SdkPackageClient.new
19
+ @rvm_runtime_client = Yadecli::Client::RvmRuntimeClient.new
20
+ @nvm_runtime_client = Yadecli::Client::NvmRuntimeClient.new
21
+ @pyenv_runtime_client = Yadecli::Client::PyenvRuntimeClient.new
22
+ end
23
+
24
+ def list
25
+ CliUtil.print_header'YadeCli Projects', ['This are the available Yade projects', '']
26
+
27
+ projects = @project_client.list
28
+
29
+ projects.each do |p|
30
+ puts "Project: #{p.name}".colorize(mode: :bold)
31
+
32
+ project_modules = @module_client.modules_for_project(p.id)
33
+
34
+ rows = []
35
+ project_modules.each do |m|
36
+ module_name = m.name
37
+ is_installed = m.installed?
38
+ git_status = '-'
39
+ git_status = FileUtil.git_status(m.home) if is_installed
40
+ rows << [module_name, is_installed, git_status]
41
+ end
42
+ table = TTY::Table.new header: ['Module name', 'Installed', 'Git Status'], rows: rows
43
+ puts table.render(:ascii, padding: [0, 1])
44
+ puts ''
45
+ end
46
+
47
+ puts 'You can run \'yadecli project install <project_name>\' to install a project'
48
+ puts ''
49
+ puts 'You can run \'yadecli module install <project_name> <module_name>\' to install a module to a project'
50
+ puts ''
51
+ end
52
+
53
+ # install a project
54
+ def install(project_name, options)
55
+ CliUtil.print_header'YadeCli Install Project',
56
+ ["Going to install Yade project #{project_name}", '']
57
+
58
+ project = @project_client.project_by_name(project_name)
59
+ vcs = @vcs_client.get(project.vcsId)
60
+
61
+ if project.installed?
62
+ puts "The project with name #{project_name} is already installed"
63
+
64
+ if options[:yes]
65
+ do_update = true
66
+ else
67
+ puts ''
68
+ prompt = TTY::Prompt.new
69
+ do_update = prompt.yes?('Do you want to pull the changes for the project? ')
70
+ end
71
+ end
72
+
73
+ cmd = TTY::Command.new(output: Yadecli.LOGGER)
74
+
75
+ if do_update
76
+ cmd_line = 'git pull'
77
+
78
+ cmd.run(cmd_line, chdir: project.home)
79
+
80
+ puts ''
81
+ puts "Yade project #{project.name} successfully pulled in #{project.home}"
82
+ else
83
+ cmd_line = "git clone #{vcs.url} #{project.home}"
84
+
85
+ cmd.run(cmd_line)
86
+
87
+ puts "Yade project #{project.name} successfully installed to #{project.home}"
88
+ end
89
+
90
+ puts ''
91
+ end
92
+
93
+ # uninstall a project
94
+ def uninstall(project_name, options)
95
+ CliUtil.print_header'YadeCli Uninstall Project',
96
+ ["Going to uninstall Yade project #{project_name}", '']
97
+
98
+ project = @project_client.project_by_name(project_name)
99
+
100
+ unless project.installed?
101
+ puts "The project with name #{project_name} is not installed"
102
+ exit 1
103
+ end
104
+
105
+ if options[:yes]
106
+ really_uninstall = true
107
+ else
108
+ prompt = TTY::Prompt.new
109
+ really_uninstall = prompt.yes?("Do you really want to uninstall the project #{project.name} and all it's modules? ")
110
+ end
111
+
112
+ FileUtils.rm_rf(project.home) if really_uninstall
113
+
114
+ puts ''
115
+ puts "Yade project #{project.name} successfully uninstalled from #{project.home}"
116
+ end
117
+
118
+ # setup a project
119
+ def setup(project_name, options)
120
+ CliUtil.print_header'YadeCli Project Setup',
121
+ ["Going to setup Yade Project #{project_name}"]
122
+
123
+ project = @project_client.project_by_name(project_name)
124
+
125
+ sdk_packages = @sdk_package_client.sdk_packages_for_project(project.id)
126
+
127
+ # sdk
128
+ puts ''
129
+ puts 'Setup sdk packages:'.colorize(:mode => :bold)
130
+ sdk_packages.each do |sdkp|
131
+ SdkUtil.install_candidate(sdkp.name, sdkp.version)
132
+ end
133
+
134
+ # rvm
135
+ rvm_runtime = @rvm_runtime_client.get(project.id)
136
+ RvmUtil.setup_rvm(project, rvm_runtime)
137
+
138
+ # nvm
139
+ nvm_runtime = @nvm_runtime_client.get(project.id)
140
+ NvmUtil.setup_nvm(project, nvm_runtime)
141
+
142
+ # pyenv
143
+ pyenv_runtime = @pyenv_runtime_client.get(project.id)
144
+ PyenvUtil.setup_pyenv(project, pyenv_runtime)
145
+
146
+ end
147
+
148
+ # start a project
149
+ def start(project_name, options)
150
+ CliUtil.print_header'YadeCli Project Start',['Going to start Yade Project']
151
+
152
+ project = @project_client.project_by_name(project_name)
153
+
154
+ puts " ↳ Name: #{project.name}"
155
+ puts " ↳ Home: #{project.home}"
156
+
157
+ prompt = TTY::Prompt.new
158
+
159
+ ide_name = if project.ideType == 'IDEA'
160
+ 'Intellij Idea'
161
+ elsif project.ideType == 'RUBYMINE'
162
+ 'Intellij Rubymine'
163
+ else
164
+ 'Unknown'
165
+ end
166
+
167
+ puts ''
168
+ answer = prompt.select('What do you want to do?'.colorize(mode: :bold)) do |menu|
169
+ menu.choice '1) Multiplexer Terminal setup', 1
170
+ if ide_name == 'Unknown'
171
+ menu.choice "2) Start IDE #{ide_name}", 2, disabled: '(n.a.)'
172
+ else
173
+ menu.choice "2) Start IDE #{ide_name}", 2
174
+ end
175
+ menu.choice '3) Start Editor', 3
176
+ menu.choice '4) Quit', 4
177
+ end
178
+
179
+ case answer
180
+ when 1
181
+ puts "111"
182
+ when 2
183
+ puts "Going to start IDE #{ide_name}"
184
+ cmd = TTY::Command.new
185
+
186
+ script_path = FileUtil.script_path('start-ide.sh')
187
+
188
+ cmd.run("#{script_path} #{project.home}/src")
189
+ when 3
190
+ puts "333"
191
+ else
192
+ puts "Unknown"
193
+ end
194
+ end
195
+
196
+ end
197
+ end
198
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'colorize'
4
+ require 'artii'
5
+
6
+ # cli util
7
+ class CliUtil
8
+ # all methods in this block are static
9
+ class << self
10
+
11
+ # print header and subtitle(s)
12
+ def print_header(title, subtitles)
13
+ a = Artii::Base.new
14
+ puts a.asciify(title).colorize(:color => :green, :mode => :bold)
15
+ subtitles.each { |s| puts s.colorize(:green) } unless subtitles.nil? || subtitles.empty?
16
+ end
17
+
18
+ def check_root
19
+ Process.uid.zero?
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'colorize'
4
+ require 'artii'
5
+ require 'tty-command'
6
+
7
+ # cli util
8
+ class FileUtil
9
+ # all methods in this block are static
10
+ class << self
11
+
12
+ # git status
13
+ def git_status(dir)
14
+ cmd = TTY::Command.new(output: Yadecli.LOGGER)
15
+
16
+ out, err = cmd.run('git fetch', chdir: dir)
17
+ out, err = cmd.run('git status -uno', chdir: dir)
18
+
19
+ if out.include? 'Your branch is ahead'
20
+ GitStatus::NEEDS_PUSH
21
+ elsif out.include? 'Your branch is behind'
22
+ GitStatus::NEEDS_PULL
23
+ else
24
+ GitStatus::UP_TO_DATE
25
+ end
26
+ end
27
+
28
+ def git_current_branch(dir)
29
+ cmd = TTY::Command.new(output: Yadecli.LOGGER)
30
+ out, err = cmd.run('git rev-parse --abbrev-ref HEAD', chdir: dir)
31
+
32
+ out.chomp
33
+ end
34
+
35
+ # scripts dir
36
+ def script_dir
37
+ script_dir = File.join(File.dirname(File.expand_path(__FILE__)), '../../../scripts')
38
+
39
+ script_dir
40
+ end
41
+
42
+ def script_path(script_name)
43
+ "#{script_dir}/#{script_name}"
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # rvm util
4
+ class NvmUtil
5
+
6
+ def self.setup_nvm(project, nvm_runtime)
7
+ puts ''
8
+ puts 'Setup nvm:'.colorize(:mode => :bold)
9
+
10
+ # .nvmrc
11
+ puts " ↳ Create .nvmrc with #{nvm_runtime.version}"
12
+ File.open("#{project.home}/.nvmrc", 'w') { |f| f.write(nvm_runtime.version) }
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ # rvm util
4
+ class PyenvUtil
5
+
6
+ def self.setup_pyenv(project, pyenv_runtime)
7
+ puts ''
8
+ puts 'Setup pyenv:'.colorize(:mode => :bold)
9
+
10
+ # .pyenv-version
11
+ puts " ↳ Create .pyenv-version with #{pyenv_runtime.version}"
12
+ File.open("#{project.home}/.pyenv-version", 'w') { |f| f.write(pyenv_runtime.version) }
13
+ end
14
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ # rvm util
4
+ class RvmUtil
5
+
6
+ def self.setup_rvm(project, rvm_runtime)
7
+
8
+ puts ''
9
+ puts 'Setup rvm:'.colorize(:mode => :bold)
10
+
11
+ # .ruby-version
12
+ puts " ↳ Create .ruby-version with #{rvm_runtime.version}"
13
+ File.open("#{project.home}/.ruby-version", 'w') { |f| f.write(rvm_runtime.version) }
14
+
15
+ # .ruby-gemset
16
+ puts " ↳ Create .ruby-gemset with #{project.name}"
17
+ File.open("#{project.home}/.ruby-gemset", 'w') { |f| f.write(project.name) }
18
+
19
+ # .gems
20
+ puts " ↳ Create .gems with #{rvm_runtime.packages}"
21
+ File.open("#{project.home}/.gems", 'w') do |f|
22
+ rvm_runtime.packages.split(',').each do |p|
23
+ f.puts(p.strip! || p)
24
+ end
25
+ end
26
+
27
+ # rvm gemset import
28
+ # puts ''
29
+ # puts 'Import gemset from .gems file.'.colorize(:mode => :bold)
30
+ #
31
+ # cmd = TTY::Command.new(output: Yadecli.LOGGER)
32
+ #
33
+ # script_path = FileUtil.script_path('rvm-gemset-import.sh')
34
+ # cmdline = "#{script_path} #{project.home}"
35
+ #
36
+ # cmd.run(cmdline)
37
+ end
38
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ # sdk util
4
+ class SdkUtil
5
+
6
+ def self.install_candidate(candidate, version)
7
+ sdkman_home = "#{File.expand_path('~')}/.sdkman"
8
+
9
+ if File.directory?("#{sdkman_home}/candidates/#{candidate}/#{version}")
10
+ puts " ↳ SKIPPED install sdk candidate #{candidate} with version #{version} because it already exists."
11
+ else
12
+ cmd = TTY::Command.new
13
+ puts " ↳ Install sdk candidate #{candidate} with version #{version} because it already exists."
14
+ script_path = FileUtil.script_path('sdk-install-candidate.sh')
15
+ cmdline = "#{script_path} #{candidate} #{version}"
16
+ cmd.run(cmdline) do |out, err|
17
+ puts out if out
18
+ puts err if err
19
+ end
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # system util
4
+ class SystemUtil
5
+
6
+ def self.os
7
+ host_os = RbConfig::CONFIG['host_os']
8
+ case host_os
9
+ when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
10
+ return :windows
11
+ when /darwin|mac os/
12
+ return :macosx
13
+ when /linux/
14
+ return :linux
15
+ when /solaris|bsd/
16
+ return :unix
17
+ else
18
+ raise Error, "unknown os: #{host_os.inspect}"
19
+ end
20
+ end
21
+
22
+ end
@@ -0,0 +1,3 @@
1
+ module Yadecli
2
+ VERSION = '0.1.1'
3
+ end
data/lib/yadecli.rb ADDED
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yadecli/version'
4
+ require 'yadecli/config/app_config'
5
+ require 'yadecli/model/project'
6
+ require 'yadecli/model/project_module'
7
+ require 'yadecli/model/host'
8
+ require 'yadecli/model/domain'
9
+ require 'yadecli/model/role'
10
+ require 'yadecli/model/vcs'
11
+ require 'yadecli/model/composer_project'
12
+ require 'yadecli/model/composer_service'
13
+ require 'yadecli/model/composer_container'
14
+ require 'yadecli/model/maven_build_task'
15
+ require 'yadecli/model/maven_build_step'
16
+ require 'yadecli/model/sdk_package'
17
+ require 'yadecli/model/rvm_runtime'
18
+ require 'yadecli/model/nvm_runtime'
19
+ require 'yadecli/model/pyenv_runtime'
20
+ require 'yadecli/model/ide_type'
21
+ require 'yadecli/model/installation_status'
22
+ require 'yadecli/model/git_status'
23
+ require 'yadecli/util/cli_util'
24
+ require 'yadecli/util/file_util'
25
+ require 'yadecli/util/system_util'
26
+ require 'yadecli/util/sdk_util'
27
+ require 'yadecli/util/rvm_util'
28
+ require 'yadecli/util/nvm_util'
29
+ require 'yadecli/util/pyenv_util'
30
+ require 'yadecli/cli/host'
31
+ require 'yadecli/cli/composer'
32
+ require 'yadecli/cli/project'
33
+ require 'yadecli/cli/module'
34
+ require 'yadecli/cli/task'
35
+ require 'yadecli/cli/application'
36
+ require 'yadecli/client/authentication_client'
37
+ require 'yadecli/client/project_client'
38
+ require 'yadecli/client/project_module_client'
39
+ require 'yadecli/client/host_client'
40
+ require 'yadecli/client/domain_client'
41
+ require 'yadecli/client/role_client'
42
+ require 'yadecli/client/vcs_client'
43
+ require 'yadecli/client/maven_build_task_client'
44
+ require 'yadecli/client/maven_build_step_client'
45
+ require 'yadecli/client/composer_project_client'
46
+ require 'yadecli/client/composer_service_client'
47
+ require 'yadecli/client/composer_container_client'
48
+ require 'yadecli/client/sdk_package_client'
49
+ require 'yadecli/client/rvm_runtime_client'
50
+ require 'yadecli/client/nvm_runtime_client'
51
+ require 'yadecli/client/pyenv_runtime_client'
52
+ require 'yadecli/service/connect_service'
53
+ require 'yadecli/service/authentication_service'
54
+ require 'yadecli/service/project_service'
55
+ require 'yadecli/service/module_service'
56
+ require 'yadecli/service/host_service'
57
+ require 'yadecli/service/build_task_service'
58
+ require 'yadecli/service/build_step_service'
59
+ require 'yadecli/service/composer_service'
60
+ require 'yadecli/io/user_input'
61
+
62
+ # yadecli
63
+ module Yadecli
64
+
65
+ def self.LOGGER
66
+ Logger.new("#{Dir.pwd}/yadecli.log")
67
+ end
68
+
69
+ end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+
3
+ export NVM_DIR="$HOME/.nvm"
4
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
5
+
6
+ nvm install $1
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+
3
+ export PATH="$PATH:$HOME/.rvm/bin"
4
+ [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
5
+
6
+ cd $1
7
+
8
+ rvm --debug gemset import
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+
3
+ export PATH="$PATH:$HOME/.rvm/bin"
4
+ [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
5
+
6
+ rvm install $1
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+
3
+ export SDKMAN_DIR="$HOME/.sdkman"
4
+ [[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"
5
+
6
+ sdk install $1 $2 < /dev/null
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ cd $1
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ idea $1
data/yadecli.gemspec ADDED
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'yadecli/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = 'yadecli'
9
+ spec.version = Yadecli::VERSION
10
+ spec.authors = ['Sebastian Freund']
11
+ spec.email = ['seba1403@gmail.com']
12
+
13
+ spec.summary = 'Commandline Util to manage development projects'
14
+ spec.description = 'Manage development project'
15
+ spec.homepage = 'https://gitlab.com/yadedev/yade-cli'
16
+ spec.license = 'MIT'
17
+
18
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
20
+ # if spec.respond_to?(:metadata)
21
+ # spec.metadata['allowed_push_host'] = 'TODO: Set to \'http://mygemserver.com\''
22
+ # else
23
+ # raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
24
+ # end
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
29
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
30
+ end
31
+ spec.bindir = 'bin'
32
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
33
+ spec.require_paths = ['lib', 'scripts']
34
+
35
+ spec.add_dependency 'activemodel', '~> 5.2'
36
+ spec.add_dependency 'artii', '~> 2.1'
37
+ spec.add_dependency 'colorize', '~> 0.8'
38
+ spec.add_dependency 'dotenv', '~> 2.5'
39
+ spec.add_dependency 'httparty', '~> 0.13'
40
+ spec.add_dependency 'net-ssh', '~> 5.0'
41
+ spec.add_dependency 'rest-client', '~> 2.0'
42
+ spec.add_dependency 'settingslogic', '~> 2.0'
43
+ spec.add_dependency 'thor', '~> 0.19'
44
+ spec.add_dependency 'tty-command', '~> 0.8'
45
+ spec.add_dependency 'tty-prompt', '~> 0.16'
46
+ spec.add_dependency 'tty-table', '~> 0.10'
47
+
48
+ spec.add_development_dependency 'aruba', '~> 0.14'
49
+ spec.add_development_dependency 'bundler', '~> 1.16'
50
+ spec.add_development_dependency 'rake', '~> 10.0'
51
+ spec.add_development_dependency 'rspec', '~> 3.0'
52
+ spec.add_development_dependency 'rspec-json_expectations', '~> 2.1'
53
+ spec.add_development_dependency 'rubocop', '~> 0.58.0'
54
+
55
+ end