comer_de_tapas 0.1.3 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c97e323c1838461bc221ef30b5549c6fb1bc52c8
4
- data.tar.gz: 02b0a3e9814c081c618d8d2ac2a70a5a5a6a1eeb
3
+ metadata.gz: f6a70e6965493b65379f10034f6643dddce8ba66
4
+ data.tar.gz: b0379d2250f250c9947422445b50dc400d556b96
5
5
  SHA512:
6
- metadata.gz: 7812e1ee92b1ef2cbaf6c4897dc2f4ae91c775d474f456750660d63e6ddb817ef2cfaf0708bf0ec2a9f46f7b7ac14d816a5ae537342eeba863dde87b21d8a630
7
- data.tar.gz: 370a445ca90681db21e53430f416346f7075a77cd2f46610f4ed9007e7e389ed3f9bfef520c8fe7a2dd9d65629839977b368eab3a1e24679bddfb1c3c0134c4f
6
+ metadata.gz: e1cd96252871165b33c73b88338d7c444f755da59a8bedce3d9d0f96eb9d122284a46d51ca0fd3f80feb8ddfde2d579e77fe8fc1ef6c6dfb976c53d298ccfc81
7
+ data.tar.gz: d21d9b28b70a8379102324d2b3b1d8b3c37f251d8049bbf348e95a5362552e7472c824c53a072808bec50d87f74e107ae26b469803c040886680ab7437794e51
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014 Juanito Fatas
3
+ Copyright (c) 2014-2015 Juanito Fatas
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -5,8 +5,8 @@ Comer de Tapas
5
5
  [![Build Status](https://travis-ci.org/JuanitoFatas/comer_de_tapas.svg)][travis]
6
6
  [![Dependency Status](https://gemnasium.com/JuanitoFatas/comer_de_tapas.svg)][gemnasium]
7
7
  [![Inline docs ](http://inch-ci.org/github/juanitofatas/comer_de_tapas.svg)][docs]
8
- [![Code Climate](https://codeclimate.com/github/JuanitoFatas/comer_de_tapas.png)][codeclimate]
9
- [![Coverage](https://codeclimate.com/github/JuanitoFatas/comer_de_tapas/coverage.png)][coverage]
8
+ [![Code Climate](https://codeclimate.com/github/JuanitoFatas/comer_de_tapas.svg)][codeclimate]
9
+ [![Coverage](https://codeclimate.com/github/JuanitoFatas/comer_de_tapas/coverage.svg)][coverage]
10
10
 
11
11
  [gem]: https://rubygems.org/gems/comer_de_tapas
12
12
  [travis]: https://travis-ci.org/JuanitoFatas/comer_de_tapas
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- Signal.trap('INT') { abort }
4
- require 'comer_de_tapas'
3
+ Signal.trap("INT") { abort }
4
+
5
+ require "comer_de_tapas"
6
+
5
7
  ComerDeTapas::CLI.start(ARGV)
@@ -5,25 +5,25 @@ require "comer_de_tapas/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "comer_de_tapas"
8
- spec.version = ComerDeTapas::VERSION
9
8
  spec.authors = ["Juanito Fatas"]
10
9
  spec.email = ["katehuang0320@gmail.com"]
10
+
11
+ spec.homepage = "https://github.com/juanitofatas/comer_de_tapas"
11
12
  spec.summary = %q{Ruby Tapas Episode Downloader.}
12
13
  spec.description = spec.summary
13
- spec.homepage = "https://github.com/juanitofatas/comer_de_tapas"
14
14
  spec.license = "MIT"
15
15
 
16
- spec.files = %w[CONTRIBUTING.md DEVELOPMENT.md LICENSE README.md Rakefile comer_de_tapas.gemspec]
17
- spec.files += Dir.glob("lib/**/*.rb")
18
- spec.files += Dir.glob("bin/**/*")
19
- spec.files += Dir.glob("test/**/*")
20
-
16
+ spec.files = %w[CONTRIBUTING.md DEVELOPMENT.md LICENSE README.md Rakefile comer_de_tapas.gemspec] + Dir["bin/*"] + Dir["lib/**/*.rb"]
21
17
  spec.executables = ["comer_de_tapas"]
22
- spec.test_files = Dir.glob("test/**/*")
23
- spec.require_paths = ["lib"]
18
+ spec.require_paths = %w(lib)
19
+
20
+ spec.version = ComerDeTapas::VERSION
21
+
22
+ spec.required_ruby_version = ">= 2.0.0"
23
+ spec.required_rubygems_version = ">= 2.2.2"
24
24
 
25
25
  spec.add_dependency "thor"
26
- spec.add_dependency "http", ">= 0.6"
26
+ spec.add_dependency "http", ">= 0.7.3"
27
27
  spec.add_dependency "nokogiri"
28
- spec.add_dependency "celluloid-io"
28
+ spec.add_dependency "celluloid-io", "~> 0.17.0"
29
29
  end
@@ -1,4 +1,4 @@
1
- require 'thor'
1
+ require "thor"
2
2
 
3
3
  module ComerDeTapas
4
4
  class CLI < Thor
@@ -7,28 +7,24 @@ module ComerDeTapas
7
7
  super
8
8
  end
9
9
 
10
- desc 'version', 'Show version'
10
+ desc "version", "Show version"
11
11
  def version
12
12
  say VERSION
13
13
  end
14
14
  map %w[-v --version] => :version
15
15
 
16
- desc 'init', 'Create config folder and files'
16
+ desc "init", "Create config folder and files"
17
17
  def init
18
18
  @client.init!
19
- say 'Please fill in your subscription info in ~/.rubytapas/.credentials.'
20
- say 'When you finished, type `comer_de_tapas download` to download.'
19
+ say "Please fill in your subscription info in ~/.rubytapas/.credentials."
20
+ say "When you finished, type `comer_de_tapas download` to download."
21
21
  end
22
22
 
23
23
  # -f, --force, options[:force] => true, otherwise nil.
24
- desc 'download', 'Download RubyTapas episodes'
25
- method_option 'force', :aliases => '-f', type: :boolean, desc: 'Force download.'
24
+ desc "download", "Download RubyTapas episodes"
25
+ method_option "force", :aliases => "-f", type: :boolean, desc: "Force download."
26
26
  def download
27
- @client.fetch_episodes!(options[:force])
28
- @client.prepare_save_folder!
29
- @client.authenticate
30
- @client.load_episodes
31
- @client.download_all_tapas!
27
+ @client.download(force: options[:force])
32
28
  end
33
29
  end
34
30
  end
@@ -1,7 +1,7 @@
1
- require 'http'
2
- require 'json'
3
- require 'pathname'
4
- require 'fileutils'
1
+ require "http"
2
+ require "json"
3
+ require "pathname"
4
+ require "fileutils"
5
5
 
6
6
  module ComerDeTapas
7
7
  class Client
@@ -11,78 +11,87 @@ module ComerDeTapas
11
11
  # $ touch ~/.rubytapas/.credentials
12
12
  def init!
13
13
  if RUBYTAPAS_DIR.exist? && CREDENTIAL_FILE.exist?
14
- abort 'Credentials found. type `comer_de_tapas download` to download.'
14
+ abort "Credentials found. type `comer_de_tapas download` to download."
15
15
  end
16
16
  create_rubytapas_files!
17
- puts '~/.rubytapas/.credentials folder and file has been created.'
17
+ puts "~/.rubytapas/.credentials folder and file has been created."
18
18
  end
19
19
 
20
- # Fetch latest feed on rubytapas.dpdcart.com
21
- # Parse it to episode, save episodes data as json to ~/.rubytapas.json
22
- def fetch_episodes! force=nil
23
- return puts 'Use cached episode data.' if fresh? && force.nil?
24
- puts 'Force fetching. Getting latest Ruby Tapas...' if force
25
- puts 'Fetching episodes...'
26
- if get_feed_with_basic_auth
27
- save_feed_data parse_xml_feed
28
- puts 'Episodes successfully fetched and saved.'
29
- end
20
+ def download(force: false)
21
+ fetch_episodes!(force)
22
+ prepare_save_folder!
23
+ authenticate
24
+ load_episodes
25
+ download_all_tapas!
30
26
  end
31
27
 
32
- # Create user specified folder: credentials[:save_path]
33
- def prepare_save_folder!
34
- return puts "#{save_folder} found." if save_folder.exist?
28
+ private
35
29
 
36
- save_folder.mkpath
37
- puts "#{save_folder} created."
38
- end
30
+ # Fetch latest feed on rubytapas.dpdcart.com
31
+ # Parse it to episode, save episodes data as json to ~/.rubytapas.json
32
+ def fetch_episodes! force=false
33
+ return puts "Use cached episode data." if fresh? && !force
39
34
 
40
- # Authenticate and return Cookie
41
- def authenticate
42
- @cookie ||= HTTP.post(LOGIN_URL, form_params).headers['Set-Cookie']
43
- end
35
+ puts "Force fetching. Getting latest Ruby Tapas..." if force
36
+ puts "Fetching episodes..."
37
+ if get_feed_with_basic_auth
38
+ save_feed_data parse_xml_feed
39
+ puts "Episodes successfully fetched and saved."
40
+ end
41
+ end
44
42
 
45
- # Load episodes json from EPISODES_JSON_FILE
46
- def load_episodes
47
- @episodes ||= JSON.parse(EPISODES_JSON_FILE.read)
48
- end
43
+ # Create user specified folder: credentials[:save_path]
44
+ def prepare_save_folder!
45
+ return puts "#{save_folder} found." if save_folder.exist?
49
46
 
50
- # User spefified folder to save episodes.
51
- # @return [Pathname]
52
- def save_folder
53
- Pathname(credentials[:save_path]).expand_path
54
- end
47
+ save_folder.mkpath
48
+ puts "#{save_folder} created."
49
+ end
50
+
51
+ # User spefified folder to save episodes.
52
+ # @return [Pathname]
53
+ def save_folder
54
+ Pathname(credentials[:save_path]).expand_path
55
+ end
55
56
 
56
- # Download episode in parallel using Actors
57
- # Powered by Celluloid::IO
58
- def download_all_tapas!
59
- episodes.each do |episode|
60
- FileUtils.cd(save_folder) do
61
- episode_title = episode['title']
62
- puts "Downloading Epsiode #{episode_title}..."
57
+ # Authenticate and return Cookie
58
+ def authenticate
59
+ @cookie ||= HTTP.post(LOGIN_URL, form_params).headers["Set-Cookie"]
60
+ end
63
61
 
64
- episode_folder = save_folder.join(sanitized episode_title)
62
+ # Load episodes json from EPISODES_JSON_FILE
63
+ def load_episodes
64
+ @episodes ||= JSON.parse(EPISODES_JSON_FILE.read)
65
+ end
65
66
 
66
- FileUtils.mkdir_p episode_folder unless episode_folder.exist?
67
+ # Download episode in parallel using Actors
68
+ # Powered by Celluloid::IO
69
+ def download_all_tapas!
70
+ episodes.each do |episode|
71
+ FileUtils.cd(save_folder) do
72
+ episode_title = episode["title"]
73
+ puts "Downloading Epsiode #{episode_title}..."
67
74
 
68
- FileUtils.cd episode_folder do
69
- fetcher = Fetcher.new
70
- file_and_links = episode['links']
71
- downloadables = find_downloadables file_and_links, fetcher
75
+ episode_folder = save_folder.join(sanitized episode_title)
72
76
 
73
- if downloadables.all? &:nil?
74
- puts 'Already downloaded, skip.'
75
- next
76
- end
77
+ FileUtils.mkdir_p episode_folder unless episode_folder.exist?
78
+
79
+ FileUtils.cd episode_folder do
80
+ fetcher = Fetcher.new
81
+ file_and_links = episode["links"]
82
+ downloadables = find_downloadables file_and_links, fetcher
77
83
 
78
- download_parallelly! downloadables
79
- puts "Episode #{episode_title} content all saved."
84
+ if downloadables.all? &:nil?
85
+ puts "Already downloaded, skip."
86
+ next
87
+ end
88
+
89
+ download_parallelly! downloadables
90
+ puts "Episode #{episode_title} content all saved."
91
+ end
80
92
  end
81
93
  end
82
94
  end
83
- end
84
-
85
- private
86
95
 
87
96
  attr_reader :feed_xml, :cookie, :episodes
88
97
 
@@ -102,14 +111,14 @@ module ComerDeTapas
102
111
  # @param [Array] file_and_links
103
112
  def find_downloadables file_and_links, fetcher
104
113
  file_and_links.map do |file_and_link|
105
- file_name = file_and_link['filename']
114
+ file_name = file_and_link["filename"]
106
115
 
107
116
  # mp4 less than 3MB considered as unfinished. Redownload it.
108
117
  FileUtils.rm file_name if small_mp4? file_name
109
118
 
110
119
  next if File.exist? file_name
111
120
 
112
- q, v = file_and_link['link'].split('?').last.split('=')
121
+ q, v = file_and_link["link"].split("?").last.split("=")
113
122
  [file_name, fetcher.future.fetch(DOWNLOAD_URL, cookie, { q => v })]
114
123
  end
115
124
  end
@@ -117,7 +126,7 @@ module ComerDeTapas
117
126
  # Return true if file is a mp4 and its size less than 3MB.
118
127
  def small_mp4?(file)
119
128
  return false unless File.exist? file
120
- File.size(file) < 3*1024*1024 && File.extname(file) == '.mp4'
129
+ File.size(file) < 3*1024*1024 && File.extname(file) == ".mp4"
121
130
  end
122
131
 
123
132
  # mkdir -p ~/.rubytapas
@@ -130,21 +139,21 @@ module ComerDeTapas
130
139
 
131
140
  # Use to create empty credential file
132
141
  def credential_template
133
- require 'yaml'
142
+ require "yaml"
134
143
  {"credentials"=>[{"email"=>nil}, {"password"=>nil}, {"save_path"=>nil}]}.to_yaml
135
144
  end
136
145
 
137
146
  # Get raw feed data (XML), RSS
138
147
  def get_feed_with_basic_auth
139
- puts 'Authorizing...'
140
- response = HTTP.auth(:basic, authenticate_params).get(FEED_URL).body.to_s
148
+ puts "Authorizing..."
149
+ response = HTTP.auth(:basic, authenticate_params).get(FEED_URL).to_s
141
150
 
142
151
  if response.empty?
143
152
  abort "Authroized failed. Please check your email & password in #{CREDENTIAL_FILE}"
144
153
  end
145
154
 
146
155
  if @feed_xml = response
147
- puts 'Authroized.'
156
+ puts "Authroized."
148
157
  return true
149
158
  end
150
159
  end
@@ -185,7 +194,7 @@ module ComerDeTapas
185
194
  end
186
195
 
187
196
  # Given links, parse to
188
- # { filename: "123.rb", "/subscriber/download?file_id=34567" }
197
+ # { filename: '123.rb', '/subscriber/download?file_id=34567' }
189
198
  # @return [Array<Hash>]
190
199
  def attachments links
191
200
  links.each_with_object([]) do |link, episode|
@@ -1,12 +1,12 @@
1
- require 'pathname'
1
+ require "pathname"
2
2
 
3
3
  module ComerDeTapas
4
- BASE_URL = 'https://rubytapas.dpdcart.com'
5
- DOWNLOAD_URL = BASE_URL + '/subscriber/download'
6
- LOGIN_URL = BASE_URL + '/subscriber/login'
7
- FEED_URL = BASE_URL + '/feed'
4
+ BASE_URL = "https://rubytapas.dpdcart.com"
5
+ DOWNLOAD_URL = BASE_URL + "/subscriber/download"
6
+ LOGIN_URL = BASE_URL + "/subscriber/login"
7
+ FEED_URL = BASE_URL + "/feed"
8
8
 
9
- RUBYTAPAS_DIR = Pathname.new(ENV['HOME']).join('.rubytapas')
10
- EPISODES_JSON_FILE = RUBYTAPAS_DIR.join('episodes.json')
11
- CREDENTIAL_FILE = RUBYTAPAS_DIR.join('.credentials')
9
+ RUBYTAPAS_DIR = Pathname.new(ENV["HOME"]).join(".rubytapas")
10
+ EPISODES_JSON_FILE = RUBYTAPAS_DIR.join("episodes.json")
11
+ CREDENTIAL_FILE = RUBYTAPAS_DIR.join(".credentials")
12
12
  end
@@ -1,4 +1,4 @@
1
- require 'celluloid/io'
1
+ require "celluloid/io"
2
2
 
3
3
  module ComerDeTapas
4
4
  class Fetcher
@@ -9,8 +9,8 @@ module ComerDeTapas
9
9
  # @param cookie
10
10
  # @option query [Hash]
11
11
  def fetch url, cookie, query={}
12
- require 'http'
13
- HTTP.with('Cookie' => cookie).get(url, ssl_socket_class: Celluloid::IO::SSLSocket, params: query)
12
+ require "http"
13
+ HTTP.with("Cookie" => cookie).get(url, ssl_socket_class: Celluloid::IO::SSLSocket, params: query)
14
14
  end
15
15
  end
16
16
  end
@@ -3,12 +3,12 @@ module ComerDeTapas
3
3
  KEYS = %w(email password save_path)
4
4
 
5
5
  def initialize
6
- abort 'Please run `comer_de_tapas init` first' unless CREDENTIAL_FILE.exist?
6
+ abort "Please run `comer_de_tapas init` first" unless CREDENTIAL_FILE.exist?
7
7
 
8
8
  set_subscription_data if subscription_data_valid?
9
9
  end
10
10
 
11
- # @return [Hash] User's Ruby Tapas credential information
11
+ # @return [Hash] User"s Ruby Tapas credential information
12
12
  def to_h
13
13
  { email: email, password: password, save_path: save_path }
14
14
  end
@@ -19,17 +19,17 @@ module ComerDeTapas
19
19
 
20
20
  # Load ~/.rubytapas/.credentials yaml
21
21
  def load_credential_data
22
- require 'yaml'
23
- @credential_yaml ||= YAML.load_file CREDENTIAL_FILE
22
+ require "yaml"
23
+ @credential_yaml ||= YAML.load CREDENTIAL_FILE.read
24
24
  end
25
25
 
26
26
  # Return true if ~/.rubytapas/.credentials files are filled and correct.
27
27
  # @return [Boolen]
28
28
  def subscription_data_valid?
29
- # empty credential file's size is about 50-55.
29
+ # empty credential file"s size is about 50-55.
30
30
  # 65 is when you have a very short email, password, and save_path.
31
31
  # So when you filled in data, probably will > 65.
32
- if File.size(CREDENTIAL_FILE) < 65
32
+ if CREDENTIAL_FILE.size < 65
33
33
  abort "Did you fill in your subscription data in #{CREDENTIAL_FILE}?"
34
34
  return false
35
35
  end
@@ -44,7 +44,7 @@ module ComerDeTapas
44
44
  hash.each do |k,v|
45
45
  abort <<-MSG unless KEYS.include? k
46
46
  Probably have a typo in #{CREDENTIAL_FILE}: #{k}
47
- Valid yaml keys: #{KEYS.join(', ')}.
47
+ Valid yaml keys: #{KEYS.join(", ")}.
48
48
  MSG
49
49
  abort "Please fill in #{k} in #{CREDENTIAL_FILE}" unless v
50
50
  end
@@ -60,9 +60,9 @@ Valid yaml keys: #{KEYS.join(', ')}.
60
60
 
61
61
  # Set subscription data from ~/.rubytapas/.credentials yaml
62
62
  def set_subscription_data
63
- @email ||= load_credential_data['credentials'][0]['email']
64
- @password ||= load_credential_data['credentials'][1]['password']
65
- @save_path ||= load_credential_data['credentials'][2]['save_path']
63
+ @email ||= load_credential_data["credentials"][0]["email"]
64
+ @password ||= load_credential_data["credentials"][1]["password"]
65
+ @save_path ||= load_credential_data["credentials"][2]["save_path"]
66
66
  end
67
67
  end
68
68
  end
@@ -1,3 +1,3 @@
1
1
  module ComerDeTapas
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comer_de_tapas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juanito Fatas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-16 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.6'
33
+ version: 0.7.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0.6'
40
+ version: 0.7.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: celluloid-io
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.17.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.17.0
69
69
  description: Ruby Tapas Episode Downloader.
70
70
  email:
71
71
  - katehuang0320@gmail.com
@@ -88,11 +88,6 @@ files:
88
88
  - lib/comer_de_tapas/fetcher.rb
89
89
  - lib/comer_de_tapas/subscription.rb
90
90
  - lib/comer_de_tapas/version.rb
91
- - test/cli_test.rb
92
- - test/client_test.rb
93
- - test/fetcher_test.rb
94
- - test/subscription_test.rb
95
- - test/test_helper.rb
96
91
  homepage: https://github.com/juanitofatas/comer_de_tapas
97
92
  licenses:
98
93
  - MIT
@@ -105,22 +100,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
100
  requirements:
106
101
  - - ">="
107
102
  - !ruby/object:Gem::Version
108
- version: '0'
103
+ version: 2.0.0
109
104
  required_rubygems_version: !ruby/object:Gem::Requirement
110
105
  requirements:
111
106
  - - ">="
112
107
  - !ruby/object:Gem::Version
113
- version: '0'
108
+ version: 2.2.2
114
109
  requirements: []
115
110
  rubyforge_project:
116
- rubygems_version: 2.3.0
111
+ rubygems_version: 2.4.8
117
112
  signing_key:
118
113
  specification_version: 4
119
114
  summary: Ruby Tapas Episode Downloader.
120
- test_files:
121
- - test/cli_test.rb
122
- - test/client_test.rb
123
- - test/fetcher_test.rb
124
- - test/subscription_test.rb
125
- - test/test_helper.rb
115
+ test_files: []
126
116
  has_rdoc:
@@ -1,12 +0,0 @@
1
- require 'test_helper'
2
-
3
- class CliTest < ComerDeTapas::Test
4
- def setup
5
- @cli = ComerDeTapas::CLI.new
6
- end
7
-
8
- def test_cli_version
9
- out, _ = capture_io { @cli.version }
10
- assert_match %r(\d.\d.\d), out
11
- end
12
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class ClientTest < ComerDeTapas::Test
4
- def setup
5
- @client = ComerDeTapas::Client.new
6
- end
7
- end
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class RubyTapasFetcherTest < ComerDeTapas::Test
4
- def setup
5
- @fetch = ComerDeTapas::Fetcher.new
6
- end
7
- end
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- class SubscriptionTest < ComerDeTapas::Test
4
- def setup
5
- end
6
- end
@@ -1,14 +0,0 @@
1
- require_relative '../lib/comer_de_tapas'
2
-
3
- require 'codeclimate-test-reporter'
4
- CodeClimate::TestReporter.start
5
-
6
- # ensures using the gem, and not the built-in.
7
- gem 'minitest'
8
- require 'minitest/autorun'
9
-
10
- module ComerDeTapas
11
- class Test < Minitest::Test
12
- end
13
- end
14
-