pinball_wizard 0.4.1 → 0.4.2

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d40319ad8219b04f717b324a1475790556afe0c7
4
- data.tar.gz: 8a8b8baf89c69bcafb54dffe584bcf1e695136b5
3
+ metadata.gz: 1c1ee29d61b4dac1dcb1965542c1ebacabe46852
4
+ data.tar.gz: fa374257a6cae189d1b258efdcdd9ff04f48f80e
5
5
  SHA512:
6
- metadata.gz: eb1a6a3c593da12102125bcd7a85634aa23aa512e3be2a1637c11919de5ea5248b62622c327b4bcb2fe7cb98866193fa10213d3e24c14707cf31c41c42b10a97
7
- data.tar.gz: 4ef3c955adc6942fbd9869795caaa8303f82b820d12bac9df5a7e41e64047398625abf5845c0f1e23f9ccb83bdc6c9f434ef8f76fe4de064085a99573aa441f6
6
+ metadata.gz: 026f8a5fb150903a6e0d955e063c83444cf54faae6ff9c76b58f944db841ac1768d0e8caabc1dc07379ceca83fdd4484c7e2f07a54dcf33a39271dc0c12045a1
7
+ data.tar.gz: 6fa133b85bfbbb4a65ddaaf0577106e5893f4c7bf95b1e0848b7d6fabe831be154f339725a9cb36bc686ce8d17aa36615bd22b733676bea71fb93f11c9c38aa8
data/.gitignore CHANGED
@@ -7,3 +7,4 @@ node_modules
7
7
  .tmp/
8
8
  npm-debug.log
9
9
  pkg
