upjs-rails 0.9.1 → 0.10.0

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +142 -0
  3. data/README.md +4 -1
  4. data/design/ghost-debugging.txt +118 -0
  5. data/design/homepage.txt +236 -0
  6. data/dist/up-bootstrap.js +7 -3
  7. data/dist/up-bootstrap.min.js +1 -1
  8. data/dist/up.js +1611 -1222
  9. data/dist/up.min.js +2 -2
  10. data/lib/assets/javascripts/up/bus.js.coffee +1 -1
  11. data/lib/assets/javascripts/up/flow.js.coffee +21 -20
  12. data/lib/assets/javascripts/up/form.js.coffee +11 -12
  13. data/lib/assets/javascripts/up/history.js.coffee +137 -20
  14. data/lib/assets/javascripts/up/layout.js.coffee +134 -21
  15. data/lib/assets/javascripts/up/link.js.coffee +40 -17
  16. data/lib/assets/javascripts/up/modal.js.coffee +2 -2
  17. data/lib/assets/javascripts/up/motion.js.coffee +3 -1
  18. data/lib/assets/javascripts/up/navigation.js.coffee +5 -5
  19. data/lib/assets/javascripts/up/popup.js.coffee +2 -2
  20. data/lib/assets/javascripts/up/proxy.js.coffee +43 -82
  21. data/lib/assets/javascripts/up/tooltip.js.coffee +1 -1
  22. data/lib/assets/javascripts/up/util.js.coffee +145 -14
  23. data/lib/assets/javascripts/up-bootstrap/layout-ext.js.coffee +2 -2
  24. data/lib/assets/javascripts/up-bootstrap/navigation-ext.js.coffee +3 -1
  25. data/lib/assets/javascripts/up.js.coffee +2 -2
  26. data/lib/upjs/rails/version.rb +1 -1
  27. data/spec_app/Gemfile.lock +1 -1
  28. data/spec_app/config/routes.rb +1 -2
  29. data/spec_app/spec/javascripts/helpers/knife.js.coffee +1 -1
  30. data/spec_app/spec/javascripts/helpers/last_request.js.coffee +4 -0
  31. data/spec_app/spec/javascripts/helpers/set_timer.js.coffee +3 -3
  32. data/spec_app/spec/javascripts/helpers/to_end_with.js.coffee +5 -0
  33. data/spec_app/spec/javascripts/up/flow_spec.js.coffee +8 -6
  34. data/spec_app/spec/javascripts/up/form_spec.js.coffee +1 -1
  35. data/spec_app/spec/javascripts/up/history_spec.js.coffee +80 -1
  36. data/spec_app/spec/javascripts/up/link_spec.js.coffee +64 -4
  37. data/spec_app/spec/javascripts/up/modal_spec.js.coffee +2 -2
  38. data/spec_app/spec/javascripts/up/motion_spec.js.coffee +7 -7
  39. data/spec_app/spec/javascripts/up/navigation_spec.js.coffee +6 -6
  40. data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +2 -2
  41. data/spec_app/spec/javascripts/up/util_spec.js.coffee +22 -4
  42. metadata +7 -2
@@ -2,7 +2,25 @@ describe 'up.util', ->
2
2
 
3
3
  describe 'Javascript functions', ->
4
4
 
5
- describe '.isBlank', ->
5
+ describe 'up.util.castedAttr', ->
6
+
7
+ it 'returns true if the attribute value is the string "true"', ->
8
+ $element = affix('div').attr('foo', 'true')
9
+ expect(up.util.castedAttr($element, 'foo')).toBe(true)
10
+
11
+ it 'returns false if the attribute value is the string "false"', ->
12
+ $element = affix('div').attr('foo', 'false')
13
+ expect(up.util.castedAttr($element, 'foo')).toBe(false)
14
+
15
+ it 'returns undefined if the element has no such attribute', ->
16
+ $element = affix('div')
17
+ expect(up.util.castedAttr($element, 'foo')).toBe(undefined)
18
+
19
+ it 'returns the attribute value unchanged if the value is some string', ->
20
+ $element = affix('div').attr('foo', 'some text')
21
+ expect(up.util.castedAttr($element, 'foo')).toBe('some text')
22
+
23
+ describe 'up.util.isBlank', ->
6
24
 
7
25
  it 'returns false for false', ->
8
26
  expect(up.util.isBlank(false)).toBe(false)
@@ -34,7 +52,7 @@ describe 'up.util', ->
34
52
  it 'returns true for an object with at least one key', ->
35
53
  expect(up.util.isBlank({key: 'value'})).toBe(false)
36
54
 
37
- describe '.normalizeUrl', ->
55
+ describe 'up.util.normalizeUrl', ->
38
56
 
39
57
  it 'normalizes a relative path', ->
40
58
  expect(up.util.normalizeUrl('foo')).toBe("http://#{location.hostname}:#{location.port}/foo")
@@ -45,7 +63,7 @@ describe 'up.util', ->
45
63
  it 'normalizes a full URL', ->
46
64
  expect(up.util.normalizeUrl('http://example.com/foo/bar')).toBe('http://example.com/foo/bar')
47
65
 
48
- describe '.detect', ->
66
+ describe 'up.util.detect', ->
49
67
 
50
68
  it 'finds the first element in the given array that matches the given tester', ->
51
69
  array = ['foo', 'bar', 'baz']
@@ -57,7 +75,7 @@ describe 'up.util', ->
57
75
  tester = (element) -> element[0] == 'z'
58
76
  expect(up.util.detect(array, tester)).toBeNull()
59
77
 
60
- describe '.config', ->
78
+ describe 'up.util.config', ->
61
79
 
62
80
  it 'creates an object with the given attributes', ->
63
81
  object = up.util.config(a: 1, b: 2)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-27 00:00:00.000000000 Z
11
+ date: 2015-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -63,6 +63,7 @@ extra_rdoc_files: []
63
63
  files:
64
64
  - ".gitignore"
65
65
  - ".ruby-version"
66
+ - CHANGELOG.md
66
67
  - Gemfile
67
68
  - Gemfile.lock
68
69
  - LICENSE
@@ -75,6 +76,8 @@ files:
75
76
  - design/design.txt
76
77
  - design/draft.html.erb
77
78
  - design/draft.rb
79
+ - design/ghost-debugging.txt
80
+ - design/homepage.txt
78
81
  - design/rename.txt
79
82
  - dist/up-bootstrap.css
80
83
  - dist/up-bootstrap.js
@@ -199,12 +202,14 @@ files:
199
202
  - spec_app/script/cucumber
200
203
  - spec_app/spec/javascripts/helpers/index.js.coffee
201
204
  - spec_app/spec/javascripts/helpers/knife.js.coffee
205
+ - spec_app/spec/javascripts/helpers/last_request.js.coffee
202
206
  - spec_app/spec/javascripts/helpers/mock_ajax.js.coffee
203
207
  - spec_app/spec/javascripts/helpers/mock_clock.js.coffee
204
208
  - spec_app/spec/javascripts/helpers/reset_path.js.coffee
205
209
  - spec_app/spec/javascripts/helpers/reset_up.js.coffee
206
210
  - spec_app/spec/javascripts/helpers/set_timer.js.coffee
207
211
  - spec_app/spec/javascripts/helpers/to_be_around.js.coffee
212
+ - spec_app/spec/javascripts/helpers/to_end_with.js.coffee
208
213
  - spec_app/spec/javascripts/helpers/to_equal_jquery.js.coffee
209
214
  - spec_app/spec/javascripts/helpers/trigger.js.coffee
210
215
  - spec_app/spec/javascripts/support/jasmine.yml