wod 0.0.3 → 0.0.4

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.
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm 1.8.7
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.0.4
2
+ * Now supports ruby 1.8
3
+
1
4
  == 0.0.3
2
5
  * An unhandled error now causes wod to save the last page for inspection
3
6
 
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'mechanize'
2
3
  require 'wod/helpers'
3
4
  require 'wod/version'
@@ -96,7 +96,7 @@ module Wod::Command
96
96
 
97
97
  def collect_team_selection team_names
98
98
  puts "This account belongs to the following teams:"
99
- team_names.each.with_index do |team, i|
99
+ team_names.each_with_index do |team, i|
100
100
  puts "#{i+1}. #{team}"
101
101
  end
102
102
  print "Select team (1): "
@@ -8,7 +8,8 @@ module Wod::Command
8
8
  udids = page.search("td.id").map(&:text)
9
9
 
10
10
  devices_left = page.search(".devicesannounce strong").first.text
11
- devices = names.map.with_index{|name, i| {:name => name, :udid => udids[i] } }
11
+ devices = []
12
+ names.each_with_index{|name, i| devices << {:name => name, :udid => udids[i] } }
12
13
 
13
14
  display_formatted devices, [:name, :udid]
14
15
  puts
@@ -25,10 +25,12 @@ module Wod
25
25
  column_lengths = columns.map do |c|
26
26
  hashes.map { |h| h[c].length }.max
27
27
  end
28
+
28
29
  sorted = hashes.sort_by {|h| h[columns.first] }
29
30
 
30
- sorted.each.with_index do |h, i|
31
- puts " " + columns.map.with_index{ |c, i| h[c].ljust(column_lengths[i]) }.join(" | ")
31
+ sorted.each do |row|
32
+ column_index = 0
33
+ puts " " + columns.map{ |column| text = row[column].ljust(column_lengths[column_index]); column_index += 1; text }.join(" | ")
32
34
  end
33
35
  end
34
36
 
@@ -1,3 +1,3 @@
1
1
  module Wod
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wod
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 23
4
5
  prerelease:
5
- version: 0.0.3
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 4
10
+ version: 0.0.4
6
11
  platform: ruby
7
12
  authors:
8
13
  - Dave Newman
@@ -21,6 +26,9 @@ dependencies:
21
26
  requirements:
22
27
  - - ">="
23
28
  - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
24
32
  version: "0"
25
33
  type: :runtime
26
34
  version_requirements: *id001
@@ -35,6 +43,7 @@ extra_rdoc_files: []
35
43
 
36
44
  files:
37
45
  - .gitignore
46
+ - .rvmrc
38
47
  - CHANGELOG
39
48
  - Gemfile
40
49
  - README.md
@@ -66,12 +75,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
66
75
  requirements:
67
76
  - - ">="
68
77
  - !ruby/object:Gem::Version
78
+ hash: 3
79
+ segments:
80
+ - 0
69
81
  version: "0"
70
82
  required_rubygems_version: !ruby/object:Gem::Requirement
71
83
  none: false
72
84
  requirements:
73
85
  - - ">="
74
86
  - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
75
90
  version: "0"
76
91
  requirements: []
77
92