ruby_svg_image_generator 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +1 -0
  4. data/.travis.yml +11 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +11 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +109 -0
  9. data/Rakefile +8 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +7 -0
  12. data/lib/ruby_svg_image_generator.rb +126 -0
  13. data/lib/ruby_svg_image_generator/color_part.rb +50 -0
  14. data/lib/ruby_svg_image_generator/part.rb +30 -0
  15. data/lib/ruby_svg_image_generator/theme.rb +67 -0
  16. data/lib/ruby_svg_image_generator/themes/face_avatars/background.rb +28 -0
  17. data/lib/ruby_svg_image_generator/themes/face_avatars/eyes.rb +28 -0
  18. data/lib/ruby_svg_image_generator/themes/face_avatars/face.rb +36 -0
  19. data/lib/ruby_svg_image_generator/themes/face_avatars/face_avatars.rb +12 -0
  20. data/lib/ruby_svg_image_generator/themes/face_avatars/hair.rb +109 -0
  21. data/lib/ruby_svg_image_generator/themes/face_avatars/mouth.rb +37 -0
  22. data/lib/ruby_svg_image_generator/themes/human_avatars/background.rb +38 -0
  23. data/lib/ruby_svg_image_generator/themes/human_avatars/background_2.rb +57 -0
  24. data/lib/ruby_svg_image_generator/themes/human_avatars/body.rb +38 -0
  25. data/lib/ruby_svg_image_generator/themes/human_avatars/complements.rb +194 -0
  26. data/lib/ruby_svg_image_generator/themes/human_avatars/eyes.rb +38 -0
  27. data/lib/ruby_svg_image_generator/themes/human_avatars/hair.rb +228 -0
  28. data/lib/ruby_svg_image_generator/themes/human_avatars/human_avatars.rb +13 -0
  29. data/lib/ruby_svg_image_generator/themes/human_avatars/mouth.rb +38 -0
  30. data/lib/ruby_svg_image_generator/themes/human_avatars/pants.rb +133 -0
  31. data/lib/ruby_svg_image_generator/themes/human_avatars/shirt.rb +208 -0
  32. data/lib/ruby_svg_image_generator/themes/human_avatars/shoes.rb +95 -0
  33. data/lib/ruby_svg_image_generator/themes/landscape_theme/background.rb +35 -0
  34. data/lib/ruby_svg_image_generator/themes/landscape_theme/clouds_back.rb +86 -0
  35. data/lib/ruby_svg_image_generator/themes/landscape_theme/clouds_front.rb +86 -0
  36. data/lib/ruby_svg_image_generator/themes/landscape_theme/flowers.rb +54 -0
  37. data/lib/ruby_svg_image_generator/themes/landscape_theme/ground.rb +35 -0
  38. data/lib/ruby_svg_image_generator/themes/landscape_theme/landscape_theme.rb +14 -0
  39. data/lib/ruby_svg_image_generator/themes/landscape_theme/mountains_back.rb +52 -0
  40. data/lib/ruby_svg_image_generator/themes/landscape_theme/mountains_front.rb +35 -0
  41. data/lib/ruby_svg_image_generator/themes/landscape_theme/river.rb +71 -0
  42. data/lib/ruby_svg_image_generator/themes/landscape_theme/sun.rb +87 -0
  43. data/lib/ruby_svg_image_generator/themes/landscape_theme/trees_1.rb +55 -0
  44. data/lib/ruby_svg_image_generator/themes/landscape_theme/trees_2.rb +55 -0
  45. data/lib/ruby_svg_image_generator/themes/landscape_theme/trees_3.rb +55 -0
  46. data/lib/ruby_svg_image_generator/themes/monkey_avatars/background.rb +34 -0
  47. data/lib/ruby_svg_image_generator/themes/monkey_avatars/clothes.rb +34 -0
  48. data/lib/ruby_svg_image_generator/themes/monkey_avatars/clothes_necks.rb +66 -0
  49. data/lib/ruby_svg_image_generator/themes/monkey_avatars/eyes.rb +100 -0
  50. data/lib/ruby_svg_image_generator/themes/monkey_avatars/face.rb +50 -0
  51. data/lib/ruby_svg_image_generator/themes/monkey_avatars/hats.rb +51 -0
  52. data/lib/ruby_svg_image_generator/themes/monkey_avatars/makeup.rb +84 -0
  53. data/lib/ruby_svg_image_generator/themes/monkey_avatars/monkey_avatars.rb +12 -0
  54. data/lib/ruby_svg_image_generator/themes/monkey_avatars/mouth.rb +83 -0
  55. data/lib/ruby_svg_image_generator/themes/monkey_avatars/nose.rb +50 -0
  56. data/lib/ruby_svg_image_generator/themes/monkey_avatars/skin.rb +34 -0
  57. data/lib/ruby_svg_image_generator/themes/monkey_avatars/wearable.rb +68 -0
  58. data/lib/ruby_svg_image_generator/themes/robot_avatars/antenna.rb +94 -0
  59. data/lib/ruby_svg_image_generator/themes/robot_avatars/arms.rb +144 -0
  60. data/lib/ruby_svg_image_generator/themes/robot_avatars/body.rb +44 -0
  61. data/lib/ruby_svg_image_generator/themes/robot_avatars/button_middle.rb +94 -0
  62. data/lib/ruby_svg_image_generator/themes/robot_avatars/buttons.rb +94 -0
  63. data/lib/ruby_svg_image_generator/themes/robot_avatars/chest.rb +119 -0
  64. data/lib/ruby_svg_image_generator/themes/robot_avatars/face.rb +144 -0
  65. data/lib/ruby_svg_image_generator/themes/robot_avatars/head.rb +94 -0
  66. data/lib/ruby_svg_image_generator/themes/robot_avatars/legs.rb +69 -0
  67. data/lib/ruby_svg_image_generator/themes/robot_avatars/robot_avatars.rb +12 -0
  68. data/lib/ruby_svg_image_generator/themes/test_theme/test_part_0.rb +29 -0
  69. data/lib/ruby_svg_image_generator/themes/test_theme/test_part_1.rb +33 -0
  70. data/lib/ruby_svg_image_generator/themes/test_theme/test_theme.rb +12 -0
  71. data/lib/ruby_svg_image_generator/version.rb +3 -0
  72. data/ruby_svg_image_generator.gemspec +37 -0
  73. data/tareas.txt +60 -0
  74. metadata +178 -0
