Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ruby gem infrastructure

Change-Id: Id4ba0bb59cabae275620821a00b28bd10e04360c
  • Loading branch information...
commit 24b5a3416b5678abac5b5d8310e7e6235af61885 1 parent 24c983d
@avsej avsej authored
View
4 .gitignore
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
View
5 .yardopts
@@ -0,0 +1,5 @@
+--protected
+--no-private
+-
+README.markdown
+HISTORY.markdown
View
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in couchbase-model.gemspec
+gemspec
View
22 Rakefile
@@ -0,0 +1,22 @@
+# Author:: Couchbase <info@couchbase.com>
+# Copyright:: 2012 Couchbase, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require 'bundler/gem_tasks'
+
+Dir['tasks/*.rake'].sort.each { |f| load f }
+
+task :default => :test
View
26 couchbase-model.gemspec
@@ -0,0 +1,26 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "couchbase/model/version"
+
+Gem::Specification.new do |s|
+ s.name = "couchbase-model"
+ s.version = Couchbase::Model::VERSION
+ s.authors = ["Sergey Avseyev"]
+ s.email = ["sergey.avseyev@gmail.com"]
+ s.homepage = ""
+ s.summary = %q{Declarative interface to Couchbase}
+ s.description = %q{ORM-like interface allows you to persist your models to Couchbase}
+
+ 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"]
+
+ s.add_runtime_dependency 'couchbase', '~> 1.0.0'
+
+ s.add_development_dependency 'rake', '~> 0.8.7'
+ s.add_development_dependency 'minitest'
+ s.add_development_dependency 'rdiscount'
+ s.add_development_dependency 'yard'
+ s.add_development_dependency RUBY_VERSION =~ /^1\.9/ ? 'ruby-debug19' : 'ruby-debug'
+end
View
26 lib/couchbase/model.rb
@@ -0,0 +1,26 @@
+# Author:: Couchbase <info@couchbase.com>
+# Copyright:: 2012 Couchbase, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require 'couchbase/model/version'
+
+module Couchbase
+
+ class Model
+
+ end
+
+end
View
26 lib/couchbase/model/version.rb
@@ -0,0 +1,26 @@
+# Author:: Couchbase <info@couchbase.com>
+# Copyright:: 2012 Couchbase, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+module Couchbase
+
+ class Model
+
+ VERSION = "0.0.1"
+
+ end
+
+end
View
25 tasks/doc.rake
@@ -0,0 +1,25 @@
+# Author:: Couchbase <info@couchbase.com>
+# Copyright:: 2012 Couchbase, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require 'rake/clean'
+require 'yard'
+require 'yard/rake/yardoc_task'
+
+YARD::Rake::YardocTask.new do |t|
+ t.options = %w(--protected --no-private)
+ t.files.push('-', 'README.markdown', 'HISTORY.markdown')
+end
View
35 tasks/test.rake
@@ -0,0 +1,35 @@
+# Author:: Couchbase <info@couchbase.com>
+# Copyright:: 2012 Couchbase, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+require 'rake/testtask'
+require 'rake/clean'
+
+rule 'test/CouchbaseMock.jar' do |task|
+ jar_path = "0.5-SNAPSHOT/CouchbaseMock-0.5-20120222.060643-15.jar"
+ sh %{wget -q -O test/CouchbaseMock.jar http://files.couchbase.com/maven2/org/couchbase/mock/CouchbaseMock/#{jar_path}}
+end
+
+CLOBBER << 'test/CouchbaseMock.jar'
+
+Rake::TestTask.new do |test|
+ test.libs << "test" << "."
+ test.ruby_opts << "-rruby-debug" if ENV['DEBUG']
+ test.pattern = 'test/test_*.rb'
+ test.options = '--verbose'
+end
+
+Rake::Task['test'].prerequisites.unshift('test/CouchbaseMock.jar')
View
21 tasks/util.rake
@@ -0,0 +1,21 @@
+# Author:: Couchbase <info@couchbase.com>
+# Copyright:: 2012 Couchbase, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+desc 'Start an irb session and load the library.'
+task :console => :compile do
+ exec "irb -I lib -rruby-debug -rcouchbase-model"
+end
Please sign in to comment.
Something went wrong with that request. Please try again.