wod 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/CHANGELOG +3 -0
- data/lib/wod/client.rb +1 -0
- data/lib/wod/commands/auth.rb +1 -1
- data/lib/wod/commands/devices.rb +2 -1
- data/lib/wod/helpers.rb +4 -2
- data/lib/wod/version.rb +1 -1
- metadata +16 -1
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm 1.8.7
|
data/CHANGELOG
CHANGED
data/lib/wod/client.rb
CHANGED
data/lib/wod/commands/auth.rb
CHANGED
@@ -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.
|
99
|
+
team_names.each_with_index do |team, i|
|
100
100
|
puts "#{i+1}. #{team}"
|
101
101
|
end
|
102
102
|
print "Select team (1): "
|
data/lib/wod/commands/devices.rb
CHANGED
@@ -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 =
|
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
|
data/lib/wod/helpers.rb
CHANGED
@@ -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
|
31
|
-
|
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
|
|
data/lib/wod/version.rb
CHANGED
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
|
-
|
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
|
|