hyperstack-config 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/.travis.yml +29 -0
  4. data/Gemfile +3 -0
  5. data/Gemfile.lock +303 -0
  6. data/README.md +73 -0
  7. data/Rakefile +11 -0
  8. data/bin/hyperstack-hotloader +22 -0
  9. data/hyperstack-config.gemspec +45 -0
  10. data/lib/hyperstack-config.rb +45 -0
  11. data/lib/hyperstack-hotloader-config.js.erb +7 -0
  12. data/lib/hyperstack-loader-application.rb.erb +1 -0
  13. data/lib/hyperstack-loader-system-code.rb.erb +1 -0
  14. data/lib/hyperstack-loader.js +6 -0
  15. data/lib/hyperstack-prerender-loader-application.rb.erb +1 -0
  16. data/lib/hyperstack-prerender-loader-system-code.rb.erb +1 -0
  17. data/lib/hyperstack-prerender-loader.js +4 -0
  18. data/lib/hyperstack/active_support_string_inquirer.rb +32 -0
  19. data/lib/hyperstack/autoloader.rb +140 -0
  20. data/lib/hyperstack/autoloader_starter.rb +15 -0
  21. data/lib/hyperstack/boot.rb +41 -0
  22. data/lib/hyperstack/client_readers.rb +19 -0
  23. data/lib/hyperstack/client_stubs.rb +12 -0
  24. data/lib/hyperstack/config/version.rb +5 -0
  25. data/lib/hyperstack/config_settings.rb +49 -0
  26. data/lib/hyperstack/context.rb +36 -0
  27. data/lib/hyperstack/deprecation_warning.rb +10 -0
  28. data/lib/hyperstack/env.rb +10 -0
  29. data/lib/hyperstack/environment/development/hyperstack_env.rb +5 -0
  30. data/lib/hyperstack/environment/production/hyperstack_env.rb +5 -0
  31. data/lib/hyperstack/environment/staging/hyperstack_env.rb +5 -0
  32. data/lib/hyperstack/environment/test/hyperstack_env.rb +5 -0
  33. data/lib/hyperstack/hotloader.rb +129 -0
  34. data/lib/hyperstack/hotloader/add_error_boundry.rb +31 -0
  35. data/lib/hyperstack/hotloader/css_reloader.rb +41 -0
  36. data/lib/hyperstack/hotloader/server.rb +296 -0
  37. data/lib/hyperstack/hotloader/short_cut.js +9 -0
  38. data/lib/hyperstack/hotloader/socket.rb +136 -0
  39. data/lib/hyperstack/hotloader/stack-trace.js +2977 -0
  40. data/lib/hyperstack/hotloader/stub.rb +10 -0
  41. data/lib/hyperstack/imports.rb +104 -0
  42. data/lib/hyperstack/js_imports.rb +18 -0
  43. data/lib/hyperstack/on_client.rb +5 -0
  44. data/lib/hyperstack/on_error.rb +5 -0
  45. data/lib/hyperstack/rail_tie.rb +87 -0
  46. data/lib/hyperstack/string.rb +6 -0
  47. metadata +350 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d6c0670834ff5cfb80aa411052edaf9c96bbde0ace44eb49f33ebb78dbdfd48d
