pinball_wizard 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.node-version +1 -0
- data/CHANGELOG.md +9 -0
- data/README.md +6 -0
- data/bower.json +1 -1
- data/dist/pinball_wizard.js +10 -3
- data/lib/pinball_wizard/version.rb +1 -1
- data/package.json +1 -1
- data/pinball_wizard.gemspec +2 -2
- data/src/pinball_wizard.coffee +4 -3
- data/test/spec/pinball_wizard_spec.coffee +21 -5
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c1ee29d61b4dac1dcb1965542c1ebacabe46852
|
4
|
+
data.tar.gz: fa374257a6cae189d1b258efdcdd9ff04f48f80e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 026f8a5fb150903a6e0d955e063c83444cf54faae6ff9c76b58f944db841ac1768d0e8caabc1dc07379ceca83fdd4484c7e2f07a54dcf33a39271dc0c12045a1
|
7
|
+
data.tar.gz: 6fa133b85bfbbb4a65ddaaf0577106e5893f4c7bf95b1e0848b7d6fabe831be154f339725a9cb36bc686ce8d17aa36615bd22b733676bea71fb93f11c9c38aa8
|
data/.gitignore
CHANGED
data/.node-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
v0.12.0
|
data/CHANGELOG.md
CHANGED
@@ -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
data/dist/pinball_wizard.js
CHANGED
@@ -200,9 +200,16 @@
|
|
200
200
|
permanent = function() {
|
201
201
|
return JSON.parse(storage.getItem('pinball_wizard') || "[]") || [];
|
202
202
|
};
|
203
|
-
activatePermanently = function(
|
204
|
-
|
205
|
-
|
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([]);
|
data/package.json
CHANGED
data/pinball_wizard.gemspec
CHANGED
@@ -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."
|
data/src/pinball_wizard.coffee
CHANGED
@@ -134,9 +134,10 @@ define ->
|
|
134
134
|
permanent = ->
|
135
135
|
JSON.parse(storage.getItem('pinball_wizard') or "[]") or []
|
136
136
|
|
137
|
-
activatePermanently = (
|
138
|
-
|
139
|
-
|
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 '#
|
270
|
+
describe '#activatePermanently', ->
|
271
271
|
beforeEach ->
|
272
|
+
pinball.resetPermanent()
|
272
273
|
pinball.add
|
273
|
-
|
274
|
-
|
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
|
-
|
281
|
+
pinball.activatePermanently('my_feature1')
|
282
|
+
expect(pinball.permanent()).toEqual(['my_feature1'])
|
278
283
|
|
279
284
|
it 'activates the feature', ->
|
280
|
-
|
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.
|
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-
|
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
|