include_js 0.0.1 → 0.1.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.
- data/Readme.md +1 -1
 - data/include_js.gemspec +2 -2
 - data/lib/include_js.rb +1 -1
 - data/lib/include_js/version.rb +1 -1
 - metadata +4 -4
 
    
        data/Readme.md
    CHANGED
    
    
    
        data/include_js.gemspec
    CHANGED
    
    | 
         @@ -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  
     | 
| 
       15 
     | 
    
         
            -
              s.description = %q{ 
     | 
| 
      
 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 
     | 
    
         | 
    
        data/lib/include_js.rb
    CHANGED
    
    | 
         @@ -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
         
     | 
    
        data/lib/include_js/version.rb
    CHANGED
    
    
    
        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 
     | 
    
         
            -
               
     | 
| 
      
 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:  
     | 
| 
      
 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  
     | 
| 
      
 106 
     | 
    
         
            +
            summary: Load CommonJS Modules into Ruby
         
     | 
| 
       107 
107 
     | 
    
         
             
            test_files: 
         
     | 
| 
       108 
108 
     | 
    
         
             
            - spec/include_js_spec.rb
         
     | 
| 
       109 
109 
     | 
    
         
             
            - spec/modules_spec.rb
         
     |