web_stat 0.3.11 → 0.3.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a94017f641fb1f84d67ea5d650c094df5a1d738ccbbf880c112f95da4a2792b
4
- data.tar.gz: 7383ba299f9f02bae998a104e84302ea99a11a28c77ad42fa23637eec9e2a922
3
+ metadata.gz: 2af80415014e94830b1e323f44e2e71732196bdfc535627295f1f6b7b2f44285
4
+ data.tar.gz: 85fc9facafff40063c434824ebc64fcd847f347bdfa0c928ee8c35b2b3e0c8b5
5
5
  SHA512:
6
- metadata.gz: 4c7d593118d75755f3db68a9f7995de60c63c5c47ba92c30a4772bc6ade5cefda14c8b44a87475ebc6cb3ab1a0badefcd3df1f6d2038aec714af654a07c89ccd
7
- data.tar.gz: 2aa7dc288acd6de6207ee8d3e2833ba2b480b99a6d3ffeed651cce6982bbb557adfe173dfd3af1d10345bb0ad4710f1e4b434272039bb8a988beabb35811c5b4
6
+ metadata.gz: 30870501431d61d5d90bdcfcf4f6ba339918b810fda48bd9a77abe183e341575bc9c7397aadb7494da1591d5d647fea7b17512ed24cea61471d4e112a0c17bd8
7
+ data.tar.gz: 8340739ddae12fd6a670d51e7fcd7e3987294bcb32219cde6e8dbcee2a067f064b2b632d102636471d0b7fd0ff27ca4f55c477eca94d88b7194a3cf17b1869c7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- web_stat (0.3.10)
4
+ web_stat (0.3.11)
5
5
  bundler (>= 2.0.2)
6
6
  cld (>= 0.8.0)
7
7
  mechanize (>= 2.7)
data/README.md CHANGED
@@ -55,12 +55,10 @@ And then execute:
55
55
 
56
56
  ### spec
57
57
 
58
- $ bundle exec rake spec
59
-
60
- or
61
-
62
- $ bundle exec rspec
58
+ $ docker/start -d
59
+ $ docker/exec ENV=development bundle exec rspec
63
60
 
64
61
  Test a file
65
62
 
66
- $ bundle exec rspec spec/web_stat/fetch_spec.rb
63
+ $ docker/start -d
64
+ $ docker/exec ENV=development bundle exec rspec spec/web_stat/fetch_spec.rb
@@ -9,7 +9,7 @@ module WebStat
9
9
  if defined? Rails
10
10
  YAML.load_file(get_configure_path)[Rails.env]
11
11
  else
12
- YAML.load_file(get_configure_path)["production"]
12
+ YAML.load_file(get_configure_path)[ENV["ENV"] || "production"]
13
13
  end
14
14
  end
15
15
 
@@ -47,8 +47,8 @@ module WebStat
47
47
  break
48
48
  end
49
49
  end
50
- if path.nil? || path.empty? || @nokogiri.at('body').xpath('//img').first
51
- path = @nokogiri.at('body').xpath('//img').first.attr('src')
50
+ if (path.nil? || path.empty?) && @nokogiri.xpath('//img')
51
+ path = @nokogiri.xpath('//img').attr('src')
52
52
  end
53
53
  if ! path.nil? && path.match(/^\//)
54
54
  "#{URI.parse(@url).scheme}://#{URI.parse(@url).host}#{path}"
@@ -11,7 +11,7 @@ module WebStat
11
11
  redirect_lookup_depth = options[:depth].to_i > 0 ? options[:depth].to_i : 10
12
12
  response_uri = get_final_redirect_url(url, redirect_lookup_depth)
13
13
  final_url = url_string_from_uri(response_uri)
14
- rescue Exception => ex
14
+ rescue => e
15
15
  # nothing
16
16
  end
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module WebStat
2
- VERSION = "0.3.11"
2
+ VERSION = "0.3.12"
3
3
  end
@@ -7,12 +7,7 @@ require "web_stat"
7
7
  require 'webmock'
8
8
  include WebMock::API
9
9
  WebMock.enable!
10
-
11
- WebMock.disable_net_connect!({
12
- allow_localhost: true,
13
- allow: 'chromedriver.storage.googleapis.com'
14
- })
15
-
10
+
16
11
  RSpec.configure do |config|
17
12
  # Enable flags like --only-failures and --next-failure
18
13
  config.example_status_persistence_file_path = ".rspec_status"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.11
4
+ version: 0.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - yusuke abe