hstore_accessor_rails5 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,48 @@
1
+ require "hstore_accessor"
2
+ require "database_cleaner"
3
+
4
+ DatabaseCleaner.strategy = :truncation
5
+
6
+ RSpec.configure do |config|
7
+ config.mock_with :rspec
8
+ config.order = :random
9
+
10
+ config.before :suite do
11
+ create_database
12
+ end
13
+
14
+ config.before do
15
+ DatabaseCleaner.clean
16
+ end
17
+ end
18
+
19
+ def create_database
20
+ ActiveRecord::Base.establish_connection(
21
+ adapter: "postgresql",
22
+ database: "hstore_accessor",
23
+ username: "postgres"
24
+ )
25
+
26
+ ActiveRecord::Base.connection.execute("CREATE EXTENSION hstore;") rescue ActiveRecord::StatementInvalid
27
+ ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS products;")
28
+ ActiveRecord::Base.connection.execute("DROP TABLE IF EXISTS product_categories;")
29
+
30
+ ActiveRecord::Base.connection.create_table(:products) do |t|
31
+ t.hstore :options
32
+ t.hstore :data
33
+
34
+ t.string :string_type
35
+ t.integer :integer_type
36
+ t.integer :product_category_id
37
+ t.boolean :boolean_type
38
+ t.float :float_type
39
+ t.time :time_type
40
+ t.date :date_type
41
+ t.datetime :datetime_type
42
+ t.decimal :decimal_type
43
+ end
44
+
45
+ ActiveRecord::Base.connection.create_table(:product_categories) do |t|
46
+ t.hstore :options
47
+ end
48
+ end
metadata ADDED
@@ -0,0 +1,217 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hstore_accessor_rails5
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Joe Hirn
8
+ - Cory Stephenson
9
+ - JC Grubbs
10
+ - Tony Coconate
11
+ - Michael Crismali
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+ date: 2017-05-10 00:00:00.000000000 Z
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: activerecord
19
+ requirement: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 4.0.0
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: 4.0.0
31
+ - !ruby/object:Gem::Dependency
32
+ name: appraisal
33
+ requirement: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ - !ruby/object:Gem::Dependency
46
+ name: bundler
47
+ requirement: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '1.7'
52
+ type: :development
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '1.7'
59
+ - !ruby/object:Gem::Dependency
60
+ name: database_cleaner
61
+ requirement: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ - !ruby/object:Gem::Dependency
74
+ name: pry
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ type: :development
81
+ prerelease: false
82
+ version_requirements: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ - !ruby/object:Gem::Dependency
88
+ name: pry-doc
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ - !ruby/object:Gem::Dependency
102
+ name: pry-nav
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ type: :development
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ - !ruby/object:Gem::Dependency
116
+ name: rake
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ type: :development
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ - !ruby/object:Gem::Dependency
130
+ name: rspec
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: 3.1.0
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - "~>"
141
+ - !ruby/object:Gem::Version
142
+ version: 3.1.0
143
+ - !ruby/object:Gem::Dependency
144
+ name: rubocop
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ description: fork of hstore accessor that supports rails 5 .
158
+ email:
159
+ - joe@devmynd.com
160
+ - cory@devmynd.com
161
+ - jc@devmynd.com
162
+ - me@tonycoconate.com
163
+ - michael@devmynd.com
164
+ executables: []
165
+ extensions: []
166
+ extra_rdoc_files: []
167
+ files:
168
+ - ".gitignore"
169
+ - ".rubocop.yml"
170
+ - ".ruby-version"
171
+ - Appraisals
172
+ - Gemfile
173
+ - LICENSE.txt
174
+ - README.md
175
+ - Rakefile
176
+ - gemfiles/activerecord_4.0.gemfile
177
+ - gemfiles/activerecord_4.1.gemfile
178
+ - gemfiles/activerecord_4.2.gemfile
179
+ - hstore_accessor.gemspec
180
+ - lib/hstore_accessor.rb
181
+ - lib/hstore_accessor/active_record_4.2/type_helpers.rb
182
+ - lib/hstore_accessor/active_record_5.0/type_helpers.rb
183
+ - lib/hstore_accessor/active_record_pre_4.2/time_helper.rb
184
+ - lib/hstore_accessor/active_record_pre_4.2/type_helpers.rb
185
+ - lib/hstore_accessor/macro.rb
186
+ - lib/hstore_accessor/serialization.rb
187
+ - lib/hstore_accessor/version.rb
188
+ - spec/hstore_accessor_spec.rb
189
+ - spec/spec_helper.rb
190
+ homepage: http://github.com/devmynd/hstore_accessor
191
+ licenses:
192
+ - MIT
193
+ metadata: {}
194
+ post_install_message: Please note that the `array` and `hash` types are no longer
195
+ supported in version 1.0.0
196
+ rdoc_options: []
197
+ require_paths:
198
+ - lib
199
+ required_ruby_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ requirements: []
210
+ rubyforge_project:
211
+ rubygems_version: 2.6.8
212
+ signing_key:
213
+ specification_version: 4
214
+ summary: Adds typed hstore backed fields to an ActiveRecord model.
215
+ test_files:
216
+ - spec/hstore_accessor_spec.rb
217
+ - spec/spec_helper.rb