hierarchy 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source :rubygems
2
2
 
3
3
  # DEPENDENCIES
4
- gem 'rails', '>= 3.0'
4
+ gem 'rails', '>= 3.0.2'
5
5
 
6
6
  # DEVELOPMENT
7
7
  gem 'jeweler'
data/Gemfile.lock CHANGED
@@ -3,49 +3,46 @@ GEM
3
3
  specs:
4
4
  RedCloth (4.2.3)
5
5
  abstract (1.0.0)
6
- actionmailer (3.0.1)
7
- actionpack (= 3.0.1)
8
- mail (~> 2.2.5)
9
- actionpack (3.0.1)
10
- activemodel (= 3.0.1)
11
- activesupport (= 3.0.1)
6
+ actionmailer (3.0.2)
7
+ actionpack (= 3.0.2)
8
+ mail (~> 2.2.9)
9
+ actionpack (3.0.2)
10
+ activemodel (= 3.0.2)
11
+ activesupport (= 3.0.2)
12
12
  builder (~> 2.1.2)
13
13
  erubis (~> 2.6.6)
14
14
  i18n (~> 0.4.1)
15
15
  rack (~> 1.2.1)
16
- rack-mount (~> 0.6.12)
17
- rack-test (~> 0.5.4)
16
+ rack-mount (~> 0.6.13)
17
+ rack-test (~> 0.5.6)
18
18
  tzinfo (~> 0.3.23)
19
- activemodel (3.0.1)
20
- activesupport (= 3.0.1)
19
+ activemodel (3.0.2)
20
+ activesupport (= 3.0.2)
21
21
  builder (~> 2.1.2)
22
22
  i18n (~> 0.4.1)
23
- activerecord (3.0.1)
24
- activemodel (= 3.0.1)
25
- activesupport (= 3.0.1)
26
- arel (~> 1.0.0)
23
+ activerecord (3.0.2)
24
+ activemodel (= 3.0.2)
25
+ activesupport (= 3.0.2)
26
+ arel (~> 2.0.2)
27
27
  tzinfo (~> 0.3.23)
28
- activeresource (3.0.1)
29
- activemodel (= 3.0.1)
30
- activesupport (= 3.0.1)
31
- activesupport (3.0.1)
32
- arel (1.0.1)
33
- activesupport (~> 3.0.0)
28
+ activeresource (3.0.2)
29
+ activemodel (= 3.0.2)
30
+ activesupport (= 3.0.2)
31
+ activesupport (3.0.2)
32
+ arel (2.0.2)
34
33
  builder (2.1.2)
35
34
  diff-lcs (1.1.2)
36
35
  erubis (2.6.6)
37
36
  abstract (>= 1.0.0)
38
- gemcutter (0.6.1)
39
37
  git (1.2.5)
40
38
  i18n (0.4.2)
41
- jeweler (1.4.0)
42
- gemcutter (>= 0.1.0)
39
+ jeweler (1.5.1)
40
+ bundler (~> 1.0.0)
43
41
  git (>= 1.2.5)
44
- rubyforge (>= 2.0.0)
45
- json_pure (1.4.6)
46
- mail (2.2.9)
42
+ rake
43
+ mail (2.2.9.1)
47
44
  activesupport (>= 2.3.6)
48
- i18n (~> 0.4.1)
45
+ i18n (>= 0.4.1)
49
46
  mime-types (~> 1.16)
50
47
  treetop (~> 1.4.8)
51
48
  mime-types (1.16)
@@ -56,37 +53,33 @@ GEM
56
53
  rack (>= 1.0.0)
57
54
  rack-test (0.5.6)
58
55
  rack (>= 1.0)
59
- rails (3.0.1)
60
- actionmailer (= 3.0.1)
61
- actionpack (= 3.0.1)
62
- activerecord (= 3.0.1)
63
- activeresource (= 3.0.1)
64
- activesupport (= 3.0.1)
56
+ rails (3.0.2)
57
+ actionmailer (= 3.0.2)
58
+ actionpack (= 3.0.2)
59
+ activerecord (= 3.0.2)
60
+ activeresource (= 3.0.2)
61
+ activesupport (= 3.0.2)
65
62
  bundler (~> 1.0.0)
66
- railties (= 3.0.1)
67
- railties (3.0.1)
68
- actionpack (= 3.0.1)
69
- activesupport (= 3.0.1)
70
- rake (>= 0.8.4)
71
- thor (~> 0.14.0)
63
+ railties (= 3.0.2)
64
+ railties (3.0.2)
65
+ actionpack (= 3.0.2)
66
+ activesupport (= 3.0.2)
67
+ rake (>= 0.8.7)
68
+ thor (~> 0.14.4)
72
69
  rake (0.8.7)
73
- rspec (2.0.1)
74
- rspec-core (~> 2.0.1)
75
- rspec-expectations (~> 2.0.1)
76
- rspec-mocks (~> 2.0.1)
77
- rspec-core (2.0.1)
78
- rspec-expectations (2.0.1)
79
- diff-lcs (>= 1.1.2)
80
- rspec-mocks (2.0.1)
81
- rspec-core (~> 2.0.1)
82
- rspec-expectations (~> 2.0.1)
83
- rubyforge (2.0.4)
84
- json_pure (>= 1.1.7)
85
- thor (0.14.3)
86
- treetop (1.4.8)
70
+ rspec (2.1.0)
71
+ rspec-core (~> 2.1.0)
72
+ rspec-expectations (~> 2.1.0)
73
+ rspec-mocks (~> 2.1.0)
74
+ rspec-core (2.1.0)
75
+ rspec-expectations (2.1.0)
76
+ diff-lcs (~> 1.1.2)
77
+ rspec-mocks (2.1.0)
78
+ thor (0.14.4)
79
+ treetop (1.4.9)
87
80
  polyglot (>= 0.3.1)
