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,160 @@
1
+ # This file comes from
2
+ # https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py
3
+ # Do not edit! Edit the upstream one instead.
4
+
5
+ """Python module for generating .ninja files.
6
+
7
+ Note that this is emphatically not a required piece of Ninja; it's
8
+ just a helpful utility for build-file-generation systems that already
9
+ use Python.
10
+ """
11
+
12
+ import textwrap
13
+ import re
14
+
15
+ def escape_path(word):
16
+ return word.replace('$ ','$$ ').replace(' ','$ ').replace(':', '$:')
17
+
18
+ class Writer(object):
19
+ def __init__(self, output, width=78):
20
+ self.output = output
21
+ self.width = width
22
+
23
+ def newline(self):
24
+ self.output.write('\n')
25
+
26
+ def comment(self, text):
27
+ for line in textwrap.wrap(text, self.width - 2):
28
+ self.output.write('# ' + line + '\n')
29
+
30
+ def variable(self, key, value, indent=0):
31
+ if value is None:
32
+ return
33
+ if isinstance(value, list):
34
+ value = ' '.join(filter(None, value)) # Filter out empty strings.
35
+ self._line('%s = %s' % (key, value), indent)
36
+
37
+ def pool(self, name, depth):
38
+ self._line('pool %s' % name)
39
+ self.variable('depth', depth, indent=1)
40
+
41
+ def rule(self, name, command, description=None, depfile=None,
42
+ generator=False, pool=None, restat=False, rspfile=None,
43
+ rspfile_content=None, deps=None):
44
+ self._line('rule %s' % name)
45
+ self.variable('command', command, indent=1)
46
+ if description:
47
+ self.variable('description', description, indent=1)
48
+ if depfile:
49
+ self.variable('depfile', depfile, indent=1)
50
+ if generator:
51
+ self.variable('generator', '1', indent=1)
52
+ if pool:
53
+ self.variable('pool', pool, indent=1)
54
+ if restat:
55
+ self.variable('restat', '1', indent=1)
56
+ if rspfile:
57
+ self.variable('rspfile', rspfile, indent=1)
58
+ if rspfile_content:
59
+ self.variable('rspfile_content', rspfile_content, indent=1)
60
+ if deps:
61
+ self.variable('deps', deps, indent=1)
62
+
63
+ def build(self, outputs, rule, inputs=None, implicit=None, order_only=None,
64
+ variables=None):
65
+ outputs = self._as_list(outputs)
66
+ all_inputs = self._as_list(inputs)[:]
67
+ out_outputs = list(map(escape_path, outputs))
68
+ all_inputs = list(map(escape_path, all_inputs))
69
+
70
+ if implicit:
71
+ implicit = map(escape_path, self._as_list(implicit))
72
+ all_inputs.append('|')
73
+ all_inputs.extend(implicit)
74
+ if order_only:
75
+ order_only = map(escape_path, self._as_list(order_only))
76
+ all_inputs.append('||')
77
+ all_inputs.extend(order_only)
78
+
79
+ self._line('build %s: %s' % (' '.join(out_outputs),
80
+ ' '.join([rule] + all_inputs)))
81
+
82
+ if variables:
83
+ if isinstance(variables, dict):
84
+ iterator = iter(variables.items())
85
+ else:
86
+ iterator = iter(variables)
87
+
88
+ for key, val in iterator:
89
+ self.variable(key, val, indent=1)
90
+
91
+ return outputs
92
+
93
+ def include(self, path):
94
+ self._line('include %s' % path)
95
+
96
+ def subninja(self, path):
97
+ self._line('subninja %s' % path)
98
+
99
+ def default(self, paths):
100
+ self._line('default %s' % ' '.join(self._as_list(paths)))
101
+
102
+ def _count_dollars_before_index(self, s, i):
103
+ """Returns the number of '$' characters right in front of s[i]."""
104
+ dollar_count = 0
105
+ dollar_index = i - 1
106
+ while dollar_index > 0 and s[dollar_index] == '$':
107
+ dollar_count += 1
108
+ dollar_index -= 1
109
+ return dollar_count
110
+
111
+ def _line(self, text, indent=0):
112
+ """Write 'text' word-wrapped at self.width characters."""
113
+ leading_space = ' ' * indent
114
+ while len(leading_space) + len(text) > self.width:
115
+ # The text is too wide; wrap if possible.
116
+
117
+ # Find the rightmost space that would obey our width constraint and
118
+ # that's not an escaped space.
119
+ available_space = self.width - len(leading_space) - len(' $')
120
+ space = available_space
121
+ while True:
122
+ space = text.rfind(' ', 0, space)
123
+ if space < 0 or \
124
+ self._count_dollars_before_index(text, space) % 2 == 0:
125
+ break
126
+
127
+ if space < 0:
128
+ # No such space; just use the first unescaped space we can find.
129
+ space = available_space - 1
130
+ while True:
131
+ space = text.find(' ', space + 1)
132
+ if space < 0 or \
133
+ self._count_dollars_before_index(text, space) % 2 == 0:
134
+ break
135
+ if space < 0:
136
+ # Give up on breaking.
137
+ break
138
+
139
+ self.output.write(leading_space + text[0:space] + ' $\n')
140
+ text = text[space+1:]
141
+
142
+ # Subsequent lines are continuations, so indent them.
143
+ leading_space = ' ' * (indent+2)
144
+
145
+ self.output.write(leading_space + text + '\n')
146
+
147
+ def _as_list(self, input):
148
+ if input is None:
149
+ return []
150
+ if isinstance(input, list):
151
+ return input
152
+ return [input]
153
+
154
+
155
+ def escape(string):
156
+ """Escape a string such that it can be embedded into a Ninja file without
157
+ further interpretation."""
158
+ assert '\n' not in string, 'Ninja syntax does not allow newlines'
159
+ # We only have one special metacharacter: '$'.
160
+ return string.replace('$', '$$')
@@ -0,0 +1,289 @@
1
+ # Unmodified from http://code.activestate.com/recipes/576693/
2
+ # other than to add MIT license header (as specified on page, but not in code).
3
+ # Linked from Python documentation here:
4
+ # http://docs.python.org/2/library/collections.html#collections.OrderedDict
5
+ #
6
+ # This should be deleted once Py2.7 is available on all bots, see
7
+ # http://crbug.com/241769.
8
+ #
9
+ # Copyright (c) 2009 Raymond Hettinger.
10
+ #
11
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ # of this software and associated documentation files (the "Software"), to deal
13
+ # in the Software without restriction, including without limitation the rights
14
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ # copies of the Software, and to permit persons to whom the Software is
16
+ # furnished to do so, subject to the following conditions:
17
+ #
18
+ # The above copyright notice and this permission notice shall be included in
19
+ # all copies or substantial portions of the Software.
20
+ #
21
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+ # THE SOFTWARE.
28
+
29
+ # Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy.
30
+ # Passes Python2.7's test suite and incorporates all the latest updates.
31
+
32
+ try:
33
+ from thread import get_ident as _get_ident
34
+ except ImportError:
35
+ from dummy_thread import get_ident as _get_ident
36
+
37
+ try:
38
+ from _abcoll import KeysView, ValuesView, ItemsView
39
+ except ImportError:
40
+ pass
41
+
42
+
43
+ class OrderedDict(dict):
44
+ 'Dictionary that remembers insertion order'
45
+ # An inherited dict maps keys to values.
46
+ # The inherited dict provides __getitem__, __len__, __contains__, and get.
47
+ # The remaining methods are order-aware.
48
+ # Big-O running times for all methods are the same as for regular dictionaries.
49
+
50
+ # The internal self.__map dictionary maps keys to links in a doubly linked list.
51
+ # The circular doubly linked list starts and ends with a sentinel element.
52
+ # The sentinel element never gets deleted (this simplifies the algorithm).
53
+ # Each link is stored as a list of length three: [PREV, NEXT, KEY].
54
+
55
+ def __init__(self, *args, **kwds):
56
+ '''Initialize an ordered dictionary. Signature is the same as for
57
+ regular dictionaries, but keyword arguments are not recommended
58
+ because their insertion order is arbitrary.
59
+
60
+ '''
61
+ if len(args) > 1:
62
+ raise TypeError('expected at most 1 arguments, got %d' % len(args))
63
+ try:
64
+ self.__root
65
+ except AttributeError:
66
+ self.__root = root = [] # sentinel node
67
+ root[:] = [root, root, None]
68
+ self.__map = {}
69
+ self.__update(*args, **kwds)
70
+
71
+ def __setitem__(self, key, value, dict_setitem=dict.__setitem__):
72
+ 'od.__setitem__(i, y) <==> od[i]=y'
73
+ # Setting a new item creates a new link which goes at the end of the linked
74
+ # list, and the inherited dictionary is updated with the new key/value pair.
75
+ if key not in self:
76
+ root = self.__root
77
+ last = root[0]
78
+ last[1] = root[0] = self.__map[key] = [last, root, key]
79
+ dict_setitem(self, key, value)
80
+
81
+ def __delitem__(self, key, dict_delitem=dict.__delitem__):
82
+ 'od.__delitem__(y) <==> del od[y]'
83
+ # Deleting an existing item uses self.__map to find the link which is
84
+ # then removed by updating the links in the predecessor and successor nodes.
85
+ dict_delitem(self, key)
86
+ link_prev, link_next, key = self.__map.pop(key)
87
+ link_prev[1] = link_next
88
+ link_next[0] = link_prev
89
+
90
+ def __iter__(self):
91
+ 'od.__iter__() <==> iter(od)'
92
+ root = self.__root
93
+ curr = root[1]
94
+ while curr is not root:
95
+ yield curr[2]
96
+ curr = curr[1]
97
+
98
+ def __reversed__(self):
99
+ 'od.__reversed__() <==> reversed(od)'
100
+ root = self.__root
101
+ curr = root[0]
102
+ while curr is not root:
103
+ yield curr[2]
104
+ curr = curr[0]
105
+
106
+ def clear(self):
107
+ 'od.clear() -> None. Remove all items from od.'
108
+ try:
109
+ for node in self.__map.itervalues():
110
+ del node[:]
111
+ root = self.__root
112
+ root[:] = [root, root, None]
113
+ self.__map.clear()
114
+ except AttributeError:
115
+ pass
116
+ dict.clear(self)
117
+
118
+ def popitem(self, last=True):
119
+ '''od.popitem() -> (k, v), return and remove a (key, value) pair.
120
+ Pairs are returned in LIFO order if last is true or FIFO order if false.
121
+
122
+ '''
123
+ if not self:
124
+ raise KeyError('dictionary is empty')
125
+ root = self.__root
126
+ if last:
127
+ link = root[0]
128
+ link_prev = link[0]
129
+ link_prev[1] = root
130
+ root[0] = link_prev
131
+ else:
132
+ link = root[1]
133
+ link_next = link[1]
134
+ root[1] = link_next
135
+ link_next[0] = root
136
+ key = link[2]
137
+ del self.__map[key]
138
+ value = dict.pop(self, key)
139
+ return key, value
140
+
141
+ # -- the following methods do not depend on the internal structure --
142
+
143
+ def keys(self):
144
+ 'od.keys() -> list of keys in od'
145
+ return list(self)
146
+
147
+ def values(self):
148
+ 'od.values() -> list of values in od'
149
+ return [self[key] for key in self]
150
+
151
+ def items(self):
152
+ 'od.items() -> list of (key, value) pairs in od'
153
+ return [(key, self[key]) for key in self]
154
+
155
+ def iterkeys(self):
156
+ 'od.iterkeys() -> an iterator over the keys in od'
157
+ return iter(self)
158
+
159
+ def itervalues(self):
160
+ 'od.itervalues -> an iterator over the values in od'
161
+ for k in self:
162
+ yield self[k]
163
+
164
+ def iteritems(self):
165
+ 'od.iteritems -> an iterator over the (key, value) items in od'
166
+ for k in self:
167
+ yield (k, self[k])
168
+
169
+ # Suppress 'OrderedDict.update: Method has no argument':
170
+ # pylint: disable=E0211
171
+ def update(*args, **kwds):
172
+ '''od.update(E, **F) -> None. Update od from dict/iterable E and F.
173
+
174
+ If E is a dict instance, does: for k in E: od[k] = E[k]
175
+ If E has a .keys() method, does: for k in E.keys(): od[k] = E[k]
176
+ Or if E is an iterable of items, does: for k, v in E: od[k] = v
177
+ In either case, this is followed by: for k, v in F.items(): od[k] = v
178
+
179
+ '''
180
+ if len(args) > 2:
181
+ raise TypeError('update() takes at most 2 positional '
182
+ 'arguments (%d given)' % (len(args),))
183
+ elif not args:
184
+ raise TypeError('update() takes at least 1 argument (0 given)')
185
+ self = args[0]
186
+ # Make progressively weaker assumptions about "other"
187
+ other = ()
188
+ if len(args) == 2:
189
+ other = args[1]
190
+ if isinstance(other, dict):
191
+ for key in other:
192
+ self[key] = other[key]
193
+ elif hasattr(other, 'keys'):
194
+ for key in other.keys():
195
+ self[key] = other[key]
196
+ else:
197
+ for key, value in other:
198
+ self[key] = value
199
+ for key, value in kwds.items():
200
+ self[key] = value
201
+
202
+ __update = update # let subclasses override update without breaking __init__
203
+
204
+ __marker = object()
205
+
206
+ def pop(self, key, default=__marker):
207
+ '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value.
208
+ If key is not found, d is returned if given, otherwise KeyError is raised.
209
+
210
+ '''
211
+ if key in self:
212
+ result = self[key]
213
+ del self[key]
214
+ return result
215
+ if default is self.__marker:
216
+ raise KeyError(key)
217
+ return default
218
+
219
+ def setdefault(self, key, default=None):
220
+ 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od'
221
+ if key in self:
222
+ return self[key]
223
+ self[key] = default
224
+ return default
225
+
226
+ def __repr__(self, _repr_running={}):
227
+ 'od.__repr__() <==> repr(od)'
228
+ call_key = id(self), _get_ident()
229
+ if call_key in _repr_running:
230
+ return '...'
231
+ _repr_running[call_key] = 1
232
+ try:
233
+ if not self:
234
+ return '%s()' % (self.__class__.__name__,)
235
+ return '%s(%r)' % (self.__class__.__name__, self.items())
236
+ finally:
237
+ del _repr_running[call_key]
238
+
239
+ def __reduce__(self):
240
+ 'Return state information for pickling'
241
+ items = [[k, self[k]] for k in self]
242
+ inst_dict = vars(self).copy()
243
+ for k in vars(OrderedDict()):
244
+ inst_dict.pop(k, None)
245
+ if inst_dict:
246
+ return (self.__class__, (items,), inst_dict)
247
+ return self.__class__, (items,)
248
+
249
+ def copy(self):
250
+ 'od.copy() -> a shallow copy of od'
251
+ return self.__class__(self)
252
+
253
+ @classmethod
254
+ def fromkeys(cls, iterable, value=None):
255
+ '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S
256
+ and values equal to v (which defaults to None).
257
+
258
+ '''
259
+ d = cls()
260
+ for key in iterable:
261
+ d[key] = value
262
+ return d
263
+
264
+ def __eq__(self, other):
265
+ '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive
266
+ while comparison to a regular mapping is order-insensitive.
267
+
268
+ '''
269
+ if isinstance(other, OrderedDict):
270
+ return len(self)==len(other) and self.items() == other.items()
271
+ return dict.__eq__(self, other)
272
+
273
+ def __ne__(self, other):
274
+ return not self == other
275
+
276
+ # -- the following methods are only used in Python 2.7 --
277
+
278
+ def viewkeys(self):
279
+ "od.viewkeys() -> a set-like object providing a view on od's keys"
280
+ return KeysView(self)
281
+
282
+ def viewvalues(self):
283
+ "od.viewvalues() -> an object providing a view on od's values"
284
+ return ValuesView(self)
285
+
286
+ def viewitems(self):
287
+ "od.viewitems() -> a set-like object providing a view on od's items"
288
+ return ItemsView(self)
289
+
@@ -0,0 +1,46 @@
1
+ # Copyright 2014 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
+ """A clone of the default copy.deepcopy that doesn't handle cyclic
6
+ structures or complex types except for dicts and lists. This is
7
+ because gyp copies so large structure that small copy overhead ends up
8
+ taking seconds in a project the size of Chromium."""
9
+
10
+ class Error(Exception):
11
+ pass
12
+
13
+ __all__ = ["Error", "deepcopy"]
14
+
15
+ def deepcopy(x):
16
+ """Deep copy operation on gyp objects such as strings, ints, dicts
17
+ and lists. More than twice as fast as copy.deepcopy but much less
18
+ generic."""
19
+
20
+ try:
21
+ return _deepcopy_dispatch[type(x)](x)
22
+ except KeyError:
23
+ raise Error('Unsupported type %s for deepcopy. Use copy.deepcopy ' +
24
+ 'or expand simple_copy support.' % type(x))
25
+
26
+ _deepcopy_dispatch = d = {}
27
+
28
+ def _deepcopy_atomic(x):
29
+ return x
30
+
31
+ for x in (type(None), int, long, float,
32
+ bool, str, unicode, type):
33
+ d[x] = _deepcopy_atomic
34
+
35
+ def _deepcopy_list(x):
36
+ return [deepcopy(a) for a in x]
37
+ d[list] = _deepcopy_list
38
+
39
+ def _deepcopy_dict(x):
40
+ y = {}
41
+ for key, value in x.iteritems():
42
+ y[deepcopy(key)] = deepcopy(value)
43
+ return y
44
+ d[dict] = _deepcopy_dict
45
+
46
+ del d