hyper-i18n 0.99.0 → 0.99.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.travis.yml +5 -13
- data/Gemfile +7 -1
- data/Gemfile.lock +361 -0
- data/Rakefile +9 -0
- data/hyper-i18n.gemspec +8 -5
- data/lib/hyper-i18n/active_model/name.rb +0 -12
- data/lib/hyper-i18n/active_record/class_methods.rb +0 -5
- data/lib/hyper-i18n/hyperloop/component/mixin.rb +1 -1
- data/lib/hyper-i18n/i18n.rb +15 -0
- data/lib/hyper-i18n/version.rb +1 -1
- data/spec/hyper_i18n_spec.rb +33 -0
- data/spec/spec_helper.rb +11 -33
- data/spec/test_app/.gitignore +21 -0
- data/spec/test_app/app/assets/config/manifest.js +3 -0
- data/spec/test_app/app/assets/images/.keep +0 -0
- data/spec/test_app/app/assets/javascripts/application.js +1 -0
- data/spec/test_app/app/assets/javascripts/cable.js +13 -0
- data/spec/test_app/app/assets/javascripts/channels/.keep +0 -0
- data/spec/test_app/app/assets/stylesheets/application.css +15 -0
- data/spec/test_app/app/channels/application_cable/channel.rb +4 -0
- data/spec/test_app/app/channels/application_cable/connection.rb +4 -0
- data/spec/test_app/app/controllers/application_controller.rb +3 -0
- data/spec/test_app/app/controllers/concerns/.keep +0 -0
- data/spec/test_app/app/controllers/test_controller.rb +10 -0
- data/spec/test_app/app/helpers/application_helper.rb +2 -0
- data/spec/test_app/app/jobs/application_job.rb +2 -0
- data/spec/test_app/app/mailers/application_mailer.rb +4 -0
- data/spec/test_app/app/models/application_record.rb +3 -0
- data/spec/test_app/app/models/concerns/.keep +0 -0
- data/spec/test_app/app/views/layouts/application.html.erb +14 -0
- data/spec/test_app/app/views/layouts/mailer.html.erb +13 -0
- data/spec/test_app/app/views/layouts/mailer.text.erb +1 -0
- data/spec/test_app/bin/bundle +3 -0
- data/spec/test_app/bin/rails +9 -0
- data/spec/test_app/bin/rake +9 -0
- data/spec/test_app/bin/setup +34 -0
- data/spec/test_app/bin/spring +17 -0
- data/spec/test_app/bin/update +29 -0
- data/spec/test_app/config/application.rb +19 -0
- data/spec/test_app/config/boot.rb +3 -0
- data/spec/test_app/config/cable.yml +9 -0
- data/spec/test_app/config/database.yml +25 -0
- data/spec/test_app/config/environment.rb +5 -0
- data/spec/test_app/config/environments/development.rb +41 -0
- data/spec/test_app/config/environments/production.rb +86 -0
- data/spec/test_app/config/environments/test.rb +46 -0
- data/spec/test_app/config/initializers/application_controller_renderer.rb +6 -0
- data/spec/test_app/config/initializers/assets.rb +12 -0
- data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/test_app/config/initializers/cookies_serializer.rb +5 -0
- data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/test_app/config/initializers/hyperloop.rb +4 -0
- data/spec/test_app/config/initializers/inflections.rb +16 -0
- data/spec/test_app/config/initializers/mime_types.rb +4 -0
- data/spec/test_app/config/initializers/new_framework_defaults.rb +21 -0
- data/spec/test_app/config/initializers/session_store.rb +3 -0
- data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/test_app/config/locales/en.yml +11 -0
- data/spec/test_app/config/puma.rb +47 -0
- data/spec/test_app/config/routes.rb +4 -0
- data/spec/test_app/config/secrets.yml +22 -0
- data/spec/test_app/config/spring.rb +6 -0
- data/spec/test_app/config.ru +5 -0
- data/spec/test_app/db/seeds.rb +7 -0
- data/spec/test_app/lib/assets/.keep +0 -0
- data/spec/test_app/lib/tasks/.keep +0 -0
- data/spec/test_app/log/.keep +0 -0
- data/spec/test_app/public/404.html +67 -0
- data/spec/test_app/public/422.html +67 -0
- data/spec/test_app/public/500.html +66 -0
- data/spec/test_app/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/test_app/public/apple-touch-icon.png +0 -0
- data/spec/test_app/public/favicon.ico +0 -0
- data/spec/test_app/public/robots.txt +5 -0
- data/spec/test_app/tmp/.keep +0 -0
- data/spec/test_app/vendor/assets/javascripts/.keep +0 -0
- data/spec/test_app/vendor/assets/stylesheets/.keep +0 -0
- metadata +130 -22
- data/CODE_OF_CONDUCT.md +0 -74
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 703dedaa6ad4bc7d05b6edfd611775e3f307eb9a4bc4d6fe41e5769c0862c6cc
|
4
|
+
data.tar.gz: 2f564bd5bafc23da47d3ee8d9b98e840a7679b46dfda4981041a80ad1edb1418
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec9b1dd9c1de21c37f07dbef7e6213e1312840e0ba5d62c1953a9ad530c2b7a501f01929ff6ea30d4d9462ae11ae7c494d8932a47f40d27e3aa87d0168431103
|
7
|
+
data.tar.gz: 384affefbde3dda6af39aab736d1fe9d42d4db2d462d7ff60f925142ce2de127ca2673bb949265c588b853191d78bf70844f7df0c295666b1fcd07dc7930590c
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
dist: trusty
|
2
2
|
language: ruby
|
3
|
+
cache: bundler
|
3
4
|
rvm:
|
4
5
|
- 2.4.4
|
5
6
|
- 2.5.1
|
@@ -9,35 +10,26 @@ env:
|
|
9
10
|
matrix:
|
10
11
|
fast_finish: true
|
11
12
|
allow_failures:
|
12
|
-
|
13
|
+
- rvm: ruby-head
|
13
14
|
before_install:
|
14
15
|
- if [[ "$DRIVER" == "google-chrome" ]]; then wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -; fi
|
15
16
|
- if [[ "$DRIVER" == "google-chrome" ]]; then echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list; fi
|
16
17
|
- if [[ "$DRIVER" == "google-chrome" ]]; then sudo apt-get update -qq && sudo apt-get install -qq -y google-chrome-stable; fi
|
17
|
-
- if [[ "$DRIVER" == "firefox" ]]; then sudo apt-get update -qq && sudo apt-get install -qq -y firefox; fi
|
18
|
-
- if [[ "$DRIVER" == "firefox" ]]; then wget -q https://github.com/mozilla/geckodriver/releases/download/v0.21.0/geckodriver-v0.21.0-linux64.tar.gz; fi
|
19
|
-
- if [[ "$DRIVER" == "firefox" ]]; then tar zxf geckodriver-v0.21.0-linux64.tar.gz; fi
|
20
|
-
- if [[ "$DRIVER" == "firefox" ]]; then sudo mv geckodriver /usr/local/bin/; fi
|
21
18
|
- gem install bundler
|
22
19
|
before_script:
|
23
20
|
- bundle install --jobs=3 --retry=3
|
24
|
-
- if [[ "$DRIVER" == "google-chrome" ]]; then chromedriver-update; fi
|
21
|
+
- if [[ "$DRIVER" == "google-chrome" ]]; then bundle exec chromedriver-update; fi
|
25
22
|
- if [[ "$DRIVER" == "google-chrome" ]]; then ls -lR ~/.chromedriver-helper/; fi
|
26
|
-
- if [[ "$DRIVER" == "google-chrome" ]]; then chromedriver --version; fi
|
23
|
+
- if [[ "$DRIVER" == "google-chrome" ]]; then bundle exec chromedriver --version; fi
|
27
24
|
- if [[ "$DRIVER" == "google-chrome" ]]; then google-chrome --version; fi
|
28
|
-
- if [[ "$DRIVER" == "google-chrome" ]]; then which chromedriver; fi
|
29
25
|
- if [[ "$DRIVER" == "google-chrome" ]]; then which google-chrome; fi
|
30
|
-
- if [[ "$DRIVER" == "firefox" ]]; then firefox --version; fi
|
31
|
-
- if [[ "$DRIVER" == "firefox" ]]; then geckodriver --version; fi
|
32
|
-
- if [[ "$DRIVER" == "firefox" ]]; then which firefox; fi
|
33
|
-
- if [[ "$DRIVER" == "firefox" ]]; then which geckodriver; fi
|
34
26
|
script: bundle exec rspec
|
35
27
|
deploy:
|
36
28
|
provider: rubygems
|
37
29
|
gem: hyper-i18n
|
38
30
|
gemspec: hyper-i18n.gemspec
|
39
31
|
api_key:
|
40
|
-
secure:
|
32
|
+
secure: ku9SGaxOhlbrc1G6F9xSCqITXLHi49IM0HglCX0Gr1QV2lEHa/1V+uTDGiatC5x2fKDF23KPVJ+A/MWO+nr0AGHNhxTJubU4NdhUspWtx8vn4eT9dmQFKjeaQqXBK00B7f97m4zg/yniGQusvt/l6Wq6lx5bGk3EM995zbFROn60JGqYK5yeZoUU7hKG87PFAjKZGkLO+r9bV+Na9m1AfJiQsOJeyG4IHmnUu+YR5moS76/+ikZnXDNDJzsxANljmP6+kRMfO91v077oAdfeJJwKzZndDoY3LBxxp5ZMWCZdqSgvY7hYTrrDIAGUiZr1/SrwGYEKFnMCDErxSsIvPDYfBSp0QPygEDP0tVoO4h3sm1T+0oTejB7+ZWUygJpAlriqVjJxV1Xi3BziejZgQoG8Z8iiHccw0e+4JzLcYGbNPAvVAQYeDgLA8sFj1WlE/HX2sE5Ct1Rg+coR23/2IDuOcZ2UmC7JHXP0PSylr07aa5vA3lIxPc/B//LF2xsQ/9LxFbmAJaVa6Efrc3IcJFghNEHR1nYiKNuRAg8g4+zqdGDlKhmaO9U3cfUZmQvb1qdKjS83nt9VIE8bWchgixW66W65FZ2++Yzi9sDcDlJWIlr/29W8q8KA96E7JzLKT4NrtO83OSDzJFbAzRi1KlmPJZlBx+N5tCuEcBo7pYc=
|
41
33
|
on:
|
42
34
|
tags: true
|
43
35
|
rvm: 2.4.4
|
data/Gemfile
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
3
|
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
4
|
-
|
4
|
+
#gem "opal-jquery", git: "https://github.com/opal/opal-jquery.git", branch: "master"
|
5
|
+
gem 'hyper-spec', path: '../hyper-spec'
|
6
|
+
gem 'hyperloop-config', path: '../hyperloop-config'
|
7
|
+
gem 'hyper-store', path: '../hyper-store'
|
8
|
+
gem 'hyper-component', path: '../hyper-component'
|
9
|
+
gem 'hyper-operation', path: '../hyper-operation'
|
10
|
+
gem 'hyper-model', path: '../hyper-model'
|
5
11
|
# Specify your gem's dependencies in hyper-i18n.gemspec
|
6
12
|
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,361 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/opal/opal-jquery.git
|
3
|
+
revision: 6249dfaf406ecd7199079b4f4d9dc67cfdf4d602
|
4
|
+
branch: master
|
5
|
+
specs:
|
6
|
+
opal-jquery (0.4.3)
|
7
|
+
opal (>= 0.10.0, < 0.12.0)
|
8
|
+
|
9
|
+
PATH
|
10
|
+
remote: ../hyper-component
|
11
|
+
specs:
|
12
|
+
hyper-component (1.0.0.lap28)
|
13
|
+
hyper-store (= 1.0.0.lap28)
|
14
|
+
hyperloop-config (= 1.0.0.lap28)
|
15
|
+
libv8 (~> 6.3.0)
|
16
|
+
mini_racer (~> 0.1.15)
|
17
|
+
opal (>= 0.11.0, < 0.12.0)
|
18
|
+
opal-activesupport (~> 0.3.1)
|
19
|
+
react-rails (>= 2.4.0, < 2.5.0)
|
20
|
+
|
21
|
+
PATH
|
22
|
+
remote: ../hyper-model
|
23
|
+
specs:
|
24
|
+
hyper-model (1.0.0.lap28)
|
25
|
+
activerecord (>= 4.0.0)
|
26
|
+
hyper-component (= 1.0.0.lap28)
|
27
|
+
hyper-operation (= 1.0.0.lap28)
|
28
|
+
|
29
|
+
PATH
|
30
|
+
remote: ../hyper-operation
|
31
|
+
specs:
|
32
|
+
hyper-operation (1.0.0.lap28)
|
33
|
+
activerecord (>= 4.0.0)
|
34
|
+
hyper-component (= 1.0.0.lap28)
|
35
|
+
hyperloop-config (= 1.0.0.lap28)
|
36
|
+
libv8 (~> 6.3.0)
|
37
|
+
mini_racer (~> 0.1.15)
|
38
|
+
mutations
|
39
|
+
opal-activesupport (~> 0.3.1)
|
40
|
+
|
41
|
+
PATH
|
42
|
+
remote: ../hyper-spec
|
43
|
+
specs:
|
44
|
+
hyper-spec (1.0.0.lap28)
|
45
|
+
capybara
|
46
|
+
chromedriver-helper
|
47
|
+
libv8 (~> 6.3.0)
|
48
|
+
method_source
|
49
|
+
mini_racer (~> 0.1.15)
|
50
|
+
opal (>= 0.11.0, < 0.12.0)
|
51
|
+
parser (>= 2.3.3.1)
|
52
|
+
pry
|
53
|
+
rspec-rails
|
54
|
+
selenium-webdriver
|
55
|
+
timecop (~> 0.8.1)
|
56
|
+
uglifier
|
57
|
+
unparser
|
58
|
+
webdrivers
|
59
|
+
|
60
|
+
PATH
|
61
|
+
remote: ../hyper-store
|
62
|
+
specs:
|
63
|
+
hyper-store (1.0.0.lap28)
|
64
|
+
hyperloop-config (= 1.0.0.lap28)
|
65
|
+
opal (>= 0.11.0, < 0.12.0)
|
66
|
+
|
67
|
+
PATH
|
68
|
+
remote: ../hyperloop-config
|
69
|
+
specs:
|
70
|
+
hyperloop-config (1.0.0.lap28)
|
71
|
+
libv8 (~> 6.3.0)
|
72
|
+
mini_racer (~> 0.1.15)
|
73
|
+
opal (>= 0.11.0, < 0.12.0)
|
74
|
+
opal-browser (~> 0.2.0)
|
75
|
+
uglifier
|
76
|
+
|
77
|
+
PATH
|
78
|
+
remote: .
|
79
|
+
specs:
|
80
|
+
hyper-i18n (1.0.0.lap28)
|
81
|
+
hyper-operation (= 1.0.0.lap28)
|
82
|
+
i18n
|
83
|
+
|
84
|
+
GEM
|
85
|
+
remote: https://rubygems.org/
|
86
|
+
specs:
|
87
|
+
abstract_type (0.0.7)
|
88
|
+
actioncable (5.2.1)
|
89
|
+
actionpack (= 5.2.1)
|
90
|
+
nio4r (~> 2.0)
|
91
|
+
websocket-driver (>= 0.6.1)
|
92
|
+
actionmailer (5.2.1)
|
93
|
+
actionpack (= 5.2.1)
|
94
|
+
actionview (= 5.2.1)
|
95
|
+
activejob (= 5.2.1)
|
96
|
+
mail (~> 2.5, >= 2.5.4)
|
97
|
+
rails-dom-testing (~> 2.0)
|
98
|
+
actionpack (5.2.1)
|
99
|
+
actionview (= 5.2.1)
|
100
|
+
activesupport (= 5.2.1)
|
101
|
+
rack (~> 2.0)
|
102
|
+
rack-test (>= 0.6.3)
|
103
|
+
rails-dom-testing (~> 2.0)
|
104
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
105
|
+
actionview (5.2.1)
|
106
|
+
activesupport (= 5.2.1)
|
107
|
+
builder (~> 3.1)
|
108
|
+
erubi (~> 1.4)
|
109
|
+
rails-dom-testing (~> 2.0)
|
110
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
111
|
+
activejob (5.2.1)
|
112
|
+
activesupport (= 5.2.1)
|
113
|
+
globalid (>= 0.3.6)
|
114
|
+
activemodel (5.2.1)
|
115
|
+
activesupport (= 5.2.1)
|
116
|
+
activerecord (5.2.1)
|
117
|
+
activemodel (= 5.2.1)
|
118
|
+
activesupport (= 5.2.1)
|
119
|
+
arel (>= 9.0)
|
120
|
+
activestorage (5.2.1)
|
121
|
+
actionpack (= 5.2.1)
|
122
|
+
activerecord (= 5.2.1)
|
123
|
+
marcel (~> 0.3.1)
|
124
|
+
activesupport (5.2.1)
|
125
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
126
|
+
i18n (>= 0.7, < 2)
|
127
|
+
minitest (~> 5.1)
|
128
|
+
tzinfo (~> 1.1)
|
129
|
+
adamantium (0.2.0)
|
130
|
+
ice_nine (~> 0.11.0)
|
131
|
+
memoizable (~> 0.4.0)
|
132
|
+
addressable (2.5.2)
|
133
|
+
public_suffix (>= 2.0.2, < 4.0)
|
134
|
+
archive-zip (0.11.0)
|
135
|
+
io-like (~> 0.3.0)
|
136
|
+
arel (9.0.0)
|
137
|
+
ast (2.4.0)
|
138
|
+
babel-source (5.8.35)
|
139
|
+
babel-transpiler (0.7.0)
|
140
|
+
babel-source (>= 4.0, < 6)
|
141
|
+
execjs (~> 2.0)
|
142
|
+
builder (3.2.3)
|
143
|
+
capybara (3.7.2)
|
144
|
+
addressable
|
145
|
+
mini_mime (>= 0.1.3)
|
146
|
+
nokogiri (~> 1.8)
|
147
|
+
rack (>= 1.6.0)
|
148
|
+
rack-test (>= 0.6.3)
|
149
|
+
xpath (~> 3.1)
|
150
|
+
childprocess (0.9.0)
|
151
|
+
ffi (~> 1.0, >= 1.0.11)
|
152
|
+
chromedriver-helper (1.2.0)
|
153
|
+
archive-zip (~> 0.10)
|
154
|
+
nokogiri (~> 1.8)
|
155
|
+
coderay (1.1.2)
|
156
|
+
concord (0.1.5)
|
157
|
+
adamantium (~> 0.2.0)
|
158
|
+
equalizer (~> 0.0.9)
|
159
|
+
concurrent-ruby (1.0.5)
|
160
|
+
connection_pool (2.2.2)
|
161
|
+
crass (1.0.4)
|
162
|
+
diff-lcs (1.3)
|
163
|
+
equalizer (0.0.11)
|
164
|
+
erubi (1.7.1)
|
165
|
+
execjs (2.7.0)
|
166
|
+
ffi (1.9.25)
|
167
|
+
globalid (0.4.1)
|
168
|
+
activesupport (>= 4.2.0)
|
169
|
+
hike (1.2.3)
|
170
|
+
i18n (1.1.0)
|
171
|
+
concurrent-ruby (~> 1.0)
|
172
|
+
ice_nine (0.11.2)
|
173
|
+
io-like (0.3.0)
|
174
|
+
jquery-rails (4.3.3)
|
175
|
+
rails-dom-testing (>= 1, < 3)
|
176
|
+
railties (>= 4.2.0)
|
177
|
+
thor (>= 0.14, < 2.0)
|
178
|
+
libv8 (6.3.292.48.1)
|
179
|
+
loofah (2.2.2)
|
180
|
+
crass (~> 1.0.2)
|
181
|
+
nokogiri (>= 1.5.9)
|
182
|
+
mail (2.7.0)
|
183
|
+
mini_mime (>= 0.1.1)
|
184
|
+
marcel (0.3.2)
|
185
|
+
mimemagic (~> 0.3.2)
|
186
|
+
memoizable (0.4.2)
|
187
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
188
|
+
method_source (0.9.0)
|
189
|
+
mimemagic (0.3.2)
|
190
|
+
mini_mime (1.0.1)
|
191
|
+
mini_portile2 (2.3.0)
|
192
|
+
mini_racer (0.1.15)
|
193
|
+
libv8 (~> 6.3)
|
194
|
+
minitest (5.11.3)
|
195
|
+
mutations (0.8.3)
|
196
|
+
activesupport
|
197
|
+
nio4r (2.3.1)
|
198
|
+
nokogiri (1.8.4)
|
199
|
+
mini_portile2 (~> 2.3.0)
|
200
|
+
opal (0.11.3)
|
201
|
+
ast (>= 2.3.0)
|
202
|
+
hike (~> 1.2)
|
203
|
+
parser (= 2.3.3.1)
|
204
|
+
sourcemap (~> 0.1.0)
|
205
|
+
opal-activesupport (0.3.1)
|
206
|
+
opal (>= 0.5.0, < 1.0.0)
|
207
|
+
opal-browser (0.2.0)
|
208
|
+
opal
|
209
|
+
paggio
|
210
|
+
opal-rails (0.9.5)
|
211
|
+
jquery-rails
|
212
|
+
opal (>= 0.11.0, < 0.12)
|
213
|
+
opal-activesupport (>= 0.0.5)
|
214
|
+
opal-jquery (~> 0.4.0)
|
215
|
+
opal-sprockets (~> 0.4.2)
|
216
|
+
rails (>= 4.1, < 6.0)
|
217
|
+
sprockets-rails (>= 2.3.3, < 4.0)
|
218
|
+
opal-sprockets (0.4.2.0.11.0.3.1)
|
219
|
+
opal (~> 0.11.0)
|
220
|
+
sprockets (~> 3.1)
|
221
|
+
tilt (>= 1.4)
|
222
|
+
paggio (0.2.6)
|
223
|
+
parallel (1.12.1)
|
224
|
+
parser (2.3.3.1)
|
225
|
+
ast (~> 2.2)
|
226
|
+
powerpack (0.1.2)
|
227
|
+
procto (0.0.3)
|
228
|
+
pry (0.11.3)
|
229
|
+
coderay (~> 1.1.0)
|
230
|
+
method_source (~> 0.9.0)
|
231
|
+
public_suffix (3.0.3)
|
232
|
+
puma (3.12.0)
|
233
|
+
rack (2.0.5)
|
234
|
+
rack-test (1.1.0)
|
235
|
+
rack (>= 1.0, < 3)
|
236
|
+
rails (5.2.1)
|
237
|
+
actioncable (= 5.2.1)
|
238
|
+
actionmailer (= 5.2.1)
|
239
|
+
actionpack (= 5.2.1)
|
240
|
+
actionview (= 5.2.1)
|
241
|
+
activejob (= 5.2.1)
|
242
|
+
activemodel (= 5.2.1)
|
243
|
+
activerecord (= 5.2.1)
|
244
|
+
activestorage (= 5.2.1)
|
245
|
+
activesupport (= 5.2.1)
|
246
|
+
bundler (>= 1.3.0)
|
247
|
+
railties (= 5.2.1)
|
248
|
+
sprockets-rails (>= 2.0.0)
|
249
|
+
rails-dom-testing (2.0.3)
|
250
|
+
activesupport (>= 4.2.0)
|
251
|
+
nokogiri (>= 1.6)
|
252
|
+
rails-html-sanitizer (1.0.4)
|
253
|
+
loofah (~> 2.2, >= 2.2.2)
|
254
|
+
railties (5.2.1)
|
255
|
+
actionpack (= 5.2.1)
|
256
|
+
activesupport (= 5.2.1)
|
257
|
+
method_source
|
258
|
+
rake (>= 0.8.7)
|
259
|
+
thor (>= 0.19.0, < 2.0)
|
260
|
+
rainbow (2.2.2)
|
261
|
+
rake
|
262
|
+
rake (10.5.0)
|
263
|
+
react-rails (2.4.7)
|
264
|
+
babel-transpiler (>= 0.7.0)
|
265
|
+
connection_pool
|
266
|
+
execjs
|
267
|
+
railties (>= 3.2)
|
268
|
+
tilt
|
269
|
+
rspec (3.8.0)
|
270
|
+
rspec-core (~> 3.8.0)
|
271
|
+
rspec-expectations (~> 3.8.0)
|
272
|
+
rspec-mocks (~> 3.8.0)
|
273
|
+
rspec-core (3.8.0)
|
274
|
+
rspec-support (~> 3.8.0)
|
275
|
+
rspec-expectations (3.8.1)
|
276
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
277
|
+
rspec-support (~> 3.8.0)
|
278
|
+
rspec-mocks (3.8.0)
|
279
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
280
|
+
rspec-support (~> 3.8.0)
|
281
|
+
rspec-rails (3.8.0)
|
282
|
+
actionpack (>= 3.0)
|
283
|
+
activesupport (>= 3.0)
|
284
|
+
railties (>= 3.0)
|
285
|
+
rspec-core (~> 3.8.0)
|
286
|
+
rspec-expectations (~> 3.8.0)
|
287
|
+
rspec-mocks (~> 3.8.0)
|
288
|
+
rspec-support (~> 3.8.0)
|
289
|
+
rspec-support (3.8.0)
|
290
|
+
rubocop (0.51.0)
|
291
|
+
parallel (~> 1.10)
|
292
|
+
parser (>= 2.3.3.1, < 3.0)
|
293
|
+
powerpack (~> 0.1)
|
294
|
+
rainbow (>= 2.2.2, < 3.0)
|
295
|
+
ruby-progressbar (~> 1.7)
|
296
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
297
|
+
ruby-progressbar (1.10.0)
|
298
|
+
rubyzip (1.2.2)
|
299
|
+
selenium-webdriver (3.14.0)
|
300
|
+
childprocess (~> 0.5)
|
301
|
+
rubyzip (~> 1.2)
|
302
|
+
sourcemap (0.1.1)
|
303
|
+
sprockets (3.7.2)
|
304
|
+
concurrent-ruby (~> 1.0)
|
305
|
+
rack (> 1, < 3)
|
306
|
+
sprockets-rails (3.2.1)
|
307
|
+
actionpack (>= 4.0)
|
308
|
+
activesupport (>= 4.0)
|
309
|
+
sprockets (>= 3.0.0)
|
310
|
+
sqlite3 (1.3.13)
|
311
|
+
thor (0.20.0)
|
312
|
+
thread_safe (0.3.6)
|
313
|
+
tilt (2.0.8)
|
314
|
+
timecop (0.8.1)
|
315
|
+
tzinfo (1.2.5)
|
316
|
+
thread_safe (~> 0.1)
|
317
|
+
uglifier (4.1.19)
|
318
|
+
execjs (>= 0.3.0, < 3)
|
319
|
+
unicode-display_width (1.4.0)
|
320
|
+
unparser (0.2.8)
|
321
|
+
abstract_type (~> 0.0.7)
|
322
|
+
adamantium (~> 0.2.0)
|
323
|
+
concord (~> 0.1.5)
|
324
|
+
diff-lcs (~> 1.3)
|
325
|
+
equalizer (~> 0.0.9)
|
326
|
+
parser (>= 2.3.1.2, < 2.6)
|
327
|
+
procto (~> 0.0.2)
|
328
|
+
webdrivers (3.4.0)
|
329
|
+
nokogiri (~> 1.6)
|
330
|
+
rubyzip (~> 1.0)
|
331
|
+
selenium-webdriver (~> 3.0)
|
332
|
+
websocket-driver (0.7.0)
|
333
|
+
websocket-extensions (>= 0.1.0)
|
334
|
+
websocket-extensions (0.1.3)
|
335
|
+
xpath (3.1.0)
|
336
|
+
nokogiri (~> 1.8)
|
337
|
+
|
338
|
+
PLATFORMS
|
339
|
+
ruby
|
340
|
+
|
341
|
+
DEPENDENCIES
|
342
|
+
bundler (~> 1.16.0)
|
343
|
+
chromedriver-helper
|
344
|
+
hyper-component!
|
345
|
+
hyper-i18n!
|
346
|
+
hyper-model!
|
347
|
+
hyper-operation!
|
348
|
+
hyper-spec!
|
349
|
+
hyper-store!
|
350
|
+
hyperloop-config!
|
351
|
+
opal-jquery!
|
352
|
+
opal-rails (~> 0.9.4)
|
353
|
+
pry
|
354
|
+
puma
|
355
|
+
rake (~> 10.0)
|
356
|
+
rspec
|
357
|
+
rubocop (~> 0.51.0)
|
358
|
+
sqlite3
|
359
|
+
|
360
|
+
BUNDLED WITH
|
361
|
+
1.16.0
|
data/Rakefile
CHANGED
data/hyper-i18n.gemspec
CHANGED
@@ -19,15 +19,18 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
+
spec.add_dependency 'hyper-operation', HyperI18n::VERSION
|
22
23
|
spec.add_dependency 'i18n'
|
23
|
-
spec.add_dependency 'hyper-component'
|
24
|
-
spec.add_dependency 'hyper-operation'
|
25
|
-
spec.add_dependency 'hyper-store'
|
26
24
|
|
27
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.16.0'
|
28
26
|
spec.add_development_dependency 'chromedriver-helper'
|
27
|
+
spec.add_development_dependency 'hyper-model', HyperI18n::VERSION
|
28
|
+
spec.add_development_dependency 'hyper-spec', HyperI18n::VERSION
|
29
|
+
spec.add_development_dependency 'opal-rails', '~> 0.9.4'
|
29
30
|
spec.add_development_dependency 'pry'
|
31
|
+
spec.add_development_dependency 'puma'
|
30
32
|
spec.add_development_dependency 'rake', '~> 10.0'
|
31
33
|
spec.add_development_dependency 'rspec'
|
32
|
-
spec.add_development_dependency 'rubocop'
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 0.51.0'
|
35
|
+
spec.add_development_dependency 'sqlite3'
|
33
36
|
end
|
@@ -1,18 +1,6 @@
|
|
1
1
|
# TODO: This should really be in hyper-mesh
|
2
2
|
module ActiveModel
|
3
3
|
class Name
|
4
|
-
attr_reader :name, :klass, :i18n_key
|
5
|
-
|
6
|
-
def initialize(klass)
|
7
|
-
@name = klass.name
|
8
|
-
@klass = klass
|
9
|
-
@i18n_key = :"#{@name.underscore}"
|
10
|
-
end
|
11
|
-
|
12
|
-
def to_s
|
13
|
-
@name
|
14
|
-
end
|
15
|
-
|
16
4
|
def human
|
17
5
|
HyperI18n::I18n.t("activerecord.models.#{i18n_key}")
|
18
6
|
end
|
@@ -1,10 +1,5 @@
|
|
1
1
|
module ActiveRecord
|
2
2
|
module ClassMethods
|
3
|
-
# TODO: This should really be in hyper-mesh
|
4
|
-
def model_name
|
5
|
-
@model_name ||= ActiveModel::Name.new(self)
|
6
|
-
end
|
7
|
-
|
8
3
|
def human_attribute_name(attribute, opts = {})
|
9
4
|
attribute = "activerecord.attributes.#{model_name.i18n_key}.#{attribute}"
|
10
5
|
|
data/lib/hyper-i18n/i18n.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# Legacy definition of HyperI18n
|
1
2
|
module HyperI18n
|
2
3
|
class I18n
|
3
4
|
extend HelperMethods
|
@@ -88,3 +89,17 @@ module HyperI18n
|
|
88
89
|
end
|
89
90
|
end
|
90
91
|
end
|
92
|
+
|
93
|
+
# we now allow directly using I18n on client (as on server)
|
94
|
+
if RUBY_ENGINE == 'opal'
|
95
|
+
module I18n
|
96
|
+
class << self
|
97
|
+
def t(*args)
|
98
|
+
HyperI18n::I18n.t(*args)
|
99
|
+
end
|
100
|
+
def l(*args)
|
101
|
+
HyperI18n::I18n.l(*args)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
data/lib/hyper-i18n/version.rb
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'I18n client methods', js: true do
|
4
|
+
before(:each) do
|
5
|
+
on_client do
|
6
|
+
class MyModel < ActiveRecord::Base
|
7
|
+
end
|
8
|
+
module Components
|
9
|
+
class TestComponent < Hyperloop::Component
|
10
|
+
render(DIV) do
|
11
|
+
DIV(id: :tp1) { t(:the_key) }
|
12
|
+
DIV(id: :tp2) { I18n.t(:hello) }
|
13
|
+
DIV(id: :tp3) { l(Time.parse('1/1/2018 12:45')) }
|
14
|
+
DIV(id: :tp4) { l(Time.parse('1/1/2018 12:45'), '%B %d, %Y at %l:%M %P') }
|
15
|
+
DIV(id: :tp5) { MyModel.model_name.human }
|
16
|
+
DIV(id: :tp6) { MyModel.human_attribute_name('the_attribute') }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
[['component rendering', :client_only], ['prerendering', :server_only]].each do |mode, flag|
|
23
|
+
it "will translate during #{mode}" do
|
24
|
+
mount 'Components::TestComponent', {}, render_on: flag
|
25
|
+
expect(find('#tp1')).to have_content('I am a key')
|
26
|
+
expect(find('#tp2')).to have_content('Hello world')
|
27
|
+
expect(find('#tp3')).to have_content('Mon, 01 Jan 2018 12:45:00')
|
28
|
+
expect(find('#tp4')).to have_content('January 01, 2018 at 12:45 pm')
|
29
|
+
expect(find('#tp5')).to have_content('My Model')
|
30
|
+
expect(find('#tp6')).to have_content('The Attribute')
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,39 +1,17 @@
|
|
1
|
-
ENV["RAILS_ENV"] ||= 'test'
|
2
|
-
|
3
|
-
require 'rspec'
|
4
1
|
require 'pry'
|
2
|
+
require 'opal-browser'
|
5
3
|
|
6
|
-
|
7
|
-
|
8
|
-
config.fail_fast = ENV['FAIL_FAST'] || false
|
9
|
-
config.fixture_path = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures")
|
10
|
-
config.infer_spec_type_from_file_location!
|
11
|
-
config.mock_with :rspec
|
12
|
-
config.raise_errors_for_deprecations!
|
13
|
-
|
14
|
-
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
15
|
-
# examples within a transaction, comment the following line or assign false
|
16
|
-
# instead of true.
|
17
|
-
config.use_transactional_fixtures = true
|
4
|
+
ENV['RAILS_ENV'] ||= 'test'
|
5
|
+
require File.expand_path('../test_app/config/environment', __FILE__)
|
18
6
|
|
19
|
-
|
20
|
-
|
21
|
-
|
7
|
+
require 'rspec/rails'
|
8
|
+
require 'hyper-spec'
|
9
|
+
require 'hyper-i18n'
|
22
10
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
config.
|
27
|
-
|
28
|
-
errors = logs.select { |e| e.level == "SEVERE" && e.message.present? }
|
29
|
-
.map { |m| m.message.gsub(/\\n/, "\n") }.to_a
|
30
|
-
if client_options[:deprecation_warnings] == :on
|
31
|
-
warnings = logs.select { |e| e.level == "WARNING" && e.message.present? }
|
32
|
-
.map { |m| m.message.gsub(/\\n/, "\n") }.to_a
|
33
|
-
puts "\033[0;33;1m\nJavascript client console warnings:\n\n" + warnings.join("\n\n") + "\033[0;30;21m" if warnings.present?
|
34
|
-
end
|
35
|
-
unless client_options[:raise_on_js_errors] == :off
|
36
|
-
raise JavaScriptError, errors.join("\n\n") if errors.present?
|
37
|
-
end
|
11
|
+
RSpec.configure do |config|
|
12
|
+
config.color = true
|
13
|
+
config.formatter = :documentation
|
14
|
+
config.before(:all) do
|
15
|
+
`rm -rf spec/test_app/tmp/cache/`
|
38
16
|
end
|
39
17
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*
|
16
|
+
/tmp/*
|
17
|
+
!/log/.keep
|
18
|
+
!/tmp/.keep
|
19
|
+
|
20
|
+
# Ignore Byebug command history file.
|
21
|
+
.byebug_history
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require 'hyperloop-loader'
|