flickr_cli 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/menu.rb +11 -11
- metadata +4 -4
data/lib/menu.rb
CHANGED
@@ -4,8 +4,9 @@ module FlickrCli
|
|
4
4
|
def self.main_menu
|
5
5
|
choose do |menu|
|
6
6
|
menu.prompt = "What's up?"
|
7
|
-
menu.choice(
|
8
|
-
|
7
|
+
menu.choice("Your Photostream") { menu_for(flickr.test.login.username) }
|
8
|
+
menu.choice("Contacts' Photostream") { contacts }
|
9
|
+
menu.choice("Quit") { end_program }
|
9
10
|
end
|
10
11
|
end
|
11
12
|
|
@@ -24,16 +25,21 @@ module FlickrCli
|
|
24
25
|
FlickrCli::Menu.download_and_print(photos.detect{|x| x.title == photo})
|
25
26
|
puts "Press any ENTER to continue"
|
26
27
|
do_nothing = STDIN.gets
|
27
|
-
self.menu_for(FlickrCli::Menu.menu_for(contact))
|
28
|
+
self.menu_for(FlickrCli::Menu.menu_for(contact, the_page))
|
28
29
|
end
|
29
30
|
end
|
30
31
|
menu.choice("More >>") { self.menu_for(contact, (the_page+1) )}
|
31
32
|
menu.choice("Back <<") { self.menu_for(contact, (the_page-1) )} if the_page > 1
|
32
33
|
menu.choice("~(==::Main::==)~") { self.main_menu }
|
33
|
-
menu.choice("Quit") {
|
34
|
+
menu.choice("Quit") { self.end_program }
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
38
|
+
def self.end_program
|
39
|
+
say self.good_by_message
|
40
|
+
exit
|
41
|
+
end
|
42
|
+
|
37
43
|
def self.download_and_print(picked_photo)
|
38
44
|
|
39
45
|
photos = flickr.photos.getSizes(:photo_id => picked_photo.id)
|
@@ -72,10 +78,4 @@ module FlickrCli
|
|
72
78
|
end
|
73
79
|
end
|
74
80
|
|
75
|
-
|
76
|
-
# TODO: implement sets
|
77
|
-
# def self.sets
|
78
|
-
#
|
79
|
-
# end
|
80
|
-
|
81
|
-
end
|
81
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flickr_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stephen Schor
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-02-
|
18
|
+
date: 2012-02-22 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|