fake_picture 0.1.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +69 -6
- data/lib/fake_picture/avatar/avatar.rb +5 -0
- data/lib/fake_picture/avatar/pack/man-1.svg +85 -0
- data/lib/fake_picture/avatar/pack/man-2.svg +110 -0
- data/lib/fake_picture/avatar/pack/man-3.svg +75 -0
- data/lib/fake_picture/avatar/pack/man-4.svg +125 -0
- data/lib/fake_picture/avatar/pack/man-5.svg +81 -0
- data/lib/fake_picture/avatar/pack/man-6.svg +110 -0
- data/lib/fake_picture/avatar/pack/woman-1.svg +82 -0
- data/lib/fake_picture/avatar/pack/woman-2.svg +123 -0
- data/lib/fake_picture/avatar/pack/woman-3.svg +102 -0
- data/lib/fake_picture/avatar/pack/woman-4.svg +84 -0
- data/lib/fake_picture/avatar/pack/woman-5.svg +66 -0
- data/lib/fake_picture/avatar/pack/woman-6.svg +77 -0
- data/lib/fake_picture/avatar/pack/woman-7.svg +76 -0
- data/lib/fake_picture/avatar/pack/woman-8.svg +75 -0
- data/lib/fake_picture/blog/blog.rb +1 -1
- data/lib/fake_picture/blog/pack/{night_street-1.jpg → preview-1.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-10.jpg → preview-10.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-10.jpg → preview-11.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-1.jpg → preview-12.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-2.jpg → preview-13.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-3.jpg → preview-14.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-4.jpg → preview-15.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-5.jpg → preview-16.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-6.jpg → preview-17.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-7.jpg → preview-18.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-8.jpg → preview-19.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-2.jpg → preview-2.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{day_street-9.jpg → preview-20.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-3.jpg → preview-3.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-4.jpg → preview-4.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-5.jpg → preview-5.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-6.jpg → preview-6.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-7.jpg → preview-7.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-8.jpg → preview-8.jpg} +0 -0
- data/lib/fake_picture/blog/pack/{night_street-9.jpg → preview-9.jpg} +0 -0
- data/lib/fake_picture/people/people.rb +1 -1
- data/lib/fake_picture/version.rb +1 -1
- data/lib/fake_picture.rb +15 -26
- metadata +37 -22
@@ -0,0 +1,76 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4
|
+
viewBox="0 0 145 145" style="enable-background:new 0 0 145 145;" xml:space="preserve">
|
5
|
+
<g id="women_8">
|
6
|
+
<rect style="fill:#8C7098;" width="145" height="145"/>
|
7
|
+
<g>
|
8
|
+
<ellipse style="fill:#10303F;" cx="72.5" cy="57.383" rx="30.015" ry="31.728"/>
|
9
|
+
<g>
|
10
|
+
<path style="fill:#F1C9A5;" d="M109.374,115.394c-4.963-9.396-36.874-15.292-36.874-15.292s-31.911,5.896-36.874,15.292
|
11
|
+
C31.957,128.433,28.888,145,28.888,145H72.5h43.612C116.112,145,114.039,127.236,109.374,115.394z"/>
|
12
|
+
<path style="fill:#E4B692;" d="M72.5,100.102c0,0,31.911,5.896,36.874,15.292c4.665,11.842,6.738,29.606,6.738,29.606H72.5
|
13
|
+
V100.102z"/>
|
14
|
+
<rect x="63.813" y="81.001" style="fill:#F1C9A5;" width="17.374" height="29.077"/>
|
15
|
+
<rect x="72.5" y="81.001" style="fill:#E4B692;" width="8.687" height="29.077"/>
|
16
|
+
<path style="opacity:0.1;fill:#DDAC8C;enable-background:new ;" d="M63.813,94.474c1.562,4.485,7.869,7.057,12.5,7.057
|
17
|
+
c1.675,0,3.305-0.281,4.874-0.795V81.001H63.813V94.474z"/>
|
18
|
+
<path style="fill:#F1C9A5;" d="M94.838,62.652c0-18.162-10.002-28.489-22.338-28.489S50.162,44.491,50.162,62.652
|
19
|
+
c0,18.162,10.001,32.887,22.338,32.887S94.838,80.814,94.838,62.652z"/>
|
20
|
+
<path style="fill:#E4B692;" d="M91.438,75.245c-4.049-0.451-6.783-5.088-6.098-10.353c0.677-5.268,4.512-9.18,8.563-8.732
|
21
|
+
c4.047,0.449,6.777,5.084,6.093,10.353C99.318,71.781,95.487,75.689,91.438,75.245z"/>
|
22
|
+
<path style="fill:#F1C9A5;" d="M45.161,66.513c-0.684-5.269,2.046-9.904,6.091-10.353c4.053-0.448,7.889,3.463,8.568,8.732
|
23
|
+
c0.684,5.265-2.053,9.901-6.1,10.353C49.671,75.689,45.84,71.781,45.161,66.513z"/>
|
24
|
+
<path style="fill:#E4B692;" d="M94.838,62.652c0-18.162-10.002-28.489-22.338-28.489v61.375
|
25
|
+
C84.836,95.539,94.838,80.814,94.838,62.652z"/>
|
26
|
+
<path style="fill:#E00315;" d="M109.374,115.394c-0.296-0.561-0.694-1.109-1.17-1.646c-5.415,7.129-19.354,12.205-35.703,12.205
|
27
|
+
c-0.001,0-0.001,0-0.001,0l0,0c-0.001,0-0.001,0-0.001,0c-16.348,0-30.288-5.076-35.704-12.204
|
28
|
+
c-0.476,0.535-0.874,1.083-1.169,1.644C31.957,128.433,28.888,145,28.888,145H72.5h43.612
|
29
|
+
C116.112,145,114.039,127.236,109.374,115.394z"/>
|
30
|
+
</g>
|
31
|
+
<g>
|
32
|
+
<g>
|
33
|
+
<g>
|
34
|
+
<path style="fill:#452317;" d="M73.599,83.247c-0.524,0-1.099,0.599-1.099,0.599s-0.574-0.599-1.099-0.599
|
35
|
+
c-0.524,0-1.648,0.936-2.659,1.048c1.348,1.348,2.909,1.834,3.757,1.834s2.409-0.486,3.757-1.834
|
36
|
+
C75.247,84.183,74.123,83.247,73.599,83.247z"/>
|
37
|
+
</g>
|
38
|
+
</g>
|
39
|
+
</g>
|
40
|
+
<circle style="fill:#10303F;" cx="72.5" cy="30.131" r="15.108"/>
|
41
|
+
<path style="fill:#10303F;" d="M96.669,60.095c0-0.054,0.004-0.106,0.004-0.16c0-14.089-9.538-28.956-22.889-28.956
|
42
|
+
c-13.35,0-25.456,14.867-25.456,28.956c0,0.054,0.003,0.106,0.003,0.16H96.669z"/>
|
43
|
+
<rect x="63.813" y="97.856" style="fill:#10303F;" width="17.374" height="4.18"/>
|
44
|
+
</g>
|
45
|
+
</g>
|
46
|
+
<g>
|
47
|
+
</g>
|
48
|
+
<g>
|
49
|
+
</g>
|
50
|
+
<g>
|
51
|
+
</g>
|
52
|
+
<g>
|
53
|
+
</g>
|
54
|
+
<g>
|
55
|
+
</g>
|
56
|
+
<g>
|
57
|
+
</g>
|
58
|
+
<g>
|
59
|
+
</g>
|
60
|
+
<g>
|
61
|
+
</g>
|
62
|
+
<g>
|
63
|
+
</g>
|
64
|
+
<g>
|
65
|
+
</g>
|
66
|
+
<g>
|
67
|
+
</g>
|
68
|
+
<g>
|
69
|
+
</g>
|
70
|
+
<g>
|
71
|
+
</g>
|
72
|
+
<g>
|
73
|
+
</g>
|
74
|
+
<g>
|
75
|
+
</g>
|
76
|
+
</svg>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4
|
+
viewBox="0 0 145 145" style="enable-background:new 0 0 145 145;" xml:space="preserve">
|
5
|
+
<g id="women_7">
|
6
|
+
<rect style="fill:#9364A8;" width="145" height="145"/>
|
7
|
+
<g>
|
8
|
+
<path style="fill:#471B18;" d="M44.388,101.531H97.63c5.85-1.428,11.301-5.104,11.301-8.182c0.002-6.799-3.691-7.704-1.156-13.565
|
9
|
+
c2.533-5.861,2.715-14.082-3.111-20.508c-7.186-7.92-1.621-9.573-7.031-20.523C91.39,26.117,82.3,23.376,73.593,26.141
|
10
|
+
c0,0-10.773-2.535-19.961,4.434c-9.188,6.97-4.309,16.888-13.18,24.809c-8.869,7.919-7.604,15.046-2.693,23.759
|
11
|
+
C42.507,87.569,31.593,94.262,44.388,101.531z"/>
|
12
|
+
<g>
|
13
|
+
<g>
|
14
|
+
<g>
|
15
|
+
<path style="fill:#F1C9A5;" d="M109.374,115.394c-4.963-9.396-36.875-15.291-36.875-15.291s-31.91,5.896-36.873,15.291
|
16
|
+
C31.956,128.433,29.544,145,29.544,145h42.955l42.795-0.094C115.294,144.906,114.038,127.236,109.374,115.394z"/>
|
17
|
+
<path style="fill:#E4B692;" d="M72.499,100.103c0,0,31.912,5.896,36.875,15.291c4.664,11.842,6.42,29.606,6.42,29.606H72.499
|
18
|
+
V100.103z"/>
|
19
|
+
<rect x="63.811" y="81" style="fill:#F1C9A5;" width="17.375" height="29.077"/>
|
20
|
+
<rect x="72.499" y="81" style="fill:#E4B692;" width="8.688" height="29.077"/>
|
21
|
+
<path style="opacity:0.1;fill:#DDAC8C;enable-background:new ;" d="M63.812,94.475c1.563,4.485,7.869,7.056,12.5,7.056
|
22
|
+
c1.676,0,3.307-0.28,4.875-0.794V81H63.812V94.475z"/>
|
23
|
+
<path style="fill:#F1C9A5;" d="M94.837,62.653c0-18.162-10-28.489-22.338-28.489c-12.336,0-22.336,10.328-22.336,28.489
|
24
|
+
c0,18.162,10,32.886,22.336,32.886C84.837,95.539,94.837,80.815,94.837,62.653z"/>
|
25
|
+
<path style="fill:#E4B692;" d="M91.437,75.245c-4.049-0.451-6.783-5.088-6.098-10.352c0.678-5.269,4.512-9.18,8.564-8.732
|
26
|
+
c4.047,0.449,6.775,5.083,6.092,10.353C99.317,71.782,95.485,75.689,91.437,75.245z"/>
|
27
|
+
<path style="fill:#F1C9A5;" d="M45.159,66.513c-0.684-5.269,2.047-9.904,6.092-10.353c4.053-0.448,7.889,3.463,8.568,8.732
|
28
|
+
c0.684,5.264-2.053,9.901-6.1,10.352C49.669,75.689,45.839,71.782,45.159,66.513z"/>
|
29
|
+
<path style="fill:#E4B692;" d="M94.837,62.653c0-18.162-10-28.489-22.338-28.489v61.375
|
30
|
+
C84.837,95.539,94.837,80.815,94.837,62.653z"/>
|
31
|
+
</g>
|
32
|
+
<path style="fill:#471B18;" d="M72.444,43.852c0,0,0.537,8.154,8.742,8.864c8.205,0.709,9.27,6.721,7.674,12.136
|
33
|
+
c-1.596,5.415-2.307,8.43,2.127,12.685c4.432,4.254-0.531,20.685-0.531,20.685l16.311-7.762c0,0-3.48-13.193-1.596-20.547
|
34
|
+
c1.885-7.353-6.561-12.586-8.688-17.905S83.674,27.5,75.032,28.958c-8.645,1.457-7.774,10.64-7.774,10.64L72.444,43.852z"/>
|
35
|
+
</g>
|
36
|
+
</g>
|
37
|
+
<path style="fill:#0A7E75;" d="M109.374,115.394c-3.285-6.216-18.359-10.951-28.188-13.41v-4.886H63.812v4.808
|
38
|
+
c-9.83,2.459-24.904,7.272-28.186,13.488C31.956,128.433,28.888,145,28.888,145h43.611h43.613
|
39
|
+
C116.112,145,114.038,127.236,109.374,115.394z"/>
|
40
|
+
<path style="fill:#471B18;" d="M46.306,101.531h4.588C48.575,93.671,57.2,89.328,58.19,81c1.244-10.484-8.027-18.348,2.658-23.497
|
41
|
+
c6.781-3.267,11.596-13.651,11.596-13.651l1.148-14.895l-17.1,3.46l-9.563,20.476c0,0-6.646,18.083-6.381,18.753
|
42
|
+
C40.815,72.316,46.306,101.531,46.306,101.531z"/>
|
43
|
+
</g>
|
44
|
+
</g>
|
45
|
+
<g>
|
46
|
+
</g>
|
47
|
+
<g>
|
48
|
+
</g>
|
49
|
+
<g>
|
50
|
+
</g>
|
51
|
+
<g>
|
52
|
+
</g>
|
53
|
+
<g>
|
54
|
+
</g>
|
55
|
+
<g>
|
56
|
+
</g>
|
57
|
+
<g>
|
58
|
+
</g>
|
59
|
+
<g>
|
60
|
+
</g>
|
61
|
+
<g>
|
62
|
+
</g>
|
63
|
+
<g>
|
64
|
+
</g>
|
65
|
+
<g>
|
66
|
+
</g>
|
67
|
+
<g>
|
68
|
+
</g>
|
69
|
+
<g>
|
70
|
+
</g>
|
71
|
+
<g>
|
72
|
+
</g>
|
73
|
+
<g>
|
74
|
+
</g>
|
75
|
+
</svg>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/fake_picture/version.rb
CHANGED
data/lib/fake_picture.rb
CHANGED
@@ -2,44 +2,33 @@
|
|
2
2
|
|
3
3
|
module FakePicture
|
4
4
|
class Base
|
5
|
-
|
6
|
-
|
7
|
-
def self.random_file(path, file: false)
|
5
|
+
def self.random_file(path)
|
8
6
|
path_to_file = Dir[path].select { |f| File.file?(f) }.sample
|
9
7
|
|
10
8
|
return false if path_to_file.nil?
|
11
9
|
|
12
|
-
|
10
|
+
path_to_file
|
13
11
|
end
|
14
12
|
|
15
|
-
def download(query)
|
13
|
+
# def download(query)
|
16
14
|
#TODO: make downloading pictures to gem
|
17
|
-
end
|
15
|
+
# end
|
18
16
|
|
19
|
-
def self.
|
20
|
-
|
21
|
-
define_singleton_method :"#{name}" do
|
22
|
-
self.superclass.check_pack_directory_readiness(path_to_directory + PACK_PATH)
|
17
|
+
def self.initialize_fake_picture_methods(*method_names, new_random_method_name: nil)
|
18
|
+
path_to_pack = "#{__dir__}/fake_picture/#{self.name.split('::').last.downcase}/pack"
|
23
19
|
|
24
|
-
|
25
|
-
end
|
20
|
+
self.superclass.check_pack_directory_readiness(path_to_pack)
|
26
21
|
|
27
|
-
|
28
|
-
|
22
|
+
[*method_names, :random].each do |name|
|
23
|
+
selector = name == :random ? '/*' : "/#{name}-*"
|
24
|
+
name = new_random_method_name if name == :random && !new_random_method_name.nil?
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
define_singleton_method :random do
|
34
|
-
self.superclass.check_pack_directory_readiness(path_to_directory + PACK_PATH)
|
35
|
-
|
36
|
-
self.superclass.random_file("#{path_to_directory + self::PACK_PATH}/*.jpg")
|
26
|
+
define_singleton_method :"#{name}" do
|
27
|
+
self.superclass.random_file("#{path_to_pack + selector}")
|
37
28
|
end
|
38
29
|
|
39
|
-
define_singleton_method :
|
40
|
-
self.
|
41
|
-
|
42
|
-
self.superclass.random_file("#{path_to_directory + self::PACK_PATH}/*.jpg", file: true)
|
30
|
+
define_singleton_method :"#{name}_file" do
|
31
|
+
File.new(self.send(name))
|
43
32
|
end
|
44
33
|
end
|
45
34
|
end
|
@@ -55,4 +44,4 @@ end
|
|
55
44
|
# require fake_picture objects
|
56
45
|
Dir.glob(File.join(__dir__, 'fake_picture', '/**/*.rb')).sort.each { |file| require file }
|
57
46
|
|
58
|
-
# add photos like
|
47
|
+
# add photos like logos, animals, "for posts"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fake_picture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- loqimean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -64,27 +64,42 @@ files:
|
|
64
64
|
- README.md
|
65
65
|
- bin/fake_picture
|
66
66
|
- lib/fake_picture.rb
|
67
|
+
- lib/fake_picture/avatar/avatar.rb
|
68
|
+
- lib/fake_picture/avatar/pack/man-1.svg
|
69
|
+
- lib/fake_picture/avatar/pack/man-2.svg
|
70
|
+
- lib/fake_picture/avatar/pack/man-3.svg
|
71
|
+
- lib/fake_picture/avatar/pack/man-4.svg
|
72
|
+
- lib/fake_picture/avatar/pack/man-5.svg
|
73
|
+
- lib/fake_picture/avatar/pack/man-6.svg
|
74
|
+
- lib/fake_picture/avatar/pack/woman-1.svg
|
75
|
+
- lib/fake_picture/avatar/pack/woman-2.svg
|
76
|
+
- lib/fake_picture/avatar/pack/woman-3.svg
|
77
|
+
- lib/fake_picture/avatar/pack/woman-4.svg
|
78
|
+
- lib/fake_picture/avatar/pack/woman-5.svg
|
79
|
+
- lib/fake_picture/avatar/pack/woman-6.svg
|
80
|
+
- lib/fake_picture/avatar/pack/woman-7.svg
|
81
|
+
- lib/fake_picture/avatar/pack/woman-8.svg
|
67
82
|
- lib/fake_picture/blog/blog.rb
|
68
|
-
- lib/fake_picture/blog/pack/
|
69
|
-
- lib/fake_picture/blog/pack/
|
70
|
-
- lib/fake_picture/blog/pack/
|
71
|
-
- lib/fake_picture/blog/pack/
|
72
|
-
- lib/fake_picture/blog/pack/
|
73
|
-
- lib/fake_picture/blog/pack/
|
74
|
-
- lib/fake_picture/blog/pack/
|
75
|
-
- lib/fake_picture/blog/pack/
|
76
|
-
- lib/fake_picture/blog/pack/
|
77
|
-
- lib/fake_picture/blog/pack/
|
78
|
-
- lib/fake_picture/blog/pack/
|
79
|
-
- lib/fake_picture/blog/pack/
|
80
|
-
- lib/fake_picture/blog/pack/
|
81
|
-
- lib/fake_picture/blog/pack/
|
82
|
-
- lib/fake_picture/blog/pack/
|
83
|
-
- lib/fake_picture/blog/pack/
|
84
|
-
- lib/fake_picture/blog/pack/
|
85
|
-
- lib/fake_picture/blog/pack/
|
86
|
-
- lib/fake_picture/blog/pack/
|
87
|
-
- lib/fake_picture/blog/pack/
|
83
|
+
- lib/fake_picture/blog/pack/preview-1.jpg
|
84
|
+
- lib/fake_picture/blog/pack/preview-10.jpg
|
85
|
+
- lib/fake_picture/blog/pack/preview-11.jpg
|
86
|
+
- lib/fake_picture/blog/pack/preview-12.jpg
|
87
|
+
- lib/fake_picture/blog/pack/preview-13.jpg
|
88
|
+
- lib/fake_picture/blog/pack/preview-14.jpg
|
89
|
+
- lib/fake_picture/blog/pack/preview-15.jpg
|
90
|
+
- lib/fake_picture/blog/pack/preview-16.jpg
|
91
|
+
- lib/fake_picture/blog/pack/preview-17.jpg
|
92
|
+
- lib/fake_picture/blog/pack/preview-18.jpg
|
93
|
+
- lib/fake_picture/blog/pack/preview-19.jpg
|
94
|
+
- lib/fake_picture/blog/pack/preview-2.jpg
|
95
|
+
- lib/fake_picture/blog/pack/preview-20.jpg
|
96
|
+
- lib/fake_picture/blog/pack/preview-3.jpg
|
97
|
+
- lib/fake_picture/blog/pack/preview-4.jpg
|
98
|
+
- lib/fake_picture/blog/pack/preview-5.jpg
|
99
|
+
- lib/fake_picture/blog/pack/preview-6.jpg
|
100
|
+
- lib/fake_picture/blog/pack/preview-7.jpg
|
101
|
+
- lib/fake_picture/blog/pack/preview-8.jpg
|
102
|
+
- lib/fake_picture/blog/pack/preview-9.jpg
|
88
103
|
- lib/fake_picture/people/pack/man-1.jpg
|
89
104
|
- lib/fake_picture/people/pack/man-10.jpg
|
90
105
|
- lib/fake_picture/people/pack/man-2.jpg
|