pdf_to_swf-paperclip-processor 0.0.4 → 0.1.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.
data/README.md
CHANGED
@@ -4,10 +4,10 @@ This gem is Paperclip processor, utilizing swftools in order to convert uploaded
|
|
4
4
|
|
5
5
|
## Requirements ##
|
6
6
|
|
7
|
-
* [Paperclip][0] ~> 2.
|
8
|
-
* [Ruby on Rails][1] ~> 3
|
7
|
+
* [Paperclip][0] ~> 2.4
|
9
8
|
* [SwfTools][2]
|
10
9
|
|
10
|
+
For older versions of paperclip (2.3 and below), please use v0.0.4 of this gem.
|
11
11
|
## Installation ##
|
12
12
|
|
13
13
|
This gem is written and tested on Ruby on Rails 3 only. However, I see no reason why it should not work on earlier versions, as long as Paperclip is functional.
|
@@ -18,22 +18,20 @@ In order to install it, add
|
|
18
18
|
|
19
19
|
to your Gemfile and run
|
20
20
|
|
21
|
-
bundle
|
21
|
+
bundle install
|
22
22
|
|
23
23
|
in your console. Bundler should take care of all the rest.
|
24
24
|
|
25
25
|
## SwfTools Instalation ##
|
26
26
|
|
27
|
-
Install [swftools][2] using your favorite package manager. On OS X, the easiest way to do it is by using [Homebrew][3].
|
27
|
+
Install [swftools][2] from source or using your favorite package manager. On OS X, the easiest way to do it is by using [Homebrew][3].
|
28
28
|
|
29
29
|
brew install swftools
|
30
30
|
|
31
|
-
Various
|
31
|
+
Various Linux distributions should use similar methods with their respected package managers.
|
32
32
|
|
33
33
|
If you are using Windows, you are in luck (this time), swftools also has a Windows binary.
|
34
34
|
|
35
|
-
Otherwise, just install from the source.
|
36
|
-
|
37
35
|
## Using Processor ##
|
38
36
|
|
39
37
|
Use it as you would any other Paperclip processor. In your model:
|
@@ -53,9 +51,6 @@ Use it as you would any other Paperclip processor. In your model:
|
|
53
51
|
|
54
52
|
which will convert your pdf document into swf , and keep both files (.swf and .pdf) on the server
|
55
53
|
|
56
|
-
|
57
|
-
However, if you think you can do better, feel free to fork.
|
58
|
-
|
59
54
|
### Params ###
|
60
55
|
|
61
56
|
Params have not been extrapolated and are passed directly to pdf2swf application. Documentation for those can be found on [swftools wiki][5].
|
@@ -85,15 +80,17 @@ Params have not been extrapolated and are passed directly to pdf2swf application
|
|
85
80
|
-I , --info Don't do actual conversion, just display a list of all pages in the PDF.
|
86
81
|
-Q , --maxtime n Abort conversion after n seconds. Only available on Unix.
|
87
82
|
|
83
|
+
I do have a to-do to make this more readable for one of the next releases.
|
84
|
+
|
88
85
|
## Release info ##
|
89
86
|
|
90
|
-
Be warned, this gem is released as early
|
87
|
+
Be warned, this gem is released as early beta version. If you are using it you are doing so on your own responsibility.
|
91
88
|
|
92
89
|
Have fun with it and drop me a note if you like it.
|
93
90
|
|
94
91
|
|
95
92
|
[0]: https://github.com/thoughtbot/paperclip
|
96
|
-
[1]: http://rubyonrails.org/
|
97
93
|
[2]: http://www.swftools.org/
|
98
94
|
[3]: http://mxcl.github.com/homebrew/
|
95
|
+
[4]: http://www.swftools.org/faq.html
|
99
96
|
[5]: http://wiki.swftools.org/index.php/Pdf2swf
|
@@ -25,7 +25,7 @@ module Paperclip
|
|
25
25
|
parameters = parameters.flatten.compact.join(" ").strip.squeeze(" ")
|
26
26
|
|
27
27
|
success = Paperclip.run("pdf2swf", parameters, :source => "#{File.expand_path(src.path)}",:dest => File.expand_path(dst.path))
|
28
|
-
rescue
|
28
|
+
rescue Cocaine::CommandLineError => e
|
29
29
|
raise PaperclipError, "There was an error converting #{@basename} to swf"
|
30
30
|
end
|
31
31
|
dst
|
@@ -6,16 +6,15 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "pdf_to_swf-paperclip-processor"
|
7
7
|
s.version = Pdftoswf::Paperclip::Processor::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["Armin Pašalić", "Mojmir Novakovic
|
10
|
-
s.email = ["
|
9
|
+
s.authors = ["Armin Pašalić", "Mojmir Novakovic"]
|
10
|
+
s.email = ["armin@pasalic.com.ba","moonflash.as3@gmail.com"]
|
11
11
|
s.homepage = "https://github.com/Krule/pdf_to_swf-paperclip-processor"
|
12
12
|
s.summary = %q{Converts uploaded pdf to swf}
|
13
13
|
s.description = %q{This gem is simple Paperclip processor which uses swftools to convert uploaded pdf files to swf}
|
14
14
|
|
15
15
|
s.rubyforge_project = "pdf_to_swf-paperclip-processor"
|
16
16
|
|
17
|
-
s.add_dependency "
|
18
|
-
s.add_dependency "paperclip", "~> 2.3"
|
17
|
+
s.add_dependency "paperclip", "~> 2.4"
|
19
18
|
|
20
19
|
s.files = `git ls-files`.split("\n")
|
21
20
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,62 +1,38 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf_to_swf-paperclip-processor
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
version: 0.0.4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
-
|
13
|
-
- Mojmir Novakovic
|
7
|
+
authors:
|
8
|
+
- Armin Pašalić
|
9
|
+
- Mojmir Novakovic
|
14
10
|
autorequire:
|
15
11
|
bindir: bin
|
16
12
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-05-05 00:00:00 +02:00
|
13
|
+
date: 2011-09-18 00:00:00.000000000 +02:00
|
19
14
|
default_executable:
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
name: rails
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
segments:
|
30
|
-
- 3
|
31
|
-
- 0
|
32
|
-
version: "3.0"
|
33
|
-
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
36
17
|
name: paperclip
|
37
|
-
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
18
|
+
requirement: &2153398880 !ruby/object:Gem::Requirement
|
39
19
|
none: false
|
40
|
-
requirements:
|
20
|
+
requirements:
|
41
21
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
- 2
|
45
|
-
- 3
|
46
|
-
version: "2.3"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '2.4'
|
47
24
|
type: :runtime
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *2153398880
|
27
|
+
description: This gem is simple Paperclip processor which uses swftools to convert
|
28
|
+
uploaded pdf files to swf
|
29
|
+
email:
|
30
|
+
- armin@pasalic.com.ba
|
52
31
|
- moonflash.as3@gmail.com
|
53
32
|
executables: []
|
54
|
-
|
55
33
|
extensions: []
|
56
|
-
|
57
34
|
extra_rdoc_files: []
|
58
|
-
|
59
|
-
files:
|
35
|
+
files:
|
60
36
|
- .gitignore
|
61
37
|
- Gemfile
|
62
38
|
- README.md
|
@@ -67,34 +43,26 @@ files:
|
|
67
43
|
has_rdoc: true
|
68
44
|
homepage: https://github.com/Krule/pdf_to_swf-paperclip-processor
|
69
45
|
licenses: []
|
70
|
-
|
71
46
|
post_install_message:
|
72
47
|
rdoc_options: []
|
73
|
-
|
74
|
-
require_paths:
|
48
|
+
require_paths:
|
75
49
|
- lib
|
76
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
51
|
none: false
|
78
|
-
requirements:
|
79
|
-
- -
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
|
82
|
-
|
83
|
-
version: "0"
|
84
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
57
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
90
|
-
- 0
|
91
|
-
version: "0"
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
92
62
|
requirements: []
|
93
|
-
|
94
63
|
rubyforge_project: pdf_to_swf-paperclip-processor
|
95
|
-
rubygems_version: 1.
|
64
|
+
rubygems_version: 1.6.2
|
96
65
|
signing_key:
|
97
66
|
specification_version: 3
|
98
67
|
summary: Converts uploaded pdf to swf
|
99
68
|
test_files: []
|
100
|
-
|