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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7ec4b7b00b6f2cb2461c5145d2de87a8d3aef494cd60e6d30e33c8d184de7e9
4
- data.tar.gz: 7d64b5f122a494ce25fd563bf8b10bfff6726dcb194791d7ca1f09c0dfb5aca6
3
+ metadata.gz: 607eb7dc633184356601998488a313cfeeb3f737d70dde0a9f67dc33bbd0b958
4
+ data.tar.gz: 01b8cf8f9152b8b25260da011050f10f9a6b5e3b6230fd5557a085dbfe8d051a
5
5
  SHA512:
6
- metadata.gz: f4279d2b9b2ac8c67582aa1c9a68c5c3553af1e9a54a80ae381a79d1ccb0dc6d4d64d09b4a22b81b0a92d406ef35889d926a1f8b505c0b7712dcbb6f0620445f
7
- data.tar.gz: cbf4e174db7515292e3747823d734537771c280dbb7440885c5b995e0a3824fb324622e2468fe7222a285b7530a310686a1913f61109de117156b62f451df50b
6
+ metadata.gz: 0eb559f6b81a803f3a37f5b2733b33869a6fbc257cbdb6430cb7d68a9e73df29c574c2b5fe17714da41eeeb45683aa0594ecaa6636baf84db5be656160f3ceda
7
+ data.tar.gz: e381374da3a8f8f70624a05151f784365fc16d0c6f9c1a0836625cce9a32d3effde74b0846d1c1bd140d8f6111b28afc1b12a458b2ca2313770900b6598919ae
@@ -0,0 +1,5 @@
1
+ module FakePicture
2
+ class Avatar < Base
3
+ define_methods(__dir__, :man, :woman)
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FakePicture
4
- VERSION = "0.1.3"
4
+ VERSION = "0.2.0"
5
5
  end
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}-*.jpg")
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}-*.jpg", file: true)
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}/*.jpg")
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}/*.jpg", file: true)
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 icons animals posts avatarsма
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.1.3
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-27 00:00:00.000000000 Z
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