Permalink
Browse files

Designate rspec and jeweler as development dependencies so other vers…

…ion can be used by apps using this gem, remove hardcoded postgresql user name and update readme to match, remove debugger statements in specs.
  • Loading branch information...
1 parent 4d53276 commit 8aaede9cb9ec6bb1157921d230d29f879ab6619e @goodwink goodwink committed Sep 19, 2012
Showing with 28 additions and 28 deletions.
  1. +4 −2 Gemfile
  2. +11 −11 Gemfile.lock
  3. +4 −4 README.md
  4. +4 −4 dm-pg-types.gemspec
  5. +0 −2 spec/integration/decimal_array_spec.rb
  6. +5 −5 spec/integration/full_spec.rb
View
@@ -16,6 +16,8 @@ gem 'dm-do-adapter', DM_VERSION
gem 'dm-postgres-adapter', DM_VERSION
gem 'rake', '~> 0.9.2'
-gem 'rspec', '~> 1.3.2'
-gem 'jeweler', '~> 1.8.4'
+group :development do
+ gem 'rspec', '~> 1.3.2'
+ gem 'jeweler', '~> 1.8.4'
+end
View
@@ -15,14 +15,14 @@ GEM
dm-postgres-adapter (1.2.0)
dm-do-adapter (~> 1.2.0)
do_postgres (~> 0.10.6)
- dm-types (1.2.1)
- bcrypt-ruby (~> 3.0.0)
+ dm-types (1.2.2)
+ bcrypt-ruby (~> 3.0)
dm-core (~> 1.2.0)
- fastercsv (~> 1.5.4)
- json (~> 1.6.1)
- multi_json (~> 1.0.3)
- stringex (~> 1.3.0)
- uuidtools (~> 2.1.2)
+ fastercsv (~> 1.5)
+ json (~> 1.6)
+ multi_json (~> 1.0)
+ stringex (~> 1.4)
+ uuidtools (~> 2.1)
dm-validations (1.2.0)
dm-core (~> 1.2.0)
do_postgres (0.10.8)
@@ -34,14 +34,14 @@ GEM
git (>= 1.2.5)
rake
rdoc
- json (1.6.7)
- multi_json (1.0.4)
+ json (1.7.5)
+ multi_json (1.3.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rspec (1.3.2)
- stringex (1.3.3)
- uuidtools (2.1.2)
+ stringex (1.4.0)
+ uuidtools (2.1.3)
PLATFORMS
ruby
View
@@ -13,22 +13,22 @@ and you should be good to go.
DataMapper plugin providing support for PostgreSQL's HSTORE and ARRAY types. An example will suffice
```ruby
-DataMapper.setup(:default, 'postgres://svs@localhost/dm_pg_types_person')
+DataMapper.setup(:default, 'postgres://localhost/dm_pg_types_person')
DataMapper.repository(:default).adapter.execute("DROP TABLE IF EXISTS people")
DataMapper.repository(:default).adapter.execute("CREATE EXTENSION HSTORE")
class Person
include DataMapper::Resource
-
+
property :id, Serial
property :name, String
property :info, HStore
property :decimals, DecimalArray, :scale => 5, :precision => 10
end
-
+
DataMapper.finalize
DataMapper.auto_migrate!
-
+
p = Person.new
p.info = {:a => "b", :c => "d"}
p.decimals = [10.1, 11.2]
View
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["svs"]
- s.date = "2012-09-08"
+ s.date = "2012-09-19"
s.description = "DataMapper plugin providing HSTORE and ARRAY datatype support for postgres"
s.email = "svs [a] svs [d] io"
s.extra_rdoc_files = [
@@ -46,7 +46,7 @@ Gem::Specification.new do |s|
s.homepage = "http://github.com/svs/dm-pg-types"
s.require_paths = ["lib"]
s.rubyforge_project = "dm-pg-types"
- s.rubygems_version = "1.8.23"
+ s.rubygems_version = "1.8.24"
s.summary = "DataMapper plugin providing HSTORE and ARRAY datatype support for postgres"
if s.respond_to? :specification_version then
@@ -62,8 +62,8 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<dm-do-adapter>, ["~> 1.2.0"])
s.add_runtime_dependency(%q<dm-postgres-adapter>, ["~> 1.2.0"])
s.add_runtime_dependency(%q<rake>, ["~> 0.9.2"])
- s.add_runtime_dependency(%q<rspec>, ["~> 1.3.2"])
- s.add_runtime_dependency(%q<jeweler>, ["~> 1.8.4"])
+ s.add_development_dependency(%q<rspec>, ["~> 1.3.2"])
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
s.add_runtime_dependency(%q<data_mapper>, ["~> 1.2.0"])
s.add_runtime_dependency(%q<dm-postgres-adapter>, ["~> 1.2.0"])
else
@@ -1,6 +1,5 @@
require 'spec_helper'
-require 'debugger'
try_spec do
require './spec/fixtures/person'
@@ -35,7 +34,6 @@
describe 'when dumped and loaded again' do
before :all do
- debugger
@resource.save.should be(true)
@resource.reload
end
@@ -3,28 +3,28 @@
describe "dm-pg-types" do
before :all do
# Create the table manually before running this spec.
- DataMapper.setup(:default, 'postgres://svs@localhost/dm_pg_types_person')
+ DataMapper.setup(:default, 'postgres://localhost/dm_pg_types_person')
DataMapper.repository(:default).adapter.execute("DROP TABLE IF EXISTS people")
DataMapper.repository(:default).adapter.execute("CREATE EXTENSION HSTORE") rescue nil
class Person
include DataMapper::Resource
-
+
property :id, Serial
property :name, String
property :info, HStore
property :decimals, DecimalArray, :scale => 5, :precision => 10
end
-
+
DataMapper.finalize
DataMapper.auto_migrate!
-
+
p = Person.new
p.info = {:a => "b", :c => "d"}
p.decimals = [10.1, 11.2]
p.save
@p = Person.last
end
-
+
it "should provide a person with info" do
@p.info.should == {"a" => "b", "c" => "d"}
end

0 comments on commit 8aaede9

Please sign in to comment.