seraph 0.0.1 → 0.0.2

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: 87a649e9b8023837802c9437c543efaa7f469015
4
- data.tar.gz: d45906cdf355f54da00e42b219c1f9757c560819
3
+ metadata.gz: 583f6cf6fa11ad1334eb9d55301e63b7eb53b080
4
+ data.tar.gz: 4ba819366691c555e82ac8b67fd7957573e8c8cb
5
5
  SHA512:
6
- metadata.gz: 3194065256e655a84637ea53b122184ad8777f6909bf850ccc44ab6deba25aa471aa582706b70a473897be039ae880d18360393443626582aff4876ddf682323
7
- data.tar.gz: b4b5eb110e7a57a951e575288791aba5014194eb085e275a1543c4786fa4fc092ac8e0a04e02a13247b96bc4a9b30d1c3187313ba4bdab7ac8a1842e23259ab0
6
+ metadata.gz: a5fa9e929257ad04d0bb75e963cb77d2085d2b5b02368fb9aedeff77deda4c412d9ead96a67fec3bc06e0cc92690c9856a74a6ce786ad5ca63dfbff84df79bba
7
+ data.tar.gz: 73e9248e3efd0810ed71b84f08cbc24c93eb070d7be0cbb2084259bee9675f2c17da21b98e7a422f13790049d5aab3bf92817ba50f96e9601b35c66c5ec605a9
data/.travis.yml CHANGED
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  language: ruby
3
3
  rvm:
4
- - 2.0
5
- - 2.1
6
- - 2.2
7
- - 2.3
4
+ - 2.1.9
5
+ - 2.2.5
8
6
  - 2.3.1
@@ -0,0 +1,9 @@
1
+ require 'singleton'
2
+
3
+ module Seraph
4
+ class Configuration
5
+ include ::Singleton
6
+
7
+ attr_accessor :pepper
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Seraph
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
data/lib/seraph.rb CHANGED
@@ -1,2 +1,15 @@
1
1
  require 'seraph/version'
2
2
  require 'seraph/password_encryptor'
3
+ require 'seraph/configuration'
4
+
5
+ module Seraph
6
+ def configure
7
+ yield configuration
8
+ end
9
+ module_function :configure
10
+
11
+ def configuration
12
+ Configuration.instance
13
+ end
14
+ module_function :configuration
15
+ end
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+ require 'seraph'
3
+
4
+ describe Seraph do
5
+ describe '#configure' do
6
+ let(:pepper) { '9b8177d1d835fad6cc19b455d41ec64f6dcbe83a1af60eb598973f8fb6e29fb1' }
7
+ before do
8
+ Seraph.configure do |config|
9
+ config.pepper = pepper
10
+ end
11
+ end
12
+
13
+ it 'saves the configuration' do
14
+ expect(Seraph.configuration.pepper).to eq pepper
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Szymon Szeliga
@@ -155,12 +155,13 @@ files:
155
155
  - README.md
156
156
  - Rakefile
157
157
  - lib/seraph.rb
158
+ - lib/seraph/configuration.rb
158
159
  - lib/seraph/extensions/nil_class_blank.rb
159
160
  - lib/seraph/password_encryptor.rb
160
161
  - lib/seraph/version.rb
161
162
  - seraph.gemspec
162
163
  - spec/password_encryptor_spec.rb
163
- - spec/serafin_spec.rb
164
+ - spec/seraph_spec.rb
164
165
  - spec/spec_helper.rb
165
166
  homepage: https://rubygems.org/gems/seraph
166
167
  licenses:
@@ -188,5 +189,5 @@ specification_version: 4
188
189
  summary: A simple framework-agnostic library for authentication
189
190
  test_files:
190
191
  - spec/password_encryptor_spec.rb
191
- - spec/serafin_spec.rb
192
+ - spec/seraph_spec.rb
192
193
  - spec/spec_helper.rb
data/spec/serafin_spec.rb DELETED
@@ -1,8 +0,0 @@
1
- require 'spec_helper'
2
- require 'seraph'
3
-
4
- describe Seraph do
5
- it "should have a VERSION constant" do
6
- expect(subject.const_get('VERSION')).to_not be_empty
7
- end
8
- end