4
+ data.tar.gz: 8191d40f44cd3d3741a5c1c8cc0de801d2dbaed63d998c8ed188e11f91a3be8d
5
+ SHA512:
6
+ metadata.gz: 68338aa962d8bce578e9f54d5e0bfe07f1eb3a5bd8957052036bd479a1b55d638383c146cd4b14c1cb8a8b200b4c01712096e19a61cf1ae171b15fd37981eb7f
7
+ data.tar.gz: cd9b2afb94907d092d27604ca7ead59728f4ad7ae87ea314a183d02cf6d071e97d362bb53b6ec2ba4dc9002c756df9cab04864bf2d422f515dc27b11e239cf12
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ /spec/test_app/Gemfile.lock
10
+
11
+ # ignore gems
12
+ *.gem
13
+
14
+ # ignore Idea files
15
+ .idea
@@ -0,0 +1,29 @@
1
+ dist: trusty
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.4.4
6
+ - 2.5.1
7
+ - ruby-head
8
+ env:
9
+ - DRIVER=google-chrome TZ=Europe/Berlin
10
+ matrix:
11
+ fast_finish: true
12
+ allow_failures:
13
+ - rvm: ruby-head
14
+ before_install:
15
+ - if [[ "$DRIVER" == "google-chrome" ]]; then wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -; fi
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
17
+ - if [[ "$DRIVER" == "google-chrome" ]]; then sudo apt-get update -qq && sudo apt-get install -qq -y google-chrome-stable; fi
18
+ - gem install bundler
19
+ before_script:
20
+ - cd spec/test_app
21
+ - bundle install --jobs=3 --retry=3
22
+ - bundle exec rails db:setup
23
+ - cd ../../
24
+ - if [[ "$DRIVER" == "google-chrome" ]]; then bundle exec chromedriver-update; fi
25
+ - if [[ "$DRIVER" == "google-chrome" ]]; then ls -lR ~/.chromedriver-helper/; fi
26
+ - if [[ "$DRIVER" == "google-chrome" ]]; then bundle exec chromedriver --version; fi
27
+ - if [[ "$DRIVER" == "google-chrome" ]]; then google-chrome --version; fi
28
+ - if [[ "$DRIVER" == "google-chrome" ]]; then which google-chrome; fi
29
+ script: bundle exec rspec
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gem 'hyper-spec', path: '../hyper-spec'
3
+ gemspec
@@ -0,0 +1,303 @@
1
+ PATH
2
+ remote: ../hyper-spec
3
+ specs:
4
+ hyper-spec (0.1)
5
+ capybara
6
+ chromedriver-helper (= 1.2.0)
7
+ libv8 (~> 6.3.0)
8
+ method_source
9
+ mini_racer (~> 0.1.15)
10
+ opal (>= 0.11.0, < 0.12.0)
11
+ parser (>= 2.3.3.1)
12
+ pry
13
+ rspec-rails
14
+ selenium-webdriver
15
+ timecop (~> 0.8.1)
16
+ uglifier
17
+ unparser
18
+ webdrivers
19
+
20
+ PATH
21
+ remote: .
22
+ specs:
23
+ hyperstack-config (0.1)
24
+ libv8 (~> 6.3.0)
25
+ listen (~> 3.0)
26
+ mini_racer (~> 0.1.15)
27
+ opal (>= 0.11.0, < 0.12.0)
28
+ opal-browser (~> 0.2.0)
29
+ uglifier
30
+ websocket
31
+
32
+ GEM
33
+ remote: https://rubygems.org/
34
+ specs:
35
+ abstract_type (0.0.7)
36
+ actioncable (5.2.1)
37
+ actionpack (= 5.2.1)
38
+ nio4r (~> 2.0)
39
+ websocket-driver (>= 0.6.1)
40
+ actionmailer (5.2.1)
41
+ actionpack (= 5.2.1)
42
+ actionview (= 5.2.1)
43
+ activejob (= 5.2.1)
44
+ mail (~> 2.5, >= 2.5.4)
45
+ rails-dom-testing (~> 2.0)
46
+ actionpack (5.2.1)
47
+ actionview (= 5.2.1)
48
+ activesupport (= 5.2.1)
49
+ rack (~> 2.0)
50
+ rack-test (>= 0.6.3)
51
+ rails-dom-testing (~> 2.0)
52
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
53
+ actionview (5.2.1)
54
+ activesupport (= 5.2.1)
55
+ builder (~> 3.1)
56
+ erubi (~> 1.4)
57
+ rails-dom-testing (~> 2.0)
58
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
59
+ activejob (5.2.1)
60
+ activesupport (= 5.2.1)
61
+ globalid (>= 0.3.6)
62
+ activemodel (5.2.1)
63
+ activesupport (= 5.2.1)
64
+ activerecord (5.2.1)
65
+ activemodel (= 5.2.1)
66
+ activesupport (= 5.2.1)
67
+ arel (>= 9.0)
68
+ activestorage (5.2.1)
69
+ actionpack (= 5.2.1)
70
+ activerecord (= 5.2.1)
71
+ marcel (~> 0.3.1)
72
+ activesupport (5.2.1)
73
+ concurrent-ruby (~> 1.0, >= 1.0.2)
74
+ i18n (>= 0.7, < 2)
75
+ minitest (~> 5.1)
76
+ tzinfo (~> 1.1)
77
+ adamantium (0.2.0)
78
+ ice_nine (~> 0.11.0)
79
+ memoizable (~> 0.4.0)
80
+ addressable (2.5.2)
81
+ public_suffix (>= 2.0.2, < 4.0)
82
+ archive-zip (0.11.0)
83
+ io-like (~> 0.3.0)
84
+ arel (9.0.0)
85
+ ast (2.4.0)
86
+ builder (3.2.3)
87
+ capybara (3.9.0)
88
+ addressable
89
+ mini_mime (>= 0.1.3)
90
+ nokogiri (~> 1.8)
91
+ rack (>= 1.6.0)
92
+ rack-test (>= 0.6.3)
93
+ xpath (~> 3.1)
94
+ childprocess (0.9.0)
95
+ ffi (~> 1.0, >= 1.0.11)
96
+ chromedriver-helper (1.2.0)
97
+ archive-zip (~> 0.10)
98
+ nokogiri (~> 1.8)
99
+ coderay (1.1.2)
100
+ concord (0.1.5)
101
+ adamantium (~> 0.2.0)
102
+ equalizer (~> 0.0.9)
103
+ concurrent-ruby (1.0.5)
104
+ crass (1.0.4)
105
+ diff-lcs (1.3)
106
+ equalizer (0.0.11)
107
+ erubi (1.7.1)
108
+ execjs (2.7.0)
109
+ ffi (1.9.25)
110
+ globalid (0.4.1)
111
+ activesupport (>= 4.2.0)
112
+ hike (1.2.3)
113
+ i18n (1.1.0)
114
+ concurrent-ruby (~> 1.0)
115
+ ice_nine (0.11.2)
116
+ io-like (0.3.0)
117
+ jquery-rails (4.3.3)
118
+ rails-dom-testing (>= 1, < 3)
119
+ railties (>= 4.2.0)
120
+ thor (>= 0.14, < 2.0)
121
+ libv8 (6.3.292.48.1-x86_64-darwin-15)
122
+ listen (3.1.5)
123
+ rb-fsevent (~> 0.9, >= 0.9.4)
124
+ rb-inotify (~> 0.9, >= 0.9.7)
125
+ ruby_dep (~> 1.2)
126
+ loofah (2.2.2)
127
+ crass (~> 1.0.2)
128
+ nokogiri (>= 1.5.9)
129
+ mail (2.7.0)
130
+ mini_mime (>= 0.1.1)
131
+ marcel (0.3.2)
132
+ mimemagic (~> 0.3.2)
133
+ memoizable (0.4.2)
134
+ thread_safe (~> 0.3, >= 0.3.1)
135
+ method_source (0.9.0)
136
+ mimemagic (0.3.2)
137
+ mini_mime (1.0.1)
138
+ mini_portile2 (2.3.0)
139
+ mini_racer (0.1.15)
140
+ libv8 (~> 6.3)
141
+ minitest (5.11.3)
142
+ nio4r (2.3.1)
143
+ nokogiri (1.8.4)
144
+ mini_portile2 (~> 2.3.0)
145
+ opal (0.11.3)
146
+ ast (>= 2.3.0)
147
+ hike (~> 1.2)
148
+ parser (= 2.3.3.1)
149
+ sourcemap (~> 0.1.0)
150
+ opal-activesupport (0.3.1)
151
+ opal (>= 0.5.0, < 1.0.0)
152
+ opal-browser (0.2.0)
153
+ opal
154
+ paggio
155
+ opal-jquery (0.4.3)
156
+ opal (>= 0.10.0, < 0.12.0)
157
+ opal-rails (0.9.5)
158
+ jquery-rails
159
+ opal (>= 0.11.0, < 0.12)
160
+ opal-activesupport (>= 0.0.5)
161
+ opal-jquery (~> 0.4.0)
162
+ opal-sprockets (~> 0.4.2)
163
+ rails (>= 4.1, < 6.0)
164
+ sprockets-rails (>= 2.3.3, < 4.0)
165
+ opal-sprockets (0.4.2.0.11.0.3.1)
166
+ opal (~> 0.11.0)
167
+ sprockets (~> 3.1)
168
+ tilt (>= 1.4)
169
+ paggio (0.2.6)
170
+ parallel (1.12.1)
171
+ parser (2.3.3.1)
172
+ ast (~> 2.2)
173
+ powerpack (0.1.2)
174
+ procto (0.0.3)
175
+ pry (0.11.3)
176
+ coderay (~> 1.1.0)
177
+ method_source (~> 0.9.0)
178
+ public_suffix (3.0.3)
179
+ puma (3.12.0)
180
+ rack (2.0.5)
181
+ rack-test (1.1.0)
182
+ rack (>= 1.0, < 3)
183
+ rails (5.2.1)
184
+ actioncable (= 5.2.1)
185
+ actionmailer (= 5.2.1)
186
+ actionpack (= 5.2.1)
187
+ actionview (= 5.2.1)
188
+ activejob (= 5.2.1)
189
+ activemodel (= 5.2.1)
190
+ activerecord (= 5.2.1)
191
+ activestorage (= 5.2.1)
192
+ activesupport (= 5.2.1)
193
+ bundler (>= 1.3.0)
194
+ railties (= 5.2.1)
195
+ sprockets-rails (>= 2.0.0)
196
+ rails-dom-testing (2.0.3)
197
+ activesupport (>= 4.2.0)
198
+ nokogiri (>= 1.6)
199
+ rails-html-sanitizer (1.0.4)
200
+ loofah (~> 2.2, >= 2.2.2)
201
+ railties (5.2.1)
202
+ actionpack (= 5.2.1)
203
+ activesupport (= 5.2.1)
204
+ method_source
205
+ rake (>= 0.8.7)
206
+ thor (>= 0.19.0, < 2.0)
207
+ rainbow (2.2.2)
208
+ rake
209
+ rake (12.3.1)
210
+ rb-fsevent (0.10.3)
211
+ rb-inotify (0.9.10)
212
+ ffi (>= 0.5.0, < 2)
213
+ rspec (3.7.0)
214
+ rspec-core (~> 3.7.0)
215
+ rspec-expectations (~> 3.7.0)
216
+ rspec-mocks (~> 3.7.0)
217
+ rspec-core (3.7.1)
218
+ rspec-support (~> 3.7.0)
219
+ rspec-expectations (3.7.0)
220
+ diff-lcs (>= 1.2.0, < 2.0)
221
+ rspec-support (~> 3.7.0)
222
+ rspec-mocks (3.7.0)
223
+ diff-lcs (>= 1.2.0, < 2.0)
224
+ rspec-support (~> 3.7.0)
225
+ rspec-rails (3.7.2)
226
+ actionpack (>= 3.0)
227
+ activesupport (>= 3.0)
228
+ railties (>= 3.0)
229
+ rspec-core (~> 3.7.0)
230
+ rspec-expectations (~> 3.7.0)
231
+ rspec-mocks (~> 3.7.0)
232
+ rspec-support (~> 3.7.0)
233
+ rspec-support (3.7.1)
234
+ rubocop (0.51.0)
235
+ parallel (~> 1.10)
236
+ parser (>= 2.3.3.1, < 3.0)
237
+ powerpack (~> 0.1)
238
+ rainbow (>= 2.2.2, < 3.0)
239
+ ruby-progressbar (~> 1.7)
240
+ unicode-display_width (~> 1.0, >= 1.0.1)
241
+ ruby-progressbar (1.10.0)
242
+ ruby_dep (1.5.0)
243
+ rubyzip (1.2.2)
244
+ selenium-webdriver (3.14.1)
245
+ childprocess (~> 0.5)
246
+ rubyzip (~> 1.2, >= 1.2.2)
247
+ sourcemap (0.1.1)
248
+ sprockets (3.7.2)
249
+ concurrent-ruby (~> 1.0)
250
+ rack (> 1, < 3)
251
+ sprockets-rails (3.2.1)
252
+ actionpack (>= 4.0)
253
+ activesupport (>= 4.0)
254
+ sprockets (>= 3.0.0)
255
+ sqlite3 (1.3.13)
256
+ thor (0.20.0)
257
+ thread_safe (0.3.6)
258
+ tilt (2.0.8)
259
+ timecop (0.8.1)
260
+ tzinfo (1.2.5)
261
+ thread_safe (~> 0.1)
262
+ uglifier (4.1.19)
263
+ execjs (>= 0.3.0, < 3)
264
+ unicode-display_width (1.4.0)
265
+ unparser (0.2.8)
266
+ abstract_type (~> 0.0.7)
267
+ adamantium (~> 0.2.0)
268
+ concord (~> 0.1.5)
269
+ diff-lcs (~> 1.3)
270
+ equalizer (~> 0.0.9)
271
+ parser (>= 2.3.1.2, < 2.6)
272
+ procto (~> 0.0.2)
273
+ webdrivers (3.4.2)
274
+ nokogiri (~> 1.6)
275
+ rubyzip (~> 1.0)
276
+ selenium-webdriver (~> 3.0)
277
+ websocket (1.2.8)
278
+ websocket-driver (0.7.0)
279
+ websocket-extensions (>= 0.1.0)
280
+ websocket-extensions (0.1.3)
281
+ xpath (3.2.0)
282
+ nokogiri (~> 1.8)
283
+
284
+ PLATFORMS
285
+ ruby
286
+
287
+ DEPENDENCIES
288
+ bundler (~> 1.16.0)
289
+ chromedriver-helper
290
+ hyper-spec!
291
+ hyperstack-config!
292
+ opal-rails (~> 0.9.4)
293
+ pry
294
+ puma
295
+ rails (>= 4.0.0)
296
+ rake
297
+ rspec (~> 3.7.0)
298
+ rubocop (~> 0.51.0)
299
+ sqlite3
300
+ timecop (~> 0.8.1)
301
+
302
+ BUNDLED WITH
303
+ 1.16.1
@@ -0,0 +1,73 @@
1
+ <div class="githubhyperstackheader">
2
+
3
+ <p align="center">
4
+
5
+ <a href="http://ruby-hyperstack.org/" alt="Hyperstack" title="Hyperstack">
6
+ <img width="350px" src="http://ruby-hyperstack.org/images/hyperstack-github-logo.png">
7
+ </a>
8
+
9
+ </p>
10
+
11
+ <h2 align="center">The Complete Isomorphic Ruby Framework</h2>
12
+
13
+ <br>
14
+
15
+ <a href="http://ruby-hyperstack.org/" alt="Hyperstack" title="Hyperstack">
16
+ <img src="http://ruby-hyperstack.org/images/githubhyperstackbadge.png">
17
+ </a>
18
+
19
+ <a href="https://gitter.im/ruby-hyperstack/chat" alt="Gitter chat" title="Gitter chat">
20
+ <img src="http://ruby-hyperstack.org/images/githubgitterbadge.png">
21
+ </a>
22
+
23
+ [![Gem Version](https://badge.fury.io/rb/hyperstack-config.svg)](https://badge.fury.io/rb/hyperstack-config)
24
+
25
+ </div>
26
+
27
+ ## Hyperstack-config GEM is part of Hyperstack GEMS family
28
+
29
+ Build interactive Web applications quickly. Hyperstack encourages rapid development with clean, pragmatic design. With developer productivity as our highest goal, Hyperstack takes care of much of the hassle of Web development, so you can focus on innovation and delivering end-user value.
30
+
31
+ One language. One model. One set of tests. The same business logic and domain models running on the clients and the server. Hyperstack is fully integrated with Rails and also gives you unfettered access to the complete universe of JavaScript libraries (including React) from within your Ruby code. Hyperstack lets you build beautiful interactive user interfaces in Ruby.
32
+
33
+ Everything has a place in our architecture. Components deliver interactive user experiences, Operations encapsulate business logic, Models magically synchronize data between clients and servers, Policies govern authorization and Stores hold local state.
34
+
35
+ **Hyperstack-config** gem is used internally by other [Hyperstack](http://ruby-hyperstack.org) gems for keeping config settings, and for registering client side autoload requirements.
36
+
37
+ ## Getting Started
38
+
39
+ 1. Update your Gemfile:
40
+
41
+ ```ruby
42
+ #Gemfile
43
+
44
+ gem 'hyperstack'
45
+ ```
46
+
47
+ 2. At the command prompt, update your bundle :
48
+
49
+ $ bundle update
50
+
51
+ 3. Run the hyperstack install generator:
52
+
53
+ $ rails g hyperstack:install
54
+
55
+ 4. Follow the guidelines to start developing your application. You may find
56
+ the following resources handy:
57
+ * [Getting Started with Hyperstack](http://ruby-hyperstack.org/start/components/)
58
+ * [Hyperstack Guides](http://ruby-hyperstack.org/docs/architecture)
59
+ * [Hyperstack Tutorial](http://ruby-hyperstack.org/tutorials)
60
+
61
+ ## Community
62
+
63
+ #### Getting Help
64
+ Please **do not post** usage questions to GitHub Issues. For these types of questions use our [Gitter chatroom](https://gitter.im/ruby-hyperstack/chat) or [StackOverflow](http://stackoverflow.com/questions/tagged/hyperstack).
65
+
66
+ #### Submitting Bugs and Enhancements
67
+ [GitHub Issues](https://github.com/ruby-hyperstack/hyperstack/issues) is for suggesting enhancements and reporting bugs. Before submiting a bug make sure you do the following:
68
+ * Check out our [contributing guide](https://github.com/ruby-hyperstack/hyperstack/blob/master/CONTRIBUTING.md) for info on our release cycle.
69
+
70
+ ## License
71
+
72
+ Hyperstack is released under the [MIT License](http://www.opensource.org/licenses/MIT).
73
+
@@ -0,0 +1,11 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ namespace :spec do
7
+ task :prepare do
8
+ end
9
+ end
10
+
11
+ task :default => :spec