acrobat 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c99bfc29e7fb060276f39533f1f762f937eca16d6961d0d889243f5f4882878
4
- data.tar.gz: ceb386e7cdc9abba3085c515f2e11cbed715aeff2d48e175b3d61818a5c767cd
3
+ metadata.gz: b18bf4cd793748cb562b6b82a086de325c34b27805b60bd37926c25aaaa266e0
4
+ data.tar.gz: 0cb1a62fddac2225254b440eedcb39b6fc1bff3aa507ceaf84ad2098ca7ecc14
5
5
  SHA512:
6
- metadata.gz: 51a1bb2f8f589f2226b160cda8e9be8b08585e95d96f221216a047bcc2a1d18c93e28b897aec2f7937b0f17a95f050ce29052c17cb43f0b123edd15d2ea3fb93
7
- data.tar.gz: 2b6e94fce7255c41afb8b75a51364a9c8e51b4cdbda37a49e071675ff4fbee8882ea0dab4363f27322c05fa2df05cb60162ce622179b43a3d44b2f236d9dfc8e
6
+ metadata.gz: c25803ae0d1e36dbb49c39f247a3177b9bab2e75b26550abc2c68aa6cbb437b6911ac0b6fc441fb737eb5b4d67b0b40da54f12d26c47f4bf8a8c6b4251fdd51a
7
+ data.tar.gz: 2fe72404d91fbe51367816c5c5a28d786debe949cb4502889bdb8a19cb95a12531fb66d1c9f6a7064d197ab3b53a20f940cdb2a915111f3c5166462d3cf3aaaa
data/.gitignore CHANGED
@@ -1,32 +1,32 @@
1
- *.gem
2
- *.rbc
3
- /pkg/
4
- /spec/reports/
5
- /spec/examples.txt
6
- /test/tmp/
7
- /test/version_tmp/
8
- /tmp/
9
-
10
- # Used by dotenv library to load environment variables.
11
- # .env
12
-
13
-
14
- ## Documentation cache and generated files:
15
- /.yardoc/
16
- /_yardoc/
17
- /doc/
18
- /rdoc/
19
-
20
- ## Environment normalization:
21
- /.bundle/
22
- /vendor/bundle
23
- /lib/bundler/man/
24
-
25
- # for a library or gem, you might want to ignore these files since the code is
26
- # intended to run in multiple environments; otherwise, check them in:
27
- Gemfile.lock
28
- .ruby-version
29
- .ruby-gemset
30
-
31
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
1
+ *.gem
2
+ *.rbc
3
+ /pkg/
4
+ /spec/reports/
5
+ /spec/examples.txt
6
+ /test/tmp/
7
+ /test/version_tmp/
8
+ /tmp/
9
+
10
+ # Used by dotenv library to load environment variables.
11
+ # .env
12
+
13
+
14
+ ## Documentation cache and generated files:
15
+ /.yardoc/
16
+ /_yardoc/
17
+ /doc/
18
+ /rdoc/
19
+
20
+ ## Environment normalization:
21
+ /.bundle/
22
+ /vendor/bundle
23
+ /lib/bundler/man/
24
+
25
+ # for a library or gem, you might want to ignore these files since the code is
26
+ # intended to run in multiple environments; otherwise, check them in:
27
+ Gemfile.lock
28
+ .ruby-version
29
+ .ruby-gemset
30
+
31
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
32
32
  .rvmrc
