Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Fix up the ability to require as a gem, with modern bundler/ruby #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
12 changes: 3 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
source 'http://rubygems.org'
source 'https://rubygems.org'

gem 'oauth'
gem 'activesupport'
gem 'i18n'

group :development, :test do
gem 'rake'
gem 'ruby-debug'
end
# Specify your gem's dependencies in google-apps-provision.gemspec
gemspec
22 changes: 22 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2013 Daniel O'Connor

MIT License

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 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.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ obtaining them.

Add the following to your Gemfile:

gem 'google-apps-provision', '0.0.1', :git => 'git://github.com/meet/google-apps-provision.git'
gem 'google-apps-provision', :git => 'git://github.com/meet/google-apps-provision.git'

Then (e.g. in a Rails initializer) specify connection parameters:

Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
require "bundler/gem_tasks"
require 'rake'
require 'rake/testtask'

Rake::TestTask.new do |t|
t.libs << 'test'
t.pattern = 'test/*_test.rb'
end
end
32 changes: 32 additions & 0 deletions google-apps-provision.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'google-apps-provision/version'

Gem::Specification.new do |spec|
spec.name = "google-apps-provision"
spec.version = GoogleApps::Provision::VERSION
spec.authors = ["Daniel O'Connor"]
spec.email = ["daniel.o'connor@htw.com.au"]
spec.description = %q{A library for interacting with the Google Apps Provisioning API in Ruby.}
spec.summary = %q{A library for interacting with the Google Apps Provisioning API in Ruby.

See:
http://code.google.com/googleapps/domain/gdata_provisioning_api_v2.0_developers_protocol.html

Requires OAuth tokens. The `google-apps-tokens` script can assist with
obtaining them.}
spec.homepage = ""
spec.license = "MIT"

spec.files = `git ls-files`.split($/)
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"]

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
spec.add_dependency 'oauth'
spec.add_dependency 'activesupport'
spec.add_dependency 'i18n'
end
2 changes: 1 addition & 1 deletion lib/google-apps-provision/org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module GoogleApps
class OrgUser < Entry

get_all { "#{ENDPOINT}/orguser/2.0/#{GoogleApps.connection.customer_id}?get=all" }
get_one { |email| "#{ENDPOINT}/orgunit/2.0/#{GoogleApps.connection.customer_id}/#{email}" }
get_one { |email| "#{ENDPOINT}/orguser/2.0/#{GoogleApps.connection.customer_id}/#{email}" }
put_updated { |u| "#{ENDPOINT}/orguser/2.0/#{GoogleApps.connection.customer_id}/#{u.org_user_email}" }

properties :org_user_email, :org_unit_path
Expand Down
5 changes: 5 additions & 0 deletions lib/google-apps-provision/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module GoogleApps
module Provision
VERSION = "0.0.1"
end
end