typed-store 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.document +5 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +102 -0
- data/LICENSE.txt +20 -0
- data/README.md +34 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/lib/typed-store.rb +26 -0
- data/test/helper.rb +50 -0
- data/test/test_typed-store.rb +76 -0
- data/typed-store.gemspec +72 -0
- metadata +169 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MzBmZGM0ZDIzNGU2YmNkMWRmMDRkYWE5Y2NmYjdjMGMwYTZhM2ExYQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NGQ2MDI3NDk4YjU0OWY5NDU3Y2VlZTZjZDg0NjAxZGI4M2YzMWRkNQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MmExNWRmYmNjNWZhYzY5MWM2ZDhjOTI0MTczYmY3ZjhhN2JmMzMxMWM5NDE1
|
10
|
+
NzU3NTdlMTM1NzFlZGMzNDQ2YWNiNTA0MTEyNmM5MDBlNTNiYzhkMmJjMzVh
|
11
|
+
OGZjODlhOTJhY2Y2ZTFlZmQ1YWYyMmE4MmI0NmVhMGE3MDJlZGY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTdhZjM3YWQxYWQ1MmRiMjBkZmQ3M2FkZDI0YjJhNmFjNjE2YWQ5NzViNjVj
|
14
|
+
NjRkZjFiN2U3ODEwYzM3OWFhN2NmN2ZmYzc4NWUyOThkMTExMWM1NzZjZjVm
|
15
|
+
ZTQwMWJiNGViYmUzNGJkNTA3OWI4ZGZiNDYxN2U0Y2RkYTQyZTY=
|
data/.document
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
gem "activerecord", ">= 3.2.1"
|
4
|
+
|
5
|
+
# Add dependencies to develop your gem here.
|
6
|
+
# Include everything needed to run rake, tests, features, etc.
|
7
|
+
group :development do
|
8
|
+
gem "shoulda", ">= 0"
|
9
|
+
gem "rdoc", "~> 3.12"
|
10
|
+
gem "bundler", "~> 1.0"
|
11
|
+
gem "jeweler", "~> 2.0.1"
|
12
|
+
gem "simplecov", ">= 0"
|
13
|
+
gem "pry"
|
14
|
+
gem "sqlite3"
|
15
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activemodel (4.0.4)
|
5
|
+
activesupport (= 4.0.4)
|
6
|
+
builder (~> 3.1.0)
|
7
|
+
activerecord (4.0.4)
|
8
|
+
activemodel (= 4.0.4)
|
9
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
10
|
+
activesupport (= 4.0.4)
|
11
|
+
arel (~> 4.0.0)
|
12
|
+
activerecord-deprecated_finders (1.0.3)
|
13
|
+
activesupport (4.0.4)
|
14
|
+
i18n (~> 0.6, >= 0.6.9)
|
15
|
+
minitest (~> 4.2)
|
16
|
+
multi_json (~> 1.3)
|
17
|
+
thread_safe (~> 0.1)
|
18
|
+
tzinfo (~> 0.3.37)
|
19
|
+
addressable (2.3.6)
|
20
|
+
arel (4.0.2)
|
21
|
+
atomic (1.1.16)
|
22
|
+
builder (3.1.4)
|
23
|
+
coderay (1.1.0)
|
24
|
+
descendants_tracker (0.0.3)
|
25
|
+
docile (1.1.3)
|
26
|
+
faraday (0.9.0)
|
27
|
+
multipart-post (>= 1.2, < 3)
|
28
|
+
git (1.2.6)
|
29
|
+
github_api (0.11.3)
|
30
|
+
addressable (~> 2.3)
|
31
|
+
descendants_tracker (~> 0.0.1)
|
32
|
+
faraday (~> 0.8, < 0.10)
|
33
|
+
hashie (>= 1.2)
|
34
|
+
multi_json (>= 1.7.5, < 2.0)
|
35
|
+
nokogiri (~> 1.6.0)
|
36
|
+
oauth2
|
37
|
+
hashie (2.0.5)
|
38
|
+
highline (1.6.21)
|
39
|
+
i18n (0.6.9)
|
40
|
+
jeweler (2.0.1)
|
41
|
+
builder
|
42
|
+
bundler (>= 1.0)
|
43
|
+
git (>= 1.2.5)
|
44
|
+
github_api
|
45
|
+
highline (>= 1.6.15)
|
46
|
+
nokogiri (>= 1.5.10)
|
47
|
+
rake
|
48
|
+
rdoc
|
49
|
+
json (1.8.1)
|
50
|
+
jwt (0.1.11)
|
51
|
+
multi_json (>= 1.5)
|
52
|
+
method_source (0.8.2)
|
53
|
+
mini_portile (0.5.3)
|
54
|
+
minitest (4.7.5)
|
55
|
+
multi_json (1.9.2)
|
56
|
+
multi_xml (0.5.5)
|
57
|
+
multipart-post (2.0.0)
|
58
|
+
nokogiri (1.6.1)
|
59
|
+
mini_portile (~> 0.5.0)
|
60
|
+
oauth2 (0.9.3)
|
61
|
+
faraday (>= 0.8, < 0.10)
|
62
|
+
jwt (~> 0.1.8)
|
63
|
+
multi_json (~> 1.3)
|
64
|
+
multi_xml (~> 0.5)
|
65
|
+
rack (~> 1.2)
|
66
|
+
pry (0.9.12.6)
|
67
|
+
coderay (~> 1.0)
|
68
|
+
method_source (~> 0.8)
|
69
|
+
slop (~> 3.4)
|
70
|
+
rack (1.5.2)
|
71
|
+
rake (10.2.0)
|
72
|
+
rdoc (3.12.2)
|
73
|
+
json (~> 1.4)
|
74
|
+
shoulda (3.5.0)
|
75
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
76
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
77
|
+
shoulda-context (1.1.6)
|
78
|
+
shoulda-matchers (2.5.0)
|
79
|
+
activesupport (>= 3.0.0)
|
80
|
+
simplecov (0.8.2)
|
81
|
+
docile (~> 1.1.0)
|
82
|
+
multi_json
|
83
|
+
simplecov-html (~> 0.8.0)
|
84
|
+
simplecov-html (0.8.0)
|
85
|
+
slop (3.4.7)
|
86
|
+
sqlite3 (1.3.7)
|
87
|
+
thread_safe (0.3.1)
|
88
|
+
atomic (>= 1.1.7, < 2)
|
89
|
+
tzinfo (0.3.39)
|
90
|
+
|
91
|
+
PLATFORMS
|
92
|
+
ruby
|
93
|
+
|
94
|
+
DEPENDENCIES
|
95
|
+
activerecord (>= 3.2.1)
|
96
|
+
bundler (~> 1.0)
|
97
|
+
jeweler (~> 2.0.1)
|
98
|
+
pry
|
99
|
+
rdoc (~> 3.12)
|
100
|
+
shoulda
|
101
|
+
simplecov
|
102
|
+
sqlite3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Michael Baldry
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# typed-store
|
2
|
+
|
3
|
+
Decorates store_accessor with some basic types as follows:
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
class TestClass
|
7
|
+
include TypedStore
|
8
|
+
|
9
|
+
typed_store_accessor :store, {a_str: String},
|
10
|
+
{a_int: Integer},
|
11
|
+
{a_dbl: BigDecimal},
|
12
|
+
{a_time: Time},
|
13
|
+
{a_datetime: DateTime},
|
14
|
+
{a_date: Date}
|
15
|
+
end
|
16
|
+
```
|
17
|
+
|
18
|
+
Postgres hstore was always returning everything as a string
|
19
|
+
|
20
|
+
## Contributing to typed-store
|
21
|
+
|
22
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
23
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
24
|
+
* Fork the project.
|
25
|
+
* Start a feature/bugfix branch.
|
26
|
+
* Commit and push until you are happy with your contribution.
|
27
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
28
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
29
|
+
|
30
|
+
## Copyright
|
31
|
+
|
32
|
+
Copyright (c) 2014 Michael Baldry. See LICENSE.txt for
|
33
|
+
further details.
|
34
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "typed-store"
|
18
|
+
gem.homepage = "http://github.com/brightbits/typed-store"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Specify types for Rails store_accessor}
|
21
|
+
gem.description = %Q{As Postgres HStore column doesn't store types, when you use this in conjuection with store_accessor, it always returns things as strings. This tidies that up.}
|
22
|
+
gem.email = "michael@brightbits.co.uk"
|
23
|
+
gem.authors = ["Michael Baldry"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Code coverage detail"
|
36
|
+
task :simplecov do
|
37
|
+
ENV['COVERAGE'] = "true"
|
38
|
+
Rake::Task['test'].execute
|
39
|
+
end
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rdoc/task'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "typed-store #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
data/lib/typed-store.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
module TypedStore
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
module ClassMethods
|
5
|
+
def typed_store_accessor(store_attribute, *mappings)
|
6
|
+
keys = mappings.map(&:first).map(&:first)
|
7
|
+
|
8
|
+
store_accessor store_attribute, keys
|
9
|
+
|
10
|
+
mappings.each do |mapping|
|
11
|
+
key, type = *mapping.first
|
12
|
+
|
13
|
+
define_method key do
|
14
|
+
value = read_store_attribute(store_attribute, key)
|
15
|
+
return nil unless value
|
16
|
+
return value if type == String
|
17
|
+
return value.to_i if type == Integer
|
18
|
+
return BigDecimal(value) if type == BigDecimal
|
19
|
+
return Time.parse(value) if type == Time
|
20
|
+
return Date.parse(value) if type == Date
|
21
|
+
return DateTime.parse(value) if type == DateTime
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
|
3
|
+
module SimpleCov::Configuration
|
4
|
+
def clean_filters
|
5
|
+
@filters = []
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
SimpleCov.configure do
|
10
|
+
clean_filters
|
11
|
+
load_adapter 'test_frameworks'
|
12
|
+
end
|
13
|
+
|
14
|
+
ENV["COVERAGE"] && SimpleCov.start do
|
15
|
+
add_filter "/.rvm/"
|
16
|
+
end
|
17
|
+
require 'rubygems'
|
18
|
+
require 'bundler'
|
19
|
+
begin
|
20
|
+
Bundler.setup(:default, :development)
|
21
|
+
rescue Bundler::BundlerError => e
|
22
|
+
$stderr.puts e.message
|
23
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
24
|
+
exit e.status_code
|
25
|
+
end
|
26
|
+
require 'test/unit'
|
27
|
+
require 'shoulda'
|
28
|
+
|
29
|
+
require "pry"
|
30
|
+
|
31
|
+
require "active_support/concern"
|
32
|
+
require "active_record"
|
33
|
+
|
34
|
+
ActiveRecord::Base.establish_connection(adapter: "sqlite3",
|
35
|
+
database: ":memory:")
|
36
|
+
|
37
|
+
ActiveRecord::Schema.define do
|
38
|
+
self.verbose = false
|
39
|
+
|
40
|
+
create_table :test_classes, force: true do |t|
|
41
|
+
t.string :store
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
46
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
47
|
+
require 'typed-store'
|
48
|
+
|
49
|
+
class Test::Unit::TestCase
|
50
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class StoreAllAsStrings
|
4
|
+
def self.dump(obj)
|
5
|
+
newobj = obj.dup
|
6
|
+
newobj.each do |k, v|
|
7
|
+
newobj[k] = v.to_s
|
8
|
+
end
|
9
|
+
newobj.to_json
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.load(json)
|
13
|
+
json ? JSON.parse(json) : {}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class TestClass < ActiveRecord::Base
|
18
|
+
serialize :store, StoreAllAsStrings
|
19
|
+
|
20
|
+
include TypedStore
|
21
|
+
|
22
|
+
typed_store_accessor :store, {a_str: String},
|
23
|
+
{a_int: Integer},
|
24
|
+
{a_dbl: BigDecimal},
|
25
|
+
{a_time: Time},
|
26
|
+
{a_datetime: DateTime},
|
27
|
+
{a_date: Date}
|
28
|
+
end
|
29
|
+
|
30
|
+
class TestTypedStore < Test::Unit::TestCase
|
31
|
+
should "it should work" do
|
32
|
+
subject = TestClass.new
|
33
|
+
|
34
|
+
time = Time.now
|
35
|
+
date = Date.today
|
36
|
+
datetime = DateTime.now
|
37
|
+
|
38
|
+
subject.a_str = "this is a test"
|
39
|
+
subject.a_int = 12452
|
40
|
+
subject.a_dbl = 3.33333335
|
41
|
+
subject.a_time = time
|
42
|
+
subject.a_date = date
|
43
|
+
subject.a_datetime = datetime
|
44
|
+
|
45
|
+
subject.save
|
46
|
+
subject.reload
|
47
|
+
|
48
|
+
assert_equal("this is a test", subject.a_str)
|
49
|
+
assert_equal(12452, subject.a_int)
|
50
|
+
assert_equal(3.33333335, subject.a_dbl)
|
51
|
+
assert_equal(time.to_s, subject.a_time.to_s)
|
52
|
+
assert_equal(date.to_s, subject.a_date.to_s)
|
53
|
+
assert_equal(datetime.to_s, subject.a_datetime.to_s)
|
54
|
+
end
|
55
|
+
|
56
|
+
should "let you set and get nils" do
|
57
|
+
subject = TestClass.new
|
58
|
+
|
59
|
+
subject.a_str = nil
|
60
|
+
subject.a_int = nil
|
61
|
+
subject.a_dbl = nil
|
62
|
+
subject.a_time = nil
|
63
|
+
subject.a_date = nil
|
64
|
+
subject.a_datetime = nil
|
65
|
+
|
66
|
+
subject.save
|
67
|
+
subject.reload
|
68
|
+
|
69
|
+
assert_equal(nil, subject.a_str)
|
70
|
+
assert_equal(nil, subject.a_int)
|
71
|
+
assert_equal(nil, subject.a_dbl)
|
72
|
+
assert_equal(nil, subject.a_time)
|
73
|
+
assert_equal(nil, subject.a_date)
|
74
|
+
assert_equal(nil, subject.a_datetime)
|
75
|
+
end
|
76
|
+
end
|
data/typed-store.gemspec
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: typed-store 0.1.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "typed-store"
|
9
|
+
s.version = "0.1.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Michael Baldry"]
|
14
|
+
s.date = "2014-03-25"
|
15
|
+
s.description = "As Postgres HStore column doesn't store types, when you use this in conjuection with store_accessor, it always returns things as strings. This tidies that up."
|
16
|
+
s.email = "michael@brightbits.co.uk"
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
"Gemfile",
|
24
|
+
"Gemfile.lock",
|
25
|
+
"LICENSE.txt",
|
26
|
+
"README.md",
|
27
|
+
"Rakefile",
|
28
|
+
"VERSION",
|
29
|
+
"lib/typed-store.rb",
|
30
|
+
"test/helper.rb",
|
31
|
+
"test/test_typed-store.rb",
|
32
|
+
"typed-store.gemspec"
|
33
|
+
]
|
34
|
+
s.homepage = "http://github.com/brightbits/typed-store"
|
35
|
+
s.licenses = ["MIT"]
|
36
|
+
s.rubygems_version = "2.2.2"
|
37
|
+
s.summary = "Specify types for Rails store_accessor"
|
38
|
+
|
39
|
+
if s.respond_to? :specification_version then
|
40
|
+
s.specification_version = 4
|
41
|
+
|
42
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
43
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 3.2.1"])
|
44
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
45
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
46
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
47
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
48
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
49
|
+
s.add_development_dependency(%q<pry>, [">= 0"])
|
50
|
+
s.add_development_dependency(%q<sqlite3>, [">= 0"])
|
51
|
+
else
|
52
|
+
s.add_dependency(%q<activerecord>, [">= 3.2.1"])
|
53
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
54
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
55
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
56
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
57
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
58
|
+
s.add_dependency(%q<pry>, [">= 0"])
|
59
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
60
|
+
end
|
61
|
+
else
|
62
|
+
s.add_dependency(%q<activerecord>, [">= 3.2.1"])
|
63
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
64
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
65
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
67
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
68
|
+
s.add_dependency(%q<pry>, [">= 0"])
|
69
|
+
s.add_dependency(%q<sqlite3>, [">= 0"])
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
metadata
ADDED
@@ -0,0 +1,169 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: typed-store
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Baldry
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: shoulda
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.12'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.12'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jeweler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.0.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.0.1
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: As Postgres HStore column doesn't store types, when you use this in conjuection
|
126
|
+
with store_accessor, it always returns things as strings. This tidies that up.
|
127
|
+
email: michael@brightbits.co.uk
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files:
|
131
|
+
- LICENSE.txt
|
132
|
+
- README.md
|
133
|
+
files:
|
134
|
+
- .document
|
135
|
+
- Gemfile
|
136
|
+
- Gemfile.lock
|
137
|
+
- LICENSE.txt
|
138
|
+
- README.md
|
139
|
+
- Rakefile
|
140
|
+
- VERSION
|
141
|
+
- lib/typed-store.rb
|
142
|
+
- test/helper.rb
|
143
|
+
- test/test_typed-store.rb
|
144
|
+
- typed-store.gemspec
|
145
|
+
homepage: http://github.com/brightbits/typed-store
|
146
|
+
licenses:
|
147
|
+
- MIT
|
148
|
+
metadata: {}
|
149
|
+
post_install_message:
|
150
|
+
rdoc_options: []
|
151
|
+
require_paths:
|
152
|
+
- lib
|
153
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
163
|
+
requirements: []
|
164
|
+
rubyforge_project:
|
165
|
+
rubygems_version: 2.2.2
|
166
|
+
signing_key:
|
167
|
+
specification_version: 4
|
168
|
+
summary: Specify types for Rails store_accessor
|
169
|
+
test_files: []
|