brauser 3.0.0 → 3.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.
- data/README.md +9 -18
- data/brauser.gemspec +1 -1
- data/doc/Brauser.html +1 -1
- data/doc/Brauser/Browser.html +1 -1
- data/doc/Brauser/BrowserMethods.html +1 -1
- data/doc/Brauser/BrowserMethods/Attributes.html +1 -1
- data/doc/Brauser/BrowserMethods/General.html +1 -1
- data/doc/Brauser/BrowserMethods/General/ClassMethods.html +1 -1
- data/doc/Brauser/BrowserMethods/Parsing.html +1 -1
- data/doc/Brauser/BrowserMethods/PartialQuerying.html +1 -1
- data/doc/Brauser/BrowserMethods/Querying.html +1 -1
- data/doc/Brauser/BrowserMethods/Register.html +1 -1
- data/doc/Brauser/BrowserMethods/Register/ClassMethods.html +1 -1
- data/doc/Brauser/Chainers.html +591 -0
- data/doc/Brauser/Definition.html +1035 -0
- data/doc/Brauser/Hooks.html +1 -1
- data/doc/Brauser/Hooks/RubyOnRails.html +1 -1
- data/doc/Brauser/Queries.html +591 -0
- data/doc/Brauser/Query.html +1 -1
- data/doc/Brauser/Version.html +2 -2
- data/doc/_index.html +1 -1
- data/doc/file.README.html +10 -23
- data/doc/index.html +10 -23
- data/doc/top-level-namespace.html +1 -1
- data/lib/brauser/definition.rb +2 -2
- data/lib/brauser/version.rb +1 -1
- metadata +7 -4
data/doc/Brauser/Query.html
CHANGED
@@ -503,7 +503,7 @@ Brauser::Browser.new.is(:msie).v(">= 7").on?(:windows)
|
|
503
503
|
</div>
|
504
504
|
|
505
505
|
<div id="footer">
|
506
|
-
Generated on Sun May 19
|
506
|
+
Generated on Sun May 19 15:39:14 2013 by
|
507
507
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
508
508
|
0.8.6.1 (ruby-1.9.3).
|
509
509
|
</div>
|
data/doc/Brauser/Version.html
CHANGED
@@ -149,7 +149,7 @@
|
|
149
149
|
|
150
150
|
</div>
|
151
151
|
</dt>
|
152
|
-
<dd><pre class="code"><span class='int'>
|
152
|
+
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
153
153
|
|
154
154
|
<dt id="STRING-constant" class="">STRING =
|
155
155
|
<div class="docstring">
|
@@ -180,7 +180,7 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on Sun May 19
|
183
|
+
Generated on Sun May 19 15:39:14 2013 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
185
|
0.8.6.1 (ruby-1.9.3).
|
186
186
|
</div>
|
data/doc/_index.html
CHANGED
@@ -295,7 +295,7 @@
|
|
295
295
|
</div>
|
296
296
|
|
297
297
|
<div id="footer">
|
298
|
-
Generated on Sun May 19
|
298
|
+
Generated on Sun May 19 15:39:13 2013 by
|
299
299
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
300
300
|
0.8.6.1 (ruby-1.9.3).
|
301
301
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -214,51 +214,38 @@ browser.is_chrome_v_lt<em>2_and_gt</em>1_2_on_osx?
|
|
214
214
|
|
215
215
|
<h3 id="adding-new-browsers">Adding new browsers</h3>
|
216
216
|
|
217
|
-
<p>To add new browsers, simply call <code
|
217
|
+
<p>To add new browsers, simply call <code>::Brauser::Browser.add(:browsers, ...)</code>.</p>
|
218
218
|
|
219
|
-
<p>This methods accepts a single
|
220
|
-
|
221
|
-
<ul>
|
222
|
-
<li><code>name</code> is the name of the browser. Should be a <code>Symbol</code>.</li>
|
223
|
-
<li><code>name_match</code> is a <code>Regexp</code> to match against the user agent to detect the current browser.</li>
|
224
|
-
<li><code>version_match</code> is a <code>Regexp</code> which last capture group holds the version of the browser.</li>
|
225
|
-
<li><code>label</code> is the human readable name of the browser.</li>
|
226
|
-
</ul>
|
219
|
+
<p>This methods accepts a single instance or an array of instances of the <code>::Brauser::Definition</code> class.</p>
|
227
220
|
|
228
221
|
<p>For example, for Google Chrome the call should be:</p>
|
229
222
|
|
230
223
|
<p><code>ruby
|
231
|
-
|
224
|
+
Brauser::Browsers.add(:browsers, ::Brauser::Definition.new(:chrome, "Chrome", /((chrome)|(chromium))/i, /(.+Chrom[a-z]+\/)([a-z0-9.]+)/i))
|
232
225
|
</code></p>
|
233
226
|
|
234
227
|
<h3 id="adding-new-platforms">Adding new platforms</h3>
|
235
228
|
|
236
|
-
<p>To add new platforms, simply call <code
|
229
|
+
<p>To add new platforms, simply call <code>::Brauser::Browser.add(:platforms, ...)</code>.</p>
|
237
230
|
|
238
|
-
<p>This
|
239
|
-
|
240
|
-
<ul>
|
241
|
-
<li><code>name</code> is the name of the platform. Should be a <code>Symbol</code>.</li>
|
242
|
-
<li><code>matcher</code> is a <code>Regexp</code> to match against the user agent to detect the current platform.</li>
|
243
|
-
<li><code>label</code> is the human readable name of the platform.</li>
|
244
|
-
</ul>
|
231
|
+
<p>This methods accepts a single instance or an array of instances of the <code>::Brauser::Definition</code> class.</p>
|
245
232
|
|
246
233
|
<p>For example, for Mac OS X the call should be:</p>
|
247
234
|
|
248
235
|
<p><code>ruby
|
249
|
-
|
236
|
+
Brauser::Browsers.add(:platforms, ::Brauser::Definition.new(:osx, /mac|macintosh|mac os x/i, "Apple MacOS X"))
|
250
237
|
</code></p>
|
251
238
|
|
252
239
|
<h3 id="adding-new-languages">Adding new languages</h3>
|
253
240
|
|
254
|
-
<p>To add new languages, simply call <code
|
241
|
+
<p>To add new languages, simply call <code>::Brauser::Browser.add(:languages, ...)</code>.</p>
|
255
242
|
|
256
|
-
<p>This
|
243
|
+
<p>This methods accepts a single instance or an array of instances of the <code>::Brauser::Definition</code> class.</p>
|
257
244
|
|
258
245
|
<p>For example, for Italian the call should be:</p>
|
259
246
|
|
260
247
|
<p><code>ruby
|
261
|
-
|
248
|
+
Brauser::Browsers.add(:languages, ::Brauser::Definition.new(:it, "Italian"))
|
262
249
|
</code></p>
|
263
250
|
|
264
251
|
<h2 id="contributing-to-brauser">Contributing to brauser</h2>
|
@@ -281,7 +268,7 @@ browser.register_language("it", "Italian")
|
|
281
268
|
</div></div>
|
282
269
|
|
283
270
|
<div id="footer">
|
284
|
-
Generated on Sun May 19
|
271
|
+
Generated on Sun May 19 15:39:13 2013 by
|
285
272
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
286
273
|
0.8.6.1 (ruby-1.9.3).
|
287
274
|
</div>
|
data/doc/index.html
CHANGED
@@ -214,51 +214,38 @@ browser.is_chrome_v_lt<em>2_and_gt</em>1_2_on_osx?
|
|
214
214
|
|
215
215
|
<h3 id="adding-new-browsers">Adding new browsers</h3>
|
216
216
|
|
217
|
-
<p>To add new browsers, simply call <code
|
217
|
+
<p>To add new browsers, simply call <code>::Brauser::Browser.add(:browsers, ...)</code>.</p>
|
218
218
|
|
219
|
-
<p>This methods accepts a single
|
220
|
-
|
221
|
-
<ul>
|
222
|
-
<li><code>name</code> is the name of the browser. Should be a <code>Symbol</code>.</li>
|
223
|
-
<li><code>name_match</code> is a <code>Regexp</code> to match against the user agent to detect the current browser.</li>
|
224
|
-
<li><code>version_match</code> is a <code>Regexp</code> which last capture group holds the version of the browser.</li>
|
225
|
-
<li><code>label</code> is the human readable name of the browser.</li>
|
226
|
-
</ul>
|
219
|
+
<p>This methods accepts a single instance or an array of instances of the <code>::Brauser::Definition</code> class.</p>
|
227
220
|
|
228
221
|
<p>For example, for Google Chrome the call should be:</p>
|
229
222
|
|
230
223
|
<p><code>ruby
|
231
|
-
|
224
|
+
Brauser::Browsers.add(:browsers, ::Brauser::Definition.new(:chrome, "Chrome", /((chrome)|(chromium))/i, /(.+Chrom[a-z]+\/)([a-z0-9.]+)/i))
|
232
225
|
</code></p>
|
233
226
|
|
234
227
|
<h3 id="adding-new-platforms">Adding new platforms</h3>
|
235
228
|
|
236
|
-
<p>To add new platforms, simply call <code
|
229
|
+
<p>To add new platforms, simply call <code>::Brauser::Browser.add(:platforms, ...)</code>.</p>
|
237
230
|
|
238
|
-
<p>This
|
239
|
-
|
240
|
-
<ul>
|
241
|
-
<li><code>name</code> is the name of the platform. Should be a <code>Symbol</code>.</li>
|
242
|
-
<li><code>matcher</code> is a <code>Regexp</code> to match against the user agent to detect the current platform.</li>
|
243
|
-
<li><code>label</code> is the human readable name of the platform.</li>
|
244
|
-
</ul>
|
231
|
+
<p>This methods accepts a single instance or an array of instances of the <code>::Brauser::Definition</code> class.</p>
|
245
232
|
|
246
233
|
<p>For example, for Mac OS X the call should be:</p>
|
247
234
|
|
248
235
|
<p><code>ruby
|
249
|
-
|
236
|
+
Brauser::Browsers.add(:platforms, ::Brauser::Definition.new(:osx, /mac|macintosh|mac os x/i, "Apple MacOS X"))
|
250
237
|
</code></p>
|
251
238
|
|
252
239
|
<h3 id="adding-new-languages">Adding new languages</h3>
|
253
240
|
|
254
|
-
<p>To add new languages, simply call <code
|
241
|
+
<p>To add new languages, simply call <code>::Brauser::Browser.add(:languages, ...)</code>.</p>
|
255
242
|
|
256
|
-
<p>This
|
243
|
+
<p>This methods accepts a single instance or an array of instances of the <code>::Brauser::Definition</code> class.</p>
|
257
244
|
|
258
245
|
<p>For example, for Italian the call should be:</p>
|
259
246
|
|
260
247
|
<p><code>ruby
|
261
|
-
|
248
|
+
Brauser::Browsers.add(:languages, ::Brauser::Definition.new(:it, "Italian"))
|
262
249
|
</code></p>
|
263
250
|
|
264
251
|
<h2 id="contributing-to-brauser">Contributing to brauser</h2>
|
@@ -281,7 +268,7 @@ browser.register_language("it", "Italian")
|
|
281
268
|
</div></div>
|
282
269
|
|
283
270
|
<div id="footer">
|
284
|
-
Generated on Sun May 19
|
271
|
+
Generated on Sun May 19 15:39:13 2013 by
|
285
272
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
286
273
|
0.8.6.1 (ruby-1.9.3).
|
287
274
|
</div>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on Sun May 19
|
106
|
+
Generated on Sun May 19 15:39:13 2013 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.6.1 (ruby-1.9.3).
|
109
109
|
</div>
|
data/lib/brauser/definition.rb
CHANGED
@@ -13,9 +13,9 @@ module Brauser
|
|
13
13
|
# @attribute label
|
14
14
|
# @return [String] A human readable label for this definition.
|
15
15
|
# @attribute primary
|
16
|
-
# @return [String|Symbol|Proc] The primary matcher of this definition.
|
16
|
+
# @return [String|Symbol|Proc] The primary matcher of this definition. Used to match browser engine, platform name and language.
|
17
17
|
# @attribute secondary
|
18
|
-
# @return [String|Symbol|Proc] The secondary matcher of this definition.
|
18
|
+
# @return [String|Symbol|Proc] The secondary matcher of this definition. Used to match browser version.
|
19
19
|
class Definition
|
20
20
|
attr_accessor :tag, :label, :primary, :secondary
|
21
21
|
|
data/lib/brauser/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brauser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.0.
|
21
|
+
version: 3.0.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.0.
|
29
|
+
version: 3.0.1
|
30
30
|
description: A framework agnostic browser detection and querying helper.
|
31
31
|
email:
|
32
32
|
- shogun_panda@me.com
|
@@ -53,8 +53,11 @@ files:
|
|
53
53
|
- doc/Brauser/BrowserMethods/Querying.html
|
54
54
|
- doc/Brauser/BrowserMethods/Register.html
|
55
55
|
- doc/Brauser/BrowserMethods/Register/ClassMethods.html
|
56
|
+
- doc/Brauser/Chainers.html
|
57
|
+
- doc/Brauser/Definition.html
|
56
58
|
- doc/Brauser/Hooks.html
|
57
59
|
- doc/Brauser/Hooks/RubyOnRails.html
|
60
|
+
- doc/Brauser/Queries.html
|
58
61
|
- doc/Brauser/Query.html
|
59
62
|
- doc/Brauser/Version.html
|
60
63
|
- doc/_index.html
|
@@ -105,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
108
|
version: '0'
|
106
109
|
segments:
|
107
110
|
- 0
|
108
|
-
hash: -
|
111
|
+
hash: -634335438394906499
|
109
112
|
requirements: []
|
110
113
|
rubyforge_project: brauser
|
111
114
|
rubygems_version: 1.8.25
|