sly 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/bin/sly +4 -4
  2. data/lib/sly/project.rb +13 -2
  3. data/lib/sly/version.rb +1 -1
  4. metadata +8 -2
data/bin/sly CHANGED
@@ -55,11 +55,11 @@ command :current do |c|
55
55
  end
56
56
  end
57
57
 
58
- desc 'Describe new here'
59
- arg_name 'Describe arguments to new here'
60
- command :new do |c|
58
+ desc 'Setup git to for the target story id'
59
+ arg_name :id, 'the item id of the story you wish to branch for'
60
+ command :branch do |c|
61
61
  c.action do |global_options,options,args|
62
- puts "new command ran"
62
+ Sly::Branch.for(args[0])
63
63
  end
64
64
  end
65
65
 
data/lib/sly/project.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'sly'
2
2
  require "yaml"
3
3
  require 'fileutils'
4
+ require 'rainbow'
4
5
 
5
6
  class Sly::Project
6
7
  include FileUtils
@@ -32,8 +33,13 @@ class Sly::Project
32
33
  end
33
34
 
34
35
  def update
35
- download_child_items
36
- save_child_items
36
+ begin
37
+ download_child_items
38
+ save_child_items
39
+ rescue Exception
40
+ puts " Failed to connect to the Sprint.ly service, using last known values. ".colour(:white).background(:red)
41
+ load_child_items
42
+ end
37
43
  end
38
44
 
39
45
  def backlog
@@ -60,4 +66,9 @@ class Sly::Project
60
66
  File.open(target_file, 'w') { |file| file.write @items.to_yaml }
61
67
  end
62
68
 
69
+ def load_child_items
70
+ target_file = File.join(pwd, '.sly', 'items')
71
+ @items = YAML::load(File.open(target_file))
72
+ end
73
+
63
74
  end
data/lib/sly/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sly
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-22 00:00:00.000000000 Z
12
+ date: 2013-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -178,12 +178,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
178
  - - ! '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ segments:
182
+ - 0
183
+ hash: 4149023213005059347
181
184
  required_rubygems_version: !ruby/object:Gem::Requirement
182
185
  none: false
183
186
  requirements:
184
187
  - - ! '>='
185
188
  - !ruby/object:Gem::Version
186
189
  version: '0'
190
+ segments:
191
+ - 0
192
+ hash: 4149023213005059347
187
193
  requirements: []
188
194
  rubyforge_project:
189
195
  rubygems_version: 1.8.25