CapicuaGenGaspar 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +49 -0
  6. data/CapicuaGenGaspar.gemspec +60 -0
  7. data/Gemfile +4 -0
  8. data/Gemfile.lock +33 -0
  9. data/LICENSE +165 -0
  10. data/README.md +41 -0
  11. data/Rakefile +6 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/lib/CapicuaGenGaspar/Business/CSSqlEntitityInterface/Source/cs_sql_entity_interface_feature.rb +96 -0
  15. data/lib/CapicuaGenGaspar/Business/CSSqlEntitityInterface/Template/table_interface.erb +49 -0
  16. data/lib/CapicuaGenGaspar/Business/CSSqlEntity/Source/cs_sql_entity_feature.rb +103 -0
  17. data/lib/CapicuaGenGaspar/Business/CSSqlEntity/Template/table_entity.erb +51 -0
  18. data/lib/CapicuaGenGaspar/CodeTransformer/CSHeaderFooter/Source/cs_header_footer_feature.rb +148 -0
  19. data/lib/CapicuaGenGaspar/CodeTransformer/CSHeaderFooter/Template/footer.erb +37 -0
  20. data/lib/CapicuaGenGaspar/CodeTransformer/CSHeaderFooter/Template/header.erb +43 -0
  21. data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/EnvDTE.dll +0 -0
  22. data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/EnvDTE80.dll +0 -0
  23. data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/RunCodeMaidCleaner.exe +0 -0
  24. data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/RunCodeMaidCleaner.exe.config +52 -0
  25. data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/stdole.dll +0 -0
  26. data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Source/code_maid_cleaner_feature.rb +162 -0
  27. data/lib/CapicuaGenGaspar/DataAccess/CSConnectionProvider/Source/cs_db_connection_provider_feature.rb +90 -0
  28. data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Source/cs_sql_data_access_feature.rb +106 -0
  29. data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Template/data_access.erb +154 -0
  30. data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Template/data_access_exception.erb +36 -0
  31. data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Template/data_access_table.erb +298 -0
  32. data/lib/CapicuaGenGaspar/Entities/CSEntity/Source/entity_field_schema.rb +100 -0
  33. data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Source/cs_about_windows_form_feature.rb +85 -0
  34. data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Template/AboutForm.designer.erb +211 -0
  35. data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Template/AboutForm.erb +127 -0
  36. data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Template/AboutForm.resx.erb +535 -0
  37. data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Source/cs_catalog_windows_form_feature.rb +146 -0
  38. data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogForm.Designer.erb +363 -0
  39. data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogForm.erb +320 -0
  40. data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogForm.resx.erb +2407 -0
  41. data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogState.erb +51 -0
  42. data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Source/cs_mdi_windows_form_feature.rb +93 -0
  43. data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MainForm.Designer.erb +316 -0
  44. data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MainForm.erb +161 -0
  45. data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MainForm.resx.erb +2504 -0
  46. data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MsgboxConsts.erb +31 -0
  47. data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb +87 -0
  48. data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Template/SplashForm.designer.erb +141 -0
  49. data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Template/SplashForm.erb +160 -0
  50. data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Template/SplashForm.resx.erb +535 -0
  51. data/lib/CapicuaGenGaspar/Mixins/about_mixin.rb +55 -0
  52. data/lib/CapicuaGenGaspar/Mixins/catalog_mixin.rb +65 -0
  53. data/lib/CapicuaGenGaspar/Mixins/cs_app_config_mixin.rb +41 -0
  54. data/lib/CapicuaGenGaspar/Mixins/cs_db_connection_provider_mixin.rb +67 -0
  55. data/lib/CapicuaGenGaspar/Mixins/cs_namespace_mixin.rb +53 -0
  56. data/lib/CapicuaGenGaspar/Mixins/entity_interface_mixin.rb +57 -0
  57. data/lib/CapicuaGenGaspar/Mixins/entity_mixin.rb +58 -0
  58. data/lib/CapicuaGenGaspar/Mixins/entity_sql_table_mixin.rb +58 -0
  59. data/lib/CapicuaGenGaspar/Mixins/main_form_mixin.rb +55 -0
  60. data/lib/CapicuaGenGaspar/Mixins/splash_mixin.rb +54 -0
  61. data/lib/CapicuaGenGaspar/Proyect/CSProyect/Source/cs_proyect_feature.rb +140 -0
  62. data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Source/cs_proyect_rest_ful_feature.rb +82 -0
  63. data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/AssemblyInfo.erb +59 -0
  64. data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/ExcepcionControlada.erb +38 -0
  65. data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/Proyect.erb +114 -0
  66. data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/Soluction.erb +54 -0
  67. data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/Web.erb +66 -0
  68. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Source/cs_proyect_windows_form_feature.rb +85 -0
  69. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/App.erb +32 -0
  70. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/AssemblyInfo.erb +59 -0
  71. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/ControlExcepciones.erb +49 -0
  72. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/ExcepcionControlada.erb +40 -0
  73. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/Program.erb +46 -0
  74. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/Proyect.erb +138 -0
  75. data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/Soluction.erb +55 -0
  76. data/lib/CapicuaGenGaspar/Tools/message_helper.rb +43 -0
  77. data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Source/cs_rest_ful_catalog_feature.rb +176 -0
  78. data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/CatalogState.erb +51 -0
  79. data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/Catalogs.erb +58 -0
  80. data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/Catalogs.svc.erb +24 -0
  81. data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/ICatalogs.erb +58 -0
  82. data/lib/CapicuaGenGaspar/gaspar.rb +44 -0
  83. data/lib/CapicuaGenGaspar/version.rb +3 -0
  84. metadata +216 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 30adbd32aa87faacf45b134cf9a2d6b004a272d6