data/History.adoc CHANGED
@@ -1,6 +1,6 @@
1
- === 0.0.5/ 2017-01-20
2
-
3
- * 1 major enhancement
4
-
5
- * Birthday!
6
-
1
+ === 0.0.5/ 2017-01-20
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/LICENSE.adoc CHANGED
@@ -1,22 +1,22 @@
1
- .The MIT License
2
- ....
3
- Copyright (C) 2012-2016 Dominic Sisneros and the Microstation-Ruby project.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
22
- ....
1
+ .The MIT License
2
+ ....
3
+ Copyright (C) 2012-2016 Dominic Sisneros and the Microstation-Ruby project.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
22
+ ....
data/Manifest.txt CHANGED
@@ -1,15 +1,14 @@
1
- .autotest
2
- .gitignore
3
- Guardfile
4
- History.adoc
5
- LICENSE.adoc
6
- Manifest.txt
7
- README.adoc
8
- Rakefile
9
- bin/acrobat
10
- lib/acrobat.rb
11
- lib/acrobat/app.rb
12
- lib/acrobat/jso.rb
13
- lib/acrobat/pdoc.rb
14
- test/acrobat_test.rb
15
- test/test_helper.rb
1
+ .gitignore
2
+ Guardfile
3
+ History.adoc
4
+ LICENSE.adoc
5
+ Manifest.txt
6
+ README.adoc
7
+ Rakefile
8
+ bin/acrobat
9
+ lib/acrobat.rb
10
+ lib/acrobat/app.rb
11
+ lib/acrobat/jso.rb
12
+ lib/acrobat/pdoc.rb
13
+ test/acrobat_test.rb
14
+ test/test_helper.rb
data/README.adoc CHANGED
@@ -1,117 +1,117 @@
1
- = acrobat
2
- Dominic Sisneros <https://github.com/dsisnero[@dsisnero]
3
- //settings
4
- :page-layout: base
5
- :idprefix:
6
- :idseparator: -
7
- :source-language: ruby
8
- :language: {source-language}
9
- // Uris
10
- :uri-org: https://github.com/dsisnero
11
- :uri-repo: {uri-org}/acrobat
12
- :uri-issues: {uri-repo}/issues
13
- :uri-contributors: {uri-repo}/graphs/contributors
14
- :uri-changelog: {uri-rel-file-base}CHANGELOG.adoc
15
- :uri-rel-file-base: {uri-repo}/blob/master/
16
- :uri-rel-tree-base: {uri-repo}/tree/master/
17
- :uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
18
- :uri-license: {uri-rel-file-base}LICENSE.adoc
19
-
20
- == DESCRIPTION:
21
-
22
- The acrobat gem is a library that uses WIN32OLE to automate pdf functions. Adobe Reader or Adobe Acrobat must be installed and then you can fill forms and merge documents
23
-
24
- == Requirements
25
-
26
- * Windows Adobe Acrobat installed
27
-
28
- == Install 0ptions
29
-
30
- acrobat can be installed using (a) the `gem install` command, (b) Bundler
31
-
32
- === (a) gem install
33
-
34
- Open a terminal and type
35
- $ gem install acrobat
36
-
37
- .Upgrading your installation
38
- [TIP]
39
- ====
40
- If you have an earlier version of acrobat installed you can update it using:
41
-
42
- $ gem update acrobat
43
-
44
- If you install a new version of the gem using `gem install` instead of
45
- gem update, you'll have multiple versions installed. If that's the
46
- case, use the following gem command to remove the old versions:
47
-
48
- $ gem cleanup acrobat
49
- ====
50
- === (b) Bundler
51
-
52
- . Create a Gemfile in the root folder of your project (or the current directory)
53
- . Add the `asciidoctor` gem to your Gemfile as follows:
54
- +
55
- [source]
56
- ----
57
- source 'https://rubygems.org'
58
- gem 'acrobat'
59
- # or specify the version explicitly
60
- # gem 'acrobat', '0.0.5'
61
- ----
62
-
63
- . Save the Gemfile
64
- . Open a terminal and install the gem using:
65
-
66
- $ bundle
67
-
68
- To upgrade the gem, specify the new version in the Gemfile and run `bundle` again.
69
- Using `bundle update` is *not* recommended as it will also update other gems, which may not be the desired result.
70
-
71
- == Usage
72
-
73
- [source,ruby]
74
- ----
75
-
76
- require 'acrobat'
77
- Adobe::Acrobat.run do |app|
78
- fields = {city: 'City', state: 'State', zip: 'zip'}
79
- doc = app.open('apd_document.pdf')
80
- doc.fill_form(fields)
81
- doc.show
82
- doc2 = app.open('another_doc.pdf')
83
- doc2.fill_form(fields)
84
- doc1.merge_doc(doc2)
85
- doc1.save_as(name: 'merged_doc.pdf', dir: 'tmp')
86
- end
87
-
88
-
89
-
90
- ----
91
-
92
- == Getting Help
93
-
94
-
95
- We encourage you to ask questions and discuss any aspects of the project on the discussion list, Twitter or IRC.
96
-
97
- Mailing list:: {uri-discuss}
98
-
99
-
100
- ifdef::env-github[]
101
- Further information and documentation about acrobat gem can be found on the project's website.
102
-
103
- {uri-project}/[Home] | {uri-news}[News] | {uri-docs}[Docs]
104
- endif::[]
105
-
106
- The project's source code, issue tracker, and sub-projects are on github
107
-
108
- Source repository (git):: {uri-repo}
109
- Issue tracker:: {uri-issues}
110
- acrobat organization on GitHub:: {uri-org}
111
-
112
- == Copyright and Licensing
113
-
114
- Copyright (C) 2012-2016 Dominic Sisneros and the acrobat-Ruby Project.
115
- Free use of this software is granted under the terms of the MIT License.
116
-
117
- See the {uri-license}[LICENSE] file for details.
1
+ = acrobat
2
+ Dominic Sisneros <https://github.com/dsisnero[@dsisnero]
3
+ //settings
4
+ :page-layout: base
5
+ :idprefix:
6
+ :idseparator: -
7
+ :source-language: ruby
8
+ :language: {source-language}
9
+ // Uris
10
+ :uri-org: https://github.com/dsisnero
11
+ :uri-repo: {uri-org}/acrobat
12
+ :uri-issues: {uri-repo}/issues
13
+ :uri-contributors: {uri-repo}/graphs/contributors
14
+ :uri-rel-file-base: {uri-repo}/blob/master/
15
+ :uri-rel-tree-base: {uri-repo}/tree/master/
16
+ :uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
17
+ :uri-changelog: {uri-rel-file-base}CHANGELOG.adoc
18
+ :uri-license: {uri-rel-file-base}LICENSE.adoc
19
+
20
+ == DESCRIPTION:
21
+
22
+ The acrobat gem is a library that uses WIN32OLE to automate pdf functions. Adobe Reader or Adobe Acrobat must be installed and then you can fill forms and merge documents
23
+
24
+ == Requirements
25
+
26
+ * Windows Adobe Acrobat installed
27
+
28
+ == Install 0ptions
29
+
30
+ acrobat can be installed using (a) the `gem install` command, (b) Bundler
31
+
32
+ === (a) gem install
33
+
34
+ Open a terminal and type
35
+ $ gem install acrobat
36
+
37
+ .Upgrading your installation
38
+ [TIP]
39
+ ====
40
+ If you have an earlier version of acrobat installed you can update it using:
41
+
42
+ $ gem update acrobat
43
+
44
+ If you install a new version of the gem using `gem install` instead of
45
+ gem update, you'll have multiple versions installed. If that's the
46
+ case, use the following gem command to remove the old versions:
47
+
48
+ $ gem cleanup acrobat
49
+ ====
50
+ === (b) Bundler
51
+
52
+ . Create a Gemfile in the root folder of your project (or the current directory)
53
+ . Add the `asciidoctor` gem to your Gemfile as follows:
54
+ +
55
+ [source]
56
+ ----
57
+ source 'https://rubygems.org'
58
+ gem 'acrobat'
59
+ # or specify the version explicitly
60
+ # gem 'acrobat', '0.0.5'
61
+ ----
62
+
63
+ . Save the Gemfile
64
+ . Open a terminal and install the gem using:
65
+
66
+ $ bundle
67
+
68
+ To upgrade the gem, specify the new version in the Gemfile and run `bundle` again.
69
+ Using `bundle update` is *not* recommended as it will also update other gems, which may not be the desired result.
70
+
71
+ == Usage
72
+
73
+ [source,ruby]
74
+ ----
75
+
76
+ require 'acrobat'
77
+ Adobe::Acrobat.run do |app|
78
+ fields = {city: 'City', state: 'State', zip: 'zip'}
79
+ doc = app.open('apd_document.pdf')
80
+ doc.fill_form(fields)
81
+ doc.show
82
+ doc2 = app.open('another_doc.pdf')
83
+ doc2.fill_form(fields)
84
+ doc1.merge_doc(doc2)
85
+ doc1.save_as(name: 'merged_doc.pdf', dir: 'tmp')
86
+ end
87
+
88
+
89
+
90
+ ----
91
+
92
+ == Getting Help
93
+
94
+
95
+ We encourage you to ask questions and discuss any aspects of the project on the discussion list, Twitter or IRC.
96
+
97
+ Mailing list:: {uri-discuss}
98
+
99
+
100
+ ifdef::env-github[]
101
+ Further information and documentation about acrobat gem can be found on the project's website.
102
+
103
+ {uri-project}/[Home] | {uri-news}[News] | {uri-docs}[Docs]
104
+ endif::[]
105
+
106
+ The project's source code, issue tracker, and sub-projects are on github
107
+
108
+ Source repository (git):: {uri-repo}
109
+ Issue tracker:: {uri-issues}
110
+ acrobat organization on GitHub:: {uri-org}
111
+
112
+ == Copyright and Licensing
113
+
114
+ Copyright (C) 2012-2016 Dominic Sisneros and the acrobat-Ruby Project.
115
+ Free use of this software is granted under the terms of the MIT License.
116
+
117
+ See the {uri-license}[LICENSE] file for details.
data/Rakefile CHANGED
@@ -1,48 +1,58 @@
1
- # -*- ruby -*-
2
-
3
- require "rubygems"
4
- require "hoe"
5
-
6
- class Hoe
7
-
8
- def intuit_values
9
- require 'asciidoctor'
10
- doc = Asciidoctor.load_file readme_file
11
- urls = { "home" => doc.attributes['uri-repo']}
12
- desc = doc.blocks.find{|b| b.id =~ /description/i}.content
13
- summ = desc.split(/\.\s+/).first(summary_sentences).join(". ")
14
- self.urls ||= urls
15
- self.description ||= desc
16
- self.summary ||= summ
17
- end
18
-
19
- end
20
-
21
- # Hoe.plugin :compiler
22
- # Hoe.plugin :gem_prelude_sucks
23
- # Hoe.plugin :inline
24
- # Hoe.plugin :racc
25
- # Hoe.plugin :rcov
26
- # Hoe.plugin :rdoc
27
- Hoe.plugin :bundler
28
- Hoe.plugin :minitest
29
- Hoe.plugin :yard
30
-
31
- Hoe.spec "acrobat" do |s|
32
- dependency("hoe-bundler", "~> 1.4",:development)
33
- dependency("hoe-yard", "> 0.1",:development)
34
- dependency("pry", "> 0.0", :development)
35
- dependency("pry-byebug", "> 0.0", :development)
36
- dependency("yard", "> 0.0", :development)
37
- dependency("guard", "> 0.0", :development)
38
- dependency("wdm", "> 0.1", :development) if Gem.win_platform?
39
- dependency("guard-minitest", "> 0.0", :development)
40
- dependency("asciidoctor", "> 0.0",:development)
41
- # dependency("minitest-utils", "> 0.0", :development)
42
- developer("Dominic Sisneros","dsisnero@gmail.com")
43
- clean_globs << "tmp"
44
- license "MIT" # this should match the license in the README
45
- end
46
-
47
-
48
- # vim: syntax=ruby
1
+ # -*- ruby -*-
2
+
3
+ require "rubygems"
4
+ require "hoe"
5
+
6
+ class Hoe
7
+
8
+ ASCIIDOC_URI_TO_METADATA = {
9
+ 'home' => 'uri-repo',
10
+ 'bugs' => 'uri-issues',
11
+ 'code' => 'uri-repo',
12
+ 'clog' => 'uri-changelog'
13
+ }
14
+
15
+ # URLS_TO_META_MAP
16
+
17
+
18
+ def intuit_values(input)
19
+ require 'asciidoctor'
20
+ doc = Asciidoctor.load_file readme_file
21
+ urls = ASCIIDOC_URI_TO_METADATA.to_h{ |k,v| [k, doc.attributes[v]]}
22
+ desc = doc.blocks.find{|b| b.id =~ /description/i}.content
23
+ summ = desc.split(/\.\s+/).first(summary_sentences).join(". ")
24
+ self.urls ||= urls
25
+ self.description ||= desc
26
+ self.summary ||= summ
27
+ end
28
+
29
+ end
30
+
31
+ # Hoe.plugin :compiler
32
+ # Hoe.plugin :gem_prelude_sucks
33
+ # Hoe.plugin :inline
34
+ # Hoe.plugin :racc
35
+ # Hoe.plugin :rcov
36
+ # Hoe.plugin :rdoc
37
+ Hoe.plugin :bundler
38
+ Hoe.plugin :minitest
39
+ Hoe.plugin :yard
40
+
41
+ Hoe.spec "acrobat" do |s|
42
+ dependency("hoe-bundler", "~> 1.4",:development)
43
+ dependency("hoe-yard", "> 0.1",:development)
44
+ dependency("pry", "> 0.0", :development)
45
+ dependency("pry-byebug", "> 0.0", :development)
46
+ dependency("yard", "> 0.0", :development)
47
+ dependency("guard", "> 0.0", :development)
48
+ dependency("wdm", "> 0.1", :development) if Gem.win_platform?
49
+ dependency("guard-minitest", "> 0.0", :development)
50
+ dependency("asciidoctor", "> 0.0",:development)
51
+ # dependency("minitest-utils", "> 0.0", :development)
52
+ developer("Dominic Sisneros","dsisnero@gmail.com")
53
+ clean_globs << "tmp"
54
+ license "MIT" # this should match the license in the README
55
+ end
56
+
57
+
58
+ # vim: syntax=ruby