middleman-jasmine 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ middleman-jasmine
@@ -0,0 +1 @@
1
+ ruby-1.9.3-p392
@@ -1,3 +1,7 @@
1
+ 0.2.0
2
+ ===
3
+ * Revise so fixtures are served by Rack::Directory
4
+
1
5
  0.1.1
2
6
  ===
3
7
  Rename lib/middleman/jasmine.rb to lib/middleman-jasmine.rb per the middleman extension convention.
@@ -12,10 +12,12 @@ module Middleman
12
12
  yield options if block_given?
13
13
 
14
14
  app.map(options.jasmine_url) { run ::JasmineSprocketsProxy.new }
15
- jasmine_asset_folders(options.fixtures_dir).each do |item|
15
+ jasmine_asset_folders.each do |item|
16
16
  app.map("/#{item}") { run ::JasmineSprocketsProxy.new(item) }
17
17
  end
18
18
 
19
+ app.map("/#{options.fixtures_dir}") { run Rack::Directory.new(options.fixtures_dir) }
20
+
19
21
  app.after_configuration do
20
22
  ::JasmineSprocketsProxy.configure(sprockets)
21
23
  end
@@ -23,9 +25,9 @@ module Middleman
23
25
 
24
26
  private
25
27
 
26
- def jasmine_asset_folders(fixtures_dir)
28
+ def jasmine_asset_folders
27
29
  [
28
- "__jasmine__", "__boot__", "__spec__", fixtures_dir
30
+ "__jasmine__", "__boot__", "__spec__"
29
31
  ]
30
32
  end
31
33
 
@@ -12,7 +12,7 @@ class JasmineSprocketsProxy
12
12
 
13
13
  def configure(middleman_sprockets)
14
14
  Jasmine.load_configuration_from_yaml
15
- @@jasmine_app = Jasmine::Application.app(Jasmine.config)
15
+ @@jasmine_app = Jasmine::Application.app(Jasmine.config)
16
16
  @@sprockets_app =
17
17
  if defined?(::Sprockets::Environment)
18
18
  sprockets = ::Sprockets::Environment.new
@@ -27,7 +27,7 @@ class JasmineSprocketsProxy
27
27
  end
28
28
  end
29
29
 
30
- def initialize(path="", js_dir="")
30
+ def initialize(path="")
31
31
  @path = path
32
32
  @app =
33
33
  if setup_for_spec_files?
@@ -49,7 +49,7 @@ class JasmineSprocketsProxy
49
49
  end
50
50
 
51
51
  def serving_spec_via_sprockets?
52
- setup_for_spec_files? && defined?(@@sprockets_app)
52
+ setup_for_spec_files? && defined?(::Sprockets::Environment)
53
53
  end
54
54
  end
55
55
 
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Jasmine
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-24 00:00:00.000000000 Z
12
+ date: 2013-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jasmine
@@ -83,6 +83,8 @@ extensions: []
83
83
  extra_rdoc_files: []
84
84
  files:
85
85
  - .gitignore
86
+ - .ruby-gemset
87
+ - .ruby-version
86
88
  - CHANGELOG.md
87
89
  - Gemfile
88
90
  - LICENSE.txt
@@ -109,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
111
  version: '0'
110
112
  segments:
111
113
  - 0
112
- hash: 2212232444352486272
114
+ hash: 3442106385098623500
113
115
  required_rubygems_version: !ruby/object:Gem::Requirement
114
116
  none: false
115
117
  requirements:
@@ -118,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
120
  version: '0'
119
121
  segments:
120
122
  - 0
121
- hash: 2212232444352486272
123
+ hash: 3442106385098623500
122
124
  requirements: []
123
125
  rubyforge_project:
124
126
  rubygems_version: 1.8.25