include_js 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # IncludeJS
2
2
 
3
- This is an experiment to see if we can use CommonJS Modules inside Ruby.
3
+ Load CommonJS Modules into Ruby.
4
4
 
5
5
  Currently it supports the [CommonJS Modules 1.0 spec](http://www.commonjs.org/specs/modules/1.0/).
6
6
 
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.authors = ["Andreas Haller", "Thorben Schröder"]
12
12
  s.email = ["andreashaller@gmail.com"]
13
13
  s.homepage = "https://github.com/ahx/include_js"
14
- s.summary = %q{CommonJS Modules in Ruby}
15
- s.description = %q{Use CommonJS Modules inside Ruby via therubyracer}
14
+ s.summary = %q{Load CommonJS Modules into Ruby}
15
+ s.description = %q{Load CommonJS Modules into Ruby via therubyracer}
16
16
 
17
17
  s.rubyforge_project = "include_js"
18
18
 
@@ -43,7 +43,7 @@ module IncludeJS
43
43
  exports = @modules[path] = @engine['Object'].new
44
44
  require_fn = lambda { |module_id| load_module(module_id, globals, path) }
45
45
 
46
- context = @engine.eval("(function(exports, require){ #{File.read(path)}})")
46
+ context = @engine.eval("(function(exports, require){ #{File.read(path)}})", path)
47
47
  context.call(exports, require_fn)
48
48
  exports
49
49
  end
@@ -1,3 +1,3 @@
1
1
  module IncludeJS
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 0
8
7
  - 1
9
- version: 0.0.1
8
+ - 0
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andreas Haller
@@ -48,7 +48,7 @@ dependencies:
48
48
  version: 2.6.0
49
49
  type: :development
50
50
  version_requirements: *id002
51
- description: Use CommonJS Modules inside Ruby via therubyracer
51
+ description: Load CommonJS Modules into Ruby via therubyracer
52
52
  email:
53
53
  - andreashaller@gmail.com
54
54
  executables: []
@@ -103,7 +103,7 @@ rubyforge_project: include_js
103
103
  rubygems_version: 1.3.7
104
104
  signing_key:
105
105
  specification_version: 3
106
- summary: CommonJS Modules in Ruby
106
+ summary: Load CommonJS Modules into Ruby
107
107
  test_files:
108
108
  - spec/include_js_spec.rb
109
109
  - spec/modules_spec.rb