rails-browscap 0.0.3

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.
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 [Gilles Devaux]
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README ADDED
@@ -0,0 +1,14 @@
1
+ Browscap
2
+ ========
3
+
4
+ Using the excellent http://github.com/lfittl/browscap parser as a rail plugin
5
+
6
+ run rake browscap:update to get the new browscap.ini from http://browsers.garykeith.com
7
+
8
+ Example
9
+ =======
10
+
11
+ Example goes here.
12
+
13
+
14
+ Copyright (c) 2010 [name of plugin creator], released under the MIT license
data/install.rb ADDED
@@ -0,0 +1,2 @@
1
+ # Install hook code here
2
+ puts "Run rake browscap:update to finish the install"
@@ -0,0 +1,2 @@
1
+ require 'inifile'
2
+ require 'browscap'
@@ -0,0 +1,20 @@
1
+ # desc "Explaining what the task does"
2
+ # task :browscap do
3
+ # # Task goes here
4
+ # end
5
+
6
+ namespace :browscap do
7
+
8
+ require 'net/http'
9
+
10
+ desc "Update browscap file"
11
+ task :update => :environment do
12
+ Net::HTTP.start("browsers.garykeith.com") { |http|
13
+ resp = http.get("/stream.asp?BrowsCapINI")
14
+ open("#{Rails.root_ROOT}/config/browscap.ini", "w") { |file|
15
+ file.write(resp.body)
16
+ }
17
+ }
18
+ end
19
+
20
+ end
data/rails/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'rails-browscap'
data/uninstall.rb ADDED
@@ -0,0 +1 @@
1
+ # Uninstall hook code here
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails-browscap
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 3
9
+ version: 0.0.3
10
+ platform: ruby
11
+ authors:
12
+ - Gilles Devaux
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-02-03 00:00:00 -08:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: browscap
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 1
30
+ - 0
31
+ version: 0.1.0
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: inifile
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ - 3
44
+ - 0
45
+ version: 0.3.0
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ description:
49
+ email: gilles.devaux@gmail.com
50
+ executables: []
51
+
52
+ extensions: []
53
+
54
+ extra_rdoc_files:
55
+ - README
56
+ files:
57
+ - rails/init.rb
58
+ - lib/rails-browscap.rb
59
+ - lib/tasks/rails-browscap_tasks.rake
60
+ - MIT-LICENSE
61
+ - README
62
+ - install.rb
63
+ - uninstall.rb
64
+ has_rdoc: true
65
+ homepage: https://github.com/gilles/rails-browscap
66
+ licenses: []
67
+
68
+ post_install_message:
69
+ rdoc_options: []
70
+
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ segments:
85
+ - 0
86
+ version: "0"
87
+ requirements: []
88
+
89
+ rubyforge_project:
90
+ rubygems_version: 1.3.6
91
+ signing_key:
92
+ specification_version: 3
93
+ summary: rails plugin around the broswcap gem
94
+ test_files: []
95
+