sprockets-commoner 0.2.5 → 0.2.6

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: bbaa88de72105eb7d82b4a4890d6b547c75fd947
4
- data.tar.gz: 0e38c76ab293522ee03b282079a78d02894580e1
3
+ metadata.gz: 0a0a84452c05ed777c7b89eca0ef2e11ed7bc4b5
4
+ data.tar.gz: 3d8d01b3dda3771950042c5a6a35b7866627ab42
5
5
  SHA512:
6
- metadata.gz: ab19b21e6290a60211999b5301be7286625a2986bf1bad92703c1dd63d35f3a69296795e05946b9b7963e3aed6c4de47d4fb00d4c3aca53de7afc9cb6d4d1caa
7
- data.tar.gz: 310e70462f4b8012879e20868b7b258fcb8c8fa137f658730ed06b2bd48ae43e219d17124ac4900533bb2474664a5c37936cf92b8a6a7e72ba75a98575fbc8e0
6
+ metadata.gz: f69e792d8176b06b52a69be2cbab2c58b8fa5afec7ada52f2f7c7cfc1e439f257b01c57c8060dd1aa49b353341d2806458c529d3f91eb0661adfd01240f994b8
7
+ data.tar.gz: 88bc47b08c66487f9a0e60e82ac688a4b57b10cecb98e0747206eafebd6e6094bc85935c0934c9616e27a7d76d0f19a5cf7927e436a02e098e7e36b2a7952563
data/README.md CHANGED
@@ -72,7 +72,7 @@ end
72
72
 
73
73
  ## Testing with Teaspoon
74
74
 
75
- Teaspoon is not compatible with commoner by default. Under `test/demo` you can find a demo Rails application, containing a setup with Teaspoon. The key change is a custom boot partial and JavaScript file, found under `spec/javascripts/fixtures/teaspoon/suite`. Simply copy those two files under `fixtures/teaspoon/suite` in your JavaScript tests, make necessary changes to `boot.js.erb` to point to your test files, and you should be good to go.
75
+ Teaspoon is not compatible with commoner by default. Under `test/demo` you can find a demo Rails application, containing a setup with Teaspoon. The key change is a gem called `teaspoon-bundle`, which contains a custom boot partial. Just add `teaspoon-bundle` to your Gemfile, add `suite.boot_partial = 'bundle_boot'` to your `teaspoon_env.rb`, and you should be good to go!
76
76
 
77
77
  ## CoffeeScript interoperability
78
78
 
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ gem install bundler --version '1.11.2'
5
+ bundle check || bundle install -j 4
6
+
7
+ for path in "./test/fixtures" "./test/fixtures/vendor-stub" "./js/babel-plugin-sprockets-commoner-internal" "./test/fixtures/root-node-modules" "./test/demo"; do
8
+ pushd "$path" >/dev/null
9
+ npm install
10
+ popd >/dev/null
11
+ done
12
+
13
+ pushd "./test/demo"
14
+ bundle check || bundle install -j 4
15
+ popd
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+ set -e -x
3
+ bundle exec rake test
4
+ pushd js/babel-plugin-sprockets-commoner-internal
5
+ npm test
6
+ popd
7
+ pushd test/demo
8
+ bundle exec teaspoon
9
+ popd
data/circle.yml CHANGED
@@ -6,8 +6,8 @@ machine:
6
6
 
7
7
  dependencies:
8
8
  override:
9
- - script/setup
9
+ - bin/setup
10
10
 
11
11
  test:
12
12
  override:
13
- - script/test
13
+ - bin/test
@@ -167,9 +167,12 @@ module.exports = function (context) {
167
167
  if (name === false) {
168
168
  path.get('init').replaceWith(t.objectExpression([]));
169
169
  } else {
170
- path.scope.rename(name);
170
+ if (path.scope.hasBinding(name)) {
171
+ path.scope.rename(name);
172
+ }
171
173
  path.scope.rename(path.node.id.name, name);
172
174
  path.remove();
175
+ path.scope.removeBinding(name);
173
176
  }
174
177
  },
175
178
  CallExpression: function CallExpression(path, state) {
@@ -7,7 +7,7 @@ module Sprockets
7
7
 
8
8
  ExcludedFileError = Class.new(::StandardError)
9
9
 
10
- VERSION = '1'.freeze
10
+ VERSION = '2'.freeze
11
11
  BABELRC_FILE = '.babelrc'.freeze
12
12
  PACKAGE_JSON = 'package.json'.freeze
13
13
  JS_PACKAGE_PATH = File.expand_path('../../../js', __dir__)
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Commoner
3
- VERSION = '0.2.5'
3
+ VERSION = '0.2.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-commoner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bouke van der Bijl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-13 00:00:00.000000000 Z
11
+ date: 2016-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets
@@ -131,6 +131,8 @@ files:
131
131
  - README.md
132
132
  - Rakefile
133
133
  - bin/console
134
+ - bin/setup
135
+ - bin/test
134
136
  - circle.yml
135
137
  - js/babel-plugin-sprockets-commoner-internal/.gitignore
136
138
  - js/babel-plugin-sprockets-commoner-internal/README.md