rails_request_parser 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b99dffeba7c15a96b28139867fb955d3ab3fb5c2
4
- data.tar.gz: f2208d2eda9a96fb65b7fc62cd5d560f415b49fe
3
+ metadata.gz: a0df5aa606a73f07a6c1208435a51f65069afd66
4
+ data.tar.gz: c5856e7086c28c9225aca280dd8fd14e3c99cbcb
5
5
  SHA512:
6
- metadata.gz: 463ee85d2cf4a43275caf633f6e17463904dc08bcfe4bd801e3755c55e573ddb766e0d5440ff09a8a7cb2f2ad4dd65a186730f01e285e81135ee39d549bb6d04
7
- data.tar.gz: a8167bd15217b226dc071eea30204e06360824c0d5bc1b24ff7345fe9cf69d14b16477dca7e9d658cf33adae64d5fae26a830fd1bfa662f8bd11d1f70a3a9d93
6
+ metadata.gz: c4a2b36c2b7c59a4cd575d8a9f7e97999cf4e128fc80b51b4984ced8fd892cab20c6e3defbf4359219e1441b3ddafc3a31d6569cfafd4061316a72f25cb47293
7
+ data.tar.gz: 323c79deabbb63bc660a8e9b31040e2988d0f4eb6a2f481a54b80fe4b3e650a354df3bda531a39de2c7b0683c018f1025e364ec4b79473bdcb81228425c5aa95
data/README.md CHANGED
@@ -20,6 +20,7 @@ $ gem install rails_request_parser
20
20
  ```ruby
21
21
  request_parser = RailsRequestParser.new(request)
22
22
  request_parser.is_mac_os? #=> true
23
+ request_parser.is_electron_client? #=> true
23
24
  request_parser.is_windows_os? #=> false
24
25
  request_parser.is_chrome_browser? #=> true
25
26
  ```
@@ -9,6 +9,10 @@ class RailsRequestParser
9
9
  chrome = 'Chrome'.freeze
10
10
  return UserAgentParser.parse(@request.user_agent).family == chrome
11
11
  end
12
+ def is_electron_client?
13
+ electron = 'Electron'.freeze
14
+ return @request.user_agent.include? electron
15
+ end
12
16
  def is_mac_os?
13
17
  mac = 'Mac'.freeze
14
18
  UserAgentParser.parse(@request.user_agent).os.to_s.include? mac
@@ -1,3 +1,3 @@
1
1
  class RailsRequestParser
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_request_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Gesualdo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-11 00:00:00.000000000 Z
11
+ date: 2017-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler