microstation 0.4.1 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +7 -0
  2. data/.autotest +23 -23
  3. data/.rspec +2 -2
  4. data/Gemfile +29 -10
  5. data/History.txt +6 -6
  6. data/LICENSE.adoc +22 -0
  7. data/Manifest.txt +91 -60
  8. data/README.adoc +131 -0
  9. data/Rakefile +72 -30
  10. data/bin/dgn2pdf +36 -37
  11. data/bin/dgn_template +107 -0
  12. data/bin/pw_print +35 -0
  13. data/cad_files/drawing_faatitle_in_non_default_model.dgn +0 -0
  14. data/cad_files/drawing_no_block.dgn +0 -0
  15. data/cad_files/drawing_with_3_block.dgn +0 -0
  16. data/cad_files/drawing_with_block.dgn +0 -0
  17. data/cad_files/drawing_with_text.dgn +0 -0
  18. data/cad_files/seed2d.dgn +0 -0
  19. data/cad_files/seed3d.dgn +0 -0
  20. data/lib/microstation/app.rb +781 -286
  21. data/lib/microstation/cad_input_queue.rb +100 -25
  22. data/lib/microstation/cell.rb +191 -0
  23. data/lib/microstation/changer.rb +70 -0
  24. data/lib/microstation/configuration.rb +193 -57
  25. data/lib/microstation/criteria_creation_t.rb +23 -0
  26. data/lib/microstation/dir.rb +252 -252
  27. data/lib/microstation/directory.rb +46 -0
  28. data/lib/microstation/drawing.rb +686 -189
  29. data/lib/microstation/element.rb +311 -0
  30. data/lib/microstation/enumerator.rb +32 -29
  31. data/lib/microstation/errors.rb +17 -0
  32. data/lib/microstation/event_handler.rb +28 -0
  33. data/lib/microstation/ext/pathname.rb +23 -25
  34. data/lib/microstation/ext/win32ole.rb +7 -0
  35. data/lib/microstation/extensions/faa.rb +124 -0
  36. data/lib/microstation/file_tests.rb +68 -0
  37. data/lib/microstation/functions.rb +60 -0
  38. data/lib/microstation/graphics.rb +35 -0
  39. data/lib/microstation/line.rb +19 -0
  40. data/lib/microstation/model.rb +45 -0
  41. data/lib/microstation/model_trait.rb +189 -0
  42. data/lib/microstation/ole_cad_input_message.rb +101 -0
  43. data/lib/microstation/ole_helper.rb +152 -0
  44. data/lib/microstation/pdf_support.rb +40 -40
  45. data/lib/microstation/point3d.rb +71 -0
  46. data/lib/microstation/primitive_command_interface.rb +66 -0
  47. data/lib/microstation/properties.rb +61 -57
  48. data/lib/microstation/property_handler.rb +48 -0
  49. data/lib/microstation/scan/color.rb +38 -38
  50. data/lib/microstation/scan/criteria.rb +89 -85
  51. data/lib/microstation/scan/klass.rb +43 -43
  52. data/lib/microstation/scan/level.rb +38 -38
  53. data/lib/microstation/scan/line_style.rb +45 -45
  54. data/lib/microstation/scan/line_weight.rb +33 -33
  55. data/lib/microstation/scan/range.rb +19 -0
  56. data/lib/microstation/scan/scan_trait.rb +51 -0
  57. data/lib/microstation/scan/subtype.rb +40 -40
  58. data/lib/microstation/scan/type.rb +134 -109
  59. data/lib/microstation/scan_trait.rb +62 -0
  60. data/lib/microstation/scanner.rb +24 -24
  61. data/lib/microstation/tag.rb +87 -58
  62. data/lib/microstation/tag_set.rb +385 -280
  63. data/lib/microstation/tag_set_trait.rb +51 -0
  64. data/lib/microstation/tagged_element.rb +105 -0
  65. data/lib/microstation/template.rb +90 -84
  66. data/lib/microstation/template_info.rb +172 -0
  67. data/lib/microstation/template_runner.rb +65 -0
  68. data/lib/microstation/text.rb +79 -54
  69. data/lib/microstation/text_node.rb +124 -74
  70. data/lib/microstation/ts/attribute.rb +140 -139
  71. data/lib/microstation/ts/instance.rb +146 -112
  72. data/lib/microstation/ts/tagset_trait.rb +49 -0
  73. data/lib/microstation/types.rb +91 -91
  74. data/lib/microstation/version.rb +5 -0
  75. data/lib/microstation/wrap.rb +28 -214
  76. data/lib/microstation.rb +252 -88
  77. data/plot/pdf-bw.plt +164 -164
  78. data/plot/pdf.plt +163 -163
  79. data/plot/png.plt +383 -383
  80. data/plot/tiff.plt +384 -384
  81. data/plot/wmbw.tbl +324 -66
  82. data/plot/wmcolor.tbl +62 -62
  83. data/spec/microstation/app_spec.rb +184 -0
  84. data/spec/microstation/configuration_spec.rb +131 -0
  85. data/spec/microstation/drawing_spec.rb +245 -0
  86. data/spec/microstation/functions_spec.rb +36 -0
  87. data/spec/microstation/tag_set_spec.rb +159 -0
  88. data/spec/microstation/template_spec.rb +159 -0
  89. data/spec/microstation/text_node_spec.rb +67 -0
  90. data/spec/microstation/text_spec.rb +42 -0
  91. data/spec/microstation_spec.rb +47 -36
  92. data/spec/spec_helper.rb +97 -31
  93. metadata +308 -84
  94. data/.gemtest +0 -0
  95. data/README.txt +0 -75
  96. data/lib/microstation/attributes.rb +0 -35
  97. data/lib/microstation/extensions/hash.rb +0 -27
  98. data/spec/app_spec.rb +0 -267
  99. data/spec/configuration_spec.rb +0 -122
  100. data/spec/drawing_spec.rb +0 -247
  101. data/spec/drawings/new_drawing.dgn +0 -0
  102. data/spec/drawings/test.dgn +0 -0
  103. data/spec/drawings/test1.dgn +0 -0
  104. data/spec/drawings/testfile.pdf +0 -0
  105. data/spec/enumerator_spec.rb +0 -60
  106. data/spec/scanner_spec.rb +0 -155
  107. data/spec/spec_app.rb +0 -11
  108. data/spec/tag_set_spec.rb +0 -123
  109. data/spec/text_node_spec.rb +0 -92
  110. data/spec/text_spec.rb +0 -62
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6dade49110e3215b4d4da3cbfa9619bd36cfbfa16088dd3705039cfbd16da86e
4
+ data.tar.gz: 1c6afd4b5f1a4a33391687890d5a0872d69aba663fda2c36b3b2c8076d616529
5
+ SHA512:
6
+ metadata.gz: 8e5f646254acf1edcaf295d74ea9e0633388aba9429d494a9f8c6cae9ac9a83546c1c451b5ecbb4a6a87560a5cd95a32227b786cf24940ac19265d3cd1deefc9
7
+ data.tar.gz: ca9aa2b552173135b1080f688632d5e8fc5cdac36b6845da2ce3676d1b20f141a2594a16aadbd03833814c88b49b0793ec7b6048153cbb339a1d9aa581df34b5
data/.autotest CHANGED
@@ -1,23 +1,23 @@
1
- # -*- ruby -*-
2
-
3
- require 'autotest/restart'
4
-
5
- # Autotest.add_hook :initialize do |at|
6
- # at.extra_files << "../some/external/dependency.rb"
7
- #
8
- # at.libs << ":../some/external"
9
- #
10
- # at.add_exception 'vendor'
11
- #
12
- # at.add_mapping(/dependency.rb/) do |f, _|
13
- # at.files_matching(/test_.*rb$/)
14
- # end
15
- #
16
- # %w(TestA TestB).each do |klass|
17
- # at.extra_class_map[klass] = "test/test_misc.rb"
18
- # end
19
- # end
20
-
21
- # Autotest.add_hook :run_command do |at|
22
- # system "rake build"
23
- # end
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --color
2
- --format progress
1
+ --color
2
+ --format progress
data/Gemfile CHANGED
@@ -1,17 +1,36 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # -*- ruby -*-
2
4
 
3
5
  # DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake bundler:gemfile`.
4
6
 
5
- source "https://rubygems.org/"
6
-
7
- gem "methadone", ">=0.0.0"
8
- gem "liquid", ">0.0.0"
9
- gem "virtus", ">0.0.0"
7
+ source 'https://rubygems.org/'
10
8
 
11
- gem "minitest", "~>4.6", :group => [:development, :test]
12
- gem "rdoc", "~>3.10", :group => [:development, :test]
13
- gem "rspec", ">0.0.0", :group => [:development, :test]
14
- gem "pry-nav", ">0.0.0", :group => [:development, :test]
15
- gem "hoe", "~>3.5", :group => [:development, :test]
9
+ gem 'dry-monads', '>0.0.0'
10
+ gem 'gli', '>0.0.0'
11
+ gem 'liquid', '>0.0.0'
12
+ gem 'methadone', '>=0.0.0'
16
13
 
14
+ group :development, :test do
15
+ gem 'aruba'
16
+ gem 'guard'
17
+ gem 'guard-minitest'
18
+ gem 'guard-yard'
19
+ gem 'hoe'
20
+ gem 'hoe-bundler'
21
+ gem 'hoe-yard'
22
+ gem 'minitest'
23
+ gem 'minitest-focus'
24
+ gem 'minitest-hooks'
25
+ gem 'notiffany'
26
+ gem 'pry'
27
+ gem 'pry-byebug'
28
+ gem 'rb-notifu'
29
+ gem 'rb-readline'
30
+ gem 'solargraph'
31
+ gem 'standard'
32
+ gem 'wdm'
33
+ gem 'win32console'
34
+ gem 'yard'
35
+ end
17
36
  # vim: syntax=ruby