@@ -0,0 +1,94 @@
1
+ module RubySvgImageGenerator
2
+ class RobotAvatars < RubySvgImageGenerator::Theme
3
+
4
+ class Head < RubySvgImageGenerator::Theme::ColorPart
5
+
6
+ COLORS = ["#38B2CE", "#9FEE00"]
7
+
8
+ MATRICES = [
9
+ [
10
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
11
+ [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1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0, 0, 0, 0],
76
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
77
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
78
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
79
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
80
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
81
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
82
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
83
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
84
+ ]
85
+ ]
86
+
87
+ def initialize
88
+ super "Head"
89
+ end
90
+
91
+ end
92
+
93
+ end
94
+ end
@@ -0,0 +1,69 @@
1
+ module RubySvgImageGenerator
2
+ class RobotAvatars < RubySvgImageGenerator::Theme
3
+
4
+ class Legs < RubySvgImageGenerator::Theme::ColorPart
5
+
6
+ COLORS = ["#B40900"]
7
+
8
+ MATRICES = [
9
+ [
10
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
11
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
51
+ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
52
+ [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],
53
+ [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],
54
+ [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],
55
+ [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],
56
+ [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],
57
+ [ 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],
58
+ [ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]
59
+ ]
60
+ ]
61
+
62
+ def initialize
63
+ super "Legs"
64
+ end
65
+
66
+ end
67
+
68
+ end
69
+ end
@@ -0,0 +1,12 @@
1
+ Dir[File.dirname(__FILE__)+'/*.rb'].each{ |f| require f }
2
+
3
+ module RubySvgImageGenerator
4
+ class RobotAvatars < RubySvgImageGenerator::Theme
5
+
6
+ def initialize
7
+ super "robot avatars", 25, 24
8
+ @parts = [] << Body.new << Chest.new << Legs.new << Head.new << Arms.new << Buttons.new << ButtonMiddle.new << Face.new << Antenna.new
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,29 @@
1
+ module RubySvgImageGenerator
2
+ class TestTheme < RubySvgImageGenerator::Theme
3
+
4
+ class TestPart0 < RubySvgImageGenerator::Theme::Part
5
+
6
+ MATRICES = [
7
+ [
8
+ [ "#000", "#000", "#000", "#000" ],
9
+ [ 0, 0, 0, 0 ],
10
+ [ 0, 0, 0, 0 ]
11
+ ],[
12
+ [ 0, 0, 0, 0 ],
13
+ [ 0, 0, 0, 0 ],
14
+ [ "#000", "#000", "#000", "#000" ]
15
+ ],[
16
+ [ 0, 0, 0, 0 ],
17
+ [ "#000", "#000", "#000", "#000" ],
18
+ [ 0, 0, 0, 0 ]
19
+ ]
20
+ ]
21
+
22
+ def initialize options={}
23
+ super "test_part_0"
24
+ end
25
+
26
+ end
27
+
28
+ end
29
+ end
@@ -0,0 +1,33 @@
1
+ module RubySvgImageGenerator
2
+ class TestTheme < RubySvgImageGenerator::Theme
3
+
4
+ class TestPart1 < RubySvgImageGenerator::Theme::Part
5
+
6
+ MATRICES = [
7
+ [
8
+ [ 0, 0, "#ff0000", 0 ],
9
+ [ 0, 0, "#ff0000", 0 ],
10
+ [ 0, 0, "#ff0000", 0 ]
11
+ ],[
12
+ [ 0, "#ff0000", 0, 0 ],
13
+ [ 0, "#ff0000", 0, 0 ],
14
+ [ 0, "#ff0000", 0, 0 ]
15
+ ],[
16
+ [ "#ff0000", 0, 0, 0 ],
17
+ [ "#ff0000", 0, 0, 0 ],
18
+ [ "#ff0000", 0, 0, 0 ]
19
+ ],[
20
+ [ 0, 0, 0, "#ff0000" ],
21
+ [ 0, 0, 0, "#ff0000" ],
22
+ [ 0, 0, 0, "#ff0000" ]
23
+ ]
24
+ ]
25
+
26
+ def initialize
27
+ super "test_part_1"
28
+ end
29
+
30
+ end
31
+
32
+ end
33
+ end
@@ -0,0 +1,12 @@
1
+ Dir[File.dirname(__FILE__)+'/*.rb'].each{ |f| require f }
2
+
3
+ module RubySvgImageGenerator
4
+ class TestTheme < RubySvgImageGenerator::Theme
5
+
6
+ def initialize
7
+ super "test theme", 3, 3
8
+ @parts = [] << TestPart0.new << TestPart1.new
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module RubySvgImageGenerator
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'ruby_svg_image_generator/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "ruby_svg_image_generator"
8
+ spec.version = RubySvgImageGenerator::VERSION
9
+ spec.authors = ["santiriera626" , "camumino", "franx0"]
10
+ spec.email = ["santiriera626@gmail.com", "camumino@gmail.com", "francisco.moya.martinez@gmail.com"]
11
+
12
+ spec.summary = "It is a SVG avatars generator gem based on themes."
13
+ spec.description = "It is a SVG avatars generator gem based on themes which can be designed by users but also you can find some great pre-designed themes on it."
14
+ spec.homepage = "https://github.com/monkeyKoders/ruby_svg_image_generator"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
+ # delete this section to allow pushing this gem to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency "bundler", "~> 1.5"
31
+ spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency 'rspec', "~> 3.4.0"
33
+
34
+ spec.add_dependency "ruby_matrix_to_svg", "~> 0.0.1"
35
+
36
+
37
+ end
@@ -0,0 +1,60 @@
1
+ Proyecto gema para "avatares" svg (ruby_svg_image_generator? ruby_svg_avatars?)
2
+
3
+ La idea es crear una gema para generar imagenes svg compuestas por piezas.
4
+ Utilizando el concepto ruby_randimage y la gema ruby_matrix_to_svg para generar los svg
5
+
6
+
7
+ Cosas por ver y decidir
8
+
9
+ - Estaria bien que la gente pudiese hacer una PR con un tema nuevo y la gema definiese una interface para ello.
10
+ De modo que si hay un nuevo tema la demo app automaticamente saque en el selector de temas el nuevo tema,
11
+ y si se selecciona que aparezcan todas sus opciones en el formulario sin tener que tocar nada en la demo app.
12
+
13
+ Ejs:
14
+ caras o avatares
15
+ - tamaño lienzo (16x16, 16x32, etc )
16
+ - fondo
17
+ - color de piel
18
+ - cabeza
19
+ - pelo
20
+ - ojos
21
+ - gafas
22
+ - barba
23
+ - orejas
24
+
25
+ flores
26
+ - tamaño lienzo (16x16, 16x32, etc )
27
+ - fondo
28
+ - tallo
29
+ - hojas
30
+ - tierra
31
+ - petalos
32
+
33
+ pechos XD
34
+ - tamaño lienzo (16x16, 16x32, etc )
35
+ - fondo
36
+ - tamaño/forma
37
+ - color de piel
38
+ - pezones
39
+ - etc
40
+
41
+ insectos
42
+ coches
43
+ motos
44
+ bicis
45
+ etc .....
46
+
47
+ - Podria ser interesante que los temas se saquen a otras gemas por cuestion de tamaño de la misma.
48
+
49
+
50
+ INTERFAZ:
51
+ Para los iferentes temas habria que decidir una interfaz.
52
+
53
+ Se me ocurre:
54
+ - nombre del tema.
55
+ - tamaño del lienzo.
56
+ - fondos permitidos.
57
+ - tipos de piezas que componen el fondo. Por cada una:
58
+ - nombre
59
+ - numero
60
+ - array con las posibilidades
metadata ADDED
@@ -0,0 +1,178 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby_svg_image_generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - santiriera626
8
+ - camumino
9
+ - franx0
10
+ autorequire:
11
+ bindir: exe
12
+ cert_chain: []
13
+ date: 2016-06-20 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.5'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '1.5'
29
+ - !ruby/object:Gem::Dependency
30
+ name: rake
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '10.0'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '10.0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: rspec
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: 3.4.0
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: 3.4.0
57
+ - !ruby/object:Gem::Dependency
58
+ name: ruby_matrix_to_svg
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: 0.0.1
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: 0.0.1
71
+ description: It is a SVG avatars generator gem based on themes which can be designed
72
+ by users but also you can find some great pre-designed themes on it.
73
+ email:
74
+ - santiriera626@gmail.com
75
+ - camumino@gmail.com
76
+ - francisco.moya.martinez@gmail.com
77
+ executables: []
78
+ extensions: []
79
+ extra_rdoc_files: []
80
+ files:
81
+ - ".gitignore"
82
+ - ".rspec"
83
+ - ".travis.yml"
84
+ - CODE_OF_CONDUCT.md
85
+ - Gemfile
86
+ - LICENSE.txt
87
+ - README.md
88
+ - Rakefile
89
+ - bin/console
90
+ - bin/setup
91
+ - lib/ruby_svg_image_generator.rb
92
+ - lib/ruby_svg_image_generator/color_part.rb
93
+ - lib/ruby_svg_image_generator/part.rb
94
+ - lib/ruby_svg_image_generator/theme.rb
95
+ - lib/ruby_svg_image_generator/themes/face_avatars/background.rb
96
+ - lib/ruby_svg_image_generator/themes/face_avatars/eyes.rb
97
+ - lib/ruby_svg_image_generator/themes/face_avatars/face.rb
98
+ - lib/ruby_svg_image_generator/themes/face_avatars/face_avatars.rb
99
+ - lib/ruby_svg_image_generator/themes/face_avatars/hair.rb
100
+ - lib/ruby_svg_image_generator/themes/face_avatars/mouth.rb
101
+ - lib/ruby_svg_image_generator/themes/human_avatars/background.rb
102
+ - lib/ruby_svg_image_generator/themes/human_avatars/background_2.rb
103
+ - lib/ruby_svg_image_generator/themes/human_avatars/body.rb
104
+ - lib/ruby_svg_image_generator/themes/human_avatars/complements.rb
105
+ - lib/ruby_svg_image_generator/themes/human_avatars/eyes.rb
106
+ - lib/ruby_svg_image_generator/themes/human_avatars/hair.rb
107
+ - lib/ruby_svg_image_generator/themes/human_avatars/human_avatars.rb
108
+ - lib/ruby_svg_image_generator/themes/human_avatars/mouth.rb
109
+ - lib/ruby_svg_image_generator/themes/human_avatars/pants.rb
110
+ - lib/ruby_svg_image_generator/themes/human_avatars/shirt.rb
111
+ - lib/ruby_svg_image_generator/themes/human_avatars/shoes.rb
112
+ - lib/ruby_svg_image_generator/themes/landscape_theme/background.rb
113
+ - lib/ruby_svg_image_generator/themes/landscape_theme/clouds_back.rb
114
+ - lib/ruby_svg_image_generator/themes/landscape_theme/clouds_front.rb
115
+ - lib/ruby_svg_image_generator/themes/landscape_theme/flowers.rb
116
+ - lib/ruby_svg_image_generator/themes/landscape_theme/ground.rb
117
+ - lib/ruby_svg_image_generator/themes/landscape_theme/landscape_theme.rb
118
+ - lib/ruby_svg_image_generator/themes/landscape_theme/mountains_back.rb
119
+ - lib/ruby_svg_image_generator/themes/landscape_theme/mountains_front.rb
120
+ - lib/ruby_svg_image_generator/themes/landscape_theme/river.rb
121
+ - lib/ruby_svg_image_generator/themes/landscape_theme/sun.rb
122
+ - lib/ruby_svg_image_generator/themes/landscape_theme/trees_1.rb
123
+ - lib/ruby_svg_image_generator/themes/landscape_theme/trees_2.rb
124
+ - lib/ruby_svg_image_generator/themes/landscape_theme/trees_3.rb
125
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/background.rb
126
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/clothes.rb
127
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/clothes_necks.rb
128
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/eyes.rb
129
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/face.rb
130
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/hats.rb
131
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/makeup.rb
132
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/monkey_avatars.rb
133
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/mouth.rb
134
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/nose.rb
135
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/skin.rb
136
+ - lib/ruby_svg_image_generator/themes/monkey_avatars/wearable.rb
137
+ - lib/ruby_svg_image_generator/themes/robot_avatars/antenna.rb
138
+ - lib/ruby_svg_image_generator/themes/robot_avatars/arms.rb
139
+ - lib/ruby_svg_image_generator/themes/robot_avatars/body.rb
140
+ - lib/ruby_svg_image_generator/themes/robot_avatars/button_middle.rb
141
+ - lib/ruby_svg_image_generator/themes/robot_avatars/buttons.rb
142
+ - lib/ruby_svg_image_generator/themes/robot_avatars/chest.rb
143
+ - lib/ruby_svg_image_generator/themes/robot_avatars/face.rb
144
+ - lib/ruby_svg_image_generator/themes/robot_avatars/head.rb
145
+ - lib/ruby_svg_image_generator/themes/robot_avatars/legs.rb
146
+ - lib/ruby_svg_image_generator/themes/robot_avatars/robot_avatars.rb
147
+ - lib/ruby_svg_image_generator/themes/test_theme/test_part_0.rb
148
+ - lib/ruby_svg_image_generator/themes/test_theme/test_part_1.rb
149
+ - lib/ruby_svg_image_generator/themes/test_theme/test_theme.rb
150
+ - lib/ruby_svg_image_generator/version.rb
151
+ - ruby_svg_image_generator.gemspec
152
+ - tareas.txt
153
+ homepage: https://github.com/monkeyKoders/ruby_svg_image_generator
154
+ licenses:
155
+ - MIT
156
+ metadata:
157
+ allowed_push_host: https://rubygems.org
158
+ post_install_message:
159
+ rdoc_options: []
160
+ require_paths:
161
+ - lib
162
+ required_ruby_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - ">="
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ requirements: []
173
+ rubyforge_project:
174
+ rubygems_version: 2.4.8
175
+ signing_key:
176
+ specification_version: 4
177
+ summary: It is a SVG avatars generator gem based on themes.
178
+ test_files: []