faceless 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 +4 -4
- data/Rakefile +7 -3
- data/faceless.gemspec +2 -2
- data/lib/faceless/version.rb +1 -1
- data/test/faceless/test_authcode.rb +20 -0
- data/test/test_helper.rb +3 -0
- metadata +8 -6
- data/specs/spec_helper.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a95630ccec9b0437cfba0af56707bb35d90f15c3
|
4
|
+
data.tar.gz: b00b23228bbe389573993980d6f1810c140e8cbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7cd462fe1dfca57d30016637c3369a6f6fb8309706c5b47d26ee7fe02ea6d7a764daebceab8f754c062d15b80b00a933c7db1dd76e5674e69bff48ab5bfe629
|
7
|
+
data.tar.gz: 780d02d517844b9df4c1c843f92e5d6917a92b2192b866f4a92ea1bf2f8beb61c2d923d8892463310cfd80b8f9dcff7b67e7e0ae592b4a5f9dd8ccda8ab0f517
|
data/Rakefile
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
require
|
2
|
+
require 'rake/testtask'
|
3
3
|
|
4
|
-
|
4
|
+
Rake::TestTask.new do |t|
|
5
|
+
t.libs << 'test'
|
6
|
+
t.pattern = "test/faceless/test_*.rb"
|
7
|
+
end
|
5
8
|
|
6
|
-
|
9
|
+
desc "Run tests"
|
10
|
+
task :default => :test
|
data/faceless.gemspec
CHANGED
@@ -2,14 +2,14 @@ require File.expand_path('../lib/faceless/version', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.authors = ["Alex S"]
|
5
|
-
gem.email =
|
5
|
+
gem.email = "hlcfan.yan@gmail.com.com"
|
6
6
|
gem.description = %q{Ruby Implementation of UCenter Authcode}
|
7
7
|
gem.summary = %q{A cool implementation of encryption/decryption in Ruby, borrowed from UCenter(comsenz)}
|
8
8
|
gem.homepage = "https://github.com/hlcfan/faceless"
|
9
9
|
|
10
10
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
11
11
|
gem.files = `git ls-files`.split("\n")
|
12
|
-
gem.test_files = `git ls-files --
|
12
|
+
gem.test_files = `git ls-files -- test/*`.split("\n")
|
13
13
|
gem.name = "faceless"
|
14
14
|
gem.require_paths = ["lib"]
|
15
15
|
gem.version = Faceless::VERSION
|
data/lib/faceless/version.rb
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class Authcode < Minitest::Test
|
4
|
+
def setup
|
5
|
+
Faceless.configure do |config|
|
6
|
+
config.auth_token = 'test-token'
|
7
|
+
end
|
8
|
+
|
9
|
+
@authenticator = Faceless::Authcode
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_encode
|
13
|
+
assert @authenticator.encode("encrypt-me").length > 0
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_decode
|
17
|
+
assert_equal "encrypt-me",
|
18
|
+
@authenticator.decode("2d4enq1n92Am7AX7+z9yuqAItMzrgeuBCqA3/R1YX7GJk4/lZE8g")
|
19
|
+
end
|
20
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faceless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex S
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,8 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
description: Ruby Implementation of UCenter Authcode
|
28
|
-
email:
|
29
|
-
- hlcfan.yan@gmail.com.com
|
28
|
+
email: hlcfan.yan@gmail.com.com
|
30
29
|
executables: []
|
31
30
|
extensions: []
|
32
31
|
extra_rdoc_files: []
|
@@ -41,7 +40,8 @@ files:
|
|
41
40
|
- lib/faceless/authcode.rb
|
42
41
|
- lib/faceless/configuration.rb
|
43
42
|
- lib/faceless/version.rb
|
44
|
-
-
|
43
|
+
- test/faceless/test_authcode.rb
|
44
|
+
- test/test_helper.rb
|
45
45
|
homepage: https://github.com/hlcfan/faceless
|
46
46
|
licenses: []
|
47
47
|
metadata: {}
|
@@ -65,5 +65,7 @@ rubygems_version: 2.4.5
|
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: A cool implementation of encryption/decryption in Ruby, borrowed from UCenter(comsenz)
|
68
|
-
test_files:
|
68
|
+
test_files:
|
69
|
+
- test/faceless/test_authcode.rb
|
70
|
+
- test/test_helper.rb
|
69
71
|
has_rdoc:
|
data/specs/spec_helper.rb
DELETED