brandeins 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/brandeins.gemspec +1 -1
- data/lib/brandeins/downloader.rb +1 -1
- data/lib/brandeins/merger/pdf_tools.rb +1 -1
- data/lib/brandeins/merger/templates/base.rb +1 -1
- data/lib/brandeins/setup.rb +1 -1
- data/lib/brandeins/version.rb +1 -1
- data/specs/brandeins_spec.rb +13 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -7,7 +7,7 @@ these fragmented PDFs, downloads and merges them into a single pdf.
|
|
7
7
|
|
8
8
|
|
9
9
|
## Requirements
|
10
|
-
BrandEins Downloader uses *pdftk* and depends on *ruby*, *rubygems*, and
|
10
|
+
BrandEins Downloader uses [*pdftk*](http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) and depends on *ruby*, *rubygems*, and
|
11
11
|
several ruby libraries (that you can get through rubygems)
|
12
12
|
|
13
13
|
|
@@ -23,4 +23,4 @@ Download just one magazine
|
|
23
23
|
|
24
24
|
Download the whole collecion of a certain year
|
25
25
|
|
26
|
-
`brandeins
|
26
|
+
`brandeins download --path=/Path/where/to/download/the/files --year=2011 --all`
|
data/brandeins.gemspec
CHANGED
data/lib/brandeins/downloader.rb
CHANGED
@@ -15,7 +15,7 @@ module BrandEins
|
|
15
15
|
@url = 'http://www.brandeins.de'
|
16
16
|
@dl_dir = path
|
17
17
|
@tmp_dir = @dl_dir + '/brand-eins-tmp'
|
18
|
-
@pdftool = BrandEins::Merger::
|
18
|
+
@pdftool = BrandEins::Merger::PdfTools.get_pdf_tool
|
19
19
|
@archive = BrandEins::Parser::ArchiveSite.new(@url)
|
20
20
|
create_tmp_dirs
|
21
21
|
end
|
data/lib/brandeins/setup.rb
CHANGED
data/lib/brandeins/version.rb
CHANGED
data/specs/brandeins_spec.rb
CHANGED
@@ -4,6 +4,7 @@ require 'webmock/minitest'
|
|
4
4
|
require File.expand_path('../../lib/brandeins', __FILE__)
|
5
5
|
|
6
6
|
describe BrandEins do
|
7
|
+
|
7
8
|
it "shows current version" do
|
8
9
|
out = capture_stdout do
|
9
10
|
BrandEins::CLI.start(['--version'])
|
@@ -11,6 +12,18 @@ describe BrandEins do
|
|
11
12
|
assert_equal BrandEins::VERSION, out.string.chomp
|
12
13
|
end
|
13
14
|
|
15
|
+
it "shows setup instructions" do
|
16
|
+
pdf_tool = Object.new
|
17
|
+
pdf_tool.define_singleton_method(:available?) do true; end
|
18
|
+
pdf_tool.define_singleton_method(:cmd) do "Funky Monkey" end
|
19
|
+
|
20
|
+
out = capture_stdout do
|
21
|
+
BrandEins::Setup.new( pdf_tool: pdf_tool ).run
|
22
|
+
end
|
23
|
+
|
24
|
+
assert !!out.string.chomp.match("you have Funky Monkey running"), "Missing Funky Monkey"
|
25
|
+
end
|
26
|
+
|
14
27
|
it "runs pdftk" do
|
15
28
|
# response_archiv = IO.read(File.expand_path('../../test_support/fixtures/brandeins_archiv.html', __FILE__))
|
16
29
|
# jpgfile = IO.binread(File.expand_path('../../test_support/fixtures/cover.jpg', __FILE__))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brandeins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash:
|
139
|
+
hash: 1329463463916465473
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
segments:
|
147
147
|
- 0
|
148
|
-
hash:
|
148
|
+
hash: 1329463463916465473
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
151
|
rubygems_version: 1.8.24
|