omniauth-haobtc 0.1.0 → 0.2.0
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 +4 -4
- metadata +2 -12
- data/.gitignore +0 -10
- data/Gemfile +0 -4
- data/README.md +0 -36
- data/Rakefile +0 -2
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/lib/omniauth/haobtc/version.rb +0 -5
- data/lib/omniauth/haobtc.rb +0 -7
- data/lib/omniauth/strategies/haobtc.rb +0 -46
- data/omniauth-haobtc.gemspec +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c9cfa13bbeaece895677a157cab2edc1082c211
|
4
|
+
data.tar.gz: f217e16a46184091e42681456422e98a4b9a28db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4346cc24434a87ea026f3b036b5cee739f8d1b0d411161c7e7e5eea62588313d792e1500b52d0543bd4a73d62c3c4b6cb67615f5d4b2a0dd26cb038215d9776
|
7
|
+
data.tar.gz: 48a4c4f85e66b9c475174fa5ec062a0a925de4dec2a2a3be5db247f76a96c3c297925d0b881a1af590c01686880e5a084ef164cc54f19c3998cdb3cbfc127772
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-haobtc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- freez91
|
@@ -86,17 +86,7 @@ email:
|
|
86
86
|
executables: []
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
|
-
files:
|
90
|
-
- ".gitignore"
|
91
|
-
- Gemfile
|
92
|
-
- README.md
|
93
|
-
- Rakefile
|
94
|
-
- bin/console
|
95
|
-
- bin/setup
|
96
|
-
- lib/omniauth/haobtc.rb
|
97
|
-
- lib/omniauth/haobtc/version.rb
|
98
|
-
- lib/omniauth/strategies/haobtc.rb
|
99
|
-
- omniauth-haobtc.gemspec
|
89
|
+
files: []
|
100
90
|
homepage: https://github.com/Freeza91/omniauth-haobtc
|
101
91
|
licenses: []
|
102
92
|
metadata: {}
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/README.md
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# Omniauth::Haobtc
|
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/omniauth/haobtc`. 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
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'omniauth-haobtc'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install omniauth-haobtc
|
22
|
-
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
|
-
## Development
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
|
-
## Contributing
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/omniauth-haobtc.
|
36
|
-
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "omniauth/haobtc"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/lib/omniauth/haobtc.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'omniauth/strategies/oauth2'
|
4
|
-
|
5
|
-
module OmniAuth
|
6
|
-
module Strategies
|
7
|
-
class Haobtc < OmniAuth::Strategies::OAuth2
|
8
|
-
option :name, "haobtc"
|
9
|
-
|
10
|
-
option :client_options, {
|
11
|
-
:site => 'https://haobtc.com',
|
12
|
-
:authorize_url => '/auth/oauth/authorize/',
|
13
|
-
:token_url => "/auth/oauth/get_token/"
|
14
|
-
}
|
15
|
-
|
16
|
-
uid do
|
17
|
-
@uid ||= begin
|
18
|
-
access_token.options[:mode] = :query
|
19
|
-
access_token.options[:param_name] = :access_token
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
info do
|
24
|
-
user_info = raw_info['user_info']
|
25
|
-
{
|
26
|
-
:username => user_info['username'],
|
27
|
-
:fullname => user_info['fullname'],
|
28
|
-
:address => user_info['address'],
|
29
|
-
}
|
30
|
-
end
|
31
|
-
|
32
|
-
# extra do
|
33
|
-
# {
|
34
|
-
# :raw_info => raw_info
|
35
|
-
# }
|
36
|
-
# end
|
37
|
-
|
38
|
-
def raw_info
|
39
|
-
@raw_info ||= access_token.get('https://haobtc.com/api/v1/user/profile').parsed
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
OmniAuth.config.add_camelization('haobtc', 'Haobtc')
|
data/omniauth-haobtc.gemspec
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'omniauth/haobtc/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
|
8
|
-
spec.name = "omniauth-haobtc"
|
9
|
-
spec.version = Omniauth::Haobtc::VERSION
|
10
|
-
spec.authors = ["freez91"]
|
11
|
-
spec.email = ["useyes91@gmail.com"]
|
12
|
-
|
13
|
-
spec.summary = %q{OmniAuth strategies for haobtc}
|
14
|
-
spec.description = %q{OmniAuth strategies for haobtc}
|
15
|
-
spec.homepage = "https://github.com/Freeza91/omniauth-haobtc"
|
16
|
-
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
-
f.match(%r{^(test|spec|features)/})
|
19
|
-
end
|
20
|
-
|
21
|
-
spec.bindir = "exe"
|
22
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
-
spec.require_paths = ["lib"]
|
24
|
-
|
25
|
-
spec.add_development_dependency "bundler", "~> 1.13"
|
26
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
-
spec.add_dependency 'omniauth', '~> 1.0'
|
28
|
-
spec.add_dependency 'omniauth-oauth', '~> 1.0'
|
29
|
-
spec.add_dependency 'omniauth-oauth2', '~> 1.0'
|
30
|
-
|
31
|
-
end
|