gokart 0.0.3 → 0.0.4

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 (29) hide show
  1. data/assets/Guardfile +7 -3
  2. data/assets/config.rb +1 -1
  3. data/assets/src/www/app/scripts/application.js.coffee +5 -0
  4. data/assets/src/www/app/scripts/main.js.coffee +9 -0
  5. data/assets/src/www/app/{coffee/libs → scripts/utilities}/deferred.js.coffee +4 -10
  6. data/assets/src/www/app/{coffee/libs → scripts/utilities}/logger.js.coffee +7 -4
  7. data/assets/src/www/app/{coffee/helpers → scripts/utilities}/properties.js.coffee +5 -3
  8. data/assets/src/www/app/scripts/utilities/require.js +69 -0
  9. data/assets/src/www/spec/all-spec.js +11 -0
  10. data/assets/src/www/spec/helpers/mocks.coffee +8 -0
  11. data/assets/{spec/javascripts → src/www/spec}/support/jasmine.yml +2 -4
  12. data/assets/{spec/javascripts → src/www/spec}/support/jasmine_config.rb +0 -0
  13. data/assets/{spec/javascripts → src/www/spec}/support/jasmine_runner.rb +0 -0
  14. data/assets/src/www/spec/utilities/deferred-spec.coffee +202 -0
  15. data/assets/src/www/spec/utilities/properties-spec.coffee +23 -0
  16. data/assets/src/www/spec/utilities/test-spec.js +7 -0
  17. data/assets/src/www/vendor/js/backbone-min.js +40 -0
  18. data/assets/tasks/www.rake +34 -33
  19. data/lib/gokart/base.rb +6 -3
  20. data/lib/gokart/environment.rb +1 -19
  21. data/lib/gokart/version.rb +1 -1
  22. metadata +47 -45
  23. data/assets/src/www/app/coffee/application.js.coffee +0 -6
  24. data/assets/src/www/app/coffee/libs/mod_loader.js.coffee +0 -44
  25. data/assets/src/www/app/coffee/main.js.coffee +0 -10
  26. data/assets/src/www/spec/coffee/deferred-spec.coffee +0 -202
  27. data/assets/src/www/spec/coffee/mocks.coffee +0 -137
  28. data/assets/src/www/spec/coffee/mod_loader-spec.coffee +0 -45
  29. data/assets/src/www/spec/coffee/properties-spec.coffee +0 -21
