pictate 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -14,4 +14,5 @@ group :development do
14
14
  end
15
15
 
16
16
  gem "selenium-webdriver", "~> 2.20"
17
- gem "choice", "~> 0.1.6"
17
+ gem "choice", "~> 0.1.6"
18
+ gem "spinning_cursor", "~> 0.1.0.rc1"
@@ -31,6 +31,7 @@ GEM
31
31
  multi_json (~> 1.0)
32
32
  simplecov-html (~> 0.5.3)
33
33
  simplecov-html (0.5.3)
34
+ spinning_cursor (0.1.0.rc1)
34
35
 
35
36
  PLATFORMS
36
37
  ruby
@@ -43,3 +44,4 @@ DEPENDENCIES
43
44
  selenium-webdriver (~> 2.20)
44
45
  shoulda
45
46
  simplecov
47
+ spinning_cursor (~> 0.1.0.rc1)
@@ -7,6 +7,10 @@ was funkier as a first gem than the boring traditional "Hello World!".
7
7
  Usage:
8
8
  $ pictate /path/to/image [options]
9
9
 
10
+ == Dependencies
11
+
12
+ * Java to run the Selenium server (details below)
13
+
10
14
  == Selenium
11
15
 
12
16
  Unfortunately Google uses a lot of Javascript and as such this gem uses browser
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -1,6 +1,7 @@
1
1
  require "selenium-webdriver"
2
2
  require "selenium/server"
3
3
  require "fileutils"
4
+ require "spinning_cursor"
4
5
 
5
6
  PICTATE_ROOT = Gem.loaded_specs['pictate'].full_gem_path
6
7
 
@@ -9,10 +10,14 @@ module Pictate
9
10
  # Starts the server, gets the best result for the image and stops server.
10
11
  #
11
12
  def pictate(image_path, options = {})
12
- start_server options[:server]
13
- puts "I'm thinking..."
14
- puts do_search image_path
15
- stop_server
13
+ SpinningCursor.start do
14
+ action do
15
+ start_server options[:server]
16
+ SpinningCursor.set_banner "I'm thinking"
17
+ SpinningCursor.set_message (do_search image_path)
18
+ stop_server
19
+ end
20
+ end
16
21
  end
17
22
 
18
23
  #
@@ -31,12 +36,13 @@ module Pictate
31
36
  FileUtils.cd(File.join PICTATE_ROOT, 'ext')
32
37
  selenium_latest = Selenium::Server.latest
33
38
  if not File.exists? "selenium-server-standalone-#{selenium_latest}.jar"
34
- puts "Downloading latest version of selenium server standalone..."
39
+ SpinningCursor.set_banner "Downloading latest version of selenium " +
40
+ "server standalone"
35
41
  end
36
42
  selenium_path = Selenium::Server.download(selenium_latest)
37
43
  end
38
44
 
39
- puts "Starting selenium standalone server"
45
+ SpinningCursor.set_banner "Starting selenium standalone server"
40
46
  @server = Selenium::Server.new(selenium_path, :background => true)
41
47
  @server.start
42
48
  caps = Selenium::WebDriver::Remote::Capabilities.htmlunit(
@@ -49,10 +55,8 @@ module Pictate
49
55
  # Stops the server
50
56
  #
51
57
  def stop_server
52
- puts "Stopping server..."
53
58
  @driver.quit
54
59
  @server.stop
55
- puts "Goodbye!"
56
60
  end
57
61
 
58
62
  #
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pictate"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Adnan Abdulhussein"]
12
- s.date = "2012-04-08"
12
+ s.date = "2012-04-25"
13
13
  s.description = "Pointless command line tool that attempts to describe the image you give it by automating a google search by image."
14
14
  s.email = "adnan@prydoni.us"
15
15
  s.executables = ["pictate"]
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
35
35
  s.homepage = "http://github.com/Prydonius/pictate"
36
36
  s.licenses = ["MIT"]
37
37
  s.require_paths = ["lib"]
38
- s.rubygems_version = "1.8.11"
38
+ s.rubygems_version = "1.8.23"
39
39
  s.summary = "Attempts to describe a picture you give it."
40
40
 
41
41
  if s.respond_to? :specification_version then
@@ -44,6 +44,7 @@ Gem::Specification.new do |s|
44
44
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
45
45
  s.add_runtime_dependency(%q<selenium-webdriver>, ["~> 2.20"])
46
46
  s.add_runtime_dependency(%q<choice>, ["~> 0.1.6"])