88
81
  tzinfo (0.3.23)
89
- yard (0.6.1)
82
+ yard (0.6.2)
90
83
 
91
84
  PLATFORMS
92
85
  ruby
@@ -95,6 +88,6 @@ DEPENDENCIES
95
88
  RedCloth
96
89
  jeweler
97
90
  pg
98
- rails (>= 3.0)
91
+ rails (>= 3.0.2)
99
92
  rspec
100
93
  yard
data/Rakefile CHANGED
@@ -16,7 +16,7 @@ Jeweler::Tasks.new do |gem|
16
16
  gem.homepage = "http://github.com/riscfuture/hierarchy"
17
17
  gem.authors = [ "Tim Morgan" ]
18
18
  gem.required_ruby_version = '>= 1.9'
19
- gem.add_dependency 'rails', '>= 3.0'
19
+ gem.add_dependency 'rails', '>= 3.0.2'
20
20
  end
21
21
  Jeweler::GemcutterTasks.new
22
22
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
1
+ 1.0.3
data/lib/hierarchy.rb CHANGED
@@ -1,21 +1,19 @@
1
1
  # @private
2
2
  module Arel
3
3
  # @private
4
- module Sql
4
+ module Attributes
5
5
  # @private
6
- module Attributes
7
- # @private
8
- def self.for_with_psql(column)
9
- case column.sql_type
10
- when 'ltree' then String
11
- else for_without_psql(column)
12
- end
13
- end
14
- unless singleton_class.method_defined?(:for_without_psql)
15
- singleton_class.send :alias_method, :for_without_psql, :for
16
- singleton_class.send :alias_method, :for, :for_with_psql
6
+ def self.for_with_psql(column)
7
+ p column.sql_type
8
+ case column.sql_type
9
+ when 'ltree' then String
10
+ else for_without_psql(column)
17
11
  end
18
12
  end
13
+ unless singleton_class.method_defined?(:for_without_psql)
14
+ singleton_class.send :alias_method, :for_without_psql, :for
15
+ singleton_class.send :alias_method, :for, :for_with_psql
16
+ end
19
17
  end
20
18
  end
21
19
 
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe Hierarchy do
4
4
  before :each do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 2
9
- version: 1.0.2
8
+ - 3
9
+ version: 1.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tim Morgan
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-11 00:00:00 -08:00
17
+ date: 2010-11-15 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -27,10 +27,91 @@ dependencies:
27
27
  segments:
28
28
  - 3
29
29
  - 0
30
- version: "3.0"
30
+ - 2
31
+ version: 3.0.2
31
32
  type: :runtime
32
33
  prerelease: false
33
34
  version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: jeweler
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: yard
50
+ requirement: &id003 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ version: "0"
58
+ type: :runtime
59
+ prerelease: false
60
+ version_requirements: *id003
61
+ - !ruby/object:Gem::Dependency
62
+ name: RedCloth
63
+ requirement: &id004 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ segments:
69
+ - 0
70
+ version: "0"
71
+ type: :runtime
72
+ prerelease: false
73
+ version_requirements: *id004
74
+ - !ruby/object:Gem::Dependency
75
+ name: pg
76
+ requirement: &id005 !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ segments:
82
+ - 0
83
+ version: "0"
84
+ type: :runtime
85
+ prerelease: false
86
+ version_requirements: *id005
87
+ - !ruby/object:Gem::Dependency
88
+ name: rspec
89
+ requirement: &id006 !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ segments:
95
+ - 0
96
+ version: "0"
97
+ type: :runtime
98
+ prerelease: false
99
+ version_requirements: *id006
100
+ - !ruby/object:Gem::Dependency
101
+ name: rails
102
+ requirement: &id007 !ruby/object:Gem::Requirement
103
+ none: false
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ segments:
108
+ - 3
109
+ - 0
110
+ - 2
111
+ version: 3.0.2
112
+ type: :runtime
113
+ prerelease: false
114
+ version_requirements: *id007
34
115
  description: Adds ActiveRecord support for hierarchial data structures using PostgreSQL's LTREE column type.
35
116
  email: git@timothymorgan.info
36
117
  executables: []
@@ -42,7 +123,6 @@ extra_rdoc_files:
42
123
  - README.textile
43
124
  files:
44
125
  - .document
45
- - .gitignore
46
126
  - .rspec
47
127
  - Gemfile
48
128
  - Gemfile.lock
@@ -64,8 +144,8 @@ homepage: http://github.com/riscfuture/hierarchy
64
144
  licenses: []
65
145
 
66
146
  post_install_message:
67
- rdoc_options:
68
- - --charset=UTF-8
147
+ rdoc_options: []
148
+
69
149
  require_paths:
70
150
  - lib
71
151
  required_ruby_version: !ruby/object:Gem::Requirement
data/.gitignore DELETED
@@ -1,25 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
- .bundle
21
- .rvmrc
22
-
23
- ## PROJECT::DOCUMENTATION
24
- .yardoc
25
- doc