hstore_translate 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -6
- data/lib/hstore_translate/version.rb +1 -1
- metadata +57 -61
data/README.md
CHANGED
@@ -9,7 +9,7 @@ maintain separate translation tables.
|
|
9
9
|
|
10
10
|
## Requirements
|
11
11
|
|
12
|
-
* ActiveRecord > 3.1.0
|
12
|
+
* ActiveRecord > 3.1.0 (4+ for JRuby)
|
13
13
|
* I18n
|
14
14
|
|
15
15
|
## Installation
|
@@ -21,9 +21,9 @@ When using bundler, put it in your Gemfile:
|
|
21
21
|
```ruby
|
22
22
|
source 'https://rubygems.org'
|
23
23
|
|
24
|
-
gem 'pg'
|
25
24
|
gem 'activerecord'
|
26
|
-
gem '
|
25
|
+
gem 'pg', :platform => :ruby
|
26
|
+
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
|
27
27
|
gem 'hstore_translate'
|
28
28
|
```
|
29
29
|
|
@@ -33,11 +33,11 @@ Model translations allow you to translate your models' attribute values. E.g.
|
|
33
33
|
|
34
34
|
```ruby
|
35
35
|
class Post < ActiveRecord::Base
|
36
|
-
translates :title, :
|
36
|
+
translates :title, :body
|
37
37
|
end
|
38
38
|
```
|
39
39
|
|
40
|
-
Allows you to translate the attributes :title and :
|
40
|
+
Allows you to translate the attributes :title and :body per locale:
|
41
41
|
|
42
42
|
```ruby
|
43
43
|
I18n.locale = :en
|
@@ -63,7 +63,7 @@ class CreatePosts < ActiveRecord::Migration
|
|
63
63
|
def up
|
64
64
|
create_table :posts do |t|
|
65
65
|
t.column :title_translations, 'hstore'
|
66
|
-
t.column :
|
66
|
+
t.column :body_translations, 'hstore'
|
67
67
|
t.timestamps
|
68
68
|
end
|
69
69
|
end
|
metadata
CHANGED
@@ -1,161 +1,157 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hstore_translate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Rob Worley
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
|
17
|
-
none: false
|
15
|
+
name: activerecord-jdbcpostgresql-adapter
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
17
|
requirements:
|
19
|
-
- -
|
18
|
+
- - '>='
|
20
19
|
- !ruby/object:Gem::Version
|
21
20
|
version: '0'
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
21
|
none: false
|
22
|
+
requirement: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
27
|
+
none: false
|
28
|
+
prerelease: false
|
29
|
+
type: :runtime
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: activerecord
|
32
|
-
|
33
|
-
none: false
|
32
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
33
|
requirements:
|
35
|
-
- -
|
34
|
+
- - '>='
|
36
35
|
- !ruby/object:Gem::Version
|
37
36
|
version: 3.1.0
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
37
|
none: false
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
42
39
|
requirements:
|
43
|
-
- -
|
40
|
+
- - '>='
|
44
41
|
- !ruby/object:Gem::Version
|
45
42
|
version: 3.1.0
|
43
|
+
none: false
|
44
|
+
prerelease: false
|
45
|
+
type: :runtime
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: activerecord-postgres-hstore
|
48
|
-
|
49
|
-
none: false
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
49
|
requirements:
|
51
50
|
- - ~>
|
52
51
|
- !ruby/object:Gem::Version
|
53
52
|
version: 0.7.0
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
53
|
none: false
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
58
55
|
requirements:
|
59
56
|
- - ~>
|
60
57
|
- !ruby/object:Gem::Version
|
61
58
|
version: 0.7.0
|
59
|
+
none: false
|
60
|
+
prerelease: false
|
61
|
+
type: :runtime
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rake
|
64
|
-
|
65
|
-
none: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
65
|
requirements:
|
67
|
-
- -
|
66
|
+
- - '>='
|
68
67
|
- !ruby/object:Gem::Version
|
69
68
|
version: '0'
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
69
|
none: false
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
74
71
|
requirements:
|
75
|
-
- -
|
72
|
+
- - '>='
|
76
73
|
- !ruby/object:Gem::Version
|
77
74
|
version: '0'
|
75
|
+
none: false
|
76
|
+
prerelease: false
|
77
|
+
type: :development
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: minitest
|
80
|
-
|
81
|
-
none: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
81
|
requirements:
|
83
82
|
- - ~>
|
84
83
|
- !ruby/object:Gem::Version
|
85
84
|
version: '4.0'
|
86
|
-
type: :development
|
87
|
-
prerelease: false
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
85
|
none: false
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
90
87
|
requirements:
|
91
88
|
- - ~>
|
92
89
|
- !ruby/object:Gem::Version
|
93
90
|
version: '4.0'
|
91
|
+
none: false
|
92
|
+
prerelease: false
|
93
|
+
type: :development
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: database_cleaner
|
96
|
-
|
97
|
-
none: false
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
98
97
|
requirements:
|
99
|
-
- -
|
98
|
+
- - '>='
|
100
99
|
- !ruby/object:Gem::Version
|
101
100
|
version: '0'
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
101
|
none: false
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
106
103
|
requirements:
|
107
|
-
- -
|
104
|
+
- - '>='
|
108
105
|
- !ruby/object:Gem::Version
|
109
106
|
version: '0'
|
110
|
-
|
111
|
-
|
112
|
-
|
107
|
+
none: false
|
108
|
+
prerelease: false
|
109
|
+
type: :development
|
110
|
+
description: Rails I18n library for ActiveRecord model/data translation using PostgreSQL's hstore datatype. Translations are stored directly in the model table rather than shadow tables.
|
113
111
|
email: robert.worley@gmail.com
|
114
112
|
executables: []
|
115
113
|
extensions: []
|
116
114
|
extra_rdoc_files: []
|
117
115
|
files:
|
116
|
+
- lib/hstore_translate.rb
|
118
117
|
- lib/hstore_translate/translates.rb
|
119
118
|
- lib/hstore_translate/version.rb
|
120
|
-
- lib/hstore_translate.rb
|
121
119
|
- README.md
|
122
120
|
- MIT-LICENSE
|
123
121
|
- test/database.yml
|
122
|
+
- test/test_helper.rb
|
123
|
+
- test/translates_test.rb
|
124
124
|
- test/gemfiles/Gemfile.rails-3.1.x
|
125
125
|
- test/gemfiles/Gemfile.rails-3.2.x
|
126
126
|
- test/gemfiles/Gemfile.rails-4.0.x
|
127
|
-
- test/test_helper.rb
|
128
|
-
- test/translates_test.rb
|
129
127
|
homepage: https://github.com/robworley/hstore_translate
|
130
128
|
licenses: []
|
131
|
-
post_install_message:
|
129
|
+
post_install_message:
|
132
130
|
rdoc_options: []
|
133
131
|
require_paths:
|
134
132
|
- lib
|
135
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
136
|
-
none: false
|
137
134
|
requirements:
|
138
|
-
- -
|
135
|
+
- - '>='
|
139
136
|
- !ruby/object:Gem::Version
|
140
137
|
version: '0'
|
141
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
138
|
none: false
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
140
|
requirements:
|
144
|
-
- -
|
141
|
+
- - '>='
|
145
142
|
- !ruby/object:Gem::Version
|
146
143
|
version: '0'
|
144
|
+
none: false
|
147
145
|
requirements: []
|
148
|
-
rubyforge_project:
|
146
|
+
rubyforge_project:
|
149
147
|
rubygems_version: 1.8.24
|
150
|
-
signing_key:
|
148
|
+
signing_key:
|
151
149
|
specification_version: 3
|
152
|
-
summary: Rails I18n library for ActiveRecord model/data translation using PostgreSQL's
|
153
|
-
hstore datatype.
|
150
|
+
summary: Rails I18n library for ActiveRecord model/data translation using PostgreSQL's hstore datatype.
|
154
151
|
test_files:
|
155
152
|
- test/database.yml
|
153
|
+
- test/test_helper.rb
|
154
|
+
- test/translates_test.rb
|
156
155
|
- test/gemfiles/Gemfile.rails-3.1.x
|
157
156
|
- test/gemfiles/Gemfile.rails-3.2.x
|
158
157
|
- test/gemfiles/Gemfile.rails-4.0.x
|
159
|
-
- test/test_helper.rb
|
160
|
-
- test/translates_test.rb
|
161
|
-
has_rdoc:
|