national-rail 0.4.12 → 0.4.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -130,7 +130,8 @@ module NationalRail
130
130
  Time.zone ||= 'London'
131
131
  @agent = Mechanize.new
132
132
  @agent.pluggable_parser.html = NokogiriParser
133
- @agent.user_agent_alias = "Mac FireFox"
133
+ aliases = Mechanize::AGENT_ALIASES.keys - %w(Mechanize)
134
+ @agent.user_agent_alias = aliases[rand(aliases.length)]
134
135
  end
135
136
 
136
137
  def plan(options = {})
@@ -1,3 +1,3 @@
1
1
  module NationalRail
2
- VERSION = "0.4.12".freeze
2
+ VERSION = "0.4.13".freeze
3
3
  end
@@ -88,7 +88,8 @@ module NationalRail
88
88
  def initialize
89
89
  @agent = Mechanize.new
90
90
  @agent.pluggable_parser.html = NokogiriParser
91
- @agent.user_agent_alias = "Mac FireFox"
91
+ aliases = Mechanize::AGENT_ALIASES.keys - %w(Mechanize)
92
+ @agent.user_agent_alias = aliases[rand(aliases.length)]
92
93
  end
93
94
 
94
95
  def summary(station_code)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: national-rail
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 12
10
- version: 0.4.12
9
+ - 13
10
+ version: 0.4.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Mead
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-12 00:00:00 +01:00
18
+ date: 2011-04-13 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency