sombrero 0.0.3 → 0.0.5

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/app/package.json +1 -1
  3. data/app/webpack.config.js +1 -2
  4. data/docker/base/build.sh +2 -4
  5. data/docker/{cleanup → skel/cleanup.sh} +0 -0
  6. data/lib/sombrero/cli/app/install.rb +21 -22
  7. data/lib/sombrero/cli/app/update.rb +12 -6
  8. data/lib/sombrero/cli/assertions.rb +60 -0
  9. data/lib/sombrero/cli/docker/build.rb +7 -27
  10. data/lib/sombrero/cli/docker/install.rb +7 -9
  11. data/lib/sombrero/cli/docker/update.rb +24 -0
  12. data/lib/sombrero/cli/docker.rb +2 -0
  13. data/lib/sombrero/cli/generator.rb +15 -0
  14. data/lib/sombrero/cli/helpers.rb +47 -0
  15. data/lib/sombrero/cli.rb +136 -70
  16. data/lib/sombrero/rtcp_controller.rb +0 -12
  17. data/sombrero.gemspec +1 -1
  18. metadata +8 -22
  19. data/.gitignore +0 -10
  20. data/LICENSE.txt +0 -21
  21. data/README.md +0 -41
  22. data/app/core/client/activity_observer.coffee +0 -37
  23. data/app/core/client/api.coffee +0 -248
  24. data/app/core/client/channels.coffee +0 -37
  25. data/app/core/client/load.coffee +0 -20
  26. data/app/core/client/page.coffee +0 -68
  27. data/app/core/client/polyfills/array.compact.coffee +0 -4
  28. data/app/core/client/polyfills/array.compact_join.coffee +0 -4
  29. data/app/core/client/polyfills/number.to_money.coffee +0 -3
  30. data/app/core/client/polyfills/string.capitalize.coffee +0 -4
  31. data/app/core/client/polyfills/string.strip.coffee +0 -5
  32. data/app/core/client/polyfills.coffee +0 -6
  33. data/app/core/client/render.coffee +0 -57
  34. data/app/core/client/util/alert.coffee +0 -50
  35. data/app/core/client/util/datetime.coffee +0 -47
  36. data/app/core/client/util.coffee +0 -38
@@ -1,50 +0,0 @@
1
- _ =
2
- isObject: require('lodash/isObject')
3
- isFunction: require('lodash/isFunction')
4
- merge: require('lodash/merge')
5
- #end
6
-
7
- require 'sweetalert/dist/sweetalert.css'
8
- Alert = require('sweetalert')
9
-
10
-
11
- Alert.setDefaults
12
- allowEscapeKey: false
13
- allowOutsideClick: false
14
- #end
15
-
16
-
17
- module.exports =
18
- alert: Alert
19
-
20
- error: (text, opts = {}) ->
21
- if _.isObject(text)
22
- [text, opts] = [null, text]
23
- Alert(_.merge({type: 'error', title: 'Error', text: text}, opts))
24
- #end
25
-
26
-
27
- warning: (title, opts = {}) ->
28
- if _.isObject(title)
29
- [title, opts] = [null, title]
30
- Alert(_.merge({type: 'warning', title: title, text: null}, opts))
31
- #end
32
-
33
-
34
- success: (title = 'Done!', opts = {}) ->
35
- if _.isObject(title)
36
- [title, opts] = [null, title]
37
- Alert(_.merge({title: title, text: null, showConfirmButton: false, timer: 1000, type: 'success'}, opts))
38
- #end
39
-
40
-
41
- confirm: (title, opts, cb) ->
42
- if _.isFunction(title)
43
- [title, opts, cb] = [null, {}, title]
44
- else if _.isFunction(opts)
45
- [opts, cb] = [null, opts]
46
- title ||= 'This action is irreversible! Continue?'
47
- Alert(_.merge({title: title, type: 'warning', showCancelButton: true}, opts), cb)
48
- #end
49
-
50
- #end
@@ -1,47 +0,0 @@
1
- Moment = require('moment')
2
-
3
- current_year = ->
4
- new Date().getFullYear()
5
- #end
6
-
7
- Api =
8
-
9
- date_format: (x, skip_current_year = false) ->
10
- date = Moment(x)
11
- if skip_current_year && time.year() == current_year()
12
- date.format('MMM Do')
13
- else
14
- date.format('MMM Do YYYY')
15
- #end
16
-
17
-
18
- datetime_format: (x, skip_current_year = false) ->
19
- time = Moment(x)
20
- if skip_current_year && time.year() == current_year()
21
- time.format('MMMM D, h:mmA')
22
- else
23
- time.format('MMMM D YYYY, h:mmA')
24
- #end
25
-
26
-
27
- time_format: (x) ->
28
- Moment(x).format('HH:mm')
29
- #end
30
-
31
-
32
- relative_time_format: (x) ->
33
- return '' unless x
34
- now = Moment()
35
- _then = Moment(x)
36
- diff = now.diff(_then, 'seconds')
37
-
38
- if diff < 86400
39
- _then.fromNow()
40
- else if diff < 172800
41
- _then.calendar(now)
42
- else
43
- Api.datetime_format(x)
44
- #end
45
- #end
46
-
47
- module.exports = Api
@@ -1,38 +0,0 @@
1
- module.exports =
2
-
3
- generate_uuid: ->
4
- 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace /[xy]/g, (c) ->
5
- v = r = Math.random() * 16|0
6
- v = (r&0x3|0x8) if c == 'x'
7
- v.toString(16)
8
- #end
9
-
10
-
11
- shorten: (text, max_length = 50) ->
12
- return unless text
13
- text[0 .. max_length] + (if text.length > max_length then '...' else '')
14
- #end
15
-
16
-
17
- scroll_top: ->
18
- window.scrollTo(0, 0)
19
- #end
20
-
21
-
22
- reload: ->
23
- window.location.reload()
24
- #end
25
-
26
-
27
- popup: (url, width, height) ->
28
- width ||= 800
29
- height ||= 600
30
- left = (screen.width / 2) - (width / 2)
31
- top = (screen.height / 2) - (height / 2)
32
- window.open url, '_blank', 'menubar=no' +
33
- ',width=' + width +
34
- ',height=' + height +
35
- ',left=' + left +
36
- ',top=' + top
37
- #end
38
- #end