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
- Y2NlZThiYzI4NzNjMGU2NjRkNmRlZjM4ZDEzNDM3Yzc1NWZmNDQxNQ==
4
+ ZjYyZWY0N2NlZDllMTM5OWJjYTZmZDNlNGU5MjY5MTAzMjczN2RkOA==
5
5
  data.tar.gz: !binary |-
6
- YjMyM2NhYWRkODE2MmY2Mjc3Yzc5ZTM2MWI1ZWJlMDNmMjQ5ZDA0OQ==
6
+ ZjBkNzM4NDhlYWRlMjBmZmU5Y2M2M2JmYjhlYjJkMTYzZGIwMDY4ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTI2YzQ5MjRiNzkyYTAyYzM3YzU2NWExMGU0OTIyZjM5ODQ3ODNhNzQzNWEx
10
- NDE1ZGU5M2JiZDZkZmE0N2IxZmQ5MTAzMzNhYjFhMzIwYTVhNTVhMmVmYTU1
11
- NWM0YmJjNzkwOTdiMzhiMTEwMzAyNTdmZGE2OGYwZGVhYTAwYTE=
9
+ ZDUwYzU5ZGY2ZmE2MWNmZmNkNjAxNTljZTM2MTBjNDQ5OGFkMTE3OGZkZTcz
10
+ YWQwNGY2MTM3YWYyY2EyYmI3NWVlODM0ZTZjYjIyMWViNTJhODI1MjIzMWU3
11
+ ZGNlOWZkNDE2MmI5NzdjNDg3NTc2NTY0NTM2YjhjMzI0NTBkYWM=
12
12
  data.tar.gz: !binary |-
13
- M2UwYjJkNTMxZWViODMwZGVjMzE3Yzk2OWVkY2U0ZjI5Y2QzNWM0NzhlNzE3
14
- ZjM5ODg0OTAxZGViMGVlMDdlOGIwZjU5NWI4NGM5MGUzOTYzYTlhNGJiMzQ4
15
- NTk0MDE1NDJhNTBhZTJhZDRmZmJjOGNmZWM0Y2Q5OWNkNzhmNzA=
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
- spec_location = "spec/javascripts/%s_spec"
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\..*}) { spec_location }
15
- watch(%r{^spec/javascripts/helpers(.*)\.(js|coffee)$}) { spec_location }
16
- watch(%r{^app/assets/javascripts/([^/]*)\.(js|coffee)$}) { spec_location }
17
- watch(%r{^app/assets/javascripts/fixtures(.*)\.(js|coffee)$}) { spec_location }
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$}) { |m| newest_js_file(spec_location % m[1]) }
21
- watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)$}) { |m| newest_js_file(spec_location % m[1]) }
22
- watch(%r{^spec/javascripts/(.*)_spec\..*}) { |m| newest_js_file(spec_location % m[1]) }
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
- @message = -> "Expected #{_(@actual).value().constructor.name} to be a #{expected.name}"
8
- value instanceof expected
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
+
@@ -1,3 +1,3 @@
1
1
  module RailsBackboneGenerator
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-backbone-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chip Miller