syfyfancam 0.1.1 → 0.2.0

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
- SHA1:
3
- metadata.gz: bb24f43fb2766380ce39afddcdd1ba3832fee5a3
4
- data.tar.gz: 4e05b26e168f6d35b8562cc1da7a903673782805
2
+ SHA256:
3
+ metadata.gz: 6e2323da4e136e0ffe91d7eebfba1a03843580a06d620988c96f69202ed9ce27
4
+ data.tar.gz: bc39d5b758ce833d9e26c0f7046d9126f13d304384dcf29d1683a7ea47d998bf
5
5
  SHA512:
6
- metadata.gz: b340b82b768164b7eef480ff94633179f2a53c7eab50af84475ce9e5752e77e7c65aa8c37ec8ca64b7e9b6f06eadc1997304036df62b616da0413ec1bd5e28ae
7
- data.tar.gz: c3a1911ee6e92b7389c926489cfdeea8a74a3fd830c3ec2433ef495c6c30c2ce7cbe8eba515700b96e11016cc561da7eea99a3e07d42c25782ff26999d4493ea
6
+ metadata.gz: dc13b13419c569f4f863cfd49700306340428268070a86fbb2f42abba3c64b8249a7e51a39ffd63a7326695f18ac4b50ab6011ac710eb5f9524ff293209a61b0
7
+ data.tar.gz: 07b18515446ee7f8b9b77a37db8506647294a689739a69179a7308b1d671e95f50d5de777592bc1a4cabf148ac14d2f5244e5fa8905d2afe1f586dbf61bb072e
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Syfyfancam
2
2
 
3
- [![Build Status](https://travis-ci.org/jbilbo/syfyfancam.svg?branch=master)](https://travis-ci.org/jbilbo/syfyfancam) [![Code Climate](https://codeclimate.com/github/jbilbo/syfyfancam/badges/gpa.svg)](https://codeclimate.com/github/jbilbo/syfyfancam) [![Test Coverage](https://codeclimate.com/github/jbilbo/syfyfancam/badges/coverage.svg)](https://codeclimate.com/github/jbilbo/syfyfancam/coverage)
3
+ [![Build Status](https://travis-ci.org/jbilbo/syfyfancam.svg?branch=master)](https://travis-ci.org/jbilbo/syfyfancam)
4
4
 
5
5
  Ruby library to obtain the list of images associated to an online Syfyfancam video. See: http://www.syfyfancam.com/view-all-fancam-videos/
6
6
 
@@ -16,7 +16,7 @@ $ gem install syfyfancam
16
16
 
17
17
  Add:
18
18
  ```ruby
19
- gem 'syfyfancam', '~> 0.1'
19
+ gem 'syfyfancam'
20
20
  ```
21
21
 
22
22
  and then execute:
@@ -38,6 +38,6 @@ syfyfancam.personal_hash
38
38
 
39
39
  ## License
40
40
 
41
- Copyright © 2015 Jonathan Hernández
41
+ Copyright © 2019 Jonathan Hernández
42
42
 
43
43
  Distributed under the MIT License.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'syfyfancam/url'
2
4
 
3
5
  module Syfyfancam
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'nokogiri'
2
4
  require 'uri'
3
5
  require 'net/http'
@@ -8,7 +10,7 @@ module Syfyfancam
8
10
 
9
11
  def initialize(url)
10
12
  @uri = URI.parse(url)
11
- fail ArgumentError, ERROR_URL unless personal_hash?
13
+ raise ArgumentError, ERROR_URL unless personal_hash?
12
14
  rescue URI::InvalidURIError => e
13
15
  raise e, ERROR_URL
14
16
  end
@@ -28,7 +30,7 @@ module Syfyfancam
28
30
  end
29
31
 
30
32
  def build_urls
31
- (1..100).map { |i| "#{base_url}#{format('%03d', i)}.jpg" }
33
+ (1..100).map { |i| "#{base_url}#{format('%<filenumber>03d', filenumber: i)}.jpg" }
32
34
  end
33
35
 
34
36
  def base_url
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Syfyfancam
2
- VERSION = '0.1.1'
4
+ VERSION = '0.2.0'
3
5
  end
@@ -1,5 +1,4 @@
1
- require 'codeclimate-test-reporter'
2
- CodeClimate::TestReporter.start
1
+ # frozen_string_literal: true
3
2
 
4
3
  require_relative '../lib/syfyfancam'
5
4
 
@@ -1,14 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../lib/syfyfancam/url'
2
4
 
3
5
  RSpec.describe Syfyfancam::URL do
4
6
  context 'valid URL' do
5
7
  let(:url) { 'http://www.syfyfancam.com/videos/ojt1nd5bnbog/' }
6
8
  let(:html) do
7
- <<-EOS
9
+ <<-PAGE
8
10
  <html><head><title></title>
9
11
  <meta property="og:image" content="http://d1fmy74dfqc2hp.cf.net/resources/footage/vE/oJt1Nd5BnboG/024.jpg" />
10
12
  </head><body></body></html>
11
- EOS
13
+ PAGE
12
14
  end
13
15
 
14
16
  subject(:syfyfancam) { described_class.new(url) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syfyfancam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Hernández
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-25 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.6.4
19
+ version: '1.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.6.6.4
26
+ version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -73,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.4.5.1
76
+ rubygems_version: 3.0.3
78
77
  signing_key:
79
78
  specification_version: 4
80
79
  summary: Library to access syfyfancam.com videos