random_images 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +13 -34
- data/VERSION +1 -1
- data/random_images.gemspec +51 -0
- metadata +4 -3
data/README.rdoc
CHANGED
@@ -1,58 +1,37 @@
|
|
1
|
-
=
|
1
|
+
= random_images
|
2
2
|
|
3
|
-
Pull urls of random images
|
3
|
+
Pull urls of random images from google searches to generate sample data.
|
4
4
|
|
5
5
|
= Installation
|
6
6
|
|
7
|
-
sudo gem install
|
7
|
+
sudo gem install random_images
|
8
8
|
|
9
9
|
In your config/environment.rb
|
10
|
-
config.gem '
|
10
|
+
config.gem 'random_images', :version => '=>0.0.9'
|
11
11
|
|
12
12
|
= To get Images
|
13
|
-
|
13
|
+
RandomImages::Images.get
|
14
14
|
You can also call pass parameters
|
15
|
-
|
15
|
+
RandomImages::Images.get(number, keyword, content)
|
16
16
|
Where number is the number of images to fetch (by default 100), keyword is the keyword for the google search (by default "me") and content is the type of images, which can be "any" (ie, any image) or "face" (ie, pictures of faces, this is the default value).
|
17
17
|
|
18
18
|
You can get a single image, too
|
19
|
-
|
19
|
+
RandomImages::Image.get
|
20
20
|
Or with parameters
|
21
|
-
|
22
|
-
|
23
|
-
= To get Files
|
24
|
-
DummyFiles::Files.get(filetype)
|
25
|
-
So you are gonna be searching for files whose file type is "filetype".
|
26
|
-
|
27
|
-
Call with parameters
|
28
|
-
DummyFiles::Files.get(filetype, number, keyword)
|
29
|
-
By default keyword is "".
|
30
|
-
|
31
|
-
Single File
|
32
|
-
DummyFiles::File.get(filetype)
|
33
|
-
With parameters
|
34
|
-
DummyFiles::File.get(filetype, keyword)
|
21
|
+
RandomImages::Image.get(keyword, content)
|
35
22
|
|
36
23
|
= API
|
37
24
|
There's an API avalailable in my website, it returns the results as text/JSON. The calls are as follows:
|
38
25
|
|
39
26
|
Images
|
40
|
-
http://
|
27
|
+
http://hackdd.co.uk/random/images
|
41
28
|
Images with params
|
42
|
-
http://
|
29
|
+
http://hackdd.co.uk/random/images?number=[YOUR_NUMBER]&keyword=[YOUR_KEYWORD]&content=[YOUR_CONTENT]
|
43
30
|
Image
|
44
|
-
http://
|
31
|
+
http://hackdd.co.uk/random/image
|
45
32
|
Image with params
|
46
|
-
http://
|
47
|
-
|
48
|
-
http://api.jordinl.com/dummy/files?filetype=[YOUR_FILETYPE]
|
49
|
-
Files with params
|
50
|
-
http://api.jordinl.com/dummy/files?filetype=[YOUR_FILETYPE]&keyword=[YOUR_KEYWORD]&number=[YOUR_NUMBER]
|
51
|
-
File
|
52
|
-
http://api.jordinl.com/dummy/file?filetype=[YOUR_FILETYPE]
|
53
|
-
File with params
|
54
|
-
http://api.jordinl.com/dummy/file?filetype=[YOUR_FILETYPE]&keyword=[YOUR_KEYWORD]
|
55
|
-
|
33
|
+
http://hackdd.co.uk/random/image?keyword=[YOUR_KEYWORD]&content=[YOUR_CONTENT]
|
34
|
+
|
56
35
|
== Note on Patches/Pull Requests
|
57
36
|
|
58
37
|
* Fork the project.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{random_images}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Jordi Noguera"]
|
12
|
+
s.date = %q{2011-03-15}
|
13
|
+
s.description = %q{Pull urls of random images from google searches to generate sample data.}
|
14
|
+
s.email = %q{jordinoguera83@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".project",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/random_images.rb",
|
27
|
+
"random_images.gemspec",
|
28
|
+
"tools/console"
|
29
|
+
]
|
30
|
+
s.homepage = %q{http://github.com/hackdd/random_images}
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
s.rubygems_version = %q{1.3.7}
|
33
|
+
s.summary = %q{URLs for sample data generation}
|
34
|
+
|
35
|
+
if s.respond_to? :specification_version then
|
36
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
37
|
+
s.specification_version = 3
|
38
|
+
|
39
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
40
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
41
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.2"])
|
42
|
+
else
|
43
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
44
|
+
s.add_dependency(%q<nokogiri>, [">= 1.4.2"])
|
45
|
+
end
|
46
|
+
else
|
47
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
48
|
+
s.add_dependency(%q<nokogiri>, [">= 1.4.2"])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: random_images
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jordi Noguera
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- Rakefile
|
66
66
|
- VERSION
|
67
67
|
- lib/random_images.rb
|
68
|
+
- random_images.gemspec
|
68
69
|
- tools/console
|
69
70
|
has_rdoc: true
|
70
71
|
homepage: http://github.com/hackdd/random_images
|