cards 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +3 -3
- data/Rakefile +4 -37
- data/examples/importing into tracker api/generate_card_wall +1 -1
- data/examples/numbers to omnigraffle/generate_card_walls +7 -11
- data/lib/cards.rb +7 -1
- data/lib/cards/numbers_parser.rb +7 -8
- data/lib/cards/writers/graffle_writer.rb +2 -8
- data/spec/cards/numbers_parser_spec.rb +1 -1
- metadata +26 -10
- data/examples/importing into tracker api/Voting Example.numbers +0 -0
- data/examples/importing into tracker api/appscript_example.rb +0 -18
- data/examples/importing into tracker api/from_numbers_09 +0 -50
- data/examples/importing into tracker api/osa.rb +0 -39
data/README.txt
CHANGED
@@ -35,10 +35,10 @@ that might look something like :
|
|
35
35
|
|
36
36
|
== Contact
|
37
37
|
|
38
|
-
Author:: Jeremy
|
39
|
-
Email::
|
38
|
+
Author:: Jeremy Lightsmith
|
39
|
+
Email:: jeremy.lightsmith@gmail.com
|
40
40
|
License:: LGPL License
|
41
41
|
|
42
42
|
== Home Page
|
43
43
|
|
44
|
-
http://
|
44
|
+
http://github.com/jeremylightsmith/cards
|
data/Rakefile
CHANGED
@@ -1,23 +1,14 @@
|
|
1
|
-
ENV["FILE"] ||= "/Users/jeremy/Desktop/PunchList Master Story List/Card Wall-Card Wall.csv"
|
2
|
-
|
3
1
|
require 'rubygems'
|
4
2
|
gem "rspec"
|
5
3
|
gem "hoe"
|
6
4
|
|
7
5
|
require 'rake/clean'
|
8
|
-
require 'spec/rake/spectask'
|
9
6
|
require 'hoe'
|
10
7
|
|
11
8
|
require 'lib/cards'
|
12
9
|
|
13
10
|
desc "Default Task"
|
14
|
-
task :default => [:generate_manifest
|
15
|
-
|
16
|
-
task :test => :spec
|
17
|
-
|
18
|
-
Spec::Rake::SpecTask.new(:spec) do |t|
|
19
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
20
|
-
end
|
11
|
+
task :default => [:generate_manifest]
|
21
12
|
|
22
13
|
task :generate_manifest do
|
23
14
|
File.open("Manifest.txt", "w") do |f|
|
@@ -25,36 +16,12 @@ task :generate_manifest do
|
|
25
16
|
end
|
26
17
|
end
|
27
18
|
|
28
|
-
desc "export to dot file"
|
29
|
-
task :run_dot do
|
30
|
-
file = ENV["FILE"] || SAMPLE_FILE
|
31
|
-
file.as(:png).delete_if_exists
|
32
|
-
file.as(:dot).delete_if_exists
|
33
|
-
|
34
|
-
CardWall.convert(file, :dot, file.as(:dot))
|
35
|
-
|
36
|
-
"dot -Tpng #{file.as(:dot).no_spaces} > #{file.as(:png).no_spaces}".run
|
37
|
-
"open #{file.as(:png).no_spaces}".run if file.as(:png).exists?
|
38
|
-
end
|
39
|
-
|
40
|
-
desc "export to text"
|
41
|
-
task :run_text do
|
42
|
-
CardWall.convert(ENV["FILE"] || SAMPLE_FILE, :text)
|
43
|
-
end
|
44
|
-
|
45
|
-
desc "export to graffle"
|
46
|
-
task :run do
|
47
|
-
file = ENV["FILE"] || SAMPLE_FILE
|
48
|
-
file.as(:graffle).delete_if_exists
|
49
|
-
|
50
|
-
CardWall.convert(file, :graffle, file.as(:graffle))
|
51
|
-
end
|
52
|
-
|
53
19
|
Hoe.new('cards', Cards::VERSION) do |p|
|
54
20
|
p.rubyforge_name = 'cardwallgen'
|
55
21
|
p.summary = p.description = p.paragraphs_of('README.txt', 2).first
|
56
22
|
p.url = p.paragraphs_of('README.txt', -1).first.strip
|
57
|
-
p.author = 'Jeremy
|
58
|
-
p.email = '
|
23
|
+
p.author = 'Jeremy Lightsmith'
|
24
|
+
p.email = 'jeremy.lightsmith@gmail.com'
|
59
25
|
p.changes = p.paragraphs_of('CHANGES.txt', 0..2).join("\n\n")
|
26
|
+
p.extra_deps = ['rb-appscript','>= 0.5.1'], ['rest-client', '>= 0.9']
|
60
27
|
end
|
@@ -1,30 +1,26 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require
|
3
|
-
gem 'cards'
|
4
|
-
require 'cards'
|
5
|
-
require 'cards/numbers_parser'
|
6
|
-
include Cards
|
2
|
+
require File.dirname(__FILE__) + "/../../lib/cards"
|
7
3
|
|
8
4
|
# this requires numbers '09, before that you must export to csv and use the csv parser
|
9
5
|
|
10
6
|
def table(name)
|
11
7
|
file = File.dirname(__FILE__) + "/Voting Example.numbers"
|
12
|
-
NumbersParser.new(file, name)
|
8
|
+
Cards::NumbersParser.new(file, name)
|
13
9
|
end
|
14
10
|
|
15
|
-
CardWall.colors[:goal] = :green
|
16
|
-
CardWall.writer = GraffleWriter
|
11
|
+
Cards::CardWall.colors[:goal] = :green
|
12
|
+
Cards::CardWall.writer = Cards::GraffleWriter
|
17
13
|
|
18
|
-
CardWall.from table("Goals") do
|
14
|
+
Cards::CardWall.from table("Goals") do
|
19
15
|
column :goal
|
20
16
|
end
|
21
17
|
|
22
|
-
CardWall.from table("Workflow") do
|
18
|
+
Cards::CardWall.from table("Workflow") do
|
23
19
|
row :role
|
24
20
|
column :task, :wrap_at => 5
|
25
21
|
end
|
26
22
|
|
27
|
-
CardWall.from table("Stories") do
|
23
|
+
Cards::CardWall.from table("Stories") do
|
28
24
|
row :activity
|
29
25
|
row :task
|
30
26
|
column :story, :wrap_at => 4 do |card, row|
|
data/lib/cards.rb
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
|
2
2
|
|
3
|
+
# this is making this a mac only distro, I'm afraid
|
4
|
+
require 'rubygems'
|
5
|
+
gem 'rb-appscript'
|
6
|
+
require 'appscript'
|
7
|
+
|
3
8
|
require 'cards/extensions'
|
4
9
|
require 'cards/builder'
|
5
10
|
require 'cards/csv_parser'
|
11
|
+
require 'cards/numbers_parser'
|
6
12
|
|
7
13
|
require 'cards/card_wall'
|
8
14
|
# writers
|
@@ -15,5 +21,5 @@ require 'cards/master_story_list'
|
|
15
21
|
require 'cards/tracker_csv'
|
16
22
|
|
17
23
|
module Cards
|
18
|
-
VERSION = "0.9"
|
24
|
+
VERSION = "0.9.1"
|
19
25
|
end
|
data/lib/cards/numbers_parser.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'rbosa'
|
2
1
|
require 'cards/tabular_parser'
|
3
2
|
|
4
3
|
module Cards
|
@@ -10,14 +9,14 @@ module Cards
|
|
10
9
|
end
|
11
10
|
|
12
11
|
def each_unparsed_row
|
13
|
-
numbers =
|
12
|
+
numbers = Appscript.app('Numbers')
|
14
13
|
document = numbers.open(@file)
|
15
14
|
table = find_table(document, @table_name)
|
16
15
|
|
17
|
-
table.rows.each do |row|
|
16
|
+
table.rows.get.each do |row|
|
18
17
|
values = []
|
19
|
-
row.cells.map do |cell|
|
20
|
-
value = cell.value
|
18
|
+
row.cells.get.map do |cell|
|
19
|
+
value = cell.value.get
|
21
20
|
value = nil if value == 0
|
22
21
|
values << value
|
23
22
|
end
|
@@ -32,9 +31,9 @@ module Cards
|
|
32
31
|
private
|
33
32
|
|
34
33
|
def find_table(document, name)
|
35
|
-
document.sheets.each do |sheet|
|
36
|
-
sheet.tables.each do |table|
|
37
|
-
return table if table.name.downcase == name.downcase
|
34
|
+
document.sheets.get.each do |sheet|
|
35
|
+
sheet.tables.get.each do |table|
|
36
|
+
return table if table.name.get.downcase == name.downcase
|
38
37
|
end
|
39
38
|
end
|
40
39
|
raise "table #{name} not found in #{document.name}"
|
@@ -1,9 +1,3 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
gem 'rb-appscript'
|
3
|
-
gem 'rubyosa'
|
4
|
-
require 'appscript'
|
5
|
-
require 'rbosa'
|
6
|
-
|
7
1
|
module Cards
|
8
2
|
class GraffleWriter
|
9
3
|
CARD_WALL_STENCIL = File.expand_path(File.dirname(__FILE__) + "/CardWall.gstencil")
|
@@ -20,8 +14,8 @@ module Cards
|
|
20
14
|
|
21
15
|
attr_reader :app
|
22
16
|
|
23
|
-
def initialize(name = "Card Wall")
|
24
|
-
@app = Appscript.app(
|
17
|
+
def initialize(name = "Card Wall", omnigraffle_app = "OmniGraffle 4")
|
18
|
+
@app = Appscript.app(omnigraffle_app)
|
25
19
|
@doc = @app.documents[0]
|
26
20
|
puts "opening #{name}"
|
27
21
|
open_document(name)
|
metadata
CHANGED
@@ -1,17 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Jeremy
|
7
|
+
- Jeremy Lightsmith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-03-
|
12
|
+
date: 2009-03-06 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rb-appscript
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.5.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rest-client
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0.9"
|
34
|
+
version:
|
15
35
|
- !ruby/object:Gem::Dependency
|
16
36
|
name: hoe
|
17
37
|
type: :development
|
@@ -20,10 +40,10 @@ dependencies:
|
|
20
40
|
requirements:
|
21
41
|
- - ">="
|
22
42
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.
|
43
|
+
version: 1.9.0
|
24
44
|
version:
|
25
45
|
description: CardWallGen is a program that reads a requirements map and generates a view of it. Typically it reads it from excel or csv and generates a graphical view in visio or omnigraffle, though it may also generate another csv view of it.
|
26
|
-
email:
|
46
|
+
email: jeremy.lightsmith@gmail.com
|
27
47
|
executables: []
|
28
48
|
|
29
49
|
extensions: []
|
@@ -48,12 +68,8 @@ files:
|
|
48
68
|
- examples/excel to visio/readme.html
|
49
69
|
- examples/excel to visio/TPS-small.png
|
50
70
|
- examples/importing into tracker api
|
51
|
-
- examples/importing into tracker api/appscript_example.rb
|
52
|
-
- examples/importing into tracker api/from_numbers_09
|
53
71
|
- examples/importing into tracker api/generate_card_wall
|
54
|
-
- examples/importing into tracker api/osa.rb
|
55
72
|
- examples/importing into tracker api/Stories.csv
|
56
|
-
- examples/importing into tracker api/Voting Example.numbers
|
57
73
|
- examples/numbers to omnigraffle
|
58
74
|
- examples/numbers to omnigraffle/generate_card_walls
|
59
75
|
- examples/numbers to omnigraffle/Voting Example.numbers
|
@@ -93,7 +109,7 @@ files:
|
|
93
109
|
- spec/fixtures/Voting Example.numbers
|
94
110
|
- spec/spec_helper.rb
|
95
111
|
has_rdoc: true
|
96
|
-
homepage: http://
|
112
|
+
homepage: http://github.com/jeremylightsmith/cards
|
97
113
|
post_install_message:
|
98
114
|
rdoc_options:
|
99
115
|
- --main
|
Binary file
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'appscript'
|
3
|
-
|
4
|
-
itunes = Appscript.app('iTunes')
|
5
|
-
|
6
|
-
track = itunes.current_track
|
7
|
-
p track # <OSA::Itunes::FileTrack:0x1495e20>
|
8
|
-
p track.name # "Over The Rainbow"
|
9
|
-
p track.artist # "Keith Jarrett"
|
10
|
-
p track.duration # 362.368988037109
|
11
|
-
p track.date_added.to_s # "2006-06-30"
|
12
|
-
p track.enabled? # true
|
13
|
-
|
14
|
-
# Play the selected track.
|
15
|
-
itunes.play
|
16
|
-
|
17
|
-
# Fade the volume.
|
18
|
-
100.times { |i| itunes.sound_volume = i; sleep 0.1 }
|
@@ -1,50 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
require 'rubygems'
|
3
|
-
require File.dirname(__FILE__) + "/../../lib/cards" # you probably want to include the gem version
|
4
|
-
require 'rest_client'
|
5
|
-
|
6
|
-
token = "d6b1b5ded944959aec78754ff9f018bd"
|
7
|
-
project_id = "9989"
|
8
|
-
priority = %w(L M H)
|
9
|
-
|
10
|
-
project = RestClient::Resource.new("http://www.pivotaltracker.com/services/v2/projects/#{project_id}",
|
11
|
-
:headers => { "X-TrackerToken" => token })
|
12
|
-
|
13
|
-
# puts project["stories?filter=type:bug"].get
|
14
|
-
|
15
|
-
require 'rbosa'
|
16
|
-
numbers = OSA.app('Numbers')
|
17
|
-
|
18
|
-
# itunes = OSA.app('iTunes')
|
19
|
-
# track = itunes.current_track
|
20
|
-
# p track # <OSA::Itunes::FileTrack:0x1495e20>
|
21
|
-
# p track.name # "Over The Rainbow"
|
22
|
-
# p track.artist # "Keith Jarrett"
|
23
|
-
# p track.duration # 362.368988037109
|
24
|
-
# p track.date_added.to_s # "2006-06-30"
|
25
|
-
# p track.enabled? # true
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
csv = Cards::CsvParser.new(File.dirname(__FILE__) + "/Stories.csv")
|
34
|
-
rows = csv.denormalized_rows(:story, [:activity, :task])
|
35
|
-
rows = rows.sort_by {|row| priority.index(row[:priority])}
|
36
|
-
|
37
|
-
rows.each do |row|
|
38
|
-
puts "adding #{row[:story]}"
|
39
|
-
|
40
|
-
params = {}
|
41
|
-
params[:name] = row[:story]
|
42
|
-
# params[:story_type] = "bug"
|
43
|
-
params[:current_state] = "unstarted"
|
44
|
-
params[:requested_by] = "Cards Test User"
|
45
|
-
params[:estimate] = row[:estimate]
|
46
|
-
params[:description] = "while #{row[:activity]}\n#{row[:note]}"
|
47
|
-
|
48
|
-
# project["stories"].post(:story => params)
|
49
|
-
end
|
50
|
-
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rbosa'
|
3
|
-
|
4
|
-
def find_table(document, name)
|
5
|
-
document.sheets.each do |sheet|
|
6
|
-
sheet.tables.each do |table|
|
7
|
-
return table
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
numbers = OSA.app('Numbers')
|
13
|
-
document = numbers.open(File.dirname(__FILE__) + "/Voting Example.numbers")
|
14
|
-
table = find_table(document, "Stories")
|
15
|
-
|
16
|
-
p table.name
|
17
|
-
table.rows.each do |row|
|
18
|
-
values = []
|
19
|
-
row.cells.map do |cell|
|
20
|
-
values << cell.name << cell.value
|
21
|
-
end
|
22
|
-
p values
|
23
|
-
end
|
24
|
-
|
25
|
-
# itunes = OSA.app('iTunes')
|
26
|
-
#
|
27
|
-
# track = itunes.current_track
|
28
|
-
# p track # <OSA::Itunes::FileTrack:0x1495e20>
|
29
|
-
# p track.name # "Over The Rainbow"
|
30
|
-
# p track.artist # "Keith Jarrett"
|
31
|
-
# p track.duration # 362.368988037109
|
32
|
-
# p track.date_added.to_s # "2006-06-30"
|
33
|
-
# p track.enabled? # true
|
34
|
-
#
|
35
|
-
# # Play the selected track.
|
36
|
-
# itunes.play
|
37
|
-
#
|
38
|
-
# # Fade the volume.
|
39
|
-
# 100.times { |i| itunes.sound_volume = i; sleep 0.1 }
|