instant2fa 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08dc3834cf91694551e139385cf3c8c931a063b9
4
- data.tar.gz: 75b4749b3d8b4f1165bf71b52ebab688d9c43daf
3
+ metadata.gz: 78b529c5f27ed50fee4234cf440e04426ef0d161
4
+ data.tar.gz: e86645df4674d91c104e3e2ef2b9a9ac22bca3ad
5
5
  SHA512:
6
- metadata.gz: 2ef0b4c316c6321cdab9ce26c526c20f9a2405ce9ec0b5a6e9b35f1492cf11ac99c6d59a43d17e82202c3cbce935023deebd9cce7b82537e86bae1f9fa8c6e9f
7
- data.tar.gz: e9b49e825e3a2f66cbd35d83a444991332c9e61b1cbfcc37b73aa342c42563456add4df9755a134bc0bb452fdef9b4b1af3306c6d4318c5b972c2fb77f98d7af
6
+ metadata.gz: abb236e3aa2fd4b83855348cbc47ca9798cfa541a388aecd7cc233a951a831d9a50dbdc0921e79333cc61da5581da29d4bd3d84976c5b4112ea495321299187d
7
+ data.tar.gz: ffac06ea1978043f4510c5dd3de245340dd724d83d92775d39d0f199db124b8da2b6730192a63fd84ca8fc22693e7e60ce2879e8f2af6344604d2f1cce6b7c2a
data/README.md CHANGED
@@ -1,8 +1,4 @@
1
- # Instant2FA
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/instant2fa`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
1
+ # Instant2fa
6
2
 
7
3
  ## Installation
8
4
 
@@ -23,20 +19,18 @@ Or install it yourself as:
23
19
  ## Usage
24
20
 
25
21
  ```ruby
26
- Instant2FA.configure do |config|
22
+ Instant2fa.configure do |config|
27
23
  config.access_key = 'YOUR_ACCESS_KEY'
28
24
  config.access_secret = 'YOUR_ACCESS_SECRET'
29
25
  end
30
26
 
31
27
  distinct_id = "A_UNIQUE_ID_FOR_A_USER"
32
28
 
33
- hosted_page_url = Instant2FA.create_settings(distinct_id)
34
- hosted_page_url = Instant2FA.create_verification(distinct_id)
35
- verification_succeeded = Instant2FA.confirm_verification(distinct_id, token)
29
+ hosted_page_url = Instant2fa.create_settings(distinct_id)
30
+ hosted_page_url = Instant2fa.create_verification(distinct_id)
31
+ verification_succeeded = Instant2fa.confirm_verification(distinct_id, token)
36
32
  ```
37
33
 
38
- TODO: Write usage instructions here
39
-
40
34
  ## Development
41
35
 
42
36
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -45,7 +39,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
45
39
 
46
40
  ## Contributing
47
41
 
48
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/instant2fa. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/clef/instant2fa-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
49
43
 
50
44
 
51
45
  ## License
data/instant2fa.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'instant2fa/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "instant2fa"
8
- spec.version = Instant2FA::VERSION
8
+ spec.version = Instant2fa::VERSION
9
9
  spec.authors = ["Jesse Pollak"]
10
10
  spec.email = ["jesse@instant2fa.com"]
11
11
 
@@ -5,12 +5,12 @@ require 'instant2fa/resources'
5
5
  require 'instant2fa/errors'
6
6
  require 'instant2fa/middleware/unprocessable_entity_status'
7
7
 
8
- module Instant2FA
8
+ module Instant2fa
9
9
  class Client
10
10
 
11
11
  attr_accessor :config
12
12
 
13
- def initialize(config=Instant2FA.config.dup, options={})
13
+ def initialize(config=Instant2fa.config.dup, options={})
14
14
  @config = config
15
15
 
16
16
  Resources::Base.site = @config.api_base
@@ -1,6 +1,6 @@
1
1
  require "instant2fa/resources"
2
2
 
3
- module Instant2FA
3
+ module Instant2fa
4
4
  class Configuration
5
5
  attr_accessor :access_key
6
6
  attr_accessor :access_secret
@@ -1,18 +1,18 @@
1
- module Instant2FA
1
+ module Instant2fa
2
2
  module Errors
3
- class Instant2FAError < StandardError
3
+ class Instant2faError < StandardError
4
4
  end
5
5
 
6
- class MFANotEnabled < Instant2FAError
6
+ class MFANotEnabled < Instant2faError
7
7
  end
8
8
 
9
- class ValidationError < Instant2FAError
9
+ class ValidationError < Instant2faError
10
10
  end
11
11
 
12
- class VerificationMismatch < Instant2FAError
12
+ class VerificationMismatch < Instant2faError
13
13
  end
14
14
 
15
- class VerificationFailed < Instant2FAError
15
+ class VerificationFailed < Instant2faError
16
16
  end
17
17
  end
18
18
  end
@@ -8,7 +8,7 @@ module JsonApiClient::Errors
8
8
  end
9
9
  end
10
10
 
11
- module Instant2FA
11
+ module Instant2fa
12
12
  module Middleware
13
13
  class UnprocessableEntityStatus < Faraday::Middleware
14
14
  def call(environment)
@@ -1,6 +1,6 @@
1
1
  require 'json_api_client'
2
2
 
3
- module Instant2FA
3
+ module Instant2fa
4
4
  class ConnectionConfiguration
5
5
  end
6
6
 
@@ -1,3 +1,3 @@
1
- module Instant2FA
2
- VERSION = "0.0.1"
1
+ module Instant2fa
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/instant2fa.rb CHANGED
@@ -5,7 +5,7 @@ require "instant2fa/version"
5
5
  require "instant2fa/configuration"
6
6
  require "instant2fa/client"
7
7
 
8
- module Instant2FA
8
+ module Instant2fa
9
9
  extend self
10
10
 
11
11
  def configure
@@ -16,7 +16,7 @@ module Instant2FA
16
16
  @config ||= Configuration.new
17
17
  end
18
18
 
19
- def new(config=Instant2FA.config.dup, options={})
19
+ def new(config=Instant2fa.config.dup, options={})
20
20
  Client.new(config, options)
21
21
  end
22
22
 
@@ -27,3 +27,5 @@ module Instant2FA
27
27
  delegate(*Configuration.public_instance_methods(false), to: :config)
28
28
  delegate(*Client.public_instance_methods(false) - [:config], to: :client)
29
29
  end
30
+
31
+ Instant2FA = Instant2fa
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: instant2fa
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
  - Jesse Pollak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-06 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler