middleman-jasmine 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ N2VjZjM4Y2I0ZjUyODFiYjQwMmQ1YTkyYzA4ZDc2NTNhNzEyMmJjYw==
5
+ data.tar.gz: !binary |-
6
+ YmQ2MTM0NzE1YTU3NDg3YTczODg5MzM0N2U3ODg5OGQ4YjYxNWFjMA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NTk4NmZlZGNmNDU0MzBlNTQ5NzkyZGIzZmJhOGU3OGZiNGNkZjBlNmM0MmM2
10
+ NmI1MmNmYzY3NDQzNTY3MmM0ODdmZDk5OGQzMTAwODhjMWQ0YmZhZDExMzEz
11
+ NWNmYjk3YWVkNTJiNTQ5OGY1MGUyNzI0ZjRmOTMwNmRkZGY2Mjc=
12
+ data.tar.gz: !binary |-
13
+ YzlhMGVhYjM3MDkwZWIyZGMxNDYzMGFlNzFhM2Q3ZmQ0ZWFiOWVjMjgwZWQ0
14
+ ZWMwZGZhZjA1YzQwMTk4YzQ4N2Y3NGJmNmZmZjcxMTY2MjQ3M2UxZTFhNDNm
15
+ NGFjODZhYTZkMTEzYTE0MDA0NDFiNWE0ZWQ0YWVjMWRkODk4ZmQ=
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.3.0
2
+ ===
3
+ * Add config_file option for specifying jasmine config file [byteio, mrship]
4
+
1
5
  0.2.0
2
6
  ===
3
7
  * Revise so fixtures are served by Rack::Directory
data/README.md CHANGED
@@ -45,7 +45,7 @@ end
45
45
 
46
46
  To configure the extension, use:
47
47
  ```
48
- activate :jasmine, fixtures_dir: "spec/javascripts/fixtures", jasmine_url: "/jasmine"
48
+ activate :jasmine, fixtures_dir: "spec/javascripts/fixtures", jasmine_url: "/jasmine", config_file: "spec/config.yml"
49
49
  ```
50
50
 
51
51
  ## Contributing
@@ -19,7 +19,7 @@ module Middleman
19
19
  app.map("/#{options.fixtures_dir}") { run Rack::Directory.new(options.fixtures_dir) }
20
20
 
21
21
  app.after_configuration do
22
- ::JasmineSprocketsProxy.configure(sprockets)
22
+ ::JasmineSprocketsProxy.configure(sprockets, options.config_file)
23
23
  end
24
24
  end
25
25
 
@@ -34,7 +34,8 @@ module Middleman
34
34
  def default_options
35
35
  {
36
36
  jasmine_url: "/jasmine",
37
- fixtures_dir: "spec/javascripts/fixtures"
37
+ fixtures_dir: "spec/javascripts/fixtures",
38
+ config_file: nil
38
39
  }
39
40
  end
40
41
  alias :included :registered
@@ -46,4 +47,4 @@ module Middleman
46
47
  end
47
48
  end
48
49
  end
49
- end
50
+ end
@@ -10,8 +10,9 @@ class JasmineSprocketsProxy
10
10
  @@sprockets_app
11
11
  end
12
12
 
13
- def configure(middleman_sprockets)
14
- Jasmine.load_configuration_from_yaml
13
+ def configure(middleman_sprockets, config_file = nil)
14
+ raise "Config file not found" unless valid_config_file?(config_file)
15
+ Jasmine.load_configuration_from_yaml(config_file)
15
16
  @@jasmine_app = Jasmine::Application.app(Jasmine.config)
16
17
  @@sprockets_app =
17
18
  if defined?(::Sprockets::Environment)
@@ -25,6 +26,13 @@ class JasmineSprocketsProxy
25
26
  @@jasmine_app
26
27
  end
27
28
  end
29
+
30
+ private
31
+
32
+ def valid_config_file?(config_file)
33
+ return true if config_file.nil?
34
+ File.exist?(config_file)
35
+ end
28
36
  end
29
37
 
30
38
  def initialize(path="")
@@ -67,4 +75,4 @@ module Rack
67
75
  end
68
76
  end
69
77
  end
70
- end
78
+ end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Jasmine
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Andy Shipman
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-15 00:00:00.000000000 Z
11
+ date: 2014-01-17 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: jasmine
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: middleman-core
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -99,32 +90,25 @@ files:
99
90
  homepage: ''
100
91
  licenses:
101
92
  - MIT
93
+ metadata: {}
102
94
  post_install_message:
103
95
  rdoc_options: []
104
96
  require_paths:
105
97
  - lib
106
98
  required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
99
  requirements:
109
100
  - - ! '>='
110
101
  - !ruby/object:Gem::Version
111
102
  version: '0'
112
- segments:
113
- - 0
114
- hash: 3442106385098623500
115
103
  required_rubygems_version: !ruby/object:Gem::Requirement
116
- none: false
117
104
  requirements:
118
105
  - - ! '>='
119
106
  - !ruby/object:Gem::Version
120
107
  version: '0'
121
- segments:
122
- - 0
123
- hash: 3442106385098623500
124
108
  requirements: []
125
109
  rubyforge_project:
126
- rubygems_version: 1.8.25
110
+ rubygems_version: 2.1.11
127
111
  signing_key:
128
- specification_version: 3
112
+ specification_version: 4
129
113
  summary: Integrates Jasmine into a Middleman app. Optional support for Sprockets.
130
114
  test_files: []