brandeins 0.0.10 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/brandeins/setup.rb +4 -4
- data/lib/brandeins/version.rb +1 -1
- data/lib/brandeins.rb +17 -7
- metadata +3 -3
data/lib/brandeins/setup.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
class BrandEinsSetup
|
2
2
|
def initialize
|
3
|
-
|
3
|
+
puts 'Checking requirements for your system'
|
4
4
|
if pdftk?
|
5
|
-
|
5
|
+
puts 'It seems you have pdftk installed on your system.'
|
6
6
|
else
|
7
|
-
|
8
|
-
|
7
|
+
puts 'It seems you are missing pdfk on your system. You are ready to go!'
|
8
|
+
puts pdfk_install_instructions
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
data/lib/brandeins/version.rb
CHANGED
data/lib/brandeins.rb
CHANGED
@@ -17,19 +17,29 @@ module BrandEins
|
|
17
17
|
|
18
18
|
desc '--version', 'Displays current version'
|
19
19
|
def version
|
20
|
-
|
20
|
+
puts BrandEins::VERSION
|
21
21
|
end
|
22
22
|
|
23
23
|
desc 'download', 'Download past brand eins magazines (use `brandeins help download` to learn more about options)'
|
24
24
|
method_option :path, :type => :string
|
25
25
|
method_option :volume, :type => :numeric
|
26
|
+
method_option :all
|
26
27
|
method_option :year, :type => :numeric
|
27
28
|
def download
|
28
|
-
path = options.path ||
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
path = options.path || Dir.pwd
|
30
|
+
year = options.year || Time.new.year
|
31
|
+
volume = options.volume
|
32
|
+
all = options.all
|
33
|
+
if volume.nil? && all.nil?
|
34
|
+
puts "If you want to download a specific volune use the --volume flag or use --all to download all volumes of a year"
|
35
|
+
else
|
36
|
+
b1 = BrandEins::Downloader.new path
|
37
|
+
if !all.nil?
|
38
|
+
b1.get_magazines_of_year year if !volume.nil?
|
39
|
+
elsif !volume.nil?
|
40
|
+
b1.get_magazine year, volume
|
41
|
+
end
|
42
|
+
end
|
33
43
|
end
|
34
44
|
|
35
45
|
desc 'setup', 'Checks if all requirements to use brandeins are met and gives instructions how to meet them'
|
@@ -37,7 +47,7 @@ module BrandEins
|
|
37
47
|
if BrandEinsHelper.windows? || BrandEinsHelper.osx?
|
38
48
|
require 'brandeins/setup'
|
39
49
|
else
|
40
|
-
|
50
|
+
puts 'Unknown/unsupported operating system. Please contact the gem author.'
|
41
51
|
end
|
42
52
|
end
|
43
53
|
end
|
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.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -103,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
segments:
|
105
105
|
- 0
|
106
|
-
hash: -
|
106
|
+
hash: -1559172589669121865
|
107
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
108
|
none: false
|
109
109
|
requirements:
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
segments:
|
114
114
|
- 0
|
115
|
-
hash: -
|
115
|
+
hash: -1559172589669121865
|
116
116
|
requirements: []
|
117
117
|
rubyforge_project:
|
118
118
|
rubygems_version: 1.8.24
|