data/History.txt CHANGED
@@ -1,6 +1,6 @@
1
- === 1.0.0 / 2012-01-03
2
-
3
- * 1 major enhancement
4
-
5
- * Birthday!
6
-
1
+ === 1.0.0 / 2012-01-03
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/LICENSE.adoc ADDED
@@ -0,0 +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
+ ....
data/Manifest.txt CHANGED
@@ -1,60 +1,91 @@
1
- .autotest
2
- .rspec
3
- Gemfile
4
- History.txt
5
- Manifest.txt
6
- README.txt
7
- Rakefile
8
- bin/dgn2pdf
9
- lib/microstation.rb
10
- lib/microstation/app.rb
11
- lib/microstation/attributes.rb
12
- lib/microstation/cad_input_queue.rb
13
- lib/microstation/configuration.rb
14
- lib/microstation/dir.rb
15
- lib/microstation/drawing.rb
16
- lib/microstation/enumerator.rb
17
- lib/microstation/ext/pathname.rb
18
- lib/microstation/extensions/hash.rb
19
- lib/microstation/pdf_support.rb
20
- lib/microstation/properties.rb
21
- lib/microstation/scan/color.rb
22
- lib/microstation/scan/criteria.rb
23
- lib/microstation/scan/klass.rb
24
- lib/microstation/scan/level.rb
25
- lib/microstation/scan/line_style.rb
26
- lib/microstation/scan/line_weight.rb
27
- lib/microstation/scan/subtype.rb
28
- lib/microstation/scan/type.rb
29
- lib/microstation/scanner.rb
30
- lib/microstation/tag.rb
31
- lib/microstation/tag_set.rb
32
- lib/microstation/template.rb
33
- lib/microstation/text.rb
34
- lib/microstation/text_node.rb
35
- lib/microstation/ts/attribute.rb
36
- lib/microstation/ts/instance.rb
37
- lib/microstation/types.rb
38
- lib/microstation/wrap.rb
39
- plot/pdf-bw.plt
40
- plot/pdf.plt
41
- plot/png.plt
42
- plot/tiff.plt
43
- plot/wmbw.tbl
44
- plot/wmcolor.tbl
45
- spec/app_spec.rb
46
- spec/configuration_spec.rb
47
- spec/drawing_spec.rb
48
- spec/drawings/new_drawing.dgn
49
- spec/drawings/test.dgn
50
- spec/drawings/test1.dgn
51
- spec/drawings/testfile.pdf
52
- spec/enumerator_spec.rb
53
- spec/microstation_spec.rb
54
- spec/scanner_spec.rb
55
- spec/spec_app.rb
56
- spec/spec_helper.rb
57
- spec/tag_set_spec.rb
58
- spec/text_node_spec.rb
59
- spec/text_spec.rb
60
-
1
+ .autotest
2
+ .rspec
3
+ Gemfile
4
+ History.txt
5
+ LICENSE.adoc
6
+ Manifest.txt
7
+ README.adoc
8
+ Rakefile
9
+ bin/dgn2pdf
10
+ bin/dgn_template
11
+ bin/pw_print
12
+ cad_files/drawing_faatitle_in_non_default_model.dgn
13
+ cad_files/drawing_no_block.dgn
14
+ cad_files/drawing_with_3_block.dgn
15
+ cad_files/drawing_with_block.dgn
16
+ cad_files/drawing_with_text.dgn
17
+ cad_files/seed2d.dgn
18
+ cad_files/seed3d.dgn
19
+ lib/microstation.rb
20
+ lib/microstation/app.rb
21
+ lib/microstation/cad_input_queue.rb
22
+ lib/microstation/cell.rb
23
+ lib/microstation/changer.rb
24
+ lib/microstation/configuration.rb
25
+ lib/microstation/criteria_creation_t.rb
26
+ lib/microstation/dir.rb
27
+ lib/microstation/directory.rb
28
+ lib/microstation/drawing.rb
29
+ lib/microstation/element.rb
30
+ lib/microstation/enumerator.rb
31
+ lib/microstation/errors.rb
32
+ lib/microstation/event_handler.rb
33
+ lib/microstation/ext/pathname.rb
34
+ lib/microstation/ext/win32ole.rb
35
+ lib/microstation/extensions/faa.rb
36
+ lib/microstation/file_tests.rb
37
+ lib/microstation/functions.rb
38
+ lib/microstation/graphics.rb
39
+ lib/microstation/line.rb
40
+ lib/microstation/model.rb
41
+ lib/microstation/model_trait.rb
42
+ lib/microstation/ole_cad_input_message.rb
43
+ lib/microstation/ole_helper.rb
44
+ lib/microstation/pdf_support.rb
45
+ lib/microstation/point3d.rb
46
+ lib/microstation/primitive_command_interface.rb
47
+ lib/microstation/properties.rb
48
+ lib/microstation/property_handler.rb
49
+ lib/microstation/scan/color.rb
50
+ lib/microstation/scan/criteria.rb
51
+ lib/microstation/scan/klass.rb
52
+ lib/microstation/scan/level.rb
53
+ lib/microstation/scan/line_style.rb
54
+ lib/microstation/scan/line_weight.rb
55
+ lib/microstation/scan/range.rb
56
+ lib/microstation/scan/scan_trait.rb
57
+ lib/microstation/scan/subtype.rb
58
+ lib/microstation/scan/type.rb
59
+ lib/microstation/scan_trait.rb
60
+ lib/microstation/scanner.rb
61
+ lib/microstation/tag.rb
62
+ lib/microstation/tag_set.rb
63
+ lib/microstation/tag_set_trait.rb
64
+ lib/microstation/tagged_element.rb
65
+ lib/microstation/template.rb
66
+ lib/microstation/template_info.rb
67
+ lib/microstation/template_runner.rb
68
+ lib/microstation/text.rb
69
+ lib/microstation/text_node.rb
70
+ lib/microstation/ts/attribute.rb
71
+ lib/microstation/ts/instance.rb
72
+ lib/microstation/ts/tagset_trait.rb
73
+ lib/microstation/types.rb
74
+ lib/microstation/version.rb
75
+ lib/microstation/wrap.rb
76
+ plot/pdf-bw.plt
77
+ plot/pdf.plt
78
+ plot/png.plt
79
+ plot/tiff.plt
80
+ plot/wmbw.tbl
81
+ plot/wmcolor.tbl
82
+ spec/microstation/app_spec.rb
83
+ spec/microstation/configuration_spec.rb
84
+ spec/microstation/drawing_spec.rb
85
+ spec/microstation/functions_spec.rb
86
+ spec/microstation/tag_set_spec.rb
87
+ spec/microstation/template_spec.rb
88
+ spec/microstation/text_node_spec.rb
89
+ spec/microstation/text_spec.rb
90
+ spec/microstation_spec.rb
91
+ spec/spec_helper.rb
data/README.adoc ADDED
@@ -0,0 +1,131 @@
1
+ = microstation
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}/microstation
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
+
21
+
22
+ == DESCRIPTION:
23
+
24
+ this is a gem that wraps Bentley Microstation using the WIN32OLE
25
+ library.
26
+
27
+ == Requirements
28
+
29
+ * Microstation Installed
30
+ * MRI
31
+
32
+ == Installation
33
+
34
+ Microstation can be installed using (a) the `gem install` command, (b) Bundler
35
+
36
+ === (a) gem install
37
+
38
+ Open a terminal and type
39
+ $ gem install microstation
40
+
41
+ .Upgrading your installation
42
+ [TIP]
43
+ ====
44
+ If you have an earlier version of microstation installed you can update it using:
45
+
46
+ $ gem update microstation
47
+
48
+ If you install a new version of the gem using `gem install` instead of
49
+ gem update, you'll have multiple versions installed. If that's the
50
+ case, use the following gem command to remove the old versions:
51
+
52
+ $ gem cleanup microstation
53
+ ====
54
+ === (b) Bundler
55
+
56
+ . Create a Gemfile in the root folder of your project (or the current directory)
57
+ . Add the `asciidoctor` gem to your Gemfile as follows:
58
+ +
59
+ [source]
60
+ ----
61
+ source 'https://rubygems.org'
62
+ gem 'microstation'
63
+ # or specify the version explicitly
64
+ # gem 'microstation', '0.0.5'
65
+ ----
66
+
67
+ . Save the Gemfile
68
+ . Open a terminal and install the gem using:
69
+
70
+ $ bundle
71
+
72
+ To upgrade the gem, specify the new version in the Gemfile and run `bundle` again.
73
+ Using `bundle update` is *not* recommended as it will also update other gems, which may not be the desired result.
74
+
75
+ == Usage
76
+
77
+ [source]
78
+ ====
79
+
80
+
81
+ text_in_drawing = []
82
+ Microstation.run do |app|
83
+ sc = app.create_scanner do
84
+ include_color(3)
85
+ include_level(3)
86
+ end
87
+ app.open_drawing('./test.dgn') do |drawing|
88
+ drawing.scan_text do |text|
89
+ text.reverse! if text =~ /Reverse/ # things that modify thetext_in_drawing
90
+ puts text.to_s
91
+ end
92
+ drawing.scan_model( sc) do |ele|
93
+
94
+ end
95
+
96
+
97
+ drawing.save_as_pdf
98
+ end
99
+ end
100
+
101
+ ====
102
+
103
+ == Getting Help
104
+
105
+ The Asciidoctor project is developed to help you easily write and publish your content.
106
+ But we can't do that without your feedback!
107
+ We encourage you to ask questions and discuss any aspects of the project on the discussion list, Twitter or IRC.
108
+
109
+ Mailing list:: {uri-discuss}
110
+ #Twitter (Chat):: #asciidoctor hashtag
111
+ #Gitter (Chat):: image:https://badges.gitter.im/Join%20In.svg[Gitter, link=https://gitter.im/asciidoctor/asciidoctor]
112
+ #IRC (Chat):: {uri-irc}[#asciidoctor] on FreeNode IRC
113
+
114
+ ifdef::env-github[]
115
+ Further information and documentation about Asciidoctor can be found on the project's website.
116
+
117
+ {uri-project}/[Home] | {uri-news}[News] | {uri-docs}[Docs]
118
+ endif::[]
119
+
120
+ The project's source code, issue tracker, and sub-projects are on github
121
+
122
+ Source repository (git):: {uri-repo}
123
+ Issue tracker:: {uri-issues}
124
+ Microstation organization on GitHub:: {uri-org}
125
+
126
+ == Copyright and Licensing
127
+
128
+ Copyright (C) 2012-2016 Dominic Sisneros and the Microstation-Ruby Project.
129
+ Free use of this software is granted under the terms of the MIT License.
130
+
131
+ See the {uri-license}[LICENSE] file for details.
data/Rakefile CHANGED
@@ -1,30 +1,72 @@
1
- # -*- ruby -*-
2
-
3
- require 'rubygems'
4
- require 'rake/clean'
5
- require 'hoe'
6
- #require 'hoe/git'
7
-
8
- require 'rake/testtask'
9
-
10
- CLEAN.include("**/#*.*#")
11
- Hoe.plugin :bundler
12
- Hoe.plugin :minitest
13
- Hoe.plugin :git
14
- # Hoe.plugin :rubyforge
15
-
16
- Hoe.spec 'microstation' do
17
- developer('Dominic Sisneros', 'dsisnero@gmail.com')
18
- clean_globs << '**/#*.*#'
19
- dependency('rspec', '> 0.0.0', :dev)
20
- dependency('methadone','>= 0.0.0')
21
- dependency('liquid', '> 0.0.0')
22
- dependency('virtus', '> 0.0.0')
23
- dependency('pry-nav', '>0.0.0',:dev)
24
-
25
- # self.rubyforge_name = 'microstation' # if different than 'microstation'
26
- end
27
-
28
-
29
-
30
- # vim: syntax=ruby
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'rake/clean'
5
+ #require 'rake/testtask'
6
+ require 'hoe'
7
+ #require 'hoe/minitest'
8
+ require 'minitest/test_task'
9
+ require 'minitest'
10
+ #require 'hoe/git'
11
+
12
+ class Hoe
13
+ def intuit_values(input)
14
+
15
+ end
16
+ end
17
+
18
+ #require 'rake/testtask'
19
+
20
+ CLEAN.include("**/#*.*#")
21
+ Hoe.plugin :bundler
22
+ #Hoe.plugin :minitest
23
+ Hoe.plugin :git
24
+ Hoe.plugin :yard
25
+ # Hoe.plugin :rubyforge
26
+ Hoe.spec 'microstation' do
27
+ self.summary = 'A ruby gem to control and automate Bentley Microstation using win32ole'
28
+ self.description = 'Wrapping of microstation using win32ole to automate and control from ruby'
29
+ developer('Dominic Sisneros', 'dsisnero@gmail.com')
30
+ clean_globs << '**/#*.*#'
31
+ # self.yard_markup = 'asciidoc'
32
+ self.urls = {home: 'https://github.com/dsisnero/microstation'}
33
+ dependency('methadone','>= 0.0.0')
34
+ dependency('liquid', '> 0.0.0')
35
+ dependency('gli', '> 0.0.0')
36
+ dependency('dry-monads', '> 0.0.0')
37
+ # dependency('pry-nav', '>0.0.0',:dev)
38
+
39
+ dependency('minitest', '>0.0.0', :dev)
40
+ dependency('minitest-hooks','>0.0', :dev)
41
+ dependency('aruba', '>0.0.0', :dev)
42
+ dependency('yard','>= 0.0',:dev)
43
+ dependency('hoe-yard','~> 0.1',:dev)
44
+ dependency('guard-yard', '>= 0.0', :dev)
45
+ dependency('hoe','~> 3.1', :dev)
46
+ dependency('hoe-bundler', '> 0.0.0', :dev)
47
+ dependency('guard', '> 0.0.0', :dev)
48
+ dependency('guard-minitest', '> 0.0.0', :dev)
49
+ dependency('minitest-focus', '> 0.0.0', :dev)
50
+ dependency('notiffany', '> 0.0.0', :dev)
51
+ dependency('pry', '> 0.0.0', :dev)
52
+ dependency('aruba', '> 0.0.0', :dev)
53
+ dependency('pry-byebug', '> 0.0.0', :dev)
54
+ dependency('rb-readline', '>0.0.0', :dev)
55
+ dependency('win32console', '>0.0.0', :dev)
56
+ dependency('rb-notifu', '> 0.0.0', :dev)
57
+ dependency('wdm', '> 0.0.0', :dev)
58
+ dependency('solargraph' , '> 0.0.0', :dev)
59
+ # dependency('windows-pr', '>0.0.0')
60
+ license('MIT')
61
+ # require 'pry';binding.pry
62
+
63
+ # self.rubyforge_name = 'microstation' # if different than 'microstation'
64
+ end
65
+
66
+
67
+
68
+ # vim: syntax=ruby
69
+ Minitest::TestTask.create('test2') do |t|
70
+ t.libs.push('specs')
71
+ t.test_globs = 'spec/**/*_spec.rb'
72
+ end
data/bin/dgn2pdf CHANGED
@@ -1,37 +1,36 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'optparse'
4
- require 'methadone'
5
- require 'microstation'
6
-
7
- class App
8
- include Methadone::Main
9
- include Methadone::CLILogging
10
-
11
- main do |directory, output_dir|
12
-
13
- directory_path = Pathname.new(directory).expand_path
14
- exit_now! "arg directory: #{directory_path} doesn't exist" unless directory_path.directory?
15
-
16
- Microstation.dgn2pdf(directory_path, output_dir)
17
- # your program code here
18
- # You can access CLI options via
19
- # the options Hash
20
- end
21
-
22
- # supplemental methods here
23
-
24
- # Declare command-line interface here
25
-
26
- description "Convert a directory of Microstation files (*.dgn) to pdf"
27
-
28
- on("-o","--output_dir","Output Dir")
29
-
30
-
31
- arg :directory
32
- arg :output_dir, :optional
33
-
34
- use_log_level_option
35
-
36
- go!
37
- end
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift('../lib')
3
+ require 'optparse'
4
+ require 'methadone'
5
+ require 'microstation'
6
+
7
+ class App
8
+ include Methadone::Main
9
+ include Methadone::CLILogging
10
+
11
+ main do |directory, output_dir|
12
+
13
+ directory_path = Pathname.new(directory).expand_path
14
+ exit_now! "arg directory: #{directory_path} doesn't exist" unless directory_path.directory?
15
+ Microstation.dgn2pdf(directory_path, output_dir)
16
+ # your program code here
17
+ # You can access CLI options via
18
+ # the options Hash
19
+ end
20
+
21
+ # supplemental methods here
22
+
23
+ # Declare command-line interface here
24
+
25
+ description "Convert a directory of Microstation files (*.dgn) to pdf"
26
+
27
+ on("-o","--output_dir","Output Dir")
28
+
29
+
30
+ arg :directory
31
+ arg :output_dir, :optional
32
+
33
+ use_log_level_option
34
+
35
+ go!
36
+ end