Skip to content
This repository has been archived by the owner on Jun 5, 2018. It is now read-only.

Commit

Permalink
Documentation refresh
Browse files Browse the repository at this point in the history
This commit is confusing because I accidentally recreated this
repo in another repo as I couldn't locate it.

In that repo I created version 0.0.6 and pushed that version to
RubyGems. I didn't realize that 0.0.6 included a crashing bug so I
had to yank it. This is why this commit contains a bump to 0.0.7,
in order to avoid any accidental re-release of a 0.0.6 version.

I will trash the other repo I created and rename this one from
oa-codepath (which doesn't match the gem name anymore) to
oa-codeschool (which does).
  • Loading branch information
olivierlacan committed Dec 12, 2014
1 parent 260386d commit 1400d2f
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 91 deletions.
17 changes: 14 additions & 3 deletions .gitignore
@@ -1,4 +1,15 @@
/.bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
*.bundle
*.so
*.o
*.a
mkmf.log
*.gem
.bundle
Gemfile.lock
pkg/*
26 changes: 26 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,26 @@
# Change Log
All notable changes to this project will be documented in this file.

## unreleased
### Fixed
- fix initialized constant bug that caused a instant crash

## 0.0.6 - 2014-12-11 (yanked)
### Added
- this CHANGELOG
- CONTRIBUTING file

### Changed
- fixed documentation to refer to CodeSchool instead of CodePath
- updated LICENSE
- updated homepage

## 0.0.5 - 2011-05-06

## 0.0.4 - 2011-04-15

## 0.0.3 - 2011-04-15

## 0.0.2 - 2011-04-15

## 0.0.1 - 2011-04-15
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,7 @@
# Contribution Guidelines

1. Fork it ( https://github.com/[my-github-username]/oa-codeschool/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
3 changes: 2 additions & 1 deletion Gemfile
@@ -1,2 +1,3 @@
source 'http://rubygems.org'
source 'https://rubygems.org'

gemspec
35 changes: 18 additions & 17 deletions LICENSE.txt
@@ -1,20 +1,21 @@
Copyright (c) 2011 Eric Allam
The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Copyright (c) 2014 Code School

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions README.md
@@ -0,0 +1,54 @@
# oa-codeschool

A backward-compatible OmniAuth gem strategy for Code School.

There a new [omniauth-codeschool](https://github.com/codeschool/omniauth-codeschool)
gem but it requires OmniAuth 1.x and above. This strategy is compatible
with OmniAuth 0.2.x which we still use in older apps.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'oa-codeschool'
```

And then execute:

```
$ bundle
```

Or install it yourself as:

```
$ gem install oa-codeschool
```

## Usage

In your config/initializers/omniauth.rb :

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
provider OmniAuth::Strategies::CodeSchool, 'client_id', 'client_secret'
end
```

By default, the `base_uri` for code_path is set to http://localhost:3000.
In different environments you may want to change it:

```ruby
OmniAuth::Strategies::CodePath.base_uri = "http://codepath.com"
```

Then all you have to do is redirect the `/` link to `/auth/code_school` and
OmniAuth will take care of the rest


## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).

## License
See [LICENSE][LICENSE].
33 changes: 0 additions & 33 deletions README.rdoc

This file was deleted.

15 changes: 1 addition & 14 deletions Rakefile
@@ -1,15 +1,2 @@
require 'bundler'
Bundler::GemHelper.install_tasks
require "bundler/gem_tasks"

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end

task :default => :spec
3 changes: 1 addition & 2 deletions lib/oa-codeschool.rb
Expand Up @@ -8,8 +8,7 @@

module OmniAuth
module Strategies
# Authenticate to Code School utilizing OAuth 2.0 and retrieve
# basic user information.
# Authenticate to Code School with OAuth 2.0 and retrieve basic user information.
#
# @example Basic Usage
# use OmniAuth::Strategies::CodeSchool, 'client_id', 'client_secret'
Expand Down
2 changes: 1 addition & 1 deletion lib/oa-codeschool/version.rb
@@ -1,5 +1,5 @@
module OmniAuth
module Strategies
CODE_SCHOOL_VERSION = '0.0.5'
CODE_SCHOOL_VERSION = '0.0.7'
end
end
42 changes: 22 additions & 20 deletions oa-codeschool.gemspec
@@ -1,26 +1,28 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path('../lib', __FILE__)
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'oa-codeschool/version'

Gem::Specification.new do |s|
s.name = 'oa-codeschool'
s.version = OmniAuth::Strategies::CODE_SCHOOL_VERSION
s.platform = Gem::Platform::RUBY
s.authors = ['Eric Allam']
s.email = ['eric@envylabs.com']
s.homepage = 'https://github.com/envylabs/oa-codeschool'
s.summary = 'Provides an OmniAuth strategy for OAuth2 on CodeSchool.com'
s.description = 'Provides an OmniAuth strategy for OAuth2 on CodeSchool.com'
s.licenses = ['MIT']
Gem::Specification.new do |spec|
spec.name = "oa-codeschool"
spec.version = OmniAuth::Strategies::CODE_SCHOOL_VERSION
spec.authors = ["Eric Allam", "Olivier Lacan"]
spec.email = ["vendor@codeschool.com"]
spec.summary = %q{OAuth2 OmniAuth strategy for Code School}
spec.description = %q{OAuth2 OmniAuth strategy for Code School}
spec.homepage = "https://github.com/codeschool/oa-codeschool/"
spec.license = "MIT"

s.add_runtime_dependency('omniauth', ['~> 0.2.5'])
s.add_runtime_dependency('multi_json', ['>= 0'])
s.add_runtime_dependency('activesupport', ['>= 0'])
spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

s.add_development_dependency('rspec', ['~> 2.3.0'])
spec.add_runtime_dependency('omniauth', ['~> 0.2.5'])
spec.add_runtime_dependency('multi_json', ['>= 0'])
spec.add_runtime_dependency('activesupport', ['>= 0'])

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ['lib']
spec.add_development_dependency('rspec', ['~> 2.3.0'])
spec.add_development_dependency "bundler", "~> 1.7"
spec.add_development_dependency "rake", "~> 10.0"
end

0 comments on commit 1400d2f

Please sign in to comment.