rails-backbone-generator 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjYyZWY0N2NlZDllMTM5OWJjYTZmZDNlNGU5MjY5MTAzMjczN2RkOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjBkNzM4NDhlYWRlMjBmZmU5Y2M2M2JmYjhlYjJkMTYzZGIwMDY4ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDUwYzU5ZGY2ZmE2MWNmZmNkNjAxNTljZTM2MTBjNDQ5OGFkMTE3OGZkZTcz
|
10
|
+
YWQwNGY2MTM3YWYyY2EyYmI3NWVlODM0ZTZjYjIyMWViNTJhODI1MjIzMWU3
|
11
|
+
ZGNlOWZkNDE2MmI5NzdjNDg3NTc2NTY0NTM2YjhjMzI0NTBkYWM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2IyMTYxMDcyZDI5ZGNmZDY3ZTI3MWY2ZGZiYTQ5MTkyYTY0ZGU0NDJjYTQ3
|
14
|
+
NmM4OWExMjMzOTY4MDU3YTRkZjhiOTBmYzJiMGViNWNlMWNiMmY3NjlhZTg3
|
15
|
+
ZWVkYjkzYmQ1ZDQ4MGZiZTFhNjNkYTVmMjFjYWNmMjQ5OWU4ZWM=
|
@@ -4,22 +4,22 @@
|
|
4
4
|
# Run JS and CoffeeScript files in a typical Rails 3.1 fashion, placing Underscore templates in app/views/*.jst
|
5
5
|
# Your spec files end with _spec.{js,coffee}.
|
6
6
|
|
7
|
-
|
7
|
+
jasmine_spec_location = "spec/javascripts/%s_spec"
|
8
8
|
|
9
9
|
|
10
10
|
guard 'jasmine-headless-webkit' do
|
11
11
|
watch(%r{^app/views/.*\.jst$})
|
12
12
|
|
13
13
|
# Run All
|
14
|
-
watch(%r{^spec/javascripts/factories\..*})
|
15
|
-
watch(%r{^spec/javascripts/helpers(.*)\.(js|coffee)$})
|
16
|
-
watch(%r{^app/assets/javascripts/([^/]*)\.(js|coffee)$})
|
17
|
-
watch(%r{^app/assets/javascripts/fixtures(.*)\.(js|coffee)$}) {
|
14
|
+
watch(%r{^spec/javascripts/factories\..*}) { jasmine_spec_location }
|
15
|
+
watch(%r{^spec/javascripts/helpers(.*)\.(js|coffee)$}) { jasmine_spec_location }
|
16
|
+
watch(%r{^app/assets/javascripts/([^/]*)\.(js|coffee)$}) { jasmine_spec_location }
|
17
|
+
watch(%r{^app/assets/javascripts/fixtures(.*)\.(js|coffee)$}) { jasmine_spec_location }
|
18
18
|
|
19
19
|
# Single Spec
|
20
|
-
watch(%r{^public/javascripts/(.*)\.js$})
|
21
|
-
watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) { |m| newest_js_file(
|
22
|
-
watch(%r{^spec/javascripts/(.*)_spec\..*})
|
20
|
+
watch(%r{^public/javascripts/(.*)\.js$}) { |m| newest_js_file("spec/javascripts/#{m[1]}_spec") }
|
21
|
+
watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) { |m| newest_js_file("spec/javascripts/#{m[1]}_spec") }
|
22
|
+
watch(%r{^spec/javascripts/(.*)_spec\..*}) { |m| newest_js_file("spec/javascripts/#{m[1]}_spec") }
|
23
23
|
end
|
24
24
|
|
25
25
|
|
@@ -2,16 +2,21 @@ beforeEach ->
|
|
2
2
|
@addMatchers toBeEmpty: ->
|
3
3
|
@message = -> "Expected #{_(@actual).value().constructor.name} to be empty"
|
4
4
|
_(@actual).isEmpty()
|
5
|
-
|
5
|
+
|
6
6
|
@addMatchers toBeA: (expected) ->
|
7
|
-
|
8
|
-
value
|
9
|
-
|
7
|
+
value = _(@actual).value()
|
8
|
+
@message = -> "Expected #{value.constructor.name} to be a #{expected.name}"
|
9
|
+
switch expected # handle inconsistent instanceof interface
|
10
|
+
when String then value.constructor.name == "String"
|
11
|
+
when Number then value.constructor.name == "Number"
|
12
|
+
else value instanceof expected
|
13
|
+
|
10
14
|
@addMatchers toBeValid: () ->
|
11
15
|
@message = -> "Expected #{_(@actual).value().constructor.name} to be valid"
|
12
16
|
@actual.isValid()
|
13
|
-
|
17
|
+
|
14
18
|
# Non-recursive version of toContain()
|
15
19
|
@addMatchers toInclude: (expected) ->
|
16
20
|
@message = -> "Expected the collection to include #{_(@actual).value().constructor.name}"
|
17
21
|
_(@actual).include(expected)
|
22
|
+
|