lounge_lizard 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (348) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.gitmodules +3 -0
  4. data/.rspec +2 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +4 -0
  7. data/Guardfile +33 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +50 -0
  10. data/Rakefile +43 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/circle.yml +14 -0
  14. data/ext/drafter/CHANGELOG.md +278 -0
  15. data/ext/drafter/Dockerfile +17 -0
  16. data/ext/drafter/Makefile +62 -0
  17. data/ext/drafter/appveyor.yml +17 -0
  18. data/ext/drafter/bin/drafter +0 -0
  19. data/ext/drafter/build/Makefile +387 -0
  20. data/ext/drafter/build/drafter.Makefile +6 -0
  21. data/ext/drafter/build/drafter.target.mk +159 -0
  22. data/ext/drafter/build/ext/snowcrash/libmarkdownparser.target.mk +141 -0
  23. data/ext/drafter/build/ext/snowcrash/libsnowcrash.target.mk +154 -0
  24. data/ext/drafter/build/ext/snowcrash/libsundown.target.mk +149 -0
  25. data/ext/drafter/build/ext/snowcrash/perf-libsnowcrash.target.mk +147 -0
  26. data/ext/drafter/build/ext/snowcrash/snowcrash.Makefile +6 -0
  27. data/ext/drafter/build/gyp-mac-tool +606 -0
  28. data/ext/drafter/build/libdrafter.target.mk +186 -0
  29. data/ext/drafter/build/libsos.target.mk +137 -0
  30. data/ext/drafter/build/out/Release/drafter +0 -0
  31. data/ext/drafter/build/out/Release/libdrafter.dylib +0 -0
  32. data/ext/drafter/build/out/Release/libmarkdownparser.a +0 -0
  33. data/ext/drafter/build/out/Release/libsnowcrash.a +0 -0
  34. data/ext/drafter/build/out/Release/libsos.a +0 -0
  35. data/ext/drafter/build/out/Release/libsundown.a +0 -0
  36. data/ext/drafter/build/out/Release/obj.target/drafter/src/config.o +0 -0
  37. data/ext/drafter/build/out/Release/obj.target/drafter/src/main.o +0 -0
  38. data/ext/drafter/build/out/Release/obj.target/drafter/src/reporting.o +0 -0
  39. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/ConversionContext.o +0 -0
  40. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/NamedTypesRegistry.o +0 -0
  41. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractAPI.o +0 -0
  42. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractDataStructure.o +0 -0
  43. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractElementFactory.o +0 -0
  44. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractSourceMap.o +0 -0
  45. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Render.o +0 -0
  46. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Serialize.o +0 -0
  47. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeAST.o +0 -0
  48. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeResult.o +0 -0
  49. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeSourcemap.o +0 -0
  50. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter.o +0 -0
  51. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter_private.o +0 -0
  52. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ComparableVisitor.o +0 -0
  53. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Element.o +0 -0
  54. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ExpandVisitor.o +0 -0
  55. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/IsExpandableVisitor.o +0 -0
  56. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/JSONSchemaVisitor.o +0 -0
  57. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/PrintVisitor.o +0 -0
  58. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Query.o +0 -0
  59. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Registry.o +0 -0
  60. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/RenderJSONVisitor.o +0 -0
  61. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeCompactVisitor.o +0 -0
  62. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeVisitor.o +0 -0
  63. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/TypeQueryVisitor.o +0 -0
  64. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/VisitorUtils.o +0 -0
  65. data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o +0 -0
  66. data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o +0 -0
  67. data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o +0 -0
  68. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Blueprint.o +0 -0
  69. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/BlueprintSourcemap.o +0 -0
  70. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HTTP.o +0 -0
  71. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HeadersParser.o +0 -0
  72. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSON.o +0 -0
  73. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONOneOfParser.o +0 -0
  74. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONSourcemap.o +0 -0
  75. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONTypeSectionParser.o +0 -0
  76. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONValueMemberParser.o +0 -0
  77. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Section.o +0 -0
  78. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Signature.o +0 -0
  79. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/UriTemplateParser.o +0 -0
  80. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/posix/RegexMatch.o +0 -0
  81. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/snowcrash.o +0 -0
  82. data/ext/drafter/build/out/Release/obj.target/libsos/ext/sos/src/sos.o +0 -0
  83. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
  84. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
  85. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.o +0 -0
  86. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.o +0 -0
  87. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.o +0 -0
  88. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.o +0 -0
  89. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.o +0 -0
  90. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.o +0 -0
  91. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
  92. data/ext/drafter/circle.yml +32 -0
  93. data/ext/drafter/config.gypi +10 -0
  94. data/ext/drafter/config.mk +5 -0
  95. data/ext/drafter/configure +224 -0
  96. data/ext/drafter/drafter.gyp +189 -0
  97. data/ext/drafter/drafter.xcworkspace/contents.xcworkspacedata +13 -0
  98. data/ext/drafter/ext/snowcrash/Makefile +58 -0
  99. data/ext/drafter/ext/snowcrash/appveyor.yml +7 -0
  100. data/ext/drafter/ext/snowcrash/common.gypi +165 -0
  101. data/ext/drafter/ext/snowcrash/configure +197 -0
  102. data/ext/drafter/ext/snowcrash/ext/markdown-parser/Makefile +90 -0
  103. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/CONTRIBUTING.md +10 -0
  104. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile +84 -0
  105. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile.win +33 -0
  106. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/smartypants.c +72 -0
  107. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/sundown.c +80 -0
  108. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini.h +37 -0
  109. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.c +108 -0
  110. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.c +84 -0
  111. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.c +647 -0
  112. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.h +77 -0
  113. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.c +389 -0
  114. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html_block_names.txt +25 -0
  115. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.c +297 -0
  116. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.h +51 -0
  117. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.c +225 -0
  118. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.h +96 -0
  119. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/html_blocks.h +206 -0
  120. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.c +2726 -0
  121. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.h +147 -0
  122. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.c +204 -0
  123. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.h +58 -0
  124. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.c +81 -0
  125. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.h +29 -0
  126. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/sundown.def +20 -0
  127. data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/markdown/markdown.vcproj +188 -0
  128. data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/msvc.sln +38 -0
  129. data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/sundown/sundown.vcproj +206 -0
  130. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.cc +160 -0
  131. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.h +90 -0
  132. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.cc +152 -0
  133. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.h +103 -0
  134. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.cc +388 -0
  135. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.h +106 -0
  136. data/ext/drafter/ext/snowcrash/snowcrash.gyp +196 -0
  137. data/ext/drafter/ext/snowcrash/src/ActionParser.h +560 -0
  138. data/ext/drafter/ext/snowcrash/src/AssetParser.h +123 -0
  139. data/ext/drafter/ext/snowcrash/src/AttributesParser.h +123 -0
  140. data/ext/drafter/ext/snowcrash/src/Blueprint.cc +90 -0
  141. data/ext/drafter/ext/snowcrash/src/Blueprint.h +489 -0
  142. data/ext/drafter/ext/snowcrash/src/BlueprintParser.h +845 -0
  143. data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc +81 -0
  144. data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.h +345 -0
  145. data/ext/drafter/ext/snowcrash/src/BlueprintUtility.h +111 -0
  146. data/ext/drafter/ext/snowcrash/src/CodeBlockUtility.h +276 -0
  147. data/ext/drafter/ext/snowcrash/src/DataStructureGroupParser.h +157 -0
  148. data/ext/drafter/ext/snowcrash/src/HTTP.cc +49 -0
  149. data/ext/drafter/ext/snowcrash/src/HTTP.h +108 -0
  150. data/ext/drafter/ext/snowcrash/src/HeadersParser.cc +117 -0
  151. data/ext/drafter/ext/snowcrash/src/HeadersParser.h +377 -0
  152. data/ext/drafter/ext/snowcrash/src/MSON.cc +272 -0
  153. data/ext/drafter/ext/snowcrash/src/MSON.h +405 -0
  154. data/ext/drafter/ext/snowcrash/src/MSONMixinParser.h +103 -0
  155. data/ext/drafter/ext/snowcrash/src/MSONNamedTypeParser.h +135 -0
  156. data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.cc +132 -0
  157. data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.h +80 -0
  158. data/ext/drafter/ext/snowcrash/src/MSONParameterParser.h +166 -0
  159. data/ext/drafter/ext/snowcrash/src/MSONPropertyMemberParser.h +106 -0
  160. data/ext/drafter/ext/snowcrash/src/MSONSourcemap.cc +141 -0
  161. data/ext/drafter/ext/snowcrash/src/MSONSourcemap.h +181 -0
  162. data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.cc +209 -0
  163. data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.h +213 -0
  164. data/ext/drafter/ext/snowcrash/src/MSONUtility.h +506 -0
  165. data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.cc +214 -0
  166. data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.h +390 -0
  167. data/ext/drafter/ext/snowcrash/src/ModelTable.h +87 -0
  168. data/ext/drafter/ext/snowcrash/src/ParameterParser.h +516 -0
  169. data/ext/drafter/ext/snowcrash/src/ParametersParser.h +222 -0
  170. data/ext/drafter/ext/snowcrash/src/PayloadParser.h +733 -0
  171. data/ext/drafter/ext/snowcrash/src/Platform.h +33 -0
  172. data/ext/drafter/ext/snowcrash/src/RegexMatch.h +32 -0
  173. data/ext/drafter/ext/snowcrash/src/RelationParser.h +87 -0
  174. data/ext/drafter/ext/snowcrash/src/ResourceGroupParser.h +297 -0
  175. data/ext/drafter/ext/snowcrash/src/ResourceParser.h +536 -0
  176. data/ext/drafter/ext/snowcrash/src/Section.cc +48 -0
  177. data/ext/drafter/ext/snowcrash/src/Section.h +60 -0
  178. data/ext/drafter/ext/snowcrash/src/SectionParser.h +246 -0
  179. data/ext/drafter/ext/snowcrash/src/SectionParserData.h +109 -0
  180. data/ext/drafter/ext/snowcrash/src/SectionProcessor.h +299 -0
  181. data/ext/drafter/ext/snowcrash/src/Signature.cc +75 -0
  182. data/ext/drafter/ext/snowcrash/src/Signature.h +103 -0
  183. data/ext/drafter/ext/snowcrash/src/SignatureSectionProcessor.h +442 -0
  184. data/ext/drafter/ext/snowcrash/src/SourceAnnotation.h +166 -0
  185. data/ext/drafter/ext/snowcrash/src/StringUtility.h +323 -0
  186. data/ext/drafter/ext/snowcrash/src/UriTemplateParser.cc +195 -0
  187. data/ext/drafter/ext/snowcrash/src/UriTemplateParser.h +240 -0
  188. data/ext/drafter/ext/snowcrash/src/ValuesParser.h +111 -0
  189. data/ext/drafter/ext/snowcrash/src/posix/RegexMatch.cc +99 -0
  190. data/ext/drafter/ext/snowcrash/src/snowcrash.cc +90 -0
  191. data/ext/drafter/ext/snowcrash/src/snowcrash.h +44 -0
  192. data/ext/drafter/ext/snowcrash/src/win/RegexMatch.cc +78 -0
  193. data/ext/drafter/ext/snowcrash/tools/gyp/AUTHORS +12 -0
  194. data/ext/drafter/ext/snowcrash/tools/gyp/DEPS +23 -0
  195. data/ext/drafter/ext/snowcrash/tools/gyp/OWNERS +1 -0
  196. data/ext/drafter/ext/snowcrash/tools/gyp/PRESUBMIT.py +137 -0
  197. data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/buildbot_run.py +136 -0
  198. data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/OWNERS +6 -0
  199. data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/cq_config.json +15 -0
  200. data/ext/drafter/ext/snowcrash/tools/gyp/codereview.settings +10 -0
  201. data/ext/drafter/ext/snowcrash/tools/gyp/data/win/large-pdb-shim.cc +12 -0
  202. data/ext/drafter/ext/snowcrash/tools/gyp/gyp +8 -0
  203. data/ext/drafter/ext/snowcrash/tools/gyp/gyp.bat +5 -0
  204. data/ext/drafter/ext/snowcrash/tools/gyp/gyp_main.py +16 -0
  205. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSNew.py +340 -0
  206. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSProject.py +208 -0
  207. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSSettings.py +1096 -0
  208. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSToolFile.py +58 -0
  209. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUserFile.py +147 -0
  210. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.py +270 -0
  211. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.pyc +0 -0
  212. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.py +445 -0
  213. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.pyc +0 -0
  214. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.py +548 -0
  215. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.pyc +0 -0
  216. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.py +608 -0
  217. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
  218. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/easy_xml.py +157 -0
  219. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/flock_tool.py +54 -0
  220. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
  221. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
  222. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/analyzer.py +741 -0
  223. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/android.py +1069 -0
  224. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/cmake.py +1248 -0
  225. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +99 -0
  226. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/eclipse.py +425 -0
  227. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypd.py +94 -0
  228. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypsh.py +56 -0
  229. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.py +2218 -0
  230. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
  231. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/msvs.py +3467 -0
  232. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.py +2427 -0
  233. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.pyc +0 -0
  234. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.py +1300 -0
  235. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
  236. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.py +2899 -0
  237. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.pyc +0 -0
  238. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/mac_tool.py +605 -0
  239. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.py +1093 -0
  240. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.pyc +0 -0
  241. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.py +160 -0
  242. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.pyc +0 -0
  243. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ordered_dict.py +289 -0
  244. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.py +46 -0
  245. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.pyc +0 -0
  246. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/win_tool.py +314 -0
  247. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.py +1664 -0
  248. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
  249. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.py +276 -0
  250. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.pyc +0 -0
  251. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.py +2927 -0
  252. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
  253. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xml_fix.py +69 -0
  254. data/ext/drafter/ext/snowcrash/tools/gyp/pylintrc +307 -0
  255. data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples +81 -0
  256. data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples.bat +5 -0
  257. data/ext/drafter/ext/snowcrash/tools/gyp/setup.py +19 -0
  258. data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
  259. data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
  260. data/ext/drafter/ext/snowcrash/tools/gyp/tools/emacs/gyp.el +275 -0
  261. data/ext/drafter/ext/snowcrash/tools/gyp/tools/graphviz.py +100 -0
  262. data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_gyp.py +155 -0
  263. data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_sln.py +169 -0
  264. data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_vcproj.py +329 -0
  265. data/ext/drafter/ext/snowcrash/vcbuild.bat +139 -0
  266. data/ext/drafter/ext/sos/Makefile +62 -0
  267. data/ext/drafter/ext/sos/src/sos.cc +235 -0
  268. data/ext/drafter/ext/sos/src/sos.h +188 -0
  269. data/ext/drafter/ext/sos/src/sosJSON.h +121 -0
  270. data/ext/drafter/ext/sos/src/sosYAML.h +105 -0
  271. data/ext/drafter/src/ConversionContext.cc +39 -0
  272. data/ext/drafter/src/ConversionContext.h +34 -0
  273. data/ext/drafter/src/NamedTypesRegistry.cc +405 -0
  274. data/ext/drafter/src/NamedTypesRegistry.h +28 -0
  275. data/ext/drafter/src/NodeInfo.h +143 -0
  276. data/ext/drafter/src/RefractAPI.cc +579 -0
  277. data/ext/drafter/src/RefractAPI.h +28 -0
  278. data/ext/drafter/src/RefractDataStructure.cc +1199 -0
  279. data/ext/drafter/src/RefractDataStructure.h +26 -0
  280. data/ext/drafter/src/RefractElementFactory.cc +107 -0
  281. data/ext/drafter/src/RefractElementFactory.h +67 -0
  282. data/ext/drafter/src/RefractSourceMap.cc +29 -0
  283. data/ext/drafter/src/RefractSourceMap.h +57 -0
  284. data/ext/drafter/src/Render.cc +157 -0
  285. data/ext/drafter/src/Render.h +40 -0
  286. data/ext/drafter/src/Serialize.cc +160 -0
  287. data/ext/drafter/src/Serialize.h +289 -0
  288. data/ext/drafter/src/SerializeAST.cc +507 -0
  289. data/ext/drafter/src/SerializeAST.h +29 -0
  290. data/ext/drafter/src/SerializeResult.cc +170 -0
  291. data/ext/drafter/src/SerializeResult.h +34 -0
  292. data/ext/drafter/src/SerializeSourcemap.cc +331 -0
  293. data/ext/drafter/src/SerializeSourcemap.h +21 -0
  294. data/ext/drafter/src/Version.h +40 -0
  295. data/ext/drafter/src/config.cc +91 -0
  296. data/ext/drafter/src/config.h +38 -0
  297. data/ext/drafter/src/drafter.cc +137 -0
  298. data/ext/drafter/src/drafter.h +102 -0
  299. data/ext/drafter/src/drafter_private.cc +85 -0
  300. data/ext/drafter/src/drafter_private.h +34 -0
  301. data/ext/drafter/src/main.cc +137 -0
  302. data/ext/drafter/src/refract/AppendDecorator.h +58 -0
  303. data/ext/drafter/src/refract/Build.h +67 -0
  304. data/ext/drafter/src/refract/ComparableVisitor.cc +43 -0
  305. data/ext/drafter/src/refract/ComparableVisitor.h +62 -0
  306. data/ext/drafter/src/refract/Element.cc +409 -0
  307. data/ext/drafter/src/refract/Element.h +656 -0
  308. data/ext/drafter/src/refract/ElementFwd.h +37 -0
  309. data/ext/drafter/src/refract/ElementInserter.h +59 -0
  310. data/ext/drafter/src/refract/Exception.h +31 -0
  311. data/ext/drafter/src/refract/ExpandVisitor.cc +359 -0
  312. data/ext/drafter/src/refract/ExpandVisitor.h +58 -0
  313. data/ext/drafter/src/refract/FilterVisitor.h +52 -0
  314. data/ext/drafter/src/refract/IsExpandableVisitor.cc +140 -0
  315. data/ext/drafter/src/refract/IsExpandableVisitor.h +31 -0
  316. data/ext/drafter/src/refract/Iterate.h +160 -0
  317. data/ext/drafter/src/refract/JSONSchemaVisitor.cc +675 -0
  318. data/ext/drafter/src/refract/JSONSchemaVisitor.h +73 -0
  319. data/ext/drafter/src/refract/PrintVisitor.cc +164 -0
  320. data/ext/drafter/src/refract/PrintVisitor.h +50 -0
  321. data/ext/drafter/src/refract/Query.cc +13 -0
  322. data/ext/drafter/src/refract/Query.h +38 -0
  323. data/ext/drafter/src/refract/Registry.cc +114 -0
  324. data/ext/drafter/src/refract/Registry.h +43 -0
  325. data/ext/drafter/src/refract/RenderJSONVisitor.cc +255 -0
  326. data/ext/drafter/src/refract/RenderJSONVisitor.h +51 -0
  327. data/ext/drafter/src/refract/SerializeCompactVisitor.cc +167 -0
  328. data/ext/drafter/src/refract/SerializeCompactVisitor.h +56 -0
  329. data/ext/drafter/src/refract/SerializeVisitor.cc +214 -0
  330. data/ext/drafter/src/refract/SerializeVisitor.h +55 -0
  331. data/ext/drafter/src/refract/TypeQueryVisitor.cc +46 -0
  332. data/ext/drafter/src/refract/TypeQueryVisitor.h +110 -0
  333. data/ext/drafter/src/refract/Visitor.h +126 -0
  334. data/ext/drafter/src/refract/VisitorUtils.cc +63 -0
  335. data/ext/drafter/src/refract/VisitorUtils.h +231 -0
  336. data/ext/drafter/src/reporting.cc +263 -0
  337. data/ext/drafter/src/reporting.h +39 -0
  338. data/ext/drafter/src/stream.h +148 -0
  339. data/ext/drafter/tools/homebrew/drafter.rb +18 -0
  340. data/ext/drafter/tools/make-tarball.sh +39 -0
  341. data/ext/drafter/tools/refract-filter.py +96 -0
  342. data/ext/drafter/tools/release.sh +17 -0
  343. data/ext/drafter/vcbuild.bat +203 -0
  344. data/lib/lounge_lizard/binding.rb +29 -0
  345. data/lib/lounge_lizard/version.rb +3 -0
  346. data/lib/lounge_lizard.rb +18 -0
  347. data/lounge_lizard.gemspec +37 -0
  348. metadata +547 -0