@@ -1,137 +0,0 @@
1
-
2
- modLoader.define 'mocks', (require, exports)->
3
-
4
- exports.ajax = jasmine.createSpy('AJAX Stub').andCallFake () ->
5
- return
6
-
7
- exports.model_subreddit = {
8
- id:'fake id',
9
- title:'fake title',
10
- name:'fake name'
11
- url: '/r/programming/'
12
- }
13
-
14
- exports.rsp_reddits = {
15
- "kind":"Listing",
16
- "data":{
17
- "modhash":"yqpsudqtcv91b6a8e81dcce79d45fcaf82bfc6b147f7fab330",
18
- "children":[
19
- {
20
- "kind":"t5",
21
- "data":{
22
- "display_name":"pics",
23
- "name":"t5_2qh0u",
24
- "title":"Pictures and Images",
25
- "url":"/r/pics/",
26
- "created":1201221069.0,
27
- "created_utc":1201221069.0,
28
- "over18":false,
29
- "subscribers":1098672,
30
- "id":"2qh0u",
31
- "description":"A place to share interesting photographs and pictures. Feel free to post your own, but please **read the rules first** (see below), and note that we are *not a catch-all* for general images (of text, comics, etc.)\n\n\n#Announcement#\n*Oct 13th, 2011* - **We have a [new ruleset](http://www.reddit.com/r/pics/comments/lb24q/rpics_ruleset/)**, please read it carefully before submitting anything. \n\n#Rules#\n\n1. **No pictures of text.** *This includes images with superimposed text, such as [image macros](http://en.wikipedia.org/wiki/Image_macro) and comics, as well as screenshots, and (non-historical) handwritten text.*\n\n1. **No gore, porn or anything NSFW.** *This subreddit is strictly SFW, and there are better places for such content.*\n\n1. **No personal information.** *This includes anything hosted on Facebook's servers, as they can be traced to the original account holder. Stalking & harassment will not be tolerated.*\n\n1. **No solicitation of votes or DAE posts.** \n\n1. **No non-author URLs in images.** *We only tolerate URLs in images if they serve to give credit to the original author.*\n\n**Please also read the full version of these rules [here](http://www.reddit.com/r/pics/comments/lb24q/rpics_ruleset/).**\n\n\nIf your submission appears to be banned but meets the above rules, [please send us a message](/message/compose?to=%23pics). Don't delete it as that makes the filter hate you! \n\n\nIf you come across any rule violations, please report the submission or [message the mods](http://www.reddit.com/message/compose?to=%23pics) and one of us will remove it!\n\n#Related subreddits#\n\n* **[misc](/r/misc/)**\n* **[gifs](/r/gifs/)**\n* **[f7u12](/r/fffffffuuuuuuuuuuuu/)**\n* **[Vertical](/r/Vertical)**\n* **[Demotivational](/r/Demotivational)**\n* **[Advice Animals](/r/AdviceAnimals)**\n* **[The SFWPorn Network](http://reddit.com/r/earthporn+villageporn+cityporn+spaceporn+waterporn+abandonedporn+animalporn+humanporn+botanicalporn+adrenalineporn+destructionporn+movieposterporn+albumartporn+machineporn+newsporn+geekporn+bookporn+mapporn+adporn+designporn+roomporn+militaryporn+historyporn+quotesporn+skyporn+fireporn+infrastructureporn)**\n* [Rage Novels](/r/ragenovels/)\n* [Rage Ops](/r/rageops)\n* [Advice Atheists](/r/AdviceAtheists)\n* [a6theism10](/r/aaaaaatheismmmmmmmmmm)\n* [Trolling Animals](/r/TrollingAnimals)\n* [/r/AnythingGoesPics](/r/AnythingGoesPics)\n* [/r/OriginalHub](/r/OriginalHub)\n* [/r/screenshots](/r/screenshots)\n* [/r/tradingfaces](/r/tradingfaces)\n* [/r/nostalgia](/r/nostalgia)\n* [/r/facepalm](/r/facepalm)\n* [/r/gamingpics](/r/gamingpics)\n* [/r/aww](/r/aww)\n* [/r/eCards](/r/eCards)\n* [/r/comics](/r/comics)\n* [/r/webcomics](/r/webcomics)\n* [/r/photography](/r/photography)\n* [/r/PictureChallenge](/r/PictureChallenge)\n* [/r/photocritique](/r/photocritique)\n* [/r/windowshots](/r/windowshots)\n* [/r/wallpaper](/r/wallpaper)\n* [/r/wallpapers](/r/wallpapers)\n* [/r/1000words](/r/1000words)\n* [/r/newreddits](/r/newreddits)\n\nAlso check out http://irc.reddit.com\n\n### [***20/10/11 New Ruleset***: Please report violations using the 'report' button.](http://www.reddit.com/r/pics/comments/lb24q/rpics_ruleset/)###"
32
- }
33
- },
34
- {
35
- "kind":"t5",
36
- "data":{
37
- "display_name":"funny",
38
- "name":"t5_2qh33",
39
- "title":"funny",
40
- "url":"/r/funny/",
41
- "created":1201242956.0,
42
- "created_utc":1201242956.0,
43
- "over18":false,
44
- "subscribers":1111900,
45
- "id":"2qh33",
46
- "description":"***New Rule***: No posts with their sole purpose being to communicate with another redditor. [Example.](http://www.reddit.com/r/funny/comments/lq3uv/a_student_in_a_course_i_teach_is_constantly/) Sorry, you're going to have to use a different form of communication.\n\n---\n\n1. [**New r/Funny Rule**, click here to see.](http://www.reddit.com/r/funny/comments/lqgx7/new_rule_use_your_phone_or_something/)\n\n**Welcome to r/Funny:**\n\nYou may only post if you are funny. \n\nNo rage comics. Go to [/F7U12](http://www.reddit.com/r/fffffffuuuuuuuuuuuu) instead.\n\n**No Memes!** Go to [/AdviceAnimals](/r/adviceanimals) instead.\n\nRehosted webcomics will be removed. Please submit a link to the original comic's site and preferably an imgur link in the comments. [(*)](http://www.reddit.com/r/funny/comments/kqwwx/we_need_to_talk_about_rehosting_wecomics/)\n\nBefore you submit a screenshot of a reddit thread *here*, you might want to check out [r/BestOf](http://www.reddit.com/r/bestof). \n\nNeed more? Check out:\n\n* [humor](http://www.reddit.com/r/humor) for more in-depth stuff\n* [jokes](/r/jokes)\n* [comics](/r/comics)\n* [punny](/r/punny)\n* [Very Punny](/r/verypunny)\n* [lolcats](/r/lolcats)\n* [lol](/r/lol)\n* [TrollingAnimals](/r/TrollingAnimals)\n* [Rage Novels](/r/ragenovels/)\n* [Demotivational](http://www.reddit.com/r/Demotivational)\n* **[misc](/r/misc/)** for anything else\n\nStill need more? See Reddit's [best / worst](http://www.reddit.com/r/AskReddit/comments/8ft5j/tell_me_your_best_worst_joke_reddit/?sort=top) and [offensive](http://www.reddit.com/r/funny/comments/7rxyh/collection_of_totally_offensive_jokes_not_for_the/?sort=top) joke collections (warning: some of those jokes are offensive / nsfw!). \n\n\n------\n\nPlease DO NOT post [personal information](http://www.reddit.com/help/faq#Ispostingpersonalinformationok). This includes anything hosted on Facebook's servers, as they can be traced to the original account holder.\n\n----\n\nIf your submission appears to be banned, please don't just delete it as that makes the filter hate you! Instead please [send us a message](/message/compose?to=%23funny). We'll unban it and it should get better. please allow 10 minutes for the post to appear before messaging moderators\n\n----\n\nCSS - BritishEnglishPolice \u00a92011"
47
- }
48
- }
49
- ],
50
- "after":"t5_2qq5c",
51
- "before":null
52
- }
53
- }
54
-
55
- exports.rsp_posts = {
56
- "kind":"Listing",
57
- "data":{
58
- "modhash":"s7069nuzol41d61f1b1ff780c40b025a4848c4b06c6ebaa061",
59
- "children":[
60
- {
61
- "kind":"t3",
62
- "data":{
63
- "domain":"perlbuzz.com",
64
- "media_embed":{
65
-
66
- },
67
- "levenshtein":null,
68
- "subreddit":"programming",
69
- "selftext_html":null,
70
- "selftext":"",
71
- "likes":null,
72
- "saved":false,
73
- "id":"ms13h",
74
- "clicked":false,
75
- "title":"Finding a lost dog's owner with Perl",
76
- "media":null,
77
- "score":426,
78
- "over_18":false,
79
- "hidden":false,
80
- "thumbnail":"",
81
- "subreddit_id":"t5_2fwo",
82
- "author_flair_css_class":null,
83
- "downs":222,
84
- "is_self":false,
85
- "permalink":"/r/programming/comments/ms13h/finding_a_lost_dogs_owner_with_perl/",
86
- "name":"t3_ms13h",
87
- "created":1322517472.0,
88
- "url":"http://perlbuzz.com/2011/11/finding-a-lost-dogs-owner-with-perl-and-wwwmechanize.html",
89
- "author_flair_text":null,
90
- "author":"mpeters",
91
- "created_utc":1322492272.0,
92
- "num_comments":61,
93
- "ups":648
94
- }
95
- },
96
- {
97
- "kind":"t3",
98
- "data":{
99
- "domain":"elegantcoding.com",
100
- "media_embed":{
101
-
102
- },
103
- "levenshtein":null,
104
- "subreddit":"programming",
105
- "selftext_html":null,
106
- "selftext":"",
107
- "likes":null,
108
- "saved":false,
109
- "id":"msl7x",
110
- "clicked":false,
111
- "title":"Eleven equations every Computer Science geeks should know",
112
- "media":null,
113
- "score":76,
114
- "over_18":false,
115
- "hidden":false,
116
- "thumbnail":"",
117
- "subreddit_id":"t5_2fwo",
118
- "author_flair_css_class":null,
119
- "downs":41,
120
- "is_self":false,
121
- "permalink":"/r/programming/comments/msl7x/eleven_equations_every_computer_science_geeks/",
122
- "name":"t3_msl7x",
123
- "created":1322547476.0,
124
- "url":"http://www.elegantcoding.com/2011/11/eleven-equations-true-computer-science.html",
125
- "author_flair_text":null,
126
- "author":"chandershivdasani",
127
- "created_utc":1322522276.0,
128
- "num_comments":34,
129
- "ups":117
130
- }
131
- }
132
- ],
133
- "after":"t3_mqs0s",
134
- "before":null
135
- }
136
- }
137
- return
@@ -1,45 +0,0 @@
1
- describe 'Module Loader Spec', ->
2
-
3
- beforeEach ->
4
- modLoader.clearAll()
5
- return
6
-
7
- it 'should be defined as a global object', ->
8
- expect(modLoader).toBeDefined()
9
- return
10
-
11
- it 'should be able to define a new module', ->
12
- modLoader.define 'testmod-1', (require, exports)->
13
- return
14
-
15
- expect(modLoader.isDefined('testmod-1')).toBe(true)
16
- return
17
-
18
- it 'should be able to define a new module with exports', ->
19
- modLoader.define 'testmod-1', (require, exports)->
20
- exports.isLoaded = true
21
- return
22
-
23
- exports = modLoader.require 'testmod-1'
24
- expect(exports).toBeDefined()
25
- expect(exports.isLoaded).toBe(true)
26
- return
27
-
28
- it 'should only load a module once and cache the exports', ->
29
- numLoaded = 0
30
- modLoader.define 'testmod-1', (require, exports)->
31
- numLoaded++
32
- exports.isLoaded = true
33
- return
34
-
35
- exports = modLoader.require 'testmod-1'
36
- expect(exports).toBeDefined()
37
- expect(exports.isLoaded).toBe(true)
38
- expect(numLoaded).toBe(1)
39
-
40
- exports = modLoader.require 'testmod-1'
41
- expect(exports).toBeDefined()
42
- expect(exports.isLoaded).toBe(true)
43
- expect(numLoaded).toBe(1)
44
-
45
- return
@@ -1,21 +0,0 @@
1
- describe 'Properties generator', ->
2
- Properties = modLoader.require 'helpers/properties'
3
-
4
- it 'should be able to add properties to a object', ->
5
- obj = {}
6
- Properties.add obj,
7
- val1: {value:'test 1 value',static:true}
8
- val2: {value: 'test 2 value'}
9
-
10
- expect(obj.__auto__val1).toBe('test 1 value')
11
- expect(obj.val1()).toBe('test 1 value')
12
- expect(obj.__auto__val2).toBe('test 2 value')
13
- expect(obj.val2()).toBe('test 2 value')
14
-
15
- obj.val1('failed value')
16
- expect(obj.val1()).toBe('test 1 value')
17
-
18
- obj.val2('failed value 2')
19
- expect(obj.val2()).toBe('failed value 2')
20
- return
21
- return