fake_picture 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fake_picture/avatar/avatar.rb +5 -0
- data/lib/fake_picture/avatar/pack/man-1.png +0 -0
- data/lib/fake_picture/avatar/pack/man-10.png +0 -0
- data/lib/fake_picture/avatar/pack/man-11.png +0 -0
- data/lib/fake_picture/avatar/pack/man-2.png +0 -0
- data/lib/fake_picture/avatar/pack/man-3.png +0 -0
- data/lib/fake_picture/avatar/pack/man-4.png +0 -0
- data/lib/fake_picture/avatar/pack/man-5.png +0 -0
- data/lib/fake_picture/avatar/pack/man-6.png +0 -0
- data/lib/fake_picture/avatar/pack/man-7.png +0 -0
- data/lib/fake_picture/avatar/pack/man-8.png +0 -0
- data/lib/fake_picture/avatar/pack/man-9.png +0 -0
- data/lib/fake_picture/avatar/pack/woman-1.png +0 -0
- data/lib/fake_picture/avatar/pack/woman-2.png +0 -0
- data/lib/fake_picture/avatar/pack/woman-3.png +0 -0
- data/lib/fake_picture/avatar/pack/woman-4.png +0 -0
- data/lib/fake_picture/avatar/pack/woman-5.png +0 -0
- data/lib/fake_picture/version.rb +1 -1
- data/lib/fake_picture.rb +7 -7
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 607eb7dc633184356601998488a313cfeeb3f737d70dde0a9f67dc33bbd0b958
|
4
|
+
data.tar.gz: 01b8cf8f9152b8b25260da011050f10f9a6b5e3b6230fd5557a085dbfe8d051a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eb559f6b81a803f3a37f5b2733b33869a6fbc257cbdb6430cb7d68a9e73df29c574c2b5fe17714da41eeeb45683aa0594ecaa6636baf84db5be656160f3ceda
|
7
|
+
data.tar.gz: e381374da3a8f8f70624a05151f784365fc16d0c6f9c1a0836625cce9a32d3effde74b0846d1c1bd140d8f6111b28afc1b12a458b2ca2313770900b6598919ae
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/fake_picture/version.rb
CHANGED
data/lib/fake_picture.rb
CHANGED
@@ -12,34 +12,34 @@ module FakePicture
|
|
12
12
|
file ? File.new(path_to_file) : path_to_file
|
13
13
|
end
|
14
14
|
|
15
|
-
def download(query)
|
15
|
+
# def download(query)
|
16
16
|
#TODO: make downloading pictures to gem
|
17
|
-
end
|
17
|
+
# end
|
18
18
|
|
19
19
|
def self.define_methods(path_to_directory, *method_names)
|
20
20
|
method_names.each do |name|
|
21
21
|
define_singleton_method :"#{name}" do
|
22
22
|
self.superclass.check_pack_directory_readiness(path_to_directory + PACK_PATH)
|
23
23
|
|
24
|
-
self.superclass.random_file("#{path_to_directory + PACK_PATH}/#{name}
|
24
|
+
self.superclass.random_file("#{path_to_directory + PACK_PATH}/#{name}-*")
|
25
25
|
end
|
26
26
|
|
27
27
|
define_singleton_method :"#{name}_file" do
|
28
28
|
self.superclass.check_pack_directory_readiness(path_to_directory + PACK_PATH)
|
29
29
|
|
30
|
-
self.superclass.random_file("#{path_to_directory + PACK_PATH}/#{name}
|
30
|
+
self.superclass.random_file("#{path_to_directory + PACK_PATH}/#{name}-*", file: true)
|
31
31
|
end
|
32
32
|
|
33
33
|
define_singleton_method :random do
|
34
34
|
self.superclass.check_pack_directory_readiness(path_to_directory + PACK_PATH)
|
35
35
|
|
36
|
-
self.superclass.random_file("#{path_to_directory + self::PACK_PATH}
|
36
|
+
self.superclass.random_file("#{path_to_directory + self::PACK_PATH}/*")
|
37
37
|
end
|
38
38
|
|
39
39
|
define_singleton_method :random_file do
|
40
40
|
self.superclass.check_pack_directory_readiness(path_to_directory + PACK_PATH)
|
41
41
|
|
42
|
-
self.superclass.random_file("#{path_to_directory + self::PACK_PATH}
|
42
|
+
self.superclass.random_file("#{path_to_directory + self::PACK_PATH}/*", file: true)
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
@@ -55,4 +55,4 @@ end
|
|
55
55
|
# require fake_picture objects
|
56
56
|
Dir.glob(File.join(__dir__, 'fake_picture', '/**/*.rb')).sort.each { |file| require file }
|
57
57
|
|
58
|
-
# add photos like
|
58
|
+
# 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.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- loqimean
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|
@@ -64,6 +64,23 @@ 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.png
|
69
|
+
- lib/fake_picture/avatar/pack/man-10.png
|
70
|
+
- lib/fake_picture/avatar/pack/man-11.png
|
71
|
+
- lib/fake_picture/avatar/pack/man-2.png
|
72
|
+
- lib/fake_picture/avatar/pack/man-3.png
|
73
|
+
- lib/fake_picture/avatar/pack/man-4.png
|
74
|
+
- lib/fake_picture/avatar/pack/man-5.png
|
75
|
+
- lib/fake_picture/avatar/pack/man-6.png
|
76
|
+
- lib/fake_picture/avatar/pack/man-7.png
|
77
|
+
- lib/fake_picture/avatar/pack/man-8.png
|
78
|
+
- lib/fake_picture/avatar/pack/man-9.png
|
79
|
+
- lib/fake_picture/avatar/pack/woman-1.png
|
80
|
+
- lib/fake_picture/avatar/pack/woman-2.png
|
81
|
+
- lib/fake_picture/avatar/pack/woman-3.png
|
82
|
+
- lib/fake_picture/avatar/pack/woman-4.png
|
83
|
+
- lib/fake_picture/avatar/pack/woman-5.png
|
67
84
|
- lib/fake_picture/blog/blog.rb
|
68
85
|
- lib/fake_picture/blog/pack/day_street-1.jpg
|
69
86
|
- lib/fake_picture/blog/pack/day_street-10.jpg
|