openid_mongodb_store 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/.bundle/config ADDED
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_DISABLE_SHARED_GEMS: "1"
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in openid_mongodb_store.gemspec
4
+ gemspec
5
+
6
+ # Extra gems for use in the config.ru demo
7
+ group :demo do
8
+ gem "rack"
9
+ gem "easy-rack-open-id"
10
+ gem "shotgun"
11
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,28 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ openid_mongodb_store (0.3.0)
5
+ mongo (~> 1.3)
6
+ ruby-openid (~> 2.1)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ bson (1.3.1)
12
+ easy-rack-open-id (0.2.2)
13
+ rack-openid
14
+ mongo (1.3.1)
15
+ bson (>= 1.3.1)
16
+ rack (1.3.0)
17
+ rack-openid (1.3.1)
18
+ rack (>= 1.1.0)
19
+ ruby-openid (>= 2.1.8)
20
+ ruby-openid (2.1.8)
21
+
22
+ PLATFORMS
23
+ ruby
24
+
25
+ DEPENDENCIES
26
+ easy-rack-open-id
27
+ openid_mongodb_store!
28
+ rack
data/README.rdoc CHANGED
@@ -10,6 +10,19 @@ db = Mongo::Connection.new('localhost').db('testorama')
10
10
  db.authenticate('foo','bar')
11
11
  OpenidMongodbStore::Store.new(db)
12
12
 
13
+ == Demo
14
+
15
+ ```
16
+ git clone git://github.com/samsm/openid_mongodb_store.git
17
+ cd openid_mongodb_store
18
+ bundle install
19
+ # have mongodb running
20
+ shotgun
21
+ open http://localhost:9292/
22
+ ```
23
+
24
+ Shotgun reloads the application each request, providing a nice sanity check. OpenID library can normally do nonce/association storage in memory, so shotgun is a little extra proof that it's really working.
25
+
13
26
  == Copyright
14
27
 
15
28
  Copyright (c) 2009 Sam Schenkman-Moore. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,53 +1,2 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "openid_mongodb_store"
8
- gem.summary = "An adaptor for storing OpenID nonces and associations with Mongo. Uses 10gen's Mongo Ruby library so should work with MongoMapper, Mongoid, and others."
9
- gem.description = "Like the ActiveRecord Store, but for Mongo."
10
- gem.email = "samsm@samsm.com"
11
- gem.homepage = "http://github.com/samsm/openid_mongodb_store"
12
- gem.authors = ["Sam Schenkman-Moore"]
13
- gem.add_development_dependency "yard", ">= 0"
14
- gem.add_development_dependency "mongo", ">= 1.0.3"
15
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
- end
17
- Jeweler::GemcutterTasks.new
18
- rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
20
- end
21
-
22
- require 'rake/testtask'
23
- Rake::TestTask.new(:test) do |test|
24
- test.libs << 'lib' << 'test'
25
- test.pattern = 'test/**/test_*.rb'
26
- test.verbose = true
27
- end
28
-
29
- begin
30
- require 'rcov/rcovtask'
31
- Rcov::RcovTask.new do |test|
32
- test.libs << 'test'
33
- test.pattern = 'test/**/test_*.rb'
34
- test.verbose = true
35
- end
36
- rescue LoadError
37
- task :rcov do
38
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
39
- end
40
- end
41
-
42
- task :test => :check_dependencies
43
-
44
- task :default => :test
45
-
46
- begin
47
- require 'yard'
48
- YARD::Rake::YardocTask.new
49
- rescue LoadError
50
- task :yardoc do
51
- abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
52
- end
53
- end
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/config.ru CHANGED
@@ -2,8 +2,9 @@ require 'rubygems'
2
2
  require 'rack'
3
3
  require 'rack/openid'
4
4
  require 'easy_rack_open_id'
5
- require 'lib/openid_mongodb_store'
6
- require 'ruby-debug'
5
+ # require 'lib/openid_mongodb_store'
6
+ require "#{File.dirname(__FILE__)}/lib/openid_mongodb_store"
7
+ # require 'ruby-debug'
7
8
 
8
9
  class HelloWorld
9
10
  def call(env)
@@ -10,7 +10,8 @@ module OpenidMongodbStore
10
10
  def self.database
11
11
  @@database
12
12
  end
13
-
14
13
  end
15
14
 
16
- require File.dirname(__FILE__) + '/openid_mongodb_store/store'
15
+ Dir[File.dirname(__FILE__) + '/openid_mongodb_store/*.rb'].each do |file|
16
+ require File.dirname(__FILE__) + '/openid_mongodb_store/' + File.basename(file, File.extname(file))
17
+ end
@@ -0,0 +1,3 @@
1
+ module OpenidMongodbStore
2
+ VERSION = "0.3.0"
3
+ end
@@ -1,59 +1,24 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "openid_mongodb_store/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{openid_mongodb_store}
8
- s.version = "0.2.3"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Sam Schenkman-Moore"]
12
- s.date = %q{2010-10-01}
6
+ s.name = "openid_mongodb_store"
7
+ s.version = OpenidMongodbStore::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Sam Schenkman-Moore"]
10
+ s.email = ["samsm@samsm.com"]
11
+ s.homepage = "http://github.com/samsm/openid_mongodb_store"
12
+ s.summary = %q{An adaptor for storing OpenID nonces and associations with MongoDB. Uses 10gen's Mongo Ruby library so should work with MongoMapper, Mongoid, and others.}
13
13
  s.description = %q{Like the ActiveRecord Store, but for Mongo.}
14
- s.email = %q{samsm@samsm.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "config.ru",
27
- "lib/openid_mongodb_store.rb",
28
- "lib/openid_mongodb_store/store.rb",
29
- "openid_mongodb_store.gemspec",
30
- "test/helper.rb",
31
- "test/test_openid_mongodb_store.rb"
32
- ]
33
- s.homepage = %q{http://github.com/samsm/openid_mongodb_store}
34
- s.rdoc_options = ["--charset=UTF-8"]
35
- s.require_paths = ["lib"]
36
- s.rubygems_version = %q{1.3.7}
37
- s.summary = %q{An adaptor for storing OpenID nonces and associations with Mongo. Uses 10gen's Mongo Ruby library so should work with MongoMapper, Mongoid, and others.}
38
- s.test_files = [
39
- "test/helper.rb",
40
- "test/test_openid_mongodb_store.rb"
41
- ]
42
14
 
43
- if s.respond_to? :specification_version then
44
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
- s.specification_version = 3
15
+ s.rubyforge_project = "openid_mongodb_store"
46
16
 
47
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
- s.add_development_dependency(%q<yard>, [">= 0"])
49
- s.add_development_dependency(%q<mongo>, [">= 1.0.3"])
50
- else
51
- s.add_dependency(%q<yard>, [">= 0"])
52
- s.add_dependency(%q<mongo>, [">= 1.0.3"])
53
- end
54
- else
55
- s.add_dependency(%q<yard>, [">= 0"])
56
- s.add_dependency(%q<mongo>, [">= 1.0.3"])
57
- end
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 'mongo', ['~> 1.3']
23
+ s.add_dependency 'ruby-openid', ['~> 2.1']
58
24
  end
59
-
data/test/helper.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'test/unit'
3
- require 'ruby-debug'
4
3
 
5
4
  $LOAD_PATH.unshift(File.dirname(__FILE__))
6
5
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
@@ -1,4 +1,4 @@
1
- require 'helper'
1
+ require File.dirname(__FILE__) + "/helper"
2
2
 
3
3
  class TestOpenidMongodbStore < Test::Unit::TestCase
4
4
  def test_store_and_retrieve_association
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openid_mongodb_store
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
8
  - 3
10
- version: 0.2.3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Schenkman-Moore
@@ -15,58 +15,60 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-01 00:00:00 -04:00
18
+ date: 2011-05-23 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: yard
22
+ name: mongo
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ">="
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 3
29
+ hash: 9
30
30
  segments:
31
- - 0
32
- version: "0"
33
- type: :development
31
+ - 1
32
+ - 3
33
+ version: "1.3"
34
+ type: :runtime
34
35
  version_requirements: *id001
35
36
  - !ruby/object:Gem::Dependency
36
- name: mongo
37
+ name: ruby-openid
37
38
  prerelease: false
38
39
  requirement: &id002 !ruby/object:Gem::Requirement
39
40
  none: false
40
41
  requirements:
41
- - - ">="
42
+ - - ~>
42
43
  - !ruby/object:Gem::Version
43
- hash: 17
44
+ hash: 1
44
45
  segments:
46
+ - 2
45
47
  - 1
46
- - 0
47
- - 3
48
- version: 1.0.3
49
- type: :development
48
+ version: "2.1"
49
+ type: :runtime
50
50
  version_requirements: *id002
51
51
  description: Like the ActiveRecord Store, but for Mongo.
52
- email: samsm@samsm.com
52
+ email:
53
+ - samsm@samsm.com
53
54
  executables: []
54
55
 
55
56
  extensions: []
56
57
 
57
- extra_rdoc_files:
58
- - LICENSE
59
- - README.rdoc
58
+ extra_rdoc_files: []
59
+
60
60
  files:
61
- - .document
61
+ - .bundle/config
62
62
  - .gitignore
63
+ - Gemfile
64
+ - Gemfile.lock
63
65
  - LICENSE
64
66
  - README.rdoc
65
67
  - Rakefile
66
- - VERSION
67
68
  - config.ru
68
69
  - lib/openid_mongodb_store.rb
69
70
  - lib/openid_mongodb_store/store.rb
71
+ - lib/openid_mongodb_store/version.rb
70
72
  - openid_mongodb_store.gemspec
71
73
  - test/helper.rb
72
74
  - test/test_openid_mongodb_store.rb
@@ -75,8 +77,8 @@ homepage: http://github.com/samsm/openid_mongodb_store
75
77
  licenses: []
76
78
 
77
79
  post_install_message:
78
- rdoc_options:
79
- - --charset=UTF-8
80
+ rdoc_options: []
81
+
80
82
  require_paths:
81
83
  - lib
82
84
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -99,11 +101,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
101
  version: "0"
100
102
  requirements: []
101
103
 
102
- rubyforge_project:
104
+ rubyforge_project: openid_mongodb_store
103
105
  rubygems_version: 1.3.7
104
106
  signing_key:
105
107
  specification_version: 3
106
- summary: An adaptor for storing OpenID nonces and associations with Mongo. Uses 10gen's Mongo Ruby library so should work with MongoMapper, Mongoid, and others.
108
+ summary: An adaptor for storing OpenID nonces and associations with MongoDB. Uses 10gen's Mongo Ruby library so should work with MongoMapper, Mongoid, and others.
107
109
  test_files:
108
110
  - test/helper.rb
109
111
  - test/test_openid_mongodb_store.rb
data/.document DELETED
@@ -1,5 +0,0 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- LICENSE
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.3