10
+ .idea/
@@ -0,0 +1 @@
1
+ v0.12.0
@@ -1,3 +1,12 @@
1
+ # v0.4.2
2
+ * [feature] `#activatePermanently` now supports multiple features: `('feature1', 'feature2'...)`
3
+
4
+ # v0.4.1
5
+ * [feature] CSS tagger honors permanent features and adds the
6
+ appropriate CSS class.
7
+
8
+ [Compare v0.4.0..v0.4.1](https://github.com/primedia/pinball_wizard/compare/v0.4.0...v0.4.1)
9
+
1
10
  # v0.4.0
2
11
  * [feature] Added `#activatePermanently('feature_name')` to
3
12
  activate features across URLs. Stored in `localStorage`
data/README.md CHANGED
@@ -164,6 +164,12 @@ To turn on and keep a feature on, you can activate it permanently in the console
164
164
  pinball.activatePermanently('example')
165
165
  ```
166
166
 
167
+ You can permanently activate multiple features like so:
168
+
169
+ ```javascript
170
+ pinball.activatePermanently('example1', 'example2')
171
+ ```
172
+
167
173
  #### See a List of Permanent Features
168
174
 
169
175
  ```javascript
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinball_wizard",
3
- "version": "0.3.0",
3
+ "version": "0.4.2",
4
4
  "main": "dist/pinball_wizard.js",
5
5
  "dependencies": {
6
6
  },
@@ -200,9 +200,16 @@
200
200
  permanent = function() {
201
201
  return JSON.parse(storage.getItem('pinball_wizard') || "[]") || [];
202
202
  };
203
- activatePermanently = function(name) {
204
- appendPermanent(name);
205
- return activate(name, 'permanent');
203
+ activatePermanently = function() {
204
+ var i, len, n, names, results;
205
+ names = 1 <= arguments.length ? slice.call(arguments, 0) : [];
206
+ results = [];
207
+ for (i = 0, len = names.length; i < len; i++) {
208
+ n = names[i];
209
+ appendPermanent(n);
210
+ results.push(activate(n, 'permanent'));
211
+ }
212
+ return results;
206
213
  };
207
214
  resetPermanent = function() {
208
215
  return setPermanent([]);
@@ -1,3 +1,3 @@
1
1
  module PinballWizard
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinball_wizard",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "pinball_wizard",
5
5
  "homepage": "https://github.com/primedia/pinball_wizard",
6
6
  "license": "MIT",
@@ -3,8 +3,8 @@ require File.expand_path('../lib/pinball_wizard/version', __FILE__)
3
3
  require 'date'
4
4
 
5
5
  Gem::Specification.new do |gem|
6
- gem.authors = ["Caleb Wright", "Mark Herman", "RentPath Team"]
7
- gem.email = ["cwright@rentpath.com", "markherman@rentpath.com"]
6
+ gem.authors = ["Caleb Wright", "Mark Herman", "Michael Pelz-Sherman", "RentPath Team"]
7
+ gem.email = ["cwright@rentpath.com", "markherman@rentpath.com", "mpelzsherman@gmail.com"]
8
8
  gem.homepage = 'https://github.com/primedia/pinball_wizard'
9
9
  gem.description = 'Build flippable features.'
10
10
  gem.summary = "Lib to build flippable features."
@@ -134,9 +134,10 @@ define ->
134
134
  permanent = ->
135
135
  JSON.parse(storage.getItem('pinball_wizard') or "[]") or []
136
136
 
137
- activatePermanently = (name) ->
138
- appendPermanent(name)
139
- activate(name, 'permanent')
137
+ activatePermanently = (names...) ->
138
+ for n in names
139
+ appendPermanent(n)
140
+ activate(n, 'permanent')
140
141
 
141
142
  resetPermanent = ->
142
143
  setPermanent []
@@ -267,17 +267,33 @@ define ['pinball_wizard'], (pinball) ->
267
267
  urlParam = '?foo=bar&pinball=a,b&bar'
268
268
  expect(pinball._urlValues(urlParam)).toEqual(['a','b'])
269
269
 
270
- describe '#activatePermanent', ->
270
+ describe '#activatePermanently', ->
271
271
  beforeEach ->
272
+ pinball.resetPermanent()
272
273
  pinball.add
273
- my_feature: 'inactive'
274
- pinball.activatePermanently('my_feature')
274
+ my_feature1: 'inactive'
275
+
276
+ it 'accepts a single feature', ->
277
+ pinball.activatePermanently('my_feature1')
278
+ expect(pinball.permanent()).toEqual(['my_feature1'])
275
279
 
276
280
  it 'adds it to the list of permanent', ->
277
- expect(pinball.permanent()).toEqual(['my_feature'])
281
+ pinball.activatePermanently('my_feature1')
282
+ expect(pinball.permanent()).toEqual(['my_feature1'])
278
283
 
279
284
  it 'activates the feature', ->
280
- expect(pinball.isActive('my_feature')).toEqual(true)
285
+ pinball.activatePermanently('my_feature1')
286
+ expect(pinball.isActive('my_feature1')).toEqual(true)
287
+
288
+ it 'accepts a comma-separated list of features', ->
289
+ pinball.add
290
+ my_feature1: 'inactive'
291
+ my_feature2: 'inactive'
292
+ pinball.activatePermanently('my_feature1', 'my_feature2')
293
+ expect(pinball.permanent()).toEqual(['my_feature1','my_feature2'])
294
+ expect(pinball.isActive('my_feature1')).toEqual(true)
295
+ expect(pinball.isActive('my_feature2')).toEqual(true)
296
+
281
297
 
282
298
  describe '#permanent', ->
283
299
  beforeEach ->
metadata CHANGED
@@ -1,26 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinball_wizard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Wright
8
8
  - Mark Herman
9
+ - Michael Pelz-Sherman
9
10
  - RentPath Team
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2015-10-15 00:00:00.000000000 Z
14
+ date: 2015-10-19 00:00:00.000000000 Z
14
15
  dependencies: []
15
16
  description: Build flippable features.
16
17
  email:
17
18
  - cwright@rentpath.com
18
19
  - markherman@rentpath.com
20
+ - mpelzsherman@gmail.com
19
21
  executables: []
20
22
  extensions: []
21
23
  extra_rdoc_files: []
22
24
  files:
23
25
  - ".gitignore"
26
+ - ".node-version"
24
27
  - CHANGELOG.md
25
28
  - Gemfile
26
29
  - Gemfile.lock