useragents 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +28 -0
- data/lib/useragents.rb +15 -0
- data/spec/useragents_spec.rb +0 -0
- data/useragents.gemspec +19 -0
- metadata +64 -0
data/README.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
useragents-rb
|
2
|
+
=============
|
3
|
+
## Usage
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
require 'useragents'
|
7
|
+
|
8
|
+
UserAgents.list() # Default useragent list, which is commonly used
|
9
|
+
# => Chrome : 27, 28, 29, 30, 31
|
10
|
+
# Firefox: 23
|
11
|
+
# IE : 7, 8, 9, 10, 11
|
12
|
+
# Safari : xx
|
13
|
+
# Opera : xx
|
14
|
+
UserAgents.rand() # Generate a useragent for you
|
15
|
+
```
|
16
|
+
|
17
|
+
``` ruby
|
18
|
+
require 'useragents'
|
19
|
+
|
20
|
+
UserAgents.use(chrome: {gt:29}, ie: {eq: 9})
|
21
|
+
UserAgents.list()
|
22
|
+
# => Chrome : 29, 30, 31
|
23
|
+
# IE : 9
|
24
|
+
|
25
|
+
UserAgents.use(:all)
|
26
|
+
UserAgents.list()
|
27
|
+
# ...
|
28
|
+
```
|
data/lib/useragents.rb
ADDED
File without changes
|
data/useragents.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "useragents"
|
3
|
+
s.version = "0.0.1"
|
4
|
+
|
5
|
+
s.authors = "debbbbie"
|
6
|
+
s.date = "2013-12-20"
|
7
|
+
s.description = "Generate a random User-Agent for you. A place holder, coming soon!"
|
8
|
+
s.email = "debbbbie@163.com"
|
9
|
+
s.files = ["useragents.gemspec", "lib/useragents.rb", "spec/useragents_spec.rb", "README.md"]
|
10
|
+
s.homepage = "https://github.com/debbbbie/useragents-rb"
|
11
|
+
s.require_paths = ["lib"]
|
12
|
+
s.summary = "Generate a random User-Agent for you, use for spiders or anything."
|
13
|
+
|
14
|
+
|
15
|
+
#s.add_dependency "growl"
|
16
|
+
|
17
|
+
s.add_development_dependency "rspec"
|
18
|
+
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: useragents
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- debbbbie
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rspec
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Generate a random User-Agent for you. A place holder, coming soon!
|
31
|
+
email: debbbbie@163.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- useragents.gemspec
|
37
|
+
- lib/useragents.rb
|
38
|
+
- spec/useragents_spec.rb
|
39
|
+
- README.md
|
40
|
+
homepage: https://github.com/debbbbie/useragents-rb
|
41
|
+
licenses: []
|
42
|
+
post_install_message:
|
43
|
+
rdoc_options: []
|
44
|
+
require_paths:
|
45
|
+
- lib
|
46
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
49
|
+
- - ! '>='
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
54
|
+
requirements:
|
55
|
+
- - ! '>='
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
requirements: []
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 1.8.24
|
61
|
+
signing_key:
|
62
|
+
specification_version: 3
|
63
|
+
summary: Generate a random User-Agent for you, use for spiders or anything.
|
64
|
+
test_files: []
|