get 0.1.5.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/get/configuration.rb +5 -1
- data/lib/get.rb +1 -1
- data/spec/get_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d94cb493af93174c9e0ae92e3496f07d7de70f2f
|
4
|
+
data.tar.gz: fb442dab1286f24ce10952ac5d744a9704755619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 706088f656cce4980d28a79ae9cf3a971faf17a12bebc5c52f3003e7e295342c7f719b2ca9c57f07e0465a7df509a201dc8b8a23ba9264722f52c9d1000a422d
|
7
|
+
data.tar.gz: 20921d8266728bbee9bc6f6695651ca00fb60472e0ade7ee15a841a25446fb742b0714c9a781284f6e771ac054f02c066f5dc1d7017f65312f695ee6b8549187
|
data/lib/get/configuration.rb
CHANGED
@@ -20,11 +20,15 @@ module Get
|
|
20
20
|
end
|
21
21
|
|
22
22
|
class Config
|
23
|
-
attr_accessor :adapter
|
23
|
+
attr_accessor :adapter, :environment
|
24
24
|
|
25
25
|
def set_adapter(adapter)
|
26
26
|
Horza.configure { |config| config.adapter = adapter }
|
27
27
|
@adapter = Horza.adapter
|
28
28
|
end
|
29
|
+
|
30
|
+
def development_mode
|
31
|
+
Horza.configure { |config| config.development_mode = true }
|
32
|
+
end
|
29
33
|
end
|
30
34
|
end
|
data/lib/get.rb
CHANGED
data/spec/get_spec.rb
CHANGED
@@ -51,6 +51,22 @@ describe Get do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
context 'development_mode' do
|
55
|
+
before do
|
56
|
+
Get.reset
|
57
|
+
Get.configure do |config|
|
58
|
+
config.set_adapter('my_adapter')
|
59
|
+
config.development_mode
|
60
|
+
end
|
61
|
+
end
|
62
|
+
after do
|
63
|
+
Get.reset
|
64
|
+
end
|
65
|
+
it 'sets Horza to development mode' do
|
66
|
+
expect(Horza.configuration.development_mode).to be true
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
54
70
|
context '#adapter' do
|
55
71
|
context 'when the adapter is set' do
|
56
72
|
it 'returns the correct adapter class' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: get
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: horza
|