yello 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1051e51b5c7018f72f7cb092742a3f9209f34a72
4
- data.tar.gz: bf719bb53b70f785ce1601d60ed589e846cb6b61
3
+ metadata.gz: 53f59f3ce6c8b7442b08df75a3cb3a09ba8ef971
4
+ data.tar.gz: 213ec88254c7f718d948d0d148971016d9a6991c
5
5
  SHA512:
6
- metadata.gz: 9017cb714d9f1dc14879c6975e4a9b177f623e4154cc6c0b8d89d19dd7eb5213729110acaecd6916b22cc9983f5ef59e96b9f15a0d1a8133320cbfa0ed7d3ef9
7
- data.tar.gz: ebec2bf06456e6203e1b9730ef487b191aaec3766538b3351a9201e5198c87b62e27221fff981356a714ffdc74c1a4e06809182fea4162197a4a9235223cda66
6
+ metadata.gz: cca7da0bbd202cd09b3967d0164e66b055f2dfd120d067e5a46f5d0321f7732884b08c58678e1d5d0100a25b6393bfbed3a78c043c8f32ae4e7b033c2d48c3d9
7
+ data.tar.gz: 52cb613d4bcb5512d8da150def556d7c98a4fdc38fbe21dba9da3fefe1f1c1a03d58735c7b77faadbe4add1612b6c1dd39b1f0fb62c86a691d8bcc9aa694b031
@@ -1,5 +1,5 @@
1
1
  require 'yello/trello'
2
- require 'yello/list'
2
+ require 'yello/model'
3
3
 
4
4
  module Yello
5
5
 
@@ -1,5 +1,5 @@
1
1
  require 'yaml'
2
- require 'yello/list'
2
+ require 'yello/model'
3
3
 
4
4
  module Yello
5
5
  class << self
File without changes
@@ -1,5 +1,4 @@
1
- require 'yello/base'
2
- require 'yello/checklist'
1
+ require 'yello/model/base'
3
2
 
4
3
  module Yello
5
4
  class Card < Base
@@ -1,4 +1,4 @@
1
- require 'yello/base'
1
+ require 'yello/model/base'
2
2
 
3
3
  module Yello
4
4
  class Checklist < Base
@@ -1,5 +1,4 @@
1
- require 'yello/base'
2
- require 'yello/card'
1
+ require 'yello/model/base'
3
2
 
4
3
  module Yello
5
4
  class List < Base
@@ -0,0 +1,3 @@
1
+ %w'list checklist card'.each do |f|
2
+ require "yello/model/#{f}"
3
+ end
data/lib/yello/to_yaml.rb CHANGED
@@ -27,14 +27,14 @@ module Yello
27
27
  end
28
28
 
29
29
  def card(c)
30
- if c.checklists && !c.checklists.empty?
31
- {
32
- c.name=>nil,
33
- 'desc'=>c.desc,
34
- 'checklists'=>c.checklists.map{|cl|checklist(cl)}
35
- }
30
+ hash = {c.name=>nil}.tap do |h|
31
+ h['desc'] = c.desc if c.desc
32
+ h['checklists'] = c.checklists.map{|cl|checklist(cl)} if c.checklists
33
+ end
34
+ if hash.size == 1
35
+ return c.name
36
36
  else
37
- c.name
37
+ return hash
38
38
  end
39
39
  end
40
40
 
data/lib/yello/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yello
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Shea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-23 00:00:00.000000000 Z
11
+ date: 2014-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -166,9 +166,6 @@ files:
166
166
  - bin/yello
167
167
  - lib/yello.rb
168
168
  - lib/yello/auth.rb
169
- - lib/yello/base.rb
170
- - lib/yello/card.rb
171
- - lib/yello/checklist.rb
172
169
  - lib/yello/cli.rb
173
170
  - lib/yello/cli/export.rb
174
171
  - lib/yello/cli/import.rb
@@ -176,7 +173,11 @@ files:
176
173
  - lib/yello/from_trello.rb
177
174
  - lib/yello/from_yaml.rb
178
175
  - lib/yello/import.rb
179
- - lib/yello/list.rb
176
+ - lib/yello/model.rb
177
+ - lib/yello/model/base.rb
178
+ - lib/yello/model/card.rb
179
+ - lib/yello/model/checklist.rb
180
+ - lib/yello/model/list.rb
180
181
  - lib/yello/to_yaml.rb
181
182
  - lib/yello/trello.rb
182
183
  - lib/yello/version.rb