protocool 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -0
- data/lib/protocool.rb +4 -0
- data/lib/protocool/version.rb +1 -1
- data/spec/lib/protocool_spec.rb +14 -1
- metadata +2 -2
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).
|
data/lib/protocool.rb
CHANGED
data/lib/protocool/version.rb
CHANGED
data/spec/lib/protocool_spec.rb
CHANGED
@@ -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.
|
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-
|
12
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|