pixavatar 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/LICENSE +21 -0
- data/README.md +21 -0
- data/Rakefile +10 -0
- data/bin/pixavatar +9 -0
- data/lib/pixavatar.rb +1 -3
- data/lib/pixavatar/version.rb +4 -0
- data/pixavatar.gemspec +26 -0
- data/spec/pixavatar_spec.rb +18 -0
- data/spec/spec_helper.rb +2 -0
- metadata +46 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba36bf2373056f6d8571bec4c0b4184db6c02f81
|
4
|
+
data.tar.gz: 6825e3a0083e732dc157fca1ee410d3b790c0e49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b1346c9ba82748f349171a9f210df94b93375f336ba73aa0b091a447f42359f8adcba9c3c66e571892158dfb7651fb9e310e78019394ba276e902dfba9113a2
|
7
|
+
data.tar.gz: 30951d99b9a8ac1dbf25f294922eb468831d098c7012ba1a1bdfdb359ff14be7d8dab552b024976408c9f5a96830572418522994ca6861dcd41ff9e4d4c04e8a
|
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 array101
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# pixavatar
|
2
|
+
|
3
|
+
[](https://badge.fury.io/rb/pixavatar)
|
4
|
+
|
5
|
+
generate unique pixel avatar for users
|
6
|
+
|
7
|
+
## How to use
|
8
|
+
|
9
|
+
- IRB
|
10
|
+
|
11
|
+
```bash
|
12
|
+
$ gem install pixavatar
|
13
|
+
$ irb
|
14
|
+
> require 'pixavatar'
|
15
|
+
#=> true
|
16
|
+
> Pixavatar.draw_image('hello')
|
17
|
+
#=> generates and saves image on $PWD
|
18
|
+
```
|
19
|
+
|
20
|
+
|
21
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'rspec/core/rake_task'
|
2
|
+
require 'bundler/gem_tasks'
|
3
|
+
|
4
|
+
# Default directory to look in is `/spec`
|
5
|
+
# Run with `rake spec`
|
6
|
+
RSpec::Core::RakeTask.new(:spec) do |task|
|
7
|
+
task.rspec_opts = ['--color', '--format progress']
|
8
|
+
end
|
9
|
+
|
10
|
+
task :default => :spec
|
data/bin/pixavatar
ADDED
data/lib/pixavatar.rb
CHANGED
data/pixavatar.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require "pixavatar/version"
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "pixavatar"
|
9
|
+
s.version = Pixavatar::VERSION
|
10
|
+
s.summary = "generate unique pixel avatar image"
|
11
|
+
s.description = "Pixavatar is a simple placeholder image generator that can be used as filler images where avatar images are missing"
|
12
|
+
s.authors = ["Sandeep"]
|
13
|
+
s.email = "acharya_sandeep@hotmail.com"
|
14
|
+
s.homepage = "https://github.com/array101/pixavatar"
|
15
|
+
s.license = "Beerware"
|
16
|
+
|
17
|
+
s.files = `git ls-files -z`.split("\x0")
|
18
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
20
|
+
|
21
|
+
s.add_development_dependency("rspec", "~> 3")
|
22
|
+
s.add_development_dependency("pry", "~> 0")
|
23
|
+
|
24
|
+
s.add_runtime_dependency("chunky_png", "~> 1.3")
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Pixavatar do
|
4
|
+
before do
|
5
|
+
@pixavatar = Pixavatar.new('hello')
|
6
|
+
end
|
7
|
+
|
8
|
+
context 'instantiate' do
|
9
|
+
it "assigns color RGB hash" do
|
10
|
+
expect(@pixavatar.avatar).to have_key(:color)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "assigns grid value" do
|
14
|
+
expect(@pixavatar.avatar).to have_key(:grid)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixavatar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandeep
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: chunky_png
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,14 +52,24 @@ dependencies:
|
|
24
52
|
- - "~>"
|
25
53
|
- !ruby/object:Gem::Version
|
26
54
|
version: '1.3'
|
27
|
-
description: Pixavatar is a simple placeholder image generator that can be used
|
28
|
-
|
55
|
+
description: Pixavatar is a simple placeholder image generator that can be used as
|
56
|
+
filler images where avatar images are missing
|
29
57
|
email: acharya_sandeep@hotmail.com
|
30
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- pixavatar
|
31
60
|
extensions: []
|
32
61
|
extra_rdoc_files: []
|
33
62
|
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- bin/pixavatar
|
34
68
|
- lib/pixavatar.rb
|
69
|
+
- lib/pixavatar/version.rb
|
70
|
+
- pixavatar.gemspec
|
71
|
+
- spec/pixavatar_spec.rb
|
72
|
+
- spec/spec_helper.rb
|
35
73
|
homepage: https://github.com/array101/pixavatar
|
36
74
|
licenses:
|
37
75
|
- Beerware
|
@@ -56,4 +94,6 @@ rubygems_version: 2.6.8
|
|
56
94
|
signing_key:
|
57
95
|
specification_version: 4
|
58
96
|
summary: generate unique pixel avatar image
|
59
|
-
test_files:
|
97
|
+
test_files:
|
98
|
+
- spec/pixavatar_spec.rb
|
99
|
+
- spec/spec_helper.rb
|