Sha256: b785ab0dc6dfb69de769391384e789a8a8292433ec1addb61c3ffb6251e04f77

Contents?: true

Size: 898 Bytes

Versions: 15

Compression:

Stored size: 898 Bytes

Contents

desc 'Setup your GitHub account'
command :setup do |c|
  c.desc 'sets up your api token with GitHub'
  c.switch [:l, :local], default_value: false, desc: 'setup GitReflow for the current project only'
  c.switch [:e, :enterprise], default_value: false, desc: 'setup GitReflow with a Github Enterprise account'
  c.action do |global_options, options, args|
    reflow_options = { project_only: options[:local], enterprise: options[:enterprise] }
    choose do |menu|
      menu.header = "Available remote Git Server services:"
      menu.prompt = "Which service would you like to use for this project?  "

      menu.choice('GitHub')    { GitReflow::GitServer.connect reflow_options.merge({ provider: 'GitHub', silent: false }) }
      menu.choice('BitBucket (team-owned repos only)') { GitReflow::GitServer.connect reflow_options.merge({ provider: 'BitBucket', silent: false }) }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
git_reflow-0.7.2 lib/git_reflow/commands/setup.rb
git_reflow-0.7.1 lib/git_reflow/commands/setup.rb
git_reflow-0.7.0 lib/git_reflow/commands/setup.rb
git_reflow-0.6.7 lib/git_reflow/commands/setup.rb
git_reflow-0.6.6 lib/git_reflow/commands/setup.rb
git_reflow-0.6.5 lib/git_reflow/commands/setup.rb
git_reflow-0.6.4 lib/git_reflow/commands/setup.rb
git_reflow-0.6.3 lib/git_reflow/commands/setup.rb
git_reflow-0.6.2 lib/git_reflow/commands/setup.rb
git_reflow-0.6.1 lib/git_reflow/commands/setup.rb
git_reflow-0.6.0 lib/git_reflow/commands/setup.rb
git_reflow-0.5.3 lib/git_reflow/commands/setup.rb
git_reflow-0.5.2 lib/git_reflow/commands/setup.rb
git_reflow-0.5.1 lib/git_reflow/commands/setup.rb
git_reflow-0.5.0 lib/git_reflow/commands/setup.rb