opal-cj 0.7.0.beta1 → 0.7.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb58bde563ad0bc20ce86bbd77e4a7bff7aba0cf
4
- data.tar.gz: eb0bc6d2676c0aa83aa271b6c619df7fa9a9c3d2
3
+ metadata.gz: eb2973ee564bb9b4596674853843da748da3a01c
4
+ data.tar.gz: 854ecb9072a230fe3fa74458e4a3584f169af22e
5
5
  SHA512:
6
- metadata.gz: 15a9786881b385f168d110728361cb64077300ae4e517eab09d887e5160db1c16b4df3dad76cd98647325c88ce23c0c7bc4edb83b8304fdc9851b2477cb0c378
7
- data.tar.gz: eb73a43fc98d01f54b44663a7c1e63fa624ec6ffe4bed7fa4f02b63898be3e9cdad7d6fec21fdd0363e9a17c20e875b7a7a8a6c06de563111d658f31acd12b7b
6
+ metadata.gz: c1b1b5f52695d7f10cb506084430bd5dfcf9b98c85cca18a7d40bf9780324a7852874844a724e8736db9b8f5b07c18fa31946bf7f171c33f25976e58e8062b7e
7
+ data.tar.gz: e35c34b07f47e5d0a67480bc767fb54a0945868b1b1725f401d57ef0698fd0f800b600c1b67a57524e04f2a0536d3b70c92e4f7be2e1e29e06c989207a6c745c
@@ -0,0 +1,19 @@
1
+ # files:
2
+ # # define files included in the analysis (defaults to ["{app,lib}/**/*.rb"])
3
+ # included:
4
+ # - plugins/**/*.rb
5
+ # # define files excluded from the analysis (defaults to [])
6
+ # excluded:
7
+ # # you can use file paths
8
+ # - plugins/vendor/sparkr/sparkr.rb
9
+ # # or globs
10
+ # - plugins/vendor/**/*.rb
11
+ # # or regular expressions
12
+ # - !ruby/regexp /vendor/
13
+
14
+
15
+ files:
16
+ included:
17
+ - lib/**/*.rb
18
+ excluded:
19
+ - lib/opal/parser/grammar.rb
data/README.md CHANGED
@@ -11,9 +11,9 @@ Opal is [hosted on github](http://github.com/opal/opal), and there
11
11
  is a Freenode IRC channel at [#opal](http://webchat.freenode.net/?channels=opal),
12
12
  ask questions on [stackoverflow (tag #opalrb)](http://stackoverflow.com/questions/ask?tags=opalrb).
13
13
 
14
- [![Stack Overflow](http://img.shields.io/badge/stackoverflow-%23opalrb-orange.svg?style=flat)](http://stackoverflow.com/questions/ask?tags=opalrb)
15
- [![API doc](http://img.shields.io/badge/doc-api-blue.svg?style=flat)](http://opalrb.org/docs/api)
14
+ [![Inline docs](http://inch-ci.org/github/opal/opal.svg?branch=master&style=flat)](http://opalrb.org/docs/api)
16
15
  [![Gitter chat](http://img.shields.io/badge/gitter-opal%2Fopal-009966.svg?style=flat)](https://gitter.im/opal/opal)
16
+ [![Stack Overflow](http://img.shields.io/badge/stackoverflow-%23opalrb-orange.svg?style=flat)](http://stackoverflow.com/questions/ask?tags=opalrb)
17
17
 
18
18
 
19
19
 
data/bin/opal CHANGED
@@ -12,7 +12,11 @@ rescue OptionParser::InvalidOption => e
12
12
  end
13
13
 
14
14
  require 'opal/cli'
15
- cli = Opal::CLI.new options.options.merge(:file => ARGF.file, :argv => ARGV.dup)
15
+ cli = Opal::CLI.new options.options.merge(
16
+ file: ARGF.file,
17
+ filename: ARGF.filename,
18
+ argv: ARGV.dup
19
+ )
16
20
 
17
21
  begin
18
22
  cli.run
@@ -6,7 +6,8 @@ require 'opal/cli_runners'
6
6
  module Opal
7
7
  class CLI
8
8
  attr_reader :options, :file, :compiler_options, :evals, :load_paths, :argv,
9
- :output, :requires, :gems, :stubs, :verbose, :port, :preload
9
+ :output, :requires, :gems, :stubs, :verbose, :port, :preload,
10
+ :filename
10
11
 
11
12
  def compile?
12
13
  @compile
@@ -44,6 +45,7 @@ module Opal
44
45
  @preload = options.delete(:preload) || []
45
46
  @output = options.delete(:output) || self.class.stdout || $stdout
46
47
  @verbose = options.fetch(:verbose, false); options.delete(:verbose)
48
+ @filename = options.fetch(:filename) { @file && @file.path }; options.delete(:filename)
47
49
  @skip_opal_require = options.delete(:skip_opal_require)
48
50
  @compiler_options = Hash[
49
51
  *processor_option_names.map do |option|
@@ -97,8 +99,8 @@ module Opal
97
99
  if evals.any?
98
100
  builder.build_str(evals.join("\n"), '-e')
99
101
  else
100
- if file and (file.path != '-' or evals.empty?)
101
- builder.build_str(file.read, file.path)
102
+ if file and (filename != '-' or evals.empty?)
103
+ builder.build_str(file.read, filename)
102
104
  end
103
105
  end
104
106
 
@@ -1,3 +1,3 @@
1
1
  module Opal
2
- VERSION = '0.7.0.beta1'
2
+ VERSION = '0.7.0.beta2'
3
3
  end
@@ -23,7 +23,6 @@ Gem::Specification.new do |s|
23
23
  s.add_dependency 'sourcemap', '~> 0.1.0'
24
24
  s.add_dependency 'sprockets', '>= 2.2.1', '< 4.0.0'
25
25
  s.add_dependency 'hike', '~> 1.2'
26
- s.add_dependency 'tilt', '~> 1.4'
27
26
 
28
27
  s.add_development_dependency 'mspec', '1.5.20'
29
28
  s.add_development_dependency 'rake'
@@ -66,12 +66,17 @@ class Regexp
66
66
 
67
67
  if (result) {
68
68
  #{$~ = MatchData.new(`re`, `result`)};
69
+
70
+ for (var i = 1, ii = result.length; i < ii; i++) {
71
+ $opal.gvars[String(i)] = result[i];
72
+ }
73
+
74
+ return result.index;
69
75
  }
70
76
  else {
71
77
  #{$~ = $` = $' = nil};
78
+ return nil;
72
79
  }
73
-
74
- return result ? result.index : nil;
75
80
  }
76
81
  end
77
82
 
@@ -1048,8 +1048,7 @@
1048
1048
  require_table = {'corelib/runtime.js': true},
1049
1049
  modules = {};
1050
1050
 
1051
- var current_dir = '.',
1052
- current_file = '.';
1051
+ var current_dir = '.';
1053
1052
 
1054
1053
  function mark_as_loaded(filename) {
1055
1054
  if (require_table[filename]) {
@@ -1085,12 +1084,7 @@
1085
1084
  var module = modules[path];
1086
1085
 
1087
1086
  if (module) {
1088
- var tmp = current_file;
1089
- current_file = path;
1090
-
1091
1087
  module(Opal);
1092
-
1093
- current_file = tmp;
1094
1088
  }
1095
1089
  else {
1096
1090
  var severity = Opal.dynamic_require_severity || 'warning';
@@ -1123,8 +1117,6 @@
1123
1117
 
1124
1118
  Opal.load = load;
1125
1119
  Opal.require = require;
1126
-
1127
- Opal.current_file = current_file;
1128
1120
  })(Opal);
1129
1121
 
1130
1122
  // Initialization
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-cj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.beta1
4
+ version: 0.7.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Beynon
@@ -58,20 +58,6 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.2'
61
- - !ruby/object:Gem::Dependency
62
- name: tilt
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '1.4'
68
- type: :runtime
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '1.4'
75
61
  - !ruby/object:Gem::Dependency
76
62
  name: mspec
77
63
  requirement: !ruby/object:Gem::Requirement
@@ -196,6 +182,7 @@ extra_rdoc_files: []
196
182
  files:
197
183
  - ".gitignore"
198
184
  - ".gitmodules"
185
+ - ".inch.yml"
199
186
  - ".rspec"
200
187
  - ".spectator"
201
188
  - ".spectator-mspec"