ui_faces 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +16 -0
- data/Gemfile +4 -0
- data/Guardfile +11 -0
- data/LICENSE.txt +22 -0
- data/README.md +69 -0
- data/Rakefile +2 -0
- data/lib/ui_faces/version.rb +3 -0
- data/lib/ui_faces.rb +176 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/uiFaces_spec.rb +54 -0
- data/ui_faces.gemspec +27 -0
- metadata +144 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6a5af90e5ad1eb8f916017a0d242c7e90657c997
|
4
|
+
data.tar.gz: debd5378bac01015431e5bb6228cf541a151a335
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2df28a2d304e866795acdf95a76ab949a5bd821cab12d0f2d10f615c371ed13d514b353b9cb935c661812bebdf653c24104f939d0131bbc2ceaa535e058609bf
|
7
|
+
data.tar.gz: 932b7faf41396468c90f3eee37438f84a24d9cedeb5488d89d344f87bb7a8fb8c7e45f70ae60dad78d79ac6d479e3df983b9b39fbc1fd6453cdfdac2a6aaf62f
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Guinsly Mondesir
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# UiFaces
|
2
|
+
|
3
|
+
This gem uses UIfaces.com ( https://www.uifaces.com/ ) to **fake user pictures** on your app. You would like to use real user images for your app. This gem might be right you need. All the images comes from the 'authorized' section from uifaces and all images are real Twitter users images or avatar that previously agreeded to share their images.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'ui_faces'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install ui_faces
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
#####FIND A RANDOM USER
|
24
|
+
link = UiFaces.face
|
25
|
+
puts link
|
26
|
+
=> https://s3.amazonaws.com/uifaces/faces/twitter/kokikillara/128.jpg
|
27
|
+
|
28
|
+
#####FIND A SPECIFIC USER
|
29
|
+
link = UiFaces.face(true, 'larrygerard')
|
30
|
+
puts link
|
31
|
+
=> https://s3.amazonaws.com/uifaces/faces/twitter/kokikillara/128.jpg
|
32
|
+
|
33
|
+
#####FIND A SPECIFIC USER BY GENRE
|
34
|
+
link = UiFaces.sex('woman')
|
35
|
+
woman = UiFaces.woman
|
36
|
+
man = UiFaces.man
|
37
|
+
|
38
|
+
#####RETRIEVE A HASH with different pictures size
|
39
|
+
link = UiFaces.faces
|
40
|
+
puts link
|
41
|
+
=> {
|
42
|
+
:bigger=>"https://s3.amazonaws.com/uifaces/faces/twitter/guiiipontes/73.jpg",
|
43
|
+
:normal=>"https://s3.amazonaws.com/uifaces/faces/twitter/guiiipontes/48.jpg",
|
44
|
+
:epic=>"https://s3.amazonaws.com/uifaces/faces/twitter/guiiipontes/128.jpg",
|
45
|
+
:mini=>"https://s3.amazonaws.com/uifaces/faces/twitter/guiiipontes/24.jpg"
|
46
|
+
}
|
47
|
+
|
48
|
+
#####RUBY ON RAILS(seed.rb)
|
49
|
+
10.times do
|
50
|
+
Employee.find_or_create(
|
51
|
+
:name => Faker,
|
52
|
+
:image => UiFaces.face
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
#app/view/employees/show.html
|
57
|
+
<%= image_tag @employee.image, class: "yourclass" %>
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
## Contributing
|
62
|
+
|
63
|
+
1. Star it :)
|
64
|
+
2. Fork it ( https://github.com/guinslym/ui_faces/fork )
|
65
|
+
3. Create your feature branch (`git checkout -b my-new-feature`)
|
66
|
+
4. Test it
|
67
|
+
5. Commit your changes (`git commit -am 'Add some feature'`)
|
68
|
+
6. Push to the branch (`git push origin my-new-feature`)
|
69
|
+
7. Create a new Pull Request
|
data/Rakefile
ADDED
data/lib/ui_faces.rb
ADDED
@@ -0,0 +1,176 @@
|
|
1
|
+
#require "ui_faces/version"
|
2
|
+
require 'net/http'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module UiFaces
|
6
|
+
|
7
|
+
USERNAME= ['brad_frost', 'iflendra', 'kastov_yury', 'vladabazhan', 'csswizardry', 'eduardo_olv',
|
8
|
+
'vladarbatov', 'mizko', 'kurafire', 'shalt0ni', 'sachagreif', 'dancounsell',
|
9
|
+
'adhamdannaway', 'peterlandt', 'chadengle', 'pixeliris', 'whale', 'kerem', 'ateneupopular',
|
10
|
+
'boheme', 'cemshid', 'thrivesolo', 'enda', 'jollynutlet', 'adellecharles', 'peterme', 'mghoz',
|
11
|
+
'flamekaizar', 'jina', 'dustinlamont', 'idiot', 'joshhemsley', 'mlane', 'nexy_dre', 'sindresorhus',
|
12
|
+
'sillyleo', 'motherfuton', 'tomaslau', 'arminophen', 'guiiipontes', 'c_southam',
|
13
|
+
'mrjohnwalker', 'iconfinder', 'glif', '_hartjeg', 'soffes', 'teleject', 'brynn',
|
14
|
+
'rssems', 'felipenogs', 'gt', 'mattchevy', 'jaredfitch', 'andrewaashen', 'ladylexy',
|
15
|
+
'brandclay', 'abecherian', 'ManikRathee', 'vista', 'leemunroe', 'dingyi', 'putorti',
|
16
|
+
'dakshbhagya', 'dannpetty', 'teclaro', '_shahedk', 'kfriedson', 'kevin_granger', 'fffabs',
|
17
|
+
'pinceladasdaweb', 'suprb', '9lessons', 'itsjonq', 'aaroni', '_everaldo',"canrec", "carloscrvntsg",
|
18
|
+
"reetajayendra", "pbaranco", "likewings", "delanicete", "joshkennedy", "xadusx", "nadezdaneverova",
|
19
|
+
"i_ganin", "derekcramer", "raphaelnikson", "zombieoummy", "shiienurm", "sunnsit", "jonathanchrisp",
|
20
|
+
"joelcannon", "bangherisetiawn", "pburjanec", "hilanimal", "massfocus", "c_southam",
|
21
|
+
"noammorrissey", "davidsasda", "_eyev_", "j04ntoh", "vm_f", "shaan360", "gmourier",
|
22
|
+
"rikitanone", "akmur", "moaazsidat", "bernieaho", "grysnsmth", "timoliverau", "rowancavanagh",
|
23
|
+
"damirdurmo", "meecasso", "hathawaystephen", "craftbynick", "dland", "pjnes", "balintorosz",
|
24
|
+
"903886562", "roskin_m", "trucy", "albertaugustin", "yalozhkin", "codysanfilippo", "dutchnadia",
|
25
|
+
"kilperic", "pequelord", "hoangloi", "islamgaraev_tim", "superoutman", "shiienurm", "josue",
|
26
|
+
"joelcannon", "glauberamos", "jayvisavadia", "karalek", "embrcecreations", "amoslanka",
|
27
|
+
"damirdurmo", "alemasferrer", "willrax", "jehnglynn", "masterhopia316", "glauberamos",
|
28
|
+
"rasagy", "fireupman", "ravikumar8", "kimberlygs_", "lososina", "n2kza", "bagawarman",
|
29
|
+
"andyfang98", "viktor_dotsenko", "irfansami2", "timbalabuch", "monicaczarny", "moae84",
|
30
|
+
"autobanshaq", "marissamcpeak", "carlosblanco_eu", "ddddrew", "htmlstream", "tofslie",
|
31
|
+
"amlinarev", "saarabpreet", "svenphan", "scottfister", "funwatercat", "ya_zl01",
|
32
|
+
"pauljakobwhite", "areus", "cookingeasycom", "kirangopal", "grantharr_s", "rpatey",
|
33
|
+
"aaronstump", "dfhdesign", "hejallan", "pf_creative", "rikas", "spacewood_", "sava2500", "sebygarilli",
|
34
|
+
"dustintheweb", "colynb", "linkinf88k", "wilsonnma", "lettershoppe", "vipinsanker", "spencerortega",
|
35
|
+
"soh3il", "he_jinsheng", "tomgreever", "meisso_jarno", "lukaszklis", "robturlinckx", "looneydoodle",
|
36
|
+
"alxleroydeval", "mizhgan", "kimberlygs_", "vista", "raresloth", "ntfblog", "j1tang", "jefffis", "jehnglynn",
|
37
|
+
"tgormtx", "dan_malarkey", "amoslanka", "mrmartineau", "kaibrach", "skylark64", "antjanus", "kirillgreen",
|
38
|
+
"brenton_clarke", "matejlatin", "froidz", "nickyzoid", "dreierdominic", "skogberg", "joelcipriano",
|
39
|
+
"inspiringbg", "donschnelly", "thimo_cz", "russell_baylis", "mashaaaaal", "areskub", "csteib", "petebernardo",
|
40
|
+
"ilya101010", "jckieangel", "jjsiii", "onkaar", "jbcordina", "lalalaura922", "heyllowlab", "nadya_lex", "suprb",
|
41
|
+
"pinceladasdaweb", "edwin_de_jongh", "francortz", "indigo90", "vishal19801", "jozh123", "anton0kurilov",
|
42
|
+
"originalgoatee", "chendahang", "alestart", "jningtho", "antongenkin", "turkutuuli", "razlagutt", "nepdud",
|
43
|
+
"snowshade", "nate_designer", "peachananr", "shuangshuangli", "quisif", "mrgnw", "devineninaresh",
|
44
|
+
"nathansimpsongd", "bruno1fernando", "mrxloka", "arpad05", "gunjanraik", "mangosango", "adellecharles",
|
45
|
+
"rikyushinichi", "ramdreamers", "victinx", "lingeswaran", "codydmd", "chexee", "sorenschroder", "zeppeppers",
|
46
|
+
"cotegrunenwald", "leelkennedy", "abujahed19", "dahparra", "borryshasian", "leogono", "ianlopshire",
|
47
|
+
"marciotoledo", "didpopcom", "fidelthomet", "ahmedelgabri", "andrewofficer", "ceekaytweet", "shanya_o",
|
48
|
+
"aarondgilmore", "herrhaase", "sikeane", "creativebrainbe", "jrxmember", "limpa123", "rbaassi", "haydn_woods",
|
49
|
+
"puzik", "i_makethings", "olgary", "arminophen", "and_zmei", "mkosterich", "suggeelson", "ektadary",
|
50
|
+
"nansysweet2", "tristandenyer", "aluisio_azevedo", "areandacom", "allenjordan", "hichamazhairi", "sachingawas",
|
51
|
+
"thekennythegame", "vashokk", "cattsmall", "elliotnolten", "tyagoneres", "mikewilliam1982", "n_tassone",
|
52
|
+
"rok_samsa", "eitarafa", "lucassimons1987", "maks_akmal", "007aasim", "phaistonian", "georgedyjr",
|
53
|
+
"gcmorley", "azizarsl", "flobota", "adamkirkwood", "creative_px", "sannigraphics", "kurtinc", "superhankai",
|
54
|
+
"strelov_d", "paladinstudio", "richwild", "rv_atom", "vlysergin", "mostafahawary", "gavr1l0", "umairulhaque",
|
55
|
+
"typografil", "spacekid", "seomarlboro", "chinagrimace", "deedubs", "marcosnwp", "hollymdewolf", "boundbystars",
|
56
|
+
"mrjohnwalker", "seantremaine", "jghyllebert", "the_frug", "solid_color", "pampersdry", "elcardoson",
|
57
|
+
"lisakey1986", "michaelcomiskey", "gordo", "olivermonschau", "davidmerrique", "plbabin", "mattdetails",
|
58
|
+
"michaelbrooksjr", "ariona_rian", "davidvb", "gokhunguneyhan", "brad_frost", "islamgaraev_tim", "kennyadr",
|
59
|
+
"ahmed_sa3ied", "simply_simpy", "bwagert", "gearoidorourke", "evgeny_ryabcev", "zackeeler", "ooomz",
|
60
|
+
"richcsmith", "raydeguzmanto", "jemmoudimed", "asna_farid", "davidhemphill", "joshuarule", "dreizle", "dannegm",
|
61
|
+
"majksner", "fgin69", "_zm", "motionthinks", "ShaneHelm", "bgiardelli", "ntnth", "avnagaraj", "stephenmdixon",
|
62
|
+
"jolliver", "osmond", "matthewkay_", "powerpointsuper", "itsselvam", "alexanderkirov", "brandon_arnold",
|
63
|
+
"julesholleboom", "laksgandikota", "kristoffintosh", "prheemo", "sconzen", "tazmattar", "mobfrank",
|
64
|
+
"alek_djuric", "normanbox", "konvictedofsin", "boheme", "aeon56", "gofrasdesign", "andresenfredrik", "upslon",
|
65
|
+
"jonpyefinch", "itsjaymem", "vamseekrishnain", "dsaltaren", "bbergher", "jackiesaik", "cheezonbread",
|
66
|
+
"onlymagugz", "kokikillara", "pavelbuben", "babojan", "thaoalpha1501", "lososina", "michaelcecetka",
|
67
|
+
"zensenmobile", "thramp", "Chakintosh", "jiceb", "aviddayentonbay", "depaulawagner", "sweetdelisa",
|
68
|
+
"kadri1914", "tomreinhoudt", "fionaosaurusrex", "robergd", "bbuecherl", "nicoleglynn", "hellofeverrrr",
|
69
|
+
"jasonkempers", "sterlingrules", "anysmechkar", "loresrockstar", "victorabrantes", "ilucasramos", "bartjo",
|
70
|
+
"motamarad", "deluzino", "jay_wilburn", "lpzilva", "migl40d", "_iamnyasha", "vitorleal", "edhenderson",
|
71
|
+
"akmalfikri"]
|
72
|
+
|
73
|
+
WOMEN = ["jina", "ladylexy", "adellecharles", "kfriedson", "brynn", "pixeliris", "nisaanjani"
|
74
|
+
|
75
|
+
]
|
76
|
+
|
77
|
+
MEN = ["brad_frost", "csswizardry", "guiiipontes", "kurafire", "tomaslau", "cemshid", "dancounsell",
|
78
|
+
"abecherian", "mlane", "peterme", "suprb", "dingyi", "shalt0ni", "vista", "arminophen",
|
79
|
+
"kevin_granger", "rssems", "adhamdannaway", "nexy_dre", "teleject", "9lessons", "dakshbhagya",
|
80
|
+
"_shahedk", "itsjonq", "joshhemsley", "enda", "leemunroe", "vladarbatov", "c_southam", "felipenogs",
|
81
|
+
"kerem", "ManikRathee", "chadengle", "peterlandt", "jaredfitch", "mattchevy", "soffes", "sindresorhus",
|
82
|
+
"motherfuton", "mrjohnwalker", "putorti", "teclaro", "andrewaashen", "aaroni", "boheme", "dustinlamont"
|
83
|
+
|
84
|
+
]
|
85
|
+
|
86
|
+
BASE_LINK = "https://s3.amazonaws.com/uifaces/faces/twitter/"
|
87
|
+
|
88
|
+
def self.face(network=false, username='random', format="epic")
|
89
|
+
#return a image link from uifaces
|
90
|
+
#to make it faster.... network should be false
|
91
|
+
|
92
|
+
if(username != 'random')
|
93
|
+
link = "http://uifaces.com/api/v1/user/"
|
94
|
+
else
|
95
|
+
link = '/api/v1/random'
|
96
|
+
end
|
97
|
+
|
98
|
+
unless network
|
99
|
+
#if you don't want to use internet to retrieve an image link
|
100
|
+
#than it will return a custom image link built from the USERNAME array
|
101
|
+
return local_random(format)
|
102
|
+
else
|
103
|
+
#I'll try to use the network
|
104
|
+
begin
|
105
|
+
response = Net::HTTP.get_response("uifaces.com", link + username)
|
106
|
+
rescue SocketError
|
107
|
+
return local_random(format)
|
108
|
+
end
|
109
|
+
#checking the response code 200 || 400
|
110
|
+
if response.code.eql?'200'
|
111
|
+
hash = JSON.parse(response.body)
|
112
|
+
return hash['image_urls'][format]
|
113
|
+
else
|
114
|
+
#the username that you are looking for doesn't exist
|
115
|
+
## response.code == 404
|
116
|
+
return local_random(format)
|
117
|
+
end
|
118
|
+
end#unless
|
119
|
+
|
120
|
+
end#self.face
|
121
|
+
|
122
|
+
def self.faces(network=false, username='random', format='epic')
|
123
|
+
#return a hash of links
|
124
|
+
#puts faces['bigger']
|
125
|
+
link = self.face(network, username, format)
|
126
|
+
username = link.split("/")[-2]
|
127
|
+
return faces = {:bigger => BASE_LINK + username + "/73.jpg",
|
128
|
+
:normal => BASE_LINK + username + "/48.jpg",
|
129
|
+
:epic => BASE_LINK + username + "/128.jpg",
|
130
|
+
:mini => BASE_LINK + username + "/24.jpg"
|
131
|
+
}
|
132
|
+
end
|
133
|
+
|
134
|
+
#Only one parameter
|
135
|
+
def self.woman(format="epic")
|
136
|
+
return self.retrieve_a_link(format, WOMEN)
|
137
|
+
end
|
138
|
+
|
139
|
+
def self.man(format="epic")
|
140
|
+
return self.retrieve_a_link(format, MEN)
|
141
|
+
end
|
142
|
+
|
143
|
+
def self.sex(genre="male", format="epic")
|
144
|
+
if ( genre.eql?("female") or (genre.eql?("woman")))
|
145
|
+
return self.retrieve_a_link(format, WOMEN)
|
146
|
+
else
|
147
|
+
return self.retrieve_a_link(format, MEN)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
def self.local_random(format="epic")
|
152
|
+
return self.retrieve_a_link(format, USERNAME)
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
def self.retrieve_a_link(format="epic", object_name=USERNAME)
|
157
|
+
return BASE_LINK + object_name.sample + "/" + self.width(format) + ".jpg"
|
158
|
+
end
|
159
|
+
|
160
|
+
|
161
|
+
def self.width(format)
|
162
|
+
if(format.eql?"bigger")
|
163
|
+
'73'
|
164
|
+
elsif (format.eql?"normal")
|
165
|
+
'48'
|
166
|
+
elsif (format.eql?"mini")
|
167
|
+
'24'
|
168
|
+
else
|
169
|
+
'128'
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
end
|
176
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'ui_faces'
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
# Use color in STDOUT
|
5
|
+
config.color = true
|
6
|
+
|
7
|
+
# Use color not only in STDOUT but also in pagers and files
|
8
|
+
config.tty = true
|
9
|
+
|
10
|
+
# Use the specified formatter
|
11
|
+
config.formatter = :documentation # :progress, :html, :textmate
|
12
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe UiFaces do
|
4
|
+
content = UiFaces.face(false, 'random', 'bigger')
|
5
|
+
|
6
|
+
it '::returns a link' do
|
7
|
+
expect(content).to be_a String
|
8
|
+
end
|
9
|
+
it '::the link include "twitter"' do
|
10
|
+
expect(content.include?('twitter')).to eql( true)
|
11
|
+
end
|
12
|
+
it "::the image size should be by default 128" do
|
13
|
+
link = UiFaces.face(true, 'larrygerard')
|
14
|
+
link = link.split("/")[-1].split(".")[0]
|
15
|
+
expect(link).to match("128")
|
16
|
+
end
|
17
|
+
it "::the image size in mini should eql 24" do
|
18
|
+
link = UiFaces.face(true, 'larrygerard', 'mini')
|
19
|
+
link = link.split("/")[-1].split(".")[0]
|
20
|
+
expect(link).to match("24")
|
21
|
+
end
|
22
|
+
it "::should returns a man images" do
|
23
|
+
link = UiFaces::sex('male', 'epic')
|
24
|
+
link = link.split("/")[-2]
|
25
|
+
#puts link
|
26
|
+
expect(UiFaces::MEN.include?link).to eql(true)
|
27
|
+
end
|
28
|
+
it "::should returns a woman images" do
|
29
|
+
link = UiFaces::sex('female', 'epic')
|
30
|
+
link = link.split("/")[-2]
|
31
|
+
#puts link
|
32
|
+
expect(UiFaces::WOMEN.include?link).to eql(true)
|
33
|
+
end
|
34
|
+
it "::In case of SocketError take a random image" do
|
35
|
+
link = UiFaces.face(true, 'larrygerard')
|
36
|
+
link = link.split("/")[-2]
|
37
|
+
expect(UiFaces::USERNAME.include?link).to eql(true)
|
38
|
+
end
|
39
|
+
it "::In case of error 400 take a random image" do
|
40
|
+
link = UiFaces.face(true, 'larrygerard')
|
41
|
+
link = link.split("/")[-2]
|
42
|
+
expect(UiFaces::USERNAME.include?link).to eql(true)
|
43
|
+
end
|
44
|
+
it "::Expecting an Hash containing exactly this pattern" do
|
45
|
+
link = UiFaces.faces(true, 'larrygerard')
|
46
|
+
expect(link).to match(
|
47
|
+
:bigger => an_instance_of(String),
|
48
|
+
:normal => a_string_starting_with("h"),
|
49
|
+
:epic => a_string_ending_with(".jpg"),
|
50
|
+
:mini => an_instance_of(String)
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
data/ui_faces.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ui_faces/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ui_faces"
|
8
|
+
spec.version = UiFaces::VERSION
|
9
|
+
spec.authors = ["Guinsly Mondesir"]
|
10
|
+
spec.email = ["agmond@gmx.com.br"]
|
11
|
+
spec.summary = %q{This gem uses UIfaces.com to fake user pictures on your app.}
|
12
|
+
spec.description = %q{UIFaces is a great website to find user pictures to mockup your app. With this gems you can now implement more easily a pictures in your web app.}
|
13
|
+
spec.homepage = "https://github.com/guinslym/Uifaces"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "rspec-nc"
|
25
|
+
spec.add_development_dependency "guard"
|
26
|
+
spec.add_development_dependency "guard-rspec"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ui_faces
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.8
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Guinsly Mondesir
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-nc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: UIFaces is a great website to find user pictures to mockup your app.
|
98
|
+
With this gems you can now implement more easily a pictures in your web app.
|
99
|
+
email:
|
100
|
+
- agmond@gmx.com.br
|
101
|
+
executables: []
|
102
|
+
extensions: []
|
103
|
+
extra_rdoc_files: []
|
104
|
+
files:
|
105
|
+
- ".gitignore"
|
106
|
+
- ".travis.yml"
|
107
|
+
- Gemfile
|
108
|
+
- Guardfile
|
109
|
+
- LICENSE.txt
|
110
|
+
- README.md
|
111
|
+
- Rakefile
|
112
|
+
- lib/ui_faces.rb
|
113
|
+
- lib/ui_faces/version.rb
|
114
|
+
- spec/spec_helper.rb
|
115
|
+
- spec/uiFaces_spec.rb
|
116
|
+
- ui_faces.gemspec
|
117
|
+
homepage: https://github.com/guinslym/Uifaces
|
118
|
+
licenses:
|
119
|
+
- MIT
|
120
|
+
metadata: {}
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options: []
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
requirements: []
|
136
|
+
rubyforge_project:
|
137
|
+
rubygems_version: 2.2.2
|
138
|
+
signing_key:
|
139
|
+
specification_version: 4
|
140
|
+
summary: This gem uses UIfaces.com to fake user pictures on your app.
|
141
|
+
test_files:
|
142
|
+
- spec/spec_helper.rb
|
143
|
+
- spec/uiFaces_spec.rb
|
144
|
+
has_rdoc:
|