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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 153f8e765a91ccd4bc414347eea1d20f97271cf7
4
- data.tar.gz: 6aad5e37b8ce974a0d0b7cd09e7e763745578652
3
+ metadata.gz: d94cb493af93174c9e0ae92e3496f07d7de70f2f
4
+ data.tar.gz: fb442dab1286f24ce10952ac5d744a9704755619
5
5
  SHA512:
6
- metadata.gz: 5f561e76ab4db43501d9fc162d32f3a059e58605cccd21afbd42a38494191437b915f301944a7c6a5c90bc2300278e4431313f9aa046d8d88c67f6e7f5c20b7c
7
- data.tar.gz: de12156579d20d990fce70a28aea8d911a6c74ded637dac62b272f2440a7760e00ad48800b89c9e3a76721d1751eac785f70757c6e2970f9eac1ede78d9ea2f0
6
+ metadata.gz: 706088f656cce4980d28a79ae9cf3a971faf17a12bebc5c52f3003e7e295342c7f719b2ca9c57f07e0465a7df509a201dc8b8a23ba9264722f52c9d1000a422d
7
+ data.tar.gz: 20921d8266728bbee9bc6f6695651ca00fb60472e0ade7ee15a841a25446fb742b0714c9a781284f6e771ac054f02c066f5dc1d7017f65312f695ee6b8549187
@@ -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
@@ -37,7 +37,7 @@ module Get
37
37
 
38
38
  def run!
39
39
  call
40
- rescue *Get.adapter.expected_errors => e
40
+ rescue *Get.adapter.expected_horza_errors => e
41
41
  raise ::Get::Errors::Base.new(e.message)
42
42
  end
43
43
  end
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.5.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-03 00:00:00.000000000 Z
11
+ date: 2015-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: horza