4
+ data.tar.gz: 8785d3e60571d2e7557bdbcfd861afeec98f758c
5
+ SHA512:
6
+ metadata.gz: 19b2f45b9ab25fe22207383b8ce6153ab4b72b317d79942f03605a735a6b6c0bff0f559d136937f021beaf3a6961432fcf36d7e004c232d4c31c2b912c151262
7
+ data.tar.gz: 75eeeb4a6b385c9ec59c3486661af998c8f7f1d8b6366f210bf270102f410be2e1158fb48b4cbe1c36ac21361083777ace3bc4e31ae5dc8bf9f234b2eecba46c
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.idea
11
+ /*.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.3
4
+ before_install: gem install bundler -v 1.11.2
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at jbautista@bansi.com.mx. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
@@ -0,0 +1,60 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'CapicuaGenGaspar/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "CapicuaGenGaspar"
8
+ spec.version = CapicuaGenGaspar::VERSION
9
+ spec.authors = ["José Luis Bautista Martín"]
10
+ spec.email = ["joseluisbautista@gmail.com"]
11
+ spec.date = Date.today.to_s
12
+
13
+
14
+ spec.summary = %q{CapicuaGen es un software que ayuda a la creación automática de
15
+ sistemas empresariales a través de la definición y ensamblado de
16
+ diversos generadores de características.Gaspar es un conjunto de generadores de caracteristicas de ejemplo pertenecientes a CapicuaGen
17
+ que generan un proyecto de Windows.
18
+ }
19
+ spec.description = %q{CapicuaGen es un software que ayuda a la creación automática de
20
+ sistemas empresariales a través de la definición y ensamblado de
21
+ diversos generadores de características.
22
+
23
+ Gaspar es un conjunto de generadores de caracteristicas de ejemplo pertenecientes a CapicuaGen
24
+ que generan un proyecto de Windows
25
+
26
+ El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
27
+ del 2016.
28
+
29
+ Puede modificar y distribuir este software, según le plazca, y usarlo
30
+ para cualquier fin ya sea comercial, personal, educativo, o de cualquier
31
+ índole, siempre y cuando incluya este mensaje, y se permita acceso el
32
+ código fuente.
33
+
34
+ Este software es código libre, y se licencia bajo LGPL.
35
+
36
+ Para más información consultar http://www.gnu.org/licenses/lgpl.html
37
+ }
38
+
39
+ spec.homepage = "http://desdelashorasextras.blogspot.mx/"
40
+ spec.licenses = ['LGPL']
41
+
42
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
43
+ # delete this section to allow pushing this gem to any host.
44
+ if spec.respond_to?(:metadata)
45
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
46
+ else
47
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
48
+ end
49
+
50
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|\.idea)/}) }
51
+ spec.bindir = "exe"
52
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
53
+ spec.require_paths = ["lib"]
54
+
55
+ spec.add_development_dependency "bundler", "~> 1.11"
56
+ spec.add_development_dependency "rake", "~> 10.0"
57
+
58
+ spec.add_runtime_dependency 'CapicuaGen', '~> 0.0','>=0.0.1'
59
+ spec.add_runtime_dependency 'CapicuaGenMelchior', '~> 0.0','>=0.0.1'
60
+ end
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in CapicuaGenGaspar.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,33 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ CapicuaGenGaspar (0.0.1)
5
+ CapicuaGen (~> 0.0, >= 0.0.1)
6
+ CapicuaGenMelchior (~> 0.0, >= 0.0.1)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ CapicuaGen (0.0.1)
12
+ activesupport (~> 2.3, >= 2.3.18)
13
+ nokogiri (~> 1.6, >= 1.6.7)
14
+ uuidtools (~> 2.1, >= 2.1.5)
15
+ CapicuaGenMelchior (0.0.1)
16
+ CapicuaGen (~> 0.0, >= 0.0.1)
17
+ activesupport (2.3.18)
18
+ mini_portile2 (2.0.0)
19
+ nokogiri (1.6.7.2-x86-mingw32)
20
+ mini_portile2 (~> 2.0.0.rc2)
21
+ rake (10.4.2)
22
+ uuidtools (2.1.5)
23
+
24
+ PLATFORMS
25
+ x86-mingw32
26
+
27
+ DEPENDENCIES
28
+ CapicuaGenGaspar!
29
+ bundler (~> 1.11)
30
+ rake (~> 10.0)
31
+
32
+ BUNDLED WITH
33
+ 1.11.2
data/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # CapicuaGenGaspar
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/CapicuaGenGaspar`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'CapicuaGenGaspar'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install CapicuaGenGaspar
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/CapicuaGenGaspar. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "CapicuaGenGaspar/gaspar"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,96 @@
1
+ =begin
2
+
3
+ CapicuaGen
4
+
5
+ CapicuaGen es un software que ayuda a la creación automática de
6
+ sistemas empresariales a través de la definición y ensamblado de
7
+ diversos generadores de características.
8
+
9
+ El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
10
+ del 2016.
11
+
12
+ Puede modificar y distribuir este software, según le plazca, y usarlo
13
+ para cualquier fin ya sea comercial, personal, educativo, o de cualquier
14
+ índole, siempre y cuando incluya este mensaje, y se permita acceso el
15
+ código fuente.
16
+
17
+ Este software es código libre, y se licencia bajo LGPL.
18
+
19
+ Para más información consultar http://www.gnu.org/licenses/lgpl.html
20
+ =end
21
+
22
+ require_relative '../../../gaspar'
23
+ require 'active_support/core_ext/object/blank'
24
+ require_relative '../../../Mixins/entity_sql_table_mixin'
25
+ require_relative '../../../Mixins/cs_namespace_mixin'
26
+
27
+ module CapicuaGen::Gaspar
28
+
29
+ # Caracteristica generadora para crear interfaces a los entidades de negocio
30
+ class CSSqlEntityInterfaceFeature < CapicuaGen::TemplateFeature
31
+ include CapicuaGen
32
+ include CapicuaGen::Gaspar
33
+ include CapicuaGen::Melchior
34
+
35
+
36
+ public
37
+
38
+ # Inicializa la caracteristica
39
+ def initialize(values= {})
40
+ super(values)
41
+
42
+ # Configuro los tipos si estos no han sido configurados previamente
43
+ self.types= [:business_interfaces] if self.types.blank?
44
+
45
+
46
+ # Configuro los templates
47
+ set_template("table_interface", Template.new(:file => 'table_interface.erb'))
48
+
49
+
50
+ end
51
+
52
+ # Configura los objetivos de las platillas (despues de establecer el generador)
53
+ def configure_template_targets
54
+
55
+ # Busco las caracteristicas que contiene entidades de SQL para una table
56
+ get_tables do |e|
57
+ set_template_target("table_interface/#{get_entity_interface_name(e.name)}",
58
+ TemplateTarget.new(
59
+ :out_file => "#{get_entity_interface_name(e.name)}.cs",
60
+ :types => :proyect_file,
61
+ :class_name => "#{get_entity_interface_name(e.name)}",
62
+ :entity_schema => e,
63
+ )
64
+ )
65
+
66
+ end
67
+
68
+ end
69
+
70
+ # Resetea los atributos personalizados de la caracteristica (antes de establecer el generador)
71
+ def reset_attributes
72
+ self.generation_attributes[:out_dir] = nil
73
+ self.generation_attributes[:namespace]= nil
74
+ end
75
+
76
+ # Configura los atributos personalizados de la caracteristica (antes de establecer el generador)
77
+ def configure_attributes()
78
+ self.generation_attributes[:out_dir] = "#{self.generation_attributes[:out_dir]}/#{self.generation_attributes[:namespace]}/Interface" unless self.generation_attributes.has_in_self?(:out_dir)
79
+ self.generation_attributes[:namespace]= "#{self.generation_attributes[:namespace]}.Interface" unless self.generation_attributes.has_in_self?(:namespace)
80
+ end
81
+
82
+
83
+ # Devuelve el nombre de la interfaz de la entidad
84
+ def get_entity_interface_name(entity_name)
85
+ return "I#{entity_name}"
86
+ end
87
+
88
+ # Devuelve el nombre completo de la interfaz de la entidad
89
+ def get_entity_interface_full_name(entity_name)
90
+ return "#{self.generation_attributes[:namespace]}.#{get_entity_interface_name(entity_name)}"
91
+ end
92
+
93
+ end
94
+ end
95
+
96
+
@@ -0,0 +1,49 @@
1
+ <%
2
+ #encoding: UTF-8
3
+
4
+ =begin
5
+
6
+ CapicuaGen
7
+
8
+ CapicuaGen es un software que ayuda a la creación automática de
9
+ sistemas empresariales a través de la definición y ensamblado de
10
+ diversos generadores de características.
11
+
12
+ El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
13
+ del 2016.
14
+
15
+ Puede modificar y distribuir este software, según le plazca, y usarlo
16
+ para cualquier fin ya sea comercial, personal, educativo, o de cualquier
17
+ índole, siempre y cuando incluya este mensaje, y se permita acceso el
18
+ código fuente.
19
+
20
+ Este software es código libre, y se licencia bajo LGPL.
21
+
22
+ Para más información consultar http://www.gnu.org/licenses/lgpl.html
23
+ =end
24
+ %>using System;
25
+ using System.Configuration;
26
+ using System.Data;
27
+ using System.Data.Common;
28
+ using System.Text;
29
+ using System.Collections.Generic;
30
+
31
+ namespace <%=generation_attributes[:namespace]%>
32
+ {
33
+ /// <summary>
34
+ /// Interfaz de <%=template_target.class_name%>
35
+ /// </summary>
36
+ partial interface <%=template_target.class_name%>
37
+ {
38
+ <%template_target.entity_schema.fields.each { |field| %>
39
+ /// <summary>
40
+ /// Nombre: <%=field.name%>
41
+ /// Tipo: <%=field.type%>
42
+ /// Permite Nulos: <%=field.allow_null%>
43
+ /// Valor por Defecto: <%=field.default_value%>
44
+ /// Llave Primaria: <%=field.primary_key%>
45
+ /// </summary>
46
+ <%=field.net_type%> <%=field.name%> { get; set; }
47
+ <%}%>
48
+ }
49
+ }
@@ -0,0 +1,103 @@
1
+ =begin
2
+
3
+ CapicuaGen
4
+
5
+ CapicuaGen es un software que ayuda a la creación automática de
6
+ sistemas empresariales a través de la definición y ensamblado de
7
+ diversos generadores de características.
8
+
9
+ El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
10
+ del 2016.
11
+
12
+ Puede modificar y distribuir este software, según le plazca, y usarlo
13
+ para cualquier fin ya sea comercial, personal, educativo, o de cualquier
14
+ índole, siempre y cuando incluya este mensaje, y se permita acceso el
15
+ código fuente.
16
+
17
+ Este software es código libre, y se licencia bajo LGPL.
18
+
19
+ Para más información consultar http://www.gnu.org/licenses/lgpl.html
20
+ =end
21
+
22
+ require 'active_support/core_ext/object/blank'
23
+
24
+ require_relative '../../../gaspar'
25
+ require 'CapicuaGenMelchior/Mixins/entity_sql_table_mixin'
26
+
27
+ module CapicuaGen::Gaspar
28
+
29
+ # Caracteristica generadora para crear entidades de negocio
30
+ # a traves de entidades extraidas un archivo .sql
31
+ class CSSqlEntityFeature < CapicuaGen::TemplateFeature
32
+ include CapicuaGen
33
+ include CapicuaGen::Gaspar
34
+ include CapicuaGen::Melchior
35
+
36
+
37
+ attr_accessor :class_accessor
38
+
39
+ public
40
+
41
+ # Inicializa la caracteristica
42
+ def initialize(values= {})
43
+ super(values)
44
+
45
+ # Configuro los tipos si estos no han sido configurados previamente
46
+
47
+ @class_accessor= "" unless @class_accessor
48
+
49
+ self.types = [:business_entities] if self.types.blank?
50
+
51
+ # Configuro los templates
52
+ set_template("table_entity", Template.new(:file => 'table_entity.erb'))
53
+
54
+
55
+ end
56
+
57
+ # Configura los objetivos de las platillas (despues de establecer el generador)
58
+ def configure_template_targets
59
+
60
+ # Busco las caracteristicas que contiene entidades de SQL para una table
61
+ get_tables do |e|
62
+ set_template_target("table_entity/#{get_entity_name(e.name)}",
63
+ TemplateTarget.new(
64
+ :out_file => "#{get_entity_name(e.name)}.cs",
65
+ :types => :proyect_file,
66
+ :class_name => get_entity_name(e.name),
67
+ :entity_schema => e,
68
+ :class_accessor => @class_accessor,
69
+ )
70
+ )
71
+
72
+ end
73
+
74
+ end
75
+
76
+ # Resetea los atributos personalizados de la caracteristica (antes de establecer el generador)
77
+ def reset_attributes
78
+ self.generation_attributes[:out_dir] = nil
79
+ self.generation_attributes[:namespace]= nil
80
+ end
81
+
82
+ # Configura los atributos personalizados de la caracteristica (antes de establecer el generador)
83
+ def configure_attributes()
84
+ self.generation_attributes[:out_dir] = "#{self.generation_attributes[:out_dir]}/#{self.generation_attributes[:namespace]}/Entities" unless self.generation_attributes.has_in_self?(:out_dir)
85
+ self.generation_attributes[:namespace]= "#{self.generation_attributes[:namespace]}.Entities" unless self.generation_attributes.has_in_self?(:namespace)
86
+ end
87
+
88
+
89
+ # Devuelve el nombre de una clase relacionada a un entidad
90
+ def get_entity_name(entity_name)
91
+ return entity_name
92
+ end
93
+
94
+
95
+ # Devuelve el nombre completo de una clase relacionada a un entidad
96
+ def get_entity_full_name(entity_name)
97
+ return "#{self.generation_attributes[:namespace]}.#{get_entity_name(entity_name)}"
98
+ end
99
+
100
+ end
101
+ end
102
+
103
+