rails_dictionary 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad83ca98316732ec61a94009c4e27fbc1076fa11b09fde448f2e305e3e08779c
4
- data.tar.gz: cf300fbaeeec5d1b982786f0b5bcdc50dc938e5e4e954678b9881bccd56173ed
3
+ metadata.gz: 8e27935b9a8076fd9e421737cef55f78c675c9636e76958112f3b84272582e3e
4
+ data.tar.gz: 15f5c22f8e6bcdc2eadd0e615046f56b5acfd50c23244e06dc95a3863bc678f5
5
5
  SHA512:
6
- metadata.gz: fb40c8172cfe41e4568ffc04efe33ef6a3a3a95d1939969461a1b0b8962319bf21a1963c60fa1c8a84ec8a70d79744870097d3c8340d71d3b0359d1dd95e5dc5
7
- data.tar.gz: 91e2857ceda81421c9462e7201b93b0959e2c0935fe7528053586a27e01bfca15db59a07866131f56b460a2ff393ff9c4fafd0e0228ca681887bddad423128e3
6
+ metadata.gz: 3e82e3e03f11b1f14bda0daf15b5b681149ac5329532906e15e2b82367295fd6e80e16a669beace59efd7a979dfc04d4da9022455a8339642a96edb0e75d078a
7
+ data.tar.gz: da3dd2458660eb485fe50d52d0a29f686d023ed7a378d1da3a3e4b90a0837b76279fd84859716f4457419042a24e4fa2adba6f9d747055559609a4812075d3d2
data/.gitignore CHANGED
@@ -3,4 +3,6 @@ pkg/
3
3
  tmp/*
4
4
  .idea/
5
5
  .byebug_history
6
- log/
6
+ log/
7
+ .DS_Store
8
+ .ruby-version
data/Gemfile CHANGED
@@ -1,11 +1,12 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
+
3
+ ruby '> 3.3'
2
4
 
3
5
  # Specify your gem's dependencies in rails_dictionary.gemspec
4
6
  gemspec
5
7
 
6
8
  group :development,:test do
7
- gem 'rails', '~> 7.0'
8
- gem 'pry-byebug'
9
- gem "rspec-rails", '5.1.0'
9
+ gem 'rails', '< 8.0'
10
+ gem "rspec-rails", '< 8'
10
11
  gem 'sqlite3'
11
12
  end
data/Gemfile.lock CHANGED
@@ -1,193 +1,243 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_dictionary (0.2.5)
5
- rails (> 6.0, < 7.1)
4
+ rails_dictionary (0.2.6)
5
+ rails (< 8)
6
6
 
7
7
  GEM
8
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (7.0.2.2)
11
- actionpack (= 7.0.2.2)
12
- activesupport (= 7.0.2.2)
10
+ actioncable (7.2.1.2)
11
+ actionpack (= 7.2.1.2)
12
+ activesupport (= 7.2.1.2)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailbox (7.0.2.2)
16
- actionpack (= 7.0.2.2)
17
- activejob (= 7.0.2.2)
18
- activerecord (= 7.0.2.2)
19
- activestorage (= 7.0.2.2)
20
- activesupport (= 7.0.2.2)
21
- mail (>= 2.7.1)
22
- net-imap
23
- net-pop
24
- net-smtp
25
- actionmailer (7.0.2.2)
26
- actionpack (= 7.0.2.2)
27
- actionview (= 7.0.2.2)
28
- activejob (= 7.0.2.2)
29
- activesupport (= 7.0.2.2)
30
- mail (~> 2.5, >= 2.5.4)
31
- net-imap
32
- net-pop
33
- net-smtp
34
- rails-dom-testing (~> 2.0)
35
- actionpack (7.0.2.2)
36
- actionview (= 7.0.2.2)
37
- activesupport (= 7.0.2.2)
38
- rack (~> 2.0, >= 2.2.0)
15
+ zeitwerk (~> 2.6)
16
+ actionmailbox (7.2.1.2)
17
+ actionpack (= 7.2.1.2)
18
+ activejob (= 7.2.1.2)
19
+ activerecord (= 7.2.1.2)
20
+ activestorage (= 7.2.1.2)
21
+ activesupport (= 7.2.1.2)
22
+ mail (>= 2.8.0)
23
+ actionmailer (7.2.1.2)
24
+ actionpack (= 7.2.1.2)
25
+ actionview (= 7.2.1.2)
26
+ activejob (= 7.2.1.2)
27
+ activesupport (= 7.2.1.2)
28
+ mail (>= 2.8.0)
29
+ rails-dom-testing (~> 2.2)
30
+ actionpack (7.2.1.2)
31
+ actionview (= 7.2.1.2)
32
+ activesupport (= 7.2.1.2)
33
+ nokogiri (>= 1.8.5)
34
+ racc
35
+ rack (>= 2.2.4, < 3.2)
36
+ rack-session (>= 1.0.1)
39
37
  rack-test (>= 0.6.3)
40
- rails-dom-testing (~> 2.0)
41
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
42
- actiontext (7.0.2.2)
43
- actionpack (= 7.0.2.2)
44
- activerecord (= 7.0.2.2)
45
- activestorage (= 7.0.2.2)
46
- activesupport (= 7.0.2.2)
38
+ rails-dom-testing (~> 2.2)
39
+ rails-html-sanitizer (~> 1.6)
40
+ useragent (~> 0.16)
41
+ actiontext (7.2.1.2)
42
+ actionpack (= 7.2.1.2)
43
+ activerecord (= 7.2.1.2)
44
+ activestorage (= 7.2.1.2)
45
+ activesupport (= 7.2.1.2)
47
46
  globalid (>= 0.6.0)
48
47
  nokogiri (>= 1.8.5)
49
- actionview (7.0.2.2)
50
- activesupport (= 7.0.2.2)
48
+ actionview (7.2.1.2)
49
+ activesupport (= 7.2.1.2)
51
50
  builder (~> 3.1)
52
- erubi (~> 1.4)
53
- rails-dom-testing (~> 2.0)
54
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
55
- activejob (7.0.2.2)
56
- activesupport (= 7.0.2.2)
51
+ erubi (~> 1.11)
52
+ rails-dom-testing (~> 2.2)
53
+ rails-html-sanitizer (~> 1.6)
54
+ activejob (7.2.1.2)
55
+ activesupport (= 7.2.1.2)
57
56
  globalid (>= 0.3.6)
58
- activemodel (7.0.2.2)
59
- activesupport (= 7.0.2.2)
60
- activerecord (7.0.2.2)
61
- activemodel (= 7.0.2.2)
62
- activesupport (= 7.0.2.2)
63
- activestorage (7.0.2.2)
64
- actionpack (= 7.0.2.2)
65
- activejob (= 7.0.2.2)
66
- activerecord (= 7.0.2.2)
67
- activesupport (= 7.0.2.2)
57
+ activemodel (7.2.1.2)
58
+ activesupport (= 7.2.1.2)
59
+ activerecord (7.2.1.2)
60
+ activemodel (= 7.2.1.2)
61
+ activesupport (= 7.2.1.2)
62
+ timeout (>= 0.4.0)
63
+ activestorage (7.2.1.2)
64
+ actionpack (= 7.2.1.2)
65
+ activejob (= 7.2.1.2)
66
+ activerecord (= 7.2.1.2)
67
+ activesupport (= 7.2.1.2)
68
68
  marcel (~> 1.0)
69
- mini_mime (>= 1.1.0)
70
- activesupport (7.0.2.2)
71
- concurrent-ruby (~> 1.0, >= 1.0.2)
69
+ activesupport (7.2.1.2)
70
+ base64
71
+ bigdecimal
72
+ concurrent-ruby (~> 1.0, >= 1.3.1)
73
+ connection_pool (>= 2.2.5)
74
+ drb
72
75
  i18n (>= 1.6, < 2)
76
+ logger (>= 1.4.2)
73
77
  minitest (>= 5.1)
74
- tzinfo (~> 2.0)
75
- builder (3.2.4)
76
- byebug (11.0.1)
77
- coderay (1.1.2)
78
- concurrent-ruby (1.1.9)
78
+ securerandom (>= 0.3)
79
+ tzinfo (~> 2.0, >= 2.0.5)
80
+ base64 (0.2.0)
81
+ bigdecimal (3.1.8)
82
+ builder (3.3.0)
83
+ concurrent-ruby (1.3.4)
84
+ connection_pool (2.4.1)
79
85
  crass (1.0.6)
80
- diff-lcs (1.5.0)
81
- digest (3.1.0)
82
- erubi (1.10.0)
83
- globalid (1.0.0)
84
- activesupport (>= 5.0)
85
- i18n (1.10.0)
86
+ date (3.3.4)
87
+ diff-lcs (1.5.1)
88
+ drb (2.2.1)
89
+ erubi (1.13.0)
90
+ globalid (1.2.1)
91
+ activesupport (>= 6.1)
92
+ i18n (1.14.6)
86
93
  concurrent-ruby (~> 1.0)
87
- io-wait (0.2.1)
88
- loofah (2.14.0)
94
+ io-console (0.7.2)
95
+ irb (1.14.1)
96
+ rdoc (>= 4.0.0)
97
+ reline (>= 0.4.2)
98
+ logger (1.6.1)
99
+ loofah (2.23.1)
89
100
  crass (~> 1.0.2)
90
- nokogiri (>= 1.5.9)
91
- mail (2.7.1)
101
+ nokogiri (>= 1.12.0)
102
+ mail (2.8.1)
92
103
  mini_mime (>= 0.1.1)
93
- marcel (1.0.2)
94
- method_source (0.9.2)
95
- mini_mime (1.1.2)
96
- mini_portile2 (2.8.0)
97
- minitest (5.15.0)
98
- net-imap (0.2.3)
99
- digest
104
+ net-imap
105
+ net-pop
106
+ net-smtp
107
+ marcel (1.0.4)
108
+ mini_mime (1.1.5)
109
+ minitest (5.25.1)
110
+ net-imap (0.5.0)
111
+ date
100
112
  net-protocol
101
- strscan
102
- net-pop (0.1.1)
103
- digest
113
+ net-pop (0.1.2)
104
114
  net-protocol
115
+ net-protocol (0.2.2)
105
116
  timeout
106
- net-protocol (0.1.2)
107
- io-wait
108
- timeout
109
- net-smtp (0.3.1)
110
- digest
117
+ net-smtp (0.5.0)
111
118
  net-protocol
112
- timeout
113
- nio4r (2.5.8)
114
- nokogiri (1.13.4)
115
- mini_portile2 (~> 2.8.0)
119
+ nio4r (2.7.3)
120
+ nokogiri (1.16.7-aarch64-linux)
121
+ racc (~> 1.4)
122
+ nokogiri (1.16.7-arm-linux)
123
+ racc (~> 1.4)
124
+ nokogiri (1.16.7-arm64-darwin)
116
125
  racc (~> 1.4)
117
- pry (0.12.2)
118
- coderay (~> 1.1.0)
119
- method_source (~> 0.9.0)
120
- pry-byebug (3.7.0)
121
- byebug (~> 11.0)
122
- pry (~> 0.10)
123
- racc (1.6.0)
124
- rack (2.2.3)
125
- rack-test (1.1.0)
126
- rack (>= 1.0, < 3)
127
- rails (7.0.2.2)
128
- actioncable (= 7.0.2.2)
129
- actionmailbox (= 7.0.2.2)
130
- actionmailer (= 7.0.2.2)
131
- actionpack (= 7.0.2.2)
132
- actiontext (= 7.0.2.2)
133
- actionview (= 7.0.2.2)
134
- activejob (= 7.0.2.2)
135
- activemodel (= 7.0.2.2)
136
- activerecord (= 7.0.2.2)
137
- activestorage (= 7.0.2.2)
138
- activesupport (= 7.0.2.2)
126
+ nokogiri (1.16.7-x86-linux)
127
+ racc (~> 1.4)
128
+ nokogiri (1.16.7-x86_64-darwin)
129
+ racc (~> 1.4)
130
+ nokogiri (1.16.7-x86_64-linux)
131
+ racc (~> 1.4)
132
+ psych (5.1.2)
133
+ stringio
134
+ racc (1.8.1)
135
+ rack (3.1.8)
136
+ rack-session (2.0.0)
137
+ rack (>= 3.0.0)
138
+ rack-test (2.1.0)
139
+ rack (>= 1.3)
140
+ rackup (2.1.0)
141
+ rack (>= 3)
142
+ webrick (~> 1.8)
143
+ rails (7.2.1.2)
144
+ actioncable (= 7.2.1.2)
145
+ actionmailbox (= 7.2.1.2)
146
+ actionmailer (= 7.2.1.2)
147
+ actionpack (= 7.2.1.2)
148
+ actiontext (= 7.2.1.2)
149
+ actionview (= 7.2.1.2)
150
+ activejob (= 7.2.1.2)
151
+ activemodel (= 7.2.1.2)
152
+ activerecord (= 7.2.1.2)
153
+ activestorage (= 7.2.1.2)
154
+ activesupport (= 7.2.1.2)
139
155
  bundler (>= 1.15.0)
140
- railties (= 7.0.2.2)
141
- rails-dom-testing (2.0.3)
142
- activesupport (>= 4.2.0)
156
+ railties (= 7.2.1.2)
157
+ rails-dom-testing (2.2.0)
158
+ activesupport (>= 5.0.0)
159
+ minitest
143
160
  nokogiri (>= 1.6)
144
- rails-html-sanitizer (1.4.2)
145
- loofah (~> 2.3)
146
- railties (7.0.2.2)
147
- actionpack (= 7.0.2.2)
148
- activesupport (= 7.0.2.2)
149
- method_source
161
+ rails-html-sanitizer (1.6.0)
162
+ loofah (~> 2.21)
163
+ nokogiri (~> 1.14)
164
+ railties (7.2.1.2)
165
+ actionpack (= 7.2.1.2)
166
+ activesupport (= 7.2.1.2)
167
+ irb (~> 1.13)
168
+ rackup (>= 1.0.0)
150
169
  rake (>= 12.2)
151
- thor (~> 1.0)
152
- zeitwerk (~> 2.5)
153
- rake (13.0.6)
154
- rspec-core (3.11.0)
155
- rspec-support (~> 3.11.0)
156
- rspec-expectations (3.11.0)
170
+ thor (~> 1.0, >= 1.2.2)
171
+ zeitwerk (~> 2.6)
172
+ rake (13.2.1)
173
+ rdoc (6.7.0)
174
+ psych (>= 4.0.0)
175
+ reline (0.5.10)
176
+ io-console (~> 0.5)
177
+ rspec-core (3.13.2)
178
+ rspec-support (~> 3.13.0)
179
+ rspec-expectations (3.13.3)
157
180
  diff-lcs (>= 1.2.0, < 2.0)
158
- rspec-support (~> 3.11.0)
159
- rspec-mocks (3.11.0)
181
+ rspec-support (~> 3.13.0)
182
+ rspec-mocks (3.13.2)
160
183
  diff-lcs (>= 1.2.0, < 2.0)
161
- rspec-support (~> 3.11.0)
162
- rspec-rails (5.1.0)
163
- actionpack (>= 5.2)
164
- activesupport (>= 5.2)
165
- railties (>= 5.2)
166
- rspec-core (~> 3.10)
167
- rspec-expectations (~> 3.10)
168
- rspec-mocks (~> 3.10)
169
- rspec-support (~> 3.10)
170
- rspec-support (3.11.0)
171
- sqlite3 (1.4.2)
172
- strscan (3.0.1)
173
- thor (1.2.1)
174
- timeout (0.2.0)
175
- tzinfo (2.0.4)
184
+ rspec-support (~> 3.13.0)
185
+ rspec-rails (7.0.1)
186
+ actionpack (>= 7.0)
187
+ activesupport (>= 7.0)
188
+ railties (>= 7.0)
189
+ rspec-core (~> 3.13)
190
+ rspec-expectations (~> 3.13)
191
+ rspec-mocks (~> 3.13)
192
+ rspec-support (~> 3.13)
193
+ rspec-support (3.13.1)
194
+ securerandom (0.3.1)
195
+ sqlite3 (2.1.1-aarch64-linux-gnu)
196
+ sqlite3 (2.1.1-aarch64-linux-musl)
197
+ sqlite3 (2.1.1-arm-linux-gnu)
198
+ sqlite3 (2.1.1-arm-linux-musl)
199
+ sqlite3 (2.1.1-arm64-darwin)
200
+ sqlite3 (2.1.1-x86-linux-gnu)
201
+ sqlite3 (2.1.1-x86-linux-musl)
202
+ sqlite3 (2.1.1-x86_64-darwin)
203
+ sqlite3 (2.1.1-x86_64-linux-gnu)
204
+ sqlite3 (2.1.1-x86_64-linux-musl)
205
+ stringio (3.1.1)
206
+ thor (1.3.2)
207
+ timeout (0.4.1)
208
+ tzinfo (2.0.6)
176
209
  concurrent-ruby (~> 1.0)
177
- websocket-driver (0.7.5)
210
+ useragent (0.16.10)
211
+ webrick (1.8.2)
212
+ websocket-driver (0.7.6)
178
213
  websocket-extensions (>= 0.1.0)
179
214
  websocket-extensions (0.1.5)
180
- zeitwerk (2.5.4)
215
+ zeitwerk (2.7.1)
181
216
 
182
217
  PLATFORMS
183
- ruby
218
+ aarch64-linux
219
+ aarch64-linux-gnu
220
+ aarch64-linux-musl
221
+ arm-linux
222
+ arm-linux-gnu
223
+ arm-linux-musl
224
+ arm64-darwin
225
+ x86-linux
226
+ x86-linux-gnu
227
+ x86-linux-musl
228
+ x86_64-darwin
229
+ x86_64-linux
230
+ x86_64-linux-gnu
231
+ x86_64-linux-musl
184
232
 
185
233
  DEPENDENCIES
186
- pry-byebug
187
- rails (~> 7.0)
234
+ rails (< 8.0)
188
235
  rails_dictionary!
189
- rspec-rails (= 5.1.0)
236
+ rspec-rails (< 8)
190
237
  sqlite3
191
238
 
239
+ RUBY VERSION
240
+ ruby 3.3.5p100
241
+
192
242
  BUNDLED WITH
193
- 2.2.32
243
+ 2.5.17
data/Rakefile CHANGED
@@ -6,5 +6,5 @@ task :default => [:test]
6
6
  desc "Running Test"
7
7
  task :test do
8
8
  # system "ruby -I . test/rails_dictionary_test.rb " # used with version 0.0.8 or before it
9
- system "rspec spec/rails_dictionary_spec.rb"
9
+ system "bundle exec rspec spec/rails_dictionary_spec.rb"
10
10
  end
@@ -1,16 +1,13 @@
1
1
  module RailsDictionary
2
2
  module ActsAsDictSlave
3
- def self.included(base)
4
- base.extend(ClassMethods)
5
- end
6
-
7
- module ClassMethods
3
+ extend ActiveSupport::Concern
8
4
 
5
+ class_methods do
9
6
  # return columns that exist in DictType#tab_and_column
10
7
  def columns_in_dict_type
11
8
  if ActiveRecord::VERSION::STRING < '3.1'
12
9
  DictType.tab_and_column[self.name.underscore.to_sym]
13
- elsif DictType.table_exists?
10
+ elsif ::DictType.table_exists?
14
11
  DictType.tab_and_column[self.name.underscore.to_sym]
15
12
  else
16
13
  []
@@ -82,7 +79,7 @@ module RailsDictionary
82
79
  end
83
80
  end
84
81
 
85
- end # END ClassMethods
82
+ end # END class_methods
86
83
 
87
84
  end
88
85
  end
@@ -2,7 +2,6 @@ module RailsDictionary
2
2
  module ActsAsDictType
3
3
  def self.included(base)
4
4
  base.extend(ClassMethods)
5
- base.send :include, InstanceMethods
6
5
  base.mattr_accessor :whole_types
7
6
  end
8
7
 
@@ -45,12 +44,9 @@ module RailsDictionary
45
44
  end
46
45
  end
47
46
 
48
- module InstanceMethods
49
- def delete_all_caches
50
- self.whole_types = nil
51
- return true
52
- end
47
+ def delete_all_caches
48
+ self.whole_types = nil
49
+ return true
53
50
  end
54
-
55
51
  end
56
52
  end
@@ -1,11 +1,10 @@
1
+ require "active_support/concern"
2
+
1
3
  module RailsDictionary
2
4
  module ActsAsDictionary
3
- def self.included(base)
4
- base.extend(ClassMethods)
5
- base.send :include,InstanceMethods
6
- end
5
+ extend ActiveSupport::Concern
7
6
 
8
- module ClassMethods
7
+ class_methods do
9
8
 
10
9
  # For rails3
11
10
  # I thought it would be better to define a method in method_missing, Not just generate cache.
@@ -72,15 +71,12 @@ module RailsDictionary
72
71
  end
73
72
  end
74
73
 
75
- end # End ClassMethods
76
-
77
- module InstanceMethods
78
- def delete_dicts_cache
79
- method_name = ::DictType.revert(self.dict_type_id)
80
- Rails.cache.delete("Dictionary.#{method_name}")
81
- return true
82
- end
83
- end # End InstanceMethods
74
+ end # End class_method
84
75
 
76
+ def delete_dicts_cache
77
+ method_name = ::DictType.revert(self.dict_type_id)
78
+ Rails.cache.delete("Dictionary.#{method_name}")
79
+ return true
80
+ end
85
81
  end
86
82
  end
@@ -1,3 +1,3 @@
1
1
  module RailsDictionary
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
@@ -12,10 +12,12 @@ Gem::Specification.new do |s|
12
12
  s.summary = %q{dictionary data for web application}
13
13
  s.description = %q{Rails plugin for mapping static data of web application to Dictionary class}
14
14
 
15
- s.add_runtime_dependency 'rails', '> 6.0', '< 7.1'
15
+
16
+ s.add_runtime_dependency 'rails', '< 8'
16
17
 
17
18
  s.files = `git ls-files`.split("\n")
18
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
21
  s.require_paths = ["lib"]
22
+ s.required_ruby_version = '>= 2.7.0'
21
23
  end
data/spec/fake_app.rb CHANGED
@@ -13,18 +13,6 @@ app.config.active_support.deprecation = :log
13
13
  app.config.eager_load = false
14
14
  app.initialize!
15
15
 
16
- # models
17
- class DictType < ActiveRecord::Base
18
- acts_as_dict_type
19
- end
20
-
21
- class Dictionary < ActiveRecord::Base
22
- acts_as_dictionary
23
- end
24
-
25
- class Student < ActiveRecord::Base
26
- end
27
-
28
16
  #migrations
29
17
  class CreateAllTables < ActiveRecord::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[5.0] : ActiveRecord::Migration
30
18
  def self.up
@@ -0,0 +1,12 @@
1
+ class Dictionary < ActiveRecord::Base
2
+ acts_as_dictionary
3
+ end
4
+
5
+ class DictType < ActiveRecord::Base
6
+ acts_as_dict_type
7
+ end
8
+
9
+ # TODO: Here is a serious code loading issue. Student can't be load before DictType and Dictionary
10
+ class Student < ActiveRecord::Base
11
+ acts_as_dict_slave
12
+ end
@@ -69,6 +69,7 @@ describe RailsDictionary do
69
69
  end
70
70
 
71
71
  describe Student do
72
+ # Run it because dict type value has cached at runtime but data inserted after cache created
72
73
  before :each do
73
74
  Student.acts_as_dict_slave
74
75
  end
@@ -105,7 +106,7 @@ describe RailsDictionary do
105
106
  end
106
107
 
107
108
  it "override default locale" do
108
- Student.acts_as_dict_slave :locale => :fr
109
+ Student.acts_as_dict_consumer :locale => :fr
109
110
  stu_beijing.named_city.should == "Pékin"
110
111
  end
111
112
 
data/spec/spec_helper.rb CHANGED
@@ -12,12 +12,11 @@ require File.join(File.dirname(__FILE__), 'fake_app')
12
12
 
13
13
  require 'rspec/rails'
14
14
 
15
- require 'pry-byebug'
16
-
17
- # $stdout = StringIO.new # remove the noise output. It can also disable pry debugger. Weird
15
+ # $stdout = StringIO.new # remove the noise outputo
18
16
 
19
17
  RSpec.configure do |config|
20
18
  config.use_transactional_fixtures = true
21
19
  config.expect_with(:rspec) { |c| c.syntax = [:should, :expect] }
22
20
  CreateAllTables.up unless ActiveRecord::Base.connection.table_exists? 'dict_types'
21
+ require File.join(File.dirname(__FILE__), 'init_models')
23
22
  end
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_dictionary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raykin Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-19 00:00:00.000000000 Z
11
+ date: 2024-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">"
18
- - !ruby/object:Gem::Version
19
- version: '6.0'
20
17
  - - "<"
21
18
  - !ruby/object:Gem::Version
22
- version: '7.1'
19
+ version: '8'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">"
28
- - !ruby/object:Gem::Version
29
- version: '6.0'
30
24
  - - "<"
31
25
  - !ruby/object:Gem::Version
32
- version: '7.1'
26
+ version: '8'
33
27
  description: Rails plugin for mapping static data of web application to Dictionary
34
28
  class
35
29
  email:
@@ -56,6 +50,7 @@ files:
56
50
  - pkg/rails_dictionary-0.2.3.gem
57
51
  - rails_dictionary.gemspec
58
52
  - spec/fake_app.rb
53
+ - spec/init_models.rb
59
54
  - spec/rails_dictionary_spec.rb
60
55
  - spec/spec_helper.rb
61
56
  homepage: https://github.com/raykin/rails_dictionary
@@ -70,18 +65,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
65
  requirements:
71
66
  - - ">="
72
67
  - !ruby/object:Gem::Version
73
- version: '0'
68
+ version: 2.7.0
74
69
  required_rubygems_version: !ruby/object:Gem::Requirement
75
70
  requirements:
76
71
  - - ">="
77
72
  - !ruby/object:Gem::Version
78
73
  version: '0'
79
74
  requirements: []
80
- rubygems_version: 3.2.32
75
+ rubygems_version: 3.5.16
81
76
  signing_key:
82
77
  specification_version: 4
83
78
  summary: dictionary data for web application
84
79
  test_files:
85
80
  - spec/fake_app.rb
81
+ - spec/init_models.rb
86
82
  - spec/rails_dictionary_spec.rb
87
83
  - spec/spec_helper.rb