@@ -0,0 +1,137 @@
1
+ # Copyright (c) 2012 Google Inc. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+
6
+ """Top-level presubmit script for GYP.
7
+
8
+ See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
9
+ for more details about the presubmit API built into gcl.
10
+ """
11
+
12
+
13
+ PYLINT_BLACKLIST = [
14
+ # TODO: fix me.
15
+ # From SCons, not done in google style.
16
+ 'test/lib/TestCmd.py',
17
+ 'test/lib/TestCommon.py',
18
+ 'test/lib/TestGyp.py',
19
+ ]
20
+
21
+
22
+ PYLINT_DISABLED_WARNINGS = [
23
+ # TODO: fix me.
24
+ # Many tests include modules they don't use.
25
+ 'W0611',
26
+ # Possible unbalanced tuple unpacking with sequence.
27
+ 'W0632',
28
+ # Attempting to unpack a non-sequence.
29
+ 'W0633',
30
+ # Include order doesn't properly include local files?
31
+ 'F0401',
32
+ # Some use of built-in names.
33
+ 'W0622',
34
+ # Some unused variables.
35
+ 'W0612',
36
+ # Operator not preceded/followed by space.
37
+ 'C0323',
38
+ 'C0322',
39
+ # Unnecessary semicolon.
40
+ 'W0301',
41
+ # Unused argument.
42
+ 'W0613',
43
+ # String has no effect (docstring in wrong place).
44
+ 'W0105',
45
+ # map/filter on lambda could be replaced by comprehension.
46
+ 'W0110',
47
+ # Use of eval.
48
+ 'W0123',
49
+ # Comma not followed by space.
50
+ 'C0324',
51
+ # Access to a protected member.
52
+ 'W0212',
53
+ # Bad indent.
54
+ 'W0311',
55
+ # Line too long.
56
+ 'C0301',
57
+ # Undefined variable.
58
+ 'E0602',
59
+ # Not exception type specified.
60
+ 'W0702',
61
+ # No member of that name.
62
+ 'E1101',
63
+ # Dangerous default {}.
64
+ 'W0102',
65
+ # Cyclic import.
66
+ 'R0401',
67
+ # Others, too many to sort.
68
+ 'W0201', 'W0232', 'E1103', 'W0621', 'W0108', 'W0223', 'W0231',
69
+ 'R0201', 'E0101', 'C0321',
70
+ # ************* Module copy
71
+ # W0104:427,12:_test.odict.__setitem__: Statement seems to have no effect
72
+ 'W0104',
73
+ ]
74
+
75
+
76
+ def CheckChangeOnUpload(input_api, output_api):
77
+ report = []
78
+ report.extend(input_api.canned_checks.PanProjectChecks(
79
+ input_api, output_api))
80
+ return report
81
+
82
+
83
+ def CheckChangeOnCommit(input_api, output_api):
84
+ report = []
85
+
86
+ # Accept any year number from 2009 to the current year.
87
+ current_year = int(input_api.time.strftime('%Y'))
88
+ allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1)))
89
+ years_re = '(' + '|'.join(allowed_years) + ')'
90
+
91
+ # The (c) is deprecated, but tolerate it until it's removed from all files.
92
+ license = (
93
+ r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
94
+ r'.*? Use of this source code is governed by a BSD-style license that '
95
+ r'can be\n'
96
+ r'.*? found in the LICENSE file\.\n'
97
+ ) % {
98
+ 'year': years_re,
99
+ }
100
+
101
+ report.extend(input_api.canned_checks.PanProjectChecks(
102
+ input_api, output_api, license_header=license))
103
+ report.extend(input_api.canned_checks.CheckTreeIsOpen(
104
+ input_api, output_api,
105
+ 'http://gyp-status.appspot.com/status',
106
+ 'http://gyp-status.appspot.com/current'))
107
+
108
+ import os
109
+ import sys
110
+ old_sys_path = sys.path
111
+ try:
112
+ sys.path = ['pylib', 'test/lib'] + sys.path
113
+ blacklist = PYLINT_BLACKLIST
114
+ if sys.platform == 'win32':
115
+ blacklist = [os.path.normpath(x).replace('\\', '\\\\')
116
+ for x in PYLINT_BLACKLIST]
117
+ report.extend(input_api.canned_checks.RunPylint(
118
+ input_api,
119
+ output_api,
120
+ black_list=blacklist,
121
+ disabled_warnings=PYLINT_DISABLED_WARNINGS))
122
+ finally:
123
+ sys.path = old_sys_path
124
+ return report
125
+
126
+
127
+ TRYBOTS = [
128
+ 'linux_try',
129
+ 'mac_try',
130
+ 'win_try',
131
+ ]
132
+
133
+
134
+ def GetPreferredTryMasters(_, change):
135
+ return {
136
+ 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS },
137
+ }
@@ -0,0 +1,136 @@
1
+ #!/usr/bin/env python
2
+ # Copyright (c) 2012 Google Inc. All rights reserved.
3
+ # Use of this source code is governed by a BSD-style license that can be
4
+ # found in the LICENSE file.
5
+
6
+ """Argument-less script to select what to run on the buildbots."""
7
+
8
+ import os
9
+ import shutil
10
+ import subprocess
11
+ import sys
12
+
13
+
14
+ BUILDBOT_DIR = os.path.dirname(os.path.abspath(__file__))
15
+ TRUNK_DIR = os.path.dirname(BUILDBOT_DIR)
16
+ ROOT_DIR = os.path.dirname(TRUNK_DIR)
17
+ CMAKE_DIR = os.path.join(ROOT_DIR, 'cmake')
18
+ CMAKE_BIN_DIR = os.path.join(CMAKE_DIR, 'bin')
19
+ OUT_DIR = os.path.join(TRUNK_DIR, 'out')
20
+
21
+
22
+ def CallSubProcess(*args, **kwargs):
23
+ """Wrapper around subprocess.call which treats errors as build exceptions."""
24
+ with open(os.devnull) as devnull_fd:
25
+ retcode = subprocess.call(stdin=devnull_fd, *args, **kwargs)
26
+ if retcode != 0:
27
+ print '@@@STEP_EXCEPTION@@@'
28
+ sys.exit(1)
29
+
30
+
31
+ def PrepareCmake():
32
+ """Build CMake 2.8.8 since the version in Precise is 2.8.7."""
33
+ if os.environ['BUILDBOT_CLOBBER'] == '1':
34
+ print '@@@BUILD_STEP Clobber CMake checkout@@@'
35
+ shutil.rmtree(CMAKE_DIR)
36
+
37
+ # We always build CMake 2.8.8, so no need to do anything
38
+ # if the directory already exists.
39
+ if os.path.isdir(CMAKE_DIR):
40
+ return
41
+
42
+ print '@@@BUILD_STEP Initialize CMake checkout@@@'
43
+ os.mkdir(CMAKE_DIR)
44
+
45
+ print '@@@BUILD_STEP Sync CMake@@@'
46
+ CallSubProcess(
47
+ ['git', 'clone',
48
+ '--depth', '1',
49
+ '--single-branch',
50
+ '--branch', 'v2.8.8',
51
+ '--',
52
+ 'git://cmake.org/cmake.git',
53
+ CMAKE_DIR],
54
+ cwd=CMAKE_DIR)
55
+
56
+ print '@@@BUILD_STEP Build CMake@@@'
57
+ CallSubProcess(
58
+ ['/bin/bash', 'bootstrap', '--prefix=%s' % CMAKE_DIR],
59
+ cwd=CMAKE_DIR)
60
+
61
+ CallSubProcess( ['make', 'cmake'], cwd=CMAKE_DIR)
62
+
63
+
64
+ def GypTestFormat(title, format=None, msvs_version=None, tests=[]):
65
+ """Run the gyp tests for a given format, emitting annotator tags.
66
+
67
+ See annotator docs at:
68
+ https://sites.google.com/a/chromium.org/dev/developers/testing/chromium-build-infrastructure/buildbot-annotations
69
+ Args:
70
+ format: gyp format to test.
71
+ Returns:
72
+ 0 for sucesss, 1 for failure.
73
+ """
74
+ if not format:
75
+ format = title
76
+
77
+ print '@@@BUILD_STEP ' + title + '@@@'
78
+ sys.stdout.flush()
79
+ env = os.environ.copy()
80
+ if msvs_version:
81
+ env['GYP_MSVS_VERSION'] = msvs_version
82
+ command = ' '.join(
83
+ [sys.executable, 'gyp/gyptest.py',
84
+ '--all',
85
+ '--passed',
86
+ '--format', format,
87
+ '--path', CMAKE_BIN_DIR,
88
+ '--chdir', 'gyp'] + tests)
89
+ retcode = subprocess.call(command, cwd=ROOT_DIR, env=env, shell=True)
90
+ if retcode:
91
+ # Emit failure tag, and keep going.
92
+ print '@@@STEP_FAILURE@@@'
93
+ return 1
94
+ return 0
95
+
96
+
97
+ def GypBuild():
98
+ # Dump out/ directory.
99
+ print '@@@BUILD_STEP cleanup@@@'
100
+ print 'Removing %s...' % OUT_DIR
101
+ shutil.rmtree(OUT_DIR, ignore_errors=True)
102
+ print 'Done.'
103
+
104
+ retcode = 0
105
+ if sys.platform.startswith('linux'):
106
+ retcode += GypTestFormat('ninja')
107
+ retcode += GypTestFormat('make')
108
+ PrepareCmake()
109
+ retcode += GypTestFormat('cmake')
110
+ elif sys.platform == 'darwin':
111
+ retcode += GypTestFormat('ninja')
112
+ retcode += GypTestFormat('xcode')
113
+ retcode += GypTestFormat('make')
114
+ elif sys.platform == 'win32':
115
+ retcode += GypTestFormat('ninja')
116
+ if os.environ['BUILDBOT_BUILDERNAME'] == 'gyp-win64':
117
+ retcode += GypTestFormat('msvs-ninja-2013', format='msvs-ninja',
118
+ msvs_version='2013',
119
+ tests=[
120
+ r'test\generator-output\gyptest-actions.py',
121
+ r'test\generator-output\gyptest-relocate.py',
122
+ r'test\generator-output\gyptest-rules.py'])
123
+ retcode += GypTestFormat('msvs-2013', format='msvs', msvs_version='2013')
124
+ else:
125
+ raise Exception('Unknown platform')
126
+ if retcode:
127
+ # TODO(bradnelson): once the annotator supports a postscript (section for
128
+ # after the build proper that could be used for cumulative failures),
129
+ # use that instead of this. This isolates the final return value so
130
+ # that it isn't misattributed to the last stage.
131
+ print '@@@BUILD_STEP failures@@@'
132
+ sys.exit(retcode)
133
+
134
+
135
+ if __name__ == '__main__':
136
+ GypBuild()
@@ -0,0 +1,6 @@
1
+ set noparent
2
+ bradnelson@chromium.org
3
+ bradnelson@google.com
4
+ iannucci@chromium.org
5
+ scottmg@chromium.org
6
+ thakis@chromium.org
@@ -0,0 +1,15 @@
1
+ {
2
+ "trybots": {
3
+ "launched": {
4
+ "tryserver.nacl": {
5
+ "gyp-presubmit": ["defaulttests"],
6
+ "gyp-linux": ["defaulttests"],
7
+ "gyp-mac": ["defaulttests"],
8
+ "gyp-win32": ["defaulttests"],
9
+ "gyp-win64": ["defaulttests"]
10
+ }
11
+ },
12
+ "triggered": {
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,10 @@
1
+ # This file is used by gcl to get repository specific information.
2
+ CODE_REVIEW_SERVER: codereview.chromium.org
3
+ CC_LIST: gyp-developer@googlegroups.com
4
+ VIEW_VC: https://chromium.googlesource.com/external/gyp/+/
5
+ TRY_ON_UPLOAD: False
6
+ TRYSERVER_PROJECT: gyp
7
+ TRYSERVER_PATCHLEVEL: 1
8
+ TRYSERVER_ROOT: gyp
9
+ TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try-nacl
10
+ PROJECT: gyp
@@ -0,0 +1,12 @@
1
+ // Copyright (c) 2013 Google Inc. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ // This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is
6
+ // then used during the final link for modules that have large PDBs. Otherwise,
7
+ // the linker will generate a pdb with a page size of 1KB, which imposes a limit
8
+ // of 1GB on the .pdb. By generating an initial empty .pdb with the compiler
9
+ // (rather than the linker), this limit is avoided. With this in place PDBs may
10
+ // grow to 2GB.
11
+ //
12
+ // This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py.
@@ -0,0 +1,8 @@
1
+ #!/bin/sh
2
+ # Copyright 2013 The Chromium Authors. All rights reserved.
3
+ # Use of this source code is governed by a BSD-style license that can be
4
+ # found in the LICENSE file.
5
+
6
+ set -e
7
+ base=$(dirname "$0")
8
+ exec python "${base}/gyp_main.py" "$@"
@@ -0,0 +1,5 @@
1
+ @rem Copyright (c) 2009 Google Inc. All rights reserved.
2
+ @rem Use of this source code is governed by a BSD-style license that can be
3
+ @rem found in the LICENSE file.
4
+
5
+ @python "%~dp0gyp_main.py" %*
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) 2009 Google Inc. All rights reserved.
4
+ # Use of this source code is governed by a BSD-style license that can be
5
+ # found in the LICENSE file.
6
+
7
+ import os
8
+ import sys
9
+
10
+ # Make sure we're using the version of pylib in this repo, not one installed
11
+ # elsewhere on the system.
12
+ sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), 'pylib'))
13
+ import gyp
14
+
15
+ if __name__ == '__main__':
16
+ sys.exit(gyp.script_main())
@@ -0,0 +1,340 @@
1
+ # Copyright (c) 2012 Google Inc. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ """New implementation of Visual Studio project generation."""
6
+
7
+ import os
8
+ import random
9
+
10
+ import gyp.common
11
+
12
+ # hashlib is supplied as of Python 2.5 as the replacement interface for md5
13
+ # and other secure hashes. In 2.6, md5 is deprecated. Import hashlib if
14
+ # available, avoiding a deprecation warning under 2.6. Import md5 otherwise,
15
+ # preserving 2.4 compatibility.
16
+ try:
17
+ import hashlib
18
+ _new_md5 = hashlib.md5
19
+ except ImportError:
20
+ import md5
21
+ _new_md5 = md5.new
22
+
23
+
24
+ # Initialize random number generator
25
+ random.seed()
26
+
27
+ # GUIDs for project types
28
+ ENTRY_TYPE_GUIDS = {
29
+ 'project': '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}',
30
+ 'folder': '{2150E333-8FDC-42A3-9474-1A3956D46DE8}',
31
+ }
32
+
33
+ #------------------------------------------------------------------------------
34
+ # Helper functions
35
+
36
+
37
+ def MakeGuid(name, seed='msvs_new'):
38
+ """Returns a GUID for the specified target name.
39
+
40
+ Args:
41
+ name: Target name.
42
+ seed: Seed for MD5 hash.
43
+ Returns:
44
+ A GUID-line string calculated from the name and seed.
45
+
46
+ This generates something which looks like a GUID, but depends only on the
47
+ name and seed. This means the same name/seed will always generate the same
48
+ GUID, so that projects and solutions which refer to each other can explicitly
49
+ determine the GUID to refer to explicitly. It also means that the GUID will
50
+ not change when the project for a target is rebuilt.
51
+ """
52
+ # Calculate a MD5 signature for the seed and name.
53
+ d = _new_md5(str(seed) + str(name)).hexdigest().upper()
54
+ # Convert most of the signature to GUID form (discard the rest)
55
+ guid = ('{' + d[:8] + '-' + d[8:12] + '-' + d[12:16] + '-' + d[16:20]
56
+ + '-' + d[20:32] + '}')
57
+ return guid
58
+
59
+ #------------------------------------------------------------------------------
60
+
61
+
62
+ class MSVSSolutionEntry(object):
63
+ def __cmp__(self, other):
64
+ # Sort by name then guid (so things are in order on vs2008).
65
+ return cmp((self.name, self.get_guid()), (other.name, other.get_guid()))
66
+
67
+
68
+ class MSVSFolder(MSVSSolutionEntry):
69
+ """Folder in a Visual Studio project or solution."""
70
+
71
+ def __init__(self, path, name = None, entries = None,
72
+ guid = None, items = None):
73
+ """Initializes the folder.
74
+
75
+ Args:
76
+ path: Full path to the folder.
77
+ name: Name of the folder.
78
+ entries: List of folder entries to nest inside this folder. May contain
79
+ Folder or Project objects. May be None, if the folder is empty.
80
+ guid: GUID to use for folder, if not None.
81
+ items: List of solution items to include in the folder project. May be
82
+ None, if the folder does not directly contain items.
83
+ """
84
+ if name:
85
+ self.name = name
86
+ else:
87
+ # Use last layer.
88
+ self.name = os.path.basename(path)
89
+
90
+ self.path = path
91
+ self.guid = guid
92
+
93
+ # Copy passed lists (or set to empty lists)
94
+ self.entries = sorted(list(entries or []))
95
+ self.items = list(items or [])
96
+
97
+ self.entry_type_guid = ENTRY_TYPE_GUIDS['folder']
98
+
99
+ def get_guid(self):
100
+ if self.guid is None:
101
+ # Use consistent guids for folders (so things don't regenerate).
102
+ self.guid = MakeGuid(self.path, seed='msvs_folder')
103
+ return self.guid
104
+
105
+
106
+ #------------------------------------------------------------------------------
107
+
108
+
109
+ class MSVSProject(MSVSSolutionEntry):
110
+ """Visual Studio project."""
111
+
112
+ def __init__(self, path, name = None, dependencies = None, guid = None,
113
+ spec = None, build_file = None, config_platform_overrides = None,
114
+ fixpath_prefix = None):
115
+ """Initializes the project.
116
+
117
+ Args:
118
+ path: Absolute path to the project file.
119
+ name: Name of project. If None, the name will be the same as the base
120
+ name of the project file.
121
+ dependencies: List of other Project objects this project is dependent
122
+ upon, if not None.
123
+ guid: GUID to use for project, if not None.
124
+ spec: Dictionary specifying how to build this project.
125
+ build_file: Filename of the .gyp file that the vcproj file comes from.
126
+ config_platform_overrides: optional dict of configuration platforms to
127
+ used in place of the default for this target.
128
+ fixpath_prefix: the path used to adjust the behavior of _fixpath
129
+ """
130
+ self.path = path
131
+ self.guid = guid
132
+ self.spec = spec
133
+ self.build_file = build_file
134
+ # Use project filename if name not specified
135
+ self.name = name or os.path.splitext(os.path.basename(path))[0]
136
+
137
+ # Copy passed lists (or set to empty lists)
138
+ self.dependencies = list(dependencies or [])
139
+
140
+ self.entry_type_guid = ENTRY_TYPE_GUIDS['project']
141
+
142
+ if config_platform_overrides:
143
+ self.config_platform_overrides = config_platform_overrides
144
+ else:
145
+ self.config_platform_overrides = {}
146
+ self.fixpath_prefix = fixpath_prefix
147
+ self.msbuild_toolset = None
148
+
149
+ def set_dependencies(self, dependencies):
150
+ self.dependencies = list(dependencies or [])
151
+
152
+ def get_guid(self):
153
+ if self.guid is None:
154
+ # Set GUID from path
155
+ # TODO(rspangler): This is fragile.
156
+ # 1. We can't just use the project filename sans path, since there could
157
+ # be multiple projects with the same base name (for example,
158
+ # foo/unittest.vcproj and bar/unittest.vcproj).
159
+ # 2. The path needs to be relative to $SOURCE_ROOT, so that the project
160
+ # GUID is the same whether it's included from base/base.sln or
161
+ # foo/bar/baz/baz.sln.
162
+ # 3. The GUID needs to be the same each time this builder is invoked, so
163
+ # that we don't need to rebuild the solution when the project changes.
164
+ # 4. We should be able to handle pre-built project files by reading the
165
+ # GUID from the files.
166
+ self.guid = MakeGuid(self.name)
167
+ return self.guid
168
+
169
+ def set_msbuild_toolset(self, msbuild_toolset):
170
+ self.msbuild_toolset = msbuild_toolset
171
+
172
+ #------------------------------------------------------------------------------
173
+
174
+
175
+ class MSVSSolution(object):
176
+ """Visual Studio solution."""
177
+
178
+ def __init__(self, path, version, entries=None, variants=None,
179
+ websiteProperties=True):
180
+ """Initializes the solution.
181
+
182
+ Args:
183
+ path: Path to solution file.
184
+ version: Format version to emit.
185
+ entries: List of entries in solution. May contain Folder or Project
186
+ objects. May be None, if the folder is empty.
187
+ variants: List of build variant strings. If none, a default list will
188
+ be used.
189
+ websiteProperties: Flag to decide if the website properties section
190
+ is generated.
191
+ """
192
+ self.path = path
193
+ self.websiteProperties = websiteProperties
194
+ self.version = version
195
+
196
+ # Copy passed lists (or set to empty lists)
197
+ self.entries = list(entries or [])
198
+
199
+ if variants:
200
+ # Copy passed list
201
+ self.variants = variants[:]
202
+ else:
203
+ # Use default
204
+ self.variants = ['Debug|Win32', 'Release|Win32']
205
+ # TODO(rspangler): Need to be able to handle a mapping of solution config
206
+ # to project config. Should we be able to handle variants being a dict,
207
+ # or add a separate variant_map variable? If it's a dict, we can't
208
+ # guarantee the order of variants since dict keys aren't ordered.
209
+
210
+
211
+ # TODO(rspangler): Automatically write to disk for now; should delay until
212
+ # node-evaluation time.
213
+ self.Write()
214
+
215
+
216
+ def Write(self, writer=gyp.common.WriteOnDiff):
217
+ """Writes the solution file to disk.
218
+
219
+ Raises:
220
+ IndexError: An entry appears multiple times.
221
+ """
222
+ # Walk the entry tree and collect all the folders and projects.
223
+ all_entries = set()
224
+ entries_to_check = self.entries[:]
225
+ while entries_to_check:
226
+ e = entries_to_check.pop(0)
227
+
228
+ # If this entry has been visited, nothing to do.
229
+ if e in all_entries:
230
+ continue
231
+
232
+ all_entries.add(e)
233
+
234
+ # If this is a folder, check its entries too.
235
+ if isinstance(e, MSVSFolder):
236
+ entries_to_check += e.entries
237
+
238
+ all_entries = sorted(all_entries)
239
+
240
+ # Open file and print header
241
+ f = writer(self.path)
242
+ f.write('Microsoft Visual Studio Solution File, '
243
+ 'Format Version %s\r\n' % self.version.SolutionVersion())
244
+ f.write('# %s\r\n' % self.version.Description())
245
+
246
+ # Project entries
247
+ sln_root = os.path.split(self.path)[0]
248
+ for e in all_entries:
249
+ relative_path = gyp.common.RelativePath(e.path, sln_root)
250
+ # msbuild does not accept an empty folder_name.
251
+ # use '.' in case relative_path is empty.
252
+ folder_name = relative_path.replace('/', '\\') or '.'
253
+ f.write('Project("%s") = "%s", "%s", "%s"\r\n' % (
254
+ e.entry_type_guid, # Entry type GUID
255
+ e.name, # Folder name
256
+ folder_name, # Folder name (again)
257
+ e.get_guid(), # Entry GUID
258
+ ))
259
+
260
+ # TODO(rspangler): Need a way to configure this stuff
261
+ if self.websiteProperties:
262
+ f.write('\tProjectSection(WebsiteProperties) = preProject\r\n'
263
+ '\t\tDebug.AspNetCompiler.Debug = "True"\r\n'
264
+ '\t\tRelease.AspNetCompiler.Debug = "False"\r\n'
265
+ '\tEndProjectSection\r\n')
266
+
267
+ if isinstance(e, MSVSFolder):
268
+ if e.items:
269
+ f.write('\tProjectSection(SolutionItems) = preProject\r\n')
270
+ for i in e.items:
271
+ f.write('\t\t%s = %s\r\n' % (i, i))
272
+ f.write('\tEndProjectSection\r\n')
273
+
274
+ if isinstance(e, MSVSProject):
275
+ if e.dependencies:
276
+ f.write('\tProjectSection(ProjectDependencies) = postProject\r\n')
277
+ for d in e.dependencies:
278
+ f.write('\t\t%s = %s\r\n' % (d.get_guid(), d.get_guid()))
279
+ f.write('\tEndProjectSection\r\n')
280
+
281
+ f.write('EndProject\r\n')
282
+
283
+ # Global section
284
+ f.write('Global\r\n')
285
+
286
+ # Configurations (variants)
287
+ f.write('\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n')
288
+ for v in self.variants:
289
+ f.write('\t\t%s = %s\r\n' % (v, v))
290
+ f.write('\tEndGlobalSection\r\n')
291
+
292
+ # Sort config guids for easier diffing of solution changes.
293
+ config_guids = []
294
+ config_guids_overrides = {}
295
+ for e in all_entries:
296
+ if isinstance(e, MSVSProject):
297
+ config_guids.append(e.get_guid())
298
+ config_guids_overrides[e.get_guid()] = e.config_platform_overrides
299
+ config_guids.sort()
300
+
301
+ f.write('\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n')
302
+ for g in config_guids:
303
+ for v in self.variants:
304
+ nv = config_guids_overrides[g].get(v, v)
305
+ # Pick which project configuration to build for this solution
306
+ # configuration.
307
+ f.write('\t\t%s.%s.ActiveCfg = %s\r\n' % (
308
+ g, # Project GUID
309
+ v, # Solution build configuration
310
+ nv, # Project build config for that solution config
311
+ ))
312
+
313
+ # Enable project in this solution configuration.
314
+ f.write('\t\t%s.%s.Build.0 = %s\r\n' % (
315
+ g, # Project GUID
316
+ v, # Solution build configuration
317
+ nv, # Project build config for that solution config
318
+ ))
319
+ f.write('\tEndGlobalSection\r\n')
320
+
321
+ # TODO(rspangler): Should be able to configure this stuff too (though I've
322
+ # never seen this be any different)
323
+ f.write('\tGlobalSection(SolutionProperties) = preSolution\r\n')
324
+ f.write('\t\tHideSolutionNode = FALSE\r\n')
325
+ f.write('\tEndGlobalSection\r\n')
326
+
327
+ # Folder mappings
328
+ # Omit this section if there are no folders
329
+ if any([e.entries for e in all_entries if isinstance(e, MSVSFolder)]):
330
+ f.write('\tGlobalSection(NestedProjects) = preSolution\r\n')
331
+ for e in all_entries:
332
+ if not isinstance(e, MSVSFolder):
333
+ continue # Does not apply to projects, only folders
334
+ for subentry in e.entries:
335
+ f.write('\t\t%s = %s\r\n' % (subentry.get_guid(), e.get_guid()))
336
+ f.write('\tEndGlobalSection\r\n')
337
+
338
+ f.write('EndGlobal\r\n')
339
+
340
+ f.close()