class Sem::CLI::Projects
Public Instance Methods
create(project_name)
click to toggle source
# File lib/sem/cli/projects.rb, line 62 def create(project_name) url = Sem::Helpers::GitUrl.new(options[:url]) abort "Git URL #{options[:url]} is invalid." unless url.valid? args = { :repo_provider => url.repo_provider, :repo_owner => url.repo_owner, :repo_name => url.repo_name } project = Sem::API::Project.create!(project_name, args) Sem::Views::Projects.info(project) end
info(project_name)
click to toggle source
# File lib/sem/cli/projects.rb, line 33 def info(project_name) project = Sem::API::Project.find!(project_name) Sem::Views::Projects.info(project) end
list()
click to toggle source
# File lib/sem/cli/projects.rb, line 13 def list projects = Sem::API::Project.all if !projects.empty? Sem::Views::Projects.list(projects) else Sem::Views::Projects.setup_first_project end end