protocool 0.0.1 → 0.0.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.
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/bukowskis/protocool.png)](https://travis-ci.org/bukowskis/protocool)
2
+
1
3
  # Protocool
2
4
 
3
5
  Decides whether to use TLS encryption or not on a per-environment basis in Rails. Inspired by [this discussion](http://stackoverflow.com/questions/3634100/rails-3-ssl-deprecation).
@@ -6,6 +6,10 @@ module Protocool
6
6
  use_ssl? ? 'https' : 'http'
7
7
  end
8
8
 
9
+ def protocol
10
+ "#{Protocool.https}://"
11
+ end
12
+
9
13
  private
10
14
 
11
15
  def use_ssl?
@@ -2,7 +2,7 @@ module Protocool
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
@@ -16,13 +16,26 @@ describe Protocool do
16
16
  end
17
17
  end
18
18
 
19
+ describe '.protocol' do
20
+ it 'is the HTTPS protocol' do
21
+ protocool.protocol.should == 'https://'
22
+ end
23
+ end
24
+
19
25
  context 'in development environment' do
26
+ before { Rails.stub!(:env).and_return dev_env }
27
+
20
28
  describe '.https' do
21
29
  it 'uses HTTP' do
22
- Rails.stub!(:env).and_return dev_env
23
30
  protocool.https.should == 'http'
24
31
  end
25
32
  end
33
+
34
+ describe '.protocol' do
35
+ it 'is the HTTP protocol' do
36
+ protocool.protocol.should == 'http://'
37
+ end
38
+ end
26
39
  end
27
40
 
28
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-04 00:00:00.000000000 Z
12
+ date: 2013-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec