therubyracer-discourse 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/.travis.yml +11 -0
  4. data/Changelog.md +247 -0
  5. data/Gemfile +9 -0
  6. data/README.md +176 -0
  7. data/Rakefile +42 -0
  8. data/benchmarks.rb +218 -0
  9. data/ext/v8/accessor.cc +181 -0
  10. data/ext/v8/array.cc +26 -0
  11. data/ext/v8/backref.cc +45 -0
  12. data/ext/v8/constants.cc +34 -0
  13. data/ext/v8/constraints.cc +52 -0
  14. data/ext/v8/context.cc +130 -0
  15. data/ext/v8/date.cc +18 -0
  16. data/ext/v8/exception.cc +38 -0
  17. data/ext/v8/extconf.rb +34 -0
  18. data/ext/v8/external.cc +43 -0
  19. data/ext/v8/function.cc +58 -0
  20. data/ext/v8/gc.cc +43 -0
  21. data/ext/v8/handles.cc +34 -0
  22. data/ext/v8/heap.cc +35 -0
  23. data/ext/v8/init.cc +39 -0
  24. data/ext/v8/invocation.cc +86 -0
  25. data/ext/v8/locker.cc +77 -0
  26. data/ext/v8/message.cc +51 -0
  27. data/ext/v8/object.cc +335 -0
  28. data/ext/v8/primitive.cc +8 -0
  29. data/ext/v8/rr.cc +83 -0
  30. data/ext/v8/rr.h +934 -0
  31. data/ext/v8/script.cc +115 -0
  32. data/ext/v8/signature.cc +18 -0
  33. data/ext/v8/stack.cc +76 -0
  34. data/ext/v8/string.cc +47 -0
  35. data/ext/v8/template.cc +175 -0
  36. data/ext/v8/trycatch.cc +87 -0
  37. data/ext/v8/v8.cc +87 -0
  38. data/ext/v8/value.cc +239 -0
  39. data/lib/v8.rb +30 -0
  40. data/lib/v8/access.rb +5 -0
  41. data/lib/v8/access/indices.rb +40 -0
  42. data/lib/v8/access/invocation.rb +47 -0
  43. data/lib/v8/access/names.rb +65 -0
  44. data/lib/v8/array.rb +26 -0
  45. data/lib/v8/context.rb +256 -0
  46. data/lib/v8/conversion.rb +36 -0
  47. data/lib/v8/conversion/array.rb +11 -0
  48. data/lib/v8/conversion/class.rb +119 -0
  49. data/lib/v8/conversion/code.rb +38 -0
  50. data/lib/v8/conversion/fixnum.rb +11 -0
  51. data/lib/v8/conversion/fundamental.rb +11 -0
  52. data/lib/v8/conversion/hash.rb +11 -0
  53. data/lib/v8/conversion/indentity.rb +31 -0
  54. data/lib/v8/conversion/method.rb +26 -0
  55. data/lib/v8/conversion/object.rb +28 -0
  56. data/lib/v8/conversion/primitive.rb +7 -0
  57. data/lib/v8/conversion/proc.rb +5 -0
  58. data/lib/v8/conversion/reference.rb +16 -0
  59. data/lib/v8/conversion/string.rb +12 -0
  60. data/lib/v8/conversion/symbol.rb +7 -0
  61. data/lib/v8/conversion/time.rb +13 -0
  62. data/lib/v8/error.rb +169 -0
  63. data/lib/v8/function.rb +28 -0
  64. data/lib/v8/object.rb +79 -0
  65. data/lib/v8/stack.rb +85 -0
  66. data/lib/v8/version.rb +3 -0
  67. data/lib/v8/weak.rb +73 -0
  68. data/spec/c/array_spec.rb +17 -0
  69. data/spec/c/constants_spec.rb +20 -0
  70. data/spec/c/exception_spec.rb +26 -0
  71. data/spec/c/external_spec.rb +9 -0
  72. data/spec/c/function_spec.rb +46 -0
  73. data/spec/c/handles_spec.rb +35 -0
  74. data/spec/c/locker_spec.rb +38 -0
  75. data/spec/c/object_spec.rb +46 -0
  76. data/spec/c/script_spec.rb +28 -0
  77. data/spec/c/string_spec.rb +16 -0
  78. data/spec/c/template_spec.rb +30 -0
  79. data/spec/c/trycatch_spec.rb +51 -0
  80. data/spec/mem/blunt_spec.rb +42 -0
  81. data/spec/redjs_spec.rb +10 -0
  82. data/spec/spec_helper.rb +45 -0
  83. data/spec/threading_spec.rb +64 -0
  84. data/spec/v8/context_spec.rb +19 -0
  85. data/spec/v8/conversion_spec.rb +52 -0
  86. data/spec/v8/error_spec.rb +165 -0
  87. data/spec/v8/function_spec.rb +9 -0
  88. data/spec/v8/object_spec.rb +15 -0
  89. data/thefrontside.png +0 -0
  90. data/therubyracer.gemspec +21 -0
  91. metadata +163 -0
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe V8::Function do
4
+ it "uses the global context if it is invoked with nil as the context" do
5
+ @cxt = V8::Context.new
6
+ @cxt['foo'] = 'bar'
7
+ @cxt.eval('(function() {return this.foo})').methodcall(nil).should eql 'bar'
8
+ end
9
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe V8::Object do
4
+ before do
5
+ @object = V8::Context.new.eval('({foo: "bar", baz: "bang", qux: "qux1"})')
6
+ end
7
+
8
+ it "can list all keys" do
9
+ @object.keys.sort.should eql %w(baz foo qux)
10
+ end
11
+
12
+ it "can list all values" do
13
+ @object.values.sort.should eql %w(bang bar qux1)
14
+ end
15
+ end
Binary file
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/v8/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Charles Lowell"]
6
+ gem.email = ["javascript-and-friends@googlegroups.com"]
7
+ gem.summary = "Embed the V8 JavaScript interpreter into Ruby - Temporary Discourse fork"
8
+ gem.description = "Call JavaScript code and manipulate JavaScript objects from Ruby. Call Ruby code and manipulate Ruby objects from JavaScript."
9
+ gem.homepage = "http://github.com/cowboyd/therubyracer"
10
+
11
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
12
+ gem.files = `git ls-files`.split("\n")
13
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ gem.name = "therubyracer-discourse"
15
+ gem.extensions = ["ext/v8/extconf.rb"]
16
+ gem.require_paths = ["lib", "ext"]
17
+ gem.version = V8::VERSION
18
+
19
+ gem.add_dependency 'ref'
20
+ gem.add_dependency 'libv8', '~> 3.16.14.0'
21
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: therubyracer-discourse
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.12.0
5
+ platform: ruby
6
+ authors:
7
+ - Charles Lowell
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-12-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ref
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: libv8
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 3.16.14.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 3.16.14.0
41
+ description: Call JavaScript code and manipulate JavaScript objects from Ruby. Call
42
+ Ruby code and manipulate Ruby objects from JavaScript.
43
+ email:
44
+ - javascript-and-friends@googlegroups.com
45
+ executables: []
46
+ extensions:
47
+ - ext/v8/extconf.rb
48
+ extra_rdoc_files: []
49
+ files:
50
+ - .gitignore
51
+ - .travis.yml
52
+ - Changelog.md
53
+ - Gemfile
54
+ - README.md
55
+ - Rakefile
56
+ - benchmarks.rb
57
+ - ext/v8/accessor.cc
58
+ - ext/v8/array.cc
59
+ - ext/v8/backref.cc
60
+ - ext/v8/constants.cc
61
+ - ext/v8/constraints.cc
62
+ - ext/v8/context.cc
63
+ - ext/v8/date.cc
64
+ - ext/v8/exception.cc
65
+ - ext/v8/extconf.rb
66
+ - ext/v8/external.cc
67
+ - ext/v8/function.cc
68
+ - ext/v8/gc.cc
69
+ - ext/v8/handles.cc
70
+ - ext/v8/heap.cc
71
+ - ext/v8/init.cc
72
+ - ext/v8/invocation.cc
73
+ - ext/v8/locker.cc
74
+ - ext/v8/message.cc
75
+ - ext/v8/object.cc
76
+ - ext/v8/primitive.cc
77
+ - ext/v8/rr.cc
78
+ - ext/v8/rr.h
79
+ - ext/v8/script.cc
80
+ - ext/v8/signature.cc
81
+ - ext/v8/stack.cc
82
+ - ext/v8/string.cc
83
+ - ext/v8/template.cc
84
+ - ext/v8/trycatch.cc
85
+ - ext/v8/v8.cc
86
+ - ext/v8/value.cc
87
+ - lib/v8.rb
88
+ - lib/v8/access.rb
89
+ - lib/v8/access/indices.rb
90
+ - lib/v8/access/invocation.rb
91
+ - lib/v8/access/names.rb
92
+ - lib/v8/array.rb
93
+ - lib/v8/context.rb
94
+ - lib/v8/conversion.rb
95
+ - lib/v8/conversion/array.rb
96
+ - lib/v8/conversion/class.rb
97
+ - lib/v8/conversion/code.rb
98
+ - lib/v8/conversion/fixnum.rb
99
+ - lib/v8/conversion/fundamental.rb
100
+ - lib/v8/conversion/hash.rb
101
+ - lib/v8/conversion/indentity.rb
102
+ - lib/v8/conversion/method.rb
103
+ - lib/v8/conversion/object.rb
104
+ - lib/v8/conversion/primitive.rb
105
+ - lib/v8/conversion/proc.rb
106
+ - lib/v8/conversion/reference.rb
107
+ - lib/v8/conversion/string.rb
108
+ - lib/v8/conversion/symbol.rb
109
+ - lib/v8/conversion/time.rb
110
+ - lib/v8/error.rb
111
+ - lib/v8/function.rb
112
+ - lib/v8/object.rb
113
+ - lib/v8/stack.rb
114
+ - lib/v8/version.rb
115
+ - lib/v8/weak.rb
116
+ - spec/c/array_spec.rb
117
+ - spec/c/constants_spec.rb
118
+ - spec/c/exception_spec.rb
119
+ - spec/c/external_spec.rb
120
+ - spec/c/function_spec.rb
121
+ - spec/c/handles_spec.rb
122
+ - spec/c/locker_spec.rb
123
+ - spec/c/object_spec.rb
124
+ - spec/c/script_spec.rb
125
+ - spec/c/string_spec.rb
126
+ - spec/c/template_spec.rb
127
+ - spec/c/trycatch_spec.rb
128
+ - spec/mem/blunt_spec.rb
129
+ - spec/redjs_spec.rb
130
+ - spec/spec_helper.rb
131
+ - spec/threading_spec.rb
132
+ - spec/v8/context_spec.rb
133
+ - spec/v8/conversion_spec.rb
134
+ - spec/v8/error_spec.rb
135
+ - spec/v8/function_spec.rb
136
+ - spec/v8/object_spec.rb
137
+ - thefrontside.png
138
+ - therubyracer.gemspec
139
+ homepage: http://github.com/cowboyd/therubyracer
140
+ licenses: []
141
+ metadata: {}
142
+ post_install_message:
143
+ rdoc_options: []
144
+ require_paths:
145
+ - lib
146
+ - ext
147
+ required_ruby_version: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - '>='
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ required_rubygems_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - '>='
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ requirements: []
158
+ rubyforge_project:
159
+ rubygems_version: 2.0.14
160
+ signing_key:
161
+ specification_version: 4
162
+ summary: Embed the V8 JavaScript interpreter into Ruby - Temporary Discourse fork
163
+ test_files: []