snapdragon 0.1.8 → 0.1.9

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: a6d78f2da8672ee4c5b730303dd01e410f84ca7a
4
- data.tar.gz: 0091e72884bc05dfb0add07e0d4be746779c84f9
3
+ metadata.gz: fbdd1c01780d6cf840d1c324b4b410b3c624064b
4
+ data.tar.gz: 469c7ba58f97d16cd7962a59553c83a8341067c8
5
5
  SHA512:
6
- metadata.gz: 1075c83b6c3962494c0f1aa6e109ba69754c0fa1a6558765b65fd3e951e8a995cb60caad22cfbfeee277feba147fcce4c7cc2812b0b69ee921c4bbd508c205f5
7
- data.tar.gz: cc86d0894d8f30304c454c24d797c9688da3d89ebad9f42d3c4cfb69e2fa502349730fbcf9012b3b7c9df86549c557f5ae6ad67c2d5f79a7809b5fbb864cbcd4
6
+ metadata.gz: c439d1a2fac54d154883624364f85e6cd39f283841ab0b4f9c1a090741b7ee1e3acff83b723d21f1fcf29b89d97fbb26fd35f2a03aad053e431f96fb40e94508
7
+ data.tar.gz: 16403dfa69ed351d35ddf21f633f2fa854e9084d56689d70c2af3fc41993ebed8a8bdbf3186ff36c985dcceaa5016aee6ce5cdc864ed83c71308dc74591dca41
@@ -6,6 +6,13 @@ versions as well as provide a rough history.
6
6
 
7
7
  #### Next Release
8
8
 
9
+ #### v0.1.9
10
+
11
+ * fixed bug preventing require\_relatives with no tailing whitespace from being
12
+ detected ([\#20](http://github.com/reachlocal/snapdragon/issues/20))
13
+ * eliminated duplicate requires
14
+ ([\#17](http://github.com/reachlocal/snapdragon/issues/17))
15
+
9
16
  #### v0.1.8
10
17
 
11
18
  * removed debug puts statements that were left in
@@ -1,2 +1,3 @@
1
1
  // require_relative('src/hoopty.js')
2
2
  // require_relative('./src/hoopty.js')
3
+ // require_relative('./src/jack.js')
File without changes
@@ -18,7 +18,7 @@ module Snapdragon
18
18
  require_paths = []
19
19
 
20
20
  lines.each do |line|
21
- if line =~ /\/\/+\s+require_relative\(['"](.+)['"]\)\s+$/
21
+ if line =~ /\/\/+\s+require_relative\(['"](.+)['"]\).*$/
22
22
  require_paths << ::File.join(::File.dirname(@path.path), $1)
23
23
  end
24
24
  end
@@ -41,5 +41,8 @@ end
41
41
  # into file_base.rb and it seemed to resolve it.
42
42
  module Snapdragon
43
43
  class RequireFile < Snapdragon::FileBase
44
+ def absolute_path
45
+ @path.absolute_path()
46
+ end
44
47
  end
45
48
  end
@@ -32,6 +32,10 @@ module Snapdragon
32
32
  return false
33
33
  end
34
34
 
35
+ def absolute_path
36
+ File.expand_path(@path)
37
+ end
38
+
35
39
  private
36
40
 
37
41
  def is_a_directory?
@@ -23,8 +23,12 @@ module Snapdragon
23
23
 
24
24
  def require_file_relative_url_paths
25
25
  paths = Set.new
26
+ absolute_paths = []
26
27
  require_files.each do |file|
27
- paths << file.relative_url_path
28
+ if !absolute_paths.include?(file.absolute_path)
29
+ absolute_paths << file.absolute_path
30
+ paths << file.relative_url_path
31
+ end
28
32
  end
29
33
  return paths
30
34
  end
@@ -1,3 +1,3 @@
1
1
  module Snapdragon
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapdragon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew De Ponte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-28 00:00:00.000000000 Z
11
+ date: 2013-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -135,6 +135,7 @@ files:
135
135
  - example/spec/hoopty_spec.js
136
136
  - example/spec_helper.js
137
137
  - example/src/hoopty.js
138
+ - example/src/jack.js
138
139
  - lib/snapdragon.rb
139
140
  - lib/snapdragon/cli_application.rb
140
141
  - lib/snapdragon/file_base.rb