oa-blip 0.0.1

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.
@@ -0,0 +1,3 @@
1
+ pkg/*
2
+ *.gem
3
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in oa-blip.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Michał Łomnicki
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,25 @@
1
+ = oa-blip
2
+
3
+ blip.pl authorization strategy for OmniAuth
4
+
5
+ == Installation
6
+
7
+ gem install oa-blip
8
+
9
+ Add to config/initializers/omniauth.rb:
10
+
11
+ === Rails 3
12
+
13
+ Rails.application.config.middleware.use OmniAuth::Builder do
14
+ provider :blip, <Application Key>, <Application Secret>
15
+ end
16
+
17
+ === Rails 2
18
+
19
+ ActionController::Dispatcher.middleware.use "OmniAuth::Builder" do
20
+ provider :blip, <Application Key>, <Application Secret>
21
+ end
22
+
23
+ == Copyright
24
+
25
+ Copyright (c) 2011 Michał Łomnicki. See LICENSE for details.
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,22 @@
1
+ require 'omniauth/oauth'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Blip < OAuth
6
+ # Authenticate to blip.pl via OAuth.
7
+ #
8
+ # Usage:
9
+ #
10
+ # use OmniAuth::Strategies::Blip, 'consumerkey', 'consumersecret'
11
+ #
12
+ def initialize(app, consumer_key, consumer_secret)
13
+ super(app, :blip, consumer_key, consumer_secret, :site => 'http://blip.pl')
14
+ end
15
+
16
+ def auth_hash
17
+ OmniAuth::Utils.deep_merge(super, 'uid' => @access_token.params[:user_id])
18
+ end
19
+
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,5 @@
1
+ module Oa
2
+ module Blip
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "oa-blip/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "oa-blip"
7
+ s.version = Oa::Blip::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Michał Łomnicki"]
10
+ s.email = ["michal.lomnicki@gmail.com"]
11
+ s.homepage = "https://github.com/mlomnicki/oa-blip"
12
+ s.summary = %q{OmniAuth strategy for blip.pl OAuth}
13
+ s.description = %q{OmniAuth strategy for blip.pl OAuth}
14
+
15
+ s.rubyforge_project = "oa-blip"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency("oa-oauth")
23
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: oa-blip
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - "Micha\xC5\x82 \xC5\x81omnicki"
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-01-11 00:00:00 +01:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: oa-oauth
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ version_requirements: *id001
32
+ description: OmniAuth strategy for blip.pl OAuth
33
+ email:
34
+ - michal.lomnicki@gmail.com
35
+ executables: []
36
+
37
+ extensions: []
38
+
39
+ extra_rdoc_files: []
40
+
41
+ files:
42
+ - .gitignore
43
+ - Gemfile
44
+ - LICENSE
45
+ - README.rdoc
46
+ - Rakefile
47
+ - lib/oa-blip.rb
48
+ - lib/oa-blip/version.rb
49
+ - oa-blip.gemspec
50
+ has_rdoc: true
51
+ homepage: https://github.com/mlomnicki/oa-blip
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options: []
56
+
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
65
+ version: "0"
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
72
+ version: "0"
73
+ requirements: []
74
+
75
+ rubyforge_project: oa-blip
76
+ rubygems_version: 1.3.6
77
+ signing_key:
78
+ specification_version: 3
79
+ summary: OmniAuth strategy for blip.pl OAuth
80
+ test_files: []
81
+