snapdragon 0.1.3 → 0.1.4

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: 27cb554944cd311cbc4ab1adfe78e93163c3565a
4
- data.tar.gz: 3987c088e89ee869591d667db9d3440daf085e9c
3
+ metadata.gz: 38b1616c053d2ad9d7528ef069daac831c23c7a9
4
+ data.tar.gz: 4b374604e2ea68df9a7a127608eddc783690a91e
5
5
  SHA512:
6
- metadata.gz: d7231b197e606c5192231b1ab9180cd496f25e96d67ab31101b043b3922885a5861235a061bbba6eafc6bcfd72de23186d3a7d6faf0d351f27e66b94da00c6c3
7
- data.tar.gz: 589cc5e56b9871f11da738bdcf89f1a99b9b4e80fbb5e5e8aa1ce540ec37740c87c6397b2535adccf542f519ffa098f3565a25d19b45a05f505fe5f3514a69be
6
+ metadata.gz: fc4ae14e6216dcc06b19ea34e9241ad012ba5db2eb80601d581f6631ec48f584f100d4857d9520ff77b6fa2ad479cb644e955b5324293d6a12ec8f48a280f410
7
+ data.tar.gz: b84cd200dffd153d9309d287f2dafac00a891e165936b843ac398e8aca9ce3aa7b01181fc16a4438c85b296fa716d63b29cc98e2e504842ca5338633dd3a7d9f
@@ -56,15 +56,27 @@ module Snapdragon
56
56
  end
57
57
 
58
58
  def is_a_file_path_and_line_number?(arguement)
59
- arguement =~ /^[\w\/\-\d]+[s|S]pec\.js:\d+$/
59
+ if arguement =~ /^[\w\/\-\d\.]+[s|S]pec\.js:\d+$/
60
+ return true
61
+ else
62
+ return false
63
+ end
60
64
  end
61
65
 
62
66
  def is_a_file_path?(arguement)
63
- arguement =~ /^[\w\/\-\d]+[s|S]pec\.js$/
67
+ if arguement =~ /^[\w\/\-\d\.]+[s|S]pec\.js$/
68
+ return true
69
+ else
70
+ return false
71
+ end
64
72
  end
65
73
 
66
74
  def is_a_directory?(arguement)
67
- arguement =~ /^[\w\/\-\d]+$/
75
+ if arguement =~ /^[\w\/\-\d\.]+$/
76
+ return true
77
+ else
78
+ return false
79
+ end
68
80
  end
69
81
 
70
82
  def run_suite
@@ -6,14 +6,14 @@ module Snapdragon
6
6
  end
7
7
 
8
8
  def read
9
- f = File.open(@path, 'r')
9
+ f = File.open(File.expand_path(@path), 'r')
10
10
  content = f.read
11
11
  f.close
12
12
  return content
13
13
  end
14
14
 
15
15
  def require_paths
16
- f = File.open(@path, 'r')
16
+ f = File.open(File.expand_path(@path), 'r')
17
17
  lines = f.readlines
18
18
  f.close
19
19
 
@@ -41,7 +41,7 @@ module Snapdragon
41
41
  initial_line_number = @line_number
42
42
  initial_line_index = initial_line_number - 1
43
43
 
44
- f = open(@path, 'r')
44
+ f = open(File.expand_path(@path), 'r')
45
45
  lines = f.readlines
46
46
  f.close
47
47
 
@@ -27,12 +27,15 @@ module Snapdragon
27
27
  end
28
28
 
29
29
  def output_spec_dependencies
30
- require_content = ""
30
+ require_content = "// output spec dependencies begin here\n\n"
31
31
  @require_paths.each do |require_path|
32
+ require_content << "\n\n// #{require_path} begins here\n"
32
33
  f = File.open(require_path, 'r')
33
34
  require_content << f.read
35
+ require_content << "\n// #{require_path} ends here\n\n"
34
36
  f.close
35
37
  end
38
+ require_content << "\n// output spec dependencies end here\n"
36
39
  return require_content
37
40
  end
38
41
 
@@ -1,3 +1,3 @@
1
1
  module Snapdragon
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -5,15 +5,15 @@
5
5
  <script type="text/javascript" src="/resources/ConsoleReporter.js"></script>
6
6
 
7
7
  <script type="text/javascript">
8
- // The implementation code the spec files being tested need
9
- <%= @suite.output_spec_dependencies %>
8
+ // The implementation code the spec files being tested need
9
+ <%= @suite.output_spec_dependencies %>
10
10
  </script>
11
11
 
12
12
  <script type="text/javascript">
13
- // The spec file contents
14
- <% @suite.spec_files.each do |spec| %>
15
- <%= spec.read %>
16
- <% end %>
13
+ // The spec file contents
14
+ <% @suite.spec_files.each do |spec| %>
15
+ <%= spec.read %>
16
+ <% end %>
17
17
  </script>
18
18
 
19
19
  <script type="text/javascript">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapdragon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew De Ponte