vanity 2.2.1 → 2.2.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 +4 -4
- data/CHANGELOG +3 -0
- data/Gemfile.lock +1 -1
- data/doc/ab_testing.textile +2 -2
- data/gemfiles/rails32.gemfile.lock +3 -1
- data/gemfiles/rails41.gemfile.lock +1 -1
- data/gemfiles/rails42.gemfile.lock +1 -1
- data/gemfiles/rails42_protected_attributes.gemfile.lock +1 -1
- data/lib/vanity/adapters.rb +0 -3
- data/lib/vanity/connection.rb +3 -1
- data/lib/vanity/version.rb +1 -1
- data/test/connection_test.rb +6 -0
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfc24752f0a1f8813a3411c47af34f672bfea9f6
|
4
|
+
data.tar.gz: 4cc904580b6190c1e31b098b567ef17b407901d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2fd34977c4f602248f8c5bc907208525d97f9de3c08cc4ebb1372d70db95a8f96df3e562ae22aacb83a539c67bb3aec6fa33bdb3297843eb3e80fadd8741dc7
|
7
|
+
data.tar.gz: f2ccd290cb139ad01bb13f3aec3ad9e3fa7d0ff096aea2700a74c60c2b09e44723a328b9566dcdd2447f3f3f8f42d74b5cb112851be19ca3958d88e6643a473d
|
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
data/doc/ab_testing.textile
CHANGED
@@ -173,7 +173,7 @@ You can force a functional/integration test to choose a given alternative:
|
|
173
173
|
|
174
174
|
<pre>
|
175
175
|
def test_big_signup_link
|
176
|
-
experiment(:big_signup_link).chooses(true)
|
176
|
+
Vanity.experiment(:big_signup_link).chooses(true)
|
177
177
|
get :index
|
178
178
|
assert_select "a[href=/signup][style^=font:14pt]", "Sign up"
|
179
179
|
end
|
@@ -184,7 +184,7 @@ Here's another example using Webrat:
|
|
184
184
|
<pre>
|
185
185
|
def test_price_option
|
186
186
|
[19, 25, 29].each do |price|
|
187
|
-
experiment(:price_options).chooses(price)
|
187
|
+
Vanity.experiment(:price_options).chooses(price)
|
188
188
|
visit root_path
|
189
189
|
assert_contain "Get started for only $#{price} a month!"
|
190
190
|
end
|
@@ -7,7 +7,7 @@ GIT
|
|
7
7
|
PATH
|
8
8
|
remote: ..
|
9
9
|
specs:
|
10
|
-
vanity (2.2.
|
10
|
+
vanity (2.2.2)
|
11
11
|
i18n
|
12
12
|
|
13
13
|
GEM
|
@@ -116,6 +116,8 @@ GEM
|
|
116
116
|
metaclass (0.0.4)
|
117
117
|
mime-types (1.25.1)
|
118
118
|
minitest (4.2.0)
|
119
|
+
minitest_tu_shim (1.3.3)
|
120
|
+
minitest (~> 4.0)
|
119
121
|
mocha (1.1.0)
|
120
122
|
metaclass (~> 0.0.1)
|
121
123
|
mongo (2.2.3)
|
data/lib/vanity/adapters.rb
CHANGED
@@ -7,9 +7,6 @@ module Vanity
|
|
7
7
|
#
|
8
8
|
# @since 1.4.0
|
9
9
|
def establish_connection(spec)
|
10
|
-
return unless Autoconnect.should_connect? ||
|
11
|
-
(Autoconnect.schema_relevant? && spec[:adapter].to_s == 'active_record')
|
12
|
-
|
13
10
|
begin
|
14
11
|
require "vanity/adapters/#{spec[:adapter]}_adapter"
|
15
12
|
rescue LoadError
|
data/lib/vanity/connection.rb
CHANGED
@@ -33,7 +33,9 @@ module Vanity
|
|
33
33
|
def initialize(specification=nil)
|
34
34
|
@specification = specification || DEFAULT_SPECIFICATION
|
35
35
|
|
36
|
-
|
36
|
+
if Autoconnect.playground_should_autoconnect?
|
37
|
+
@adapter = setup_connection(@specification)
|
38
|
+
end
|
37
39
|
end
|
38
40
|
|
39
41
|
# Closes the current connection.
|
data/lib/vanity/version.rb
CHANGED
data/test/connection_test.rb
CHANGED
@@ -12,6 +12,12 @@ describe Vanity::Connection do
|
|
12
12
|
Vanity::Connection.new(adapter: "mock")
|
13
13
|
end
|
14
14
|
|
15
|
+
it "can skip connection" do
|
16
|
+
Vanity::Autoconnect.stubs(:playground_should_autoconnect?).returns(false)
|
17
|
+
connection = Vanity::Connection.new(adapter: "mock")
|
18
|
+
assert !connection.connected?
|
19
|
+
end
|
20
|
+
|
15
21
|
it "parses from a string" do
|
16
22
|
Vanity::Adapters.expects(:establish_connection).with(
|
17
23
|
adapter: 'redis',
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Assaf Arkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.8.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.8.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '4.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '4.2'
|
55
55
|
description: Mirror, mirror on the wall ...
|
@@ -61,8 +61,8 @@ extra_rdoc_files:
|
|
61
61
|
- README.md
|
62
62
|
- CHANGELOG
|
63
63
|
files:
|
64
|
-
- .gitignore
|
65
|
-
- .travis.yml
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
66
66
|
- Appraisals
|
67
67
|
- CHANGELOG
|
68
68
|
- Gemfile
|
@@ -212,27 +212,27 @@ licenses:
|
|
212
212
|
metadata: {}
|
213
213
|
post_install_message: To get started run vanity --help
|
214
214
|
rdoc_options:
|
215
|
-
- --title
|
216
|
-
- Vanity 2.2.
|
217
|
-
- --main
|
215
|
+
- "--title"
|
216
|
+
- Vanity 2.2.2
|
217
|
+
- "--main"
|
218
218
|
- README.md
|
219
|
-
- --webcvs
|
219
|
+
- "--webcvs"
|
220
220
|
- http://github.com/assaf/vanity
|
221
221
|
require_paths:
|
222
222
|
- lib
|
223
223
|
required_ruby_version: !ruby/object:Gem::Requirement
|
224
224
|
requirements:
|
225
|
-
- -
|
225
|
+
- - ">="
|
226
226
|
- !ruby/object:Gem::Version
|
227
227
|
version: 1.9.3
|
228
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
|
-
- -
|
230
|
+
- - ">="
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: '0'
|
233
233
|
requirements: []
|
234
234
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.
|
235
|
+
rubygems_version: 2.4.8
|
236
236
|
signing_key:
|
237
237
|
specification_version: 4
|
238
238
|
summary: Experience Driven Development framework for Ruby
|