Module: JIRADiff

Defined in:
lib/jira_diff.rb,
lib/jira_diff/git.rb,
lib/jira_diff/story.rb,
lib/jira_diff/globals.rb,
lib/jira_diff/options.rb,
lib/jira_diff/stories.rb

Defined Under Namespace

Classes: Git, OptParse, Stories, Story

Constant Summary collapse

PROGRAM_NAME =
"JIRADiff"
VERSION =
"0.2.3"

Class Method Summary collapse

Class Method Details

.not_implemented(feature) ⇒ Object



6
7
8
9
# File 'lib/jira_diff.rb', line 6

def self.not_implemented(feature)
  puts "Sorry, #{feature} has not yet been implemented"
  exit 2
end

.run!Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/jira_diff.rb', line 11

def self.run!
  begin
    opts = OptParse.parse ARGV
  rescue => error
    puts error
    exit 1
  end

  puts opts.inspect if opts.debug

  begin
    puts 'Searching for stories...' if opts.verbose
    stories = Stories.new(opts)
  rescue RuntimeError => error
    puts error
    exit 1
  end

  if opts.verbose
    puts "From #{stories.directory}"
    puts "-> All stories from #{stories.source.join(', ')}"
    puts "-> Which are not in #{stories.master}"
    stories.diff.each do |story|
      puts "%-120.120s" % story.to_s
    end
  else
    puts stories.diff.shas
  end

end