47
+ s.add_runtime_dependency(%q<spinning_cursor>, ["~> 0.1.0.rc1"])
47
48
  s.add_development_dependency(%q<shoulda>, [">= 0"])
48
49
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
49
50
  s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
@@ -52,6 +53,7 @@ Gem::Specification.new do |s|
52
53
  else
53
54
  s.add_dependency(%q<selenium-webdriver>, ["~> 2.20"])
54
55
  s.add_dependency(%q<choice>, ["~> 0.1.6"])
56
+ s.add_dependency(%q<spinning_cursor>, ["~> 0.1.0.rc1"])
55
57
  s.add_dependency(%q<shoulda>, [">= 0"])
56
58
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
57
59
  s.add_dependency(%q<bundler>, ["~> 1.1.0"])
@@ -61,6 +63,7 @@ Gem::Specification.new do |s|
61
63
  else
62
64
  s.add_dependency(%q<selenium-webdriver>, ["~> 2.20"])
63
65
  s.add_dependency(%q<choice>, ["~> 0.1.6"])
66
+ s.add_dependency(%q<spinning_cursor>, ["~> 0.1.0.rc1"])
64
67
  s.add_dependency(%q<shoulda>, [">= 0"])
65
68
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
66
69
  s.add_dependency(%q<bundler>, ["~> 1.1.0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pictate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-08 00:00:00.000000000 Z
12
+ date: 2012-04-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: selenium-webdriver
16
- requirement: &70350774202340 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '2.20'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70350774202340
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '2.20'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: choice
27
- requirement: &70350774201580 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,31 @@ dependencies:
32
37
  version: 0.1.6
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70350774201580
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.6
46
+ - !ruby/object:Gem::Dependency
47
+ name: spinning_cursor
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 0.1.0.rc1
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.1.0.rc1
36
62
  - !ruby/object:Gem::Dependency
37
63
  name: shoulda
38
- requirement: &70350774201020 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
39
65
  none: false
40
66
  requirements:
41
67
  - - ! '>='
@@ -43,10 +69,15 @@ dependencies:
43
69
  version: '0'
44
70
  type: :development
45
71
  prerelease: false
46
- version_requirements: *70350774201020
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
47
78
  - !ruby/object:Gem::Dependency
48
79
  name: rdoc
49
- requirement: &70350774200520 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
50
81
  none: false
51
82
  requirements:
52
83
  - - ~>
@@ -54,10 +85,15 @@ dependencies:
54
85
  version: '3.12'
55
86
  type: :development
56
87
  prerelease: false
57
- version_requirements: *70350774200520
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '3.12'
58
94
  - !ruby/object:Gem::Dependency
59
95
  name: bundler
60
- requirement: &70350774200040 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
61
97
  none: false
62
98
  requirements:
63
99
  - - ~>
@@ -65,10 +101,15 @@ dependencies:
65
101
  version: 1.1.0
66
102
  type: :development
67
103
  prerelease: false
68
- version_requirements: *70350774200040
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.1.0
69
110
  - !ruby/object:Gem::Dependency
70
111
  name: jeweler
71
- requirement: &70350774199560 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
72
113
  none: false
73
114
  requirements:
74
115
  - - ~>
@@ -76,10 +117,15 @@ dependencies:
76
117
  version: 1.8.3
77
118
  type: :development
78
119
  prerelease: false
79
- version_requirements: *70350774199560
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 1.8.3
80
126
  - !ruby/object:Gem::Dependency
81
127
  name: simplecov
82
- requirement: &70350774198860 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
83
129
  none: false
84
130
  requirements:
85
131
  - - ! '>='
@@ -87,7 +133,12 @@ dependencies:
87
133
  version: '0'
88
134
  type: :development
89
135
  prerelease: false
90
- version_requirements: *70350774198860
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
91
142
  description: Pointless command line tool that attempts to describe the image you give
92
143
  it by automating a google search by image.
93
144
  email: adnan@prydoni.us
@@ -126,7 +177,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
177
  version: '0'
127
178
  segments:
128
179
  - 0
129
- hash: 1904959883566357958
180
+ hash: -3199460460875786531
130
181
  required_rubygems_version: !ruby/object:Gem::Requirement
131
182
  none: false
132
183
  requirements:
@@ -135,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
186
  version: '0'
136
187
  requirements: []
137
188
  rubyforge_project:
138
- rubygems_version: 1.8.11
189
+ rubygems_version: 1.8.23
139
190
  signing_key:
140
191
  specification_version: 3
141
192
  summary: Attempts to describe a picture you give it.