fannypack 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.ruby-version +1 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +127 -0
- data/Guardfile +6 -0
- data/LICENSE +22 -0
- data/Procfile +1 -0
- data/README.md +166 -0
- data/Rakefile +50 -0
- data/config.rb +74 -0
- data/fannypack.gemspec +22 -0
- data/lib/assets/javascripts/fanny_pack.coffee +21 -0
- data/lib/assets/javascripts/fanny_pack/ajax.js.coffee +58 -0
- data/lib/assets/javascripts/fanny_pack/env.js.coffee +4 -0
- data/lib/assets/javascripts/fanny_pack/models/environment.js.coffee +15 -0
- data/lib/assets/javascripts/fanny_pack/namespace.coffee +10 -0
- data/lib/assets/javascripts/fanny_pack/routers/base.coffee +82 -0
- data/lib/assets/javascripts/fanny_pack/version.js.coffee +2 -0
- data/lib/assets/javascripts/fanny_pack/views/app.coffee +19 -0
- data/lib/assets/javascripts/fanny_pack/views/base.coffee +90 -0
- data/lib/assets/javascripts/fanny_pack/views/list.coffee +29 -0
- data/lib/fanny_pack.rb +4 -0
- data/lib/fanny_pack/assets.rb +24 -0
- data/lib/fanny_pack/version.rb +4 -0
- data/source/images/background.png +0 -0
- data/source/images/middleman.png +0 -0
- data/source/index.html.haml +9 -0
- data/source/javascripts/application.js.coffee +2 -0
- data/source/javascripts/lib/.gitkeep +0 -0
- data/source/javascripts/vendor/.gitkeep +0 -0
- data/source/layouts/layout.html.haml +49 -0
- data/source/stylesheets/application.css.sass +2 -0
- data/source/stylesheets/lib/_fonts.css.sass +0 -0
- data/source/stylesheets/lib/_mixins.css.sass +0 -0
- data/source/stylesheets/lib/_variables.css.sass +0 -0
- data/source/stylesheets/lib/common.css.sass +1 -0
- data/source/stylesheets/vendor/all.css +55 -0
- data/source/stylesheets/vendor/normalize.css +375 -0
- data/spec/javascripts/helpers/spec_helper.coffee +11 -0
- data/spec/javascripts/support/jasmine-jquery.js +812 -0
- data/spec/javascripts/support/jasmine-sinon.coffee +246 -0
- data/spec/javascripts/support/jasmine.yml +10 -0
- data/spec/javascripts/support/jasmine_helper.rb +3 -0
- data/spec/javascripts/support/sinon-1.7.3.js +4290 -0
- data/spec/javascripts/views/base_spec.coffee +130 -0
- data/spec/javascripts/views/list_spec.coffee +31 -0
- data/vendor/assets/javascripts/backbone-1.1.2.js +1608 -0
- data/vendor/assets/javascripts/jquery-1.11.0.js +10337 -0
- data/vendor/assets/javascripts/json2.js +487 -0
- data/vendor/assets/javascripts/ppx.js +391 -0
- data/vendor/assets/javascripts/underscore-1.5.1.js +1246 -0
- data/vendor/assets/javascripts/uri.js +1803 -0
- data/vendor/assets/javascripts/zepto-detect.js +66 -0
- metadata +150 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
// Zepto.js
|
2
|
+
// (c) 2010-2014 Thomas Fuchs
|
3
|
+
// Zepto.js may be freely distributed under the MIT license.
|
4
|
+
|
5
|
+
;(function($){
|
6
|
+
function detect(ua){
|
7
|
+
var os = this.os = {}, browser = this.browser = {},
|
8
|
+
webkit = ua.match(/Web[kK]it[\/]{0,1}([\d.]+)/),
|
9
|
+
android = ua.match(/(Android);?[\s\/]+([\d.]+)?/),
|
10
|
+
osx = !!ua.match(/\(Macintosh\; Intel /),
|
11
|
+
ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
|
12
|
+
ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/),
|
13
|
+
iphone = !ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
|
14
|
+
webos = ua.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),
|
15
|
+
touchpad = webos && ua.match(/TouchPad/),
|
16
|
+
kindle = ua.match(/Kindle\/([\d.]+)/),
|
17
|
+
silk = ua.match(/Silk\/([\d._]+)/),
|
18
|
+
blackberry = ua.match(/(BlackBerry).*Version\/([\d.]+)/),
|
19
|
+
bb10 = ua.match(/(BB10).*Version\/([\d.]+)/),
|
20
|
+
rimtabletos = ua.match(/(RIM\sTablet\sOS)\s([\d.]+)/),
|
21
|
+
playbook = ua.match(/PlayBook/),
|
22
|
+
chrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/),
|
23
|
+
firefox = ua.match(/Firefox\/([\d.]+)/),
|
24
|
+
ie = ua.match(/MSIE\s([\d.]+)/) || ua.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),
|
25
|
+
webview = !chrome && ua.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),
|
26
|
+
safari = webview || ua.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/)
|
27
|
+
|
28
|
+
// Todo: clean this up with a better OS/browser seperation:
|
29
|
+
// - discern (more) between multiple browsers on android
|
30
|
+
// - decide if kindle fire in silk mode is android or not
|
31
|
+
// - Firefox on Android doesn't specify the Android version
|
32
|
+
// - possibly devide in os, device and browser hashes
|
33
|
+
|
34
|
+
if (browser.webkit = !!webkit) browser.version = webkit[1]
|
35
|
+
|
36
|
+
if (android) os.android = true, os.version = android[2]
|
37
|
+
if (iphone && !ipod) os.ios = os.iphone = true, os.version = iphone[2].replace(/_/g, '.')
|
38
|
+
if (ipad) os.ios = os.ipad = true, os.version = ipad[2].replace(/_/g, '.')
|
39
|
+
if (ipod) os.ios = os.ipod = true, os.version = ipod[3] ? ipod[3].replace(/_/g, '.') : null
|
40
|
+
if (webos) os.webos = true, os.version = webos[2]
|
41
|
+
if (touchpad) os.touchpad = true
|
42
|
+
if (blackberry) os.blackberry = true, os.version = blackberry[2]
|
43
|
+
if (bb10) os.bb10 = true, os.version = bb10[2]
|
44
|
+
if (rimtabletos) os.rimtabletos = true, os.version = rimtabletos[2]
|
45
|
+
if (playbook) browser.playbook = true
|
46
|
+
if (kindle) os.kindle = true, os.version = kindle[1]
|
47
|
+
if (silk) browser.silk = true, browser.version = silk[1]
|
48
|
+
if (!silk && os.android && ua.match(/Kindle Fire/)) browser.silk = true
|
49
|
+
if (chrome) browser.chrome = true, browser.version = chrome[1]
|
50
|
+
if (firefox) browser.mozilla = browser.firefox = true, browser.version = firefox[1]
|
51
|
+
if (ie) browser.msie = browser.ie = true, browser.version = ie[1]
|
52
|
+
if (safari && (osx || os.ios)) {browser.safari = true; if (osx) browser.version = safari[1]}
|
53
|
+
if (webview) browser.webview = true
|
54
|
+
|
55
|
+
os.tablet = !!(ipad || playbook || (android && !ua.match(/Mobile/)) ||
|
56
|
+
(firefox && ua.match(/Tablet/)) || (ie && !ua.match(/Phone/) && ua.match(/Touch/)))
|
57
|
+
os.phone = !!(!os.tablet && !os.ipod && (android || iphone || webos || blackberry || bb10 ||
|
58
|
+
(chrome && ua.match(/Android/)) || (chrome && ua.match(/CriOS\/([\d.]+)/)) ||
|
59
|
+
(firefox && ua.match(/Mobile/)) || (ie && ua.match(/Touch/))))
|
60
|
+
}
|
61
|
+
|
62
|
+
detect.call($, navigator.userAgent)
|
63
|
+
// make available to unit tests
|
64
|
+
$.__detect = detect
|
65
|
+
|
66
|
+
})(jQuery)
|
metadata
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fannypack
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.2'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matt Diebolt
|
8
|
+
- Steel Fu
|
9
|
+
- Brad Gessler
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2014-04-21 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: middleman
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '3.3'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: growl
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rb-fsevent
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
description: A simple set of base views to help develop Backbone applications.
|
58
|
+
email:
|
59
|
+
- matt@polleverywhere.com
|
60
|
+
- steel@polleverywhere.com
|
61
|
+
- brad@polleverywhere.com
|
62
|
+
executables: []
|
63
|
+
extensions: []
|
64
|
+
extra_rdoc_files: []
|
65
|
+
files:
|
66
|
+
- .gitignore
|
67
|
+
- .ruby-version
|
68
|
+
- Gemfile
|
69
|
+
- Gemfile.lock
|
70
|
+
- Guardfile
|
71
|
+
- LICENSE
|
72
|
+
- Procfile
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- config.rb
|
76
|
+
- fannypack.gemspec
|
77
|
+
- lib/assets/javascripts/fanny_pack.coffee
|
78
|
+
- lib/assets/javascripts/fanny_pack/ajax.js.coffee
|
79
|
+
- lib/assets/javascripts/fanny_pack/env.js.coffee
|
80
|
+
- lib/assets/javascripts/fanny_pack/models/environment.js.coffee
|
81
|
+
- lib/assets/javascripts/fanny_pack/namespace.coffee
|
82
|
+
- lib/assets/javascripts/fanny_pack/routers/base.coffee
|
83
|
+
- lib/assets/javascripts/fanny_pack/version.js.coffee
|
84
|
+
- lib/assets/javascripts/fanny_pack/views/app.coffee
|
85
|
+
- lib/assets/javascripts/fanny_pack/views/base.coffee
|
86
|
+
- lib/assets/javascripts/fanny_pack/views/list.coffee
|
87
|
+
- lib/fanny_pack.rb
|
88
|
+
- lib/fanny_pack/assets.rb
|
89
|
+
- lib/fanny_pack/version.rb
|
90
|
+
- source/images/background.png
|
91
|
+
- source/images/middleman.png
|
92
|
+
- source/index.html.haml
|
93
|
+
- source/javascripts/application.js.coffee
|
94
|
+
- source/javascripts/lib/.gitkeep
|
95
|
+
- source/javascripts/vendor/.gitkeep
|
96
|
+
- source/layouts/layout.html.haml
|
97
|
+
- source/stylesheets/application.css.sass
|
98
|
+
- source/stylesheets/lib/_fonts.css.sass
|
99
|
+
- source/stylesheets/lib/_mixins.css.sass
|
100
|
+
- source/stylesheets/lib/_variables.css.sass
|
101
|
+
- source/stylesheets/lib/common.css.sass
|
102
|
+
- source/stylesheets/vendor/all.css
|
103
|
+
- source/stylesheets/vendor/normalize.css
|
104
|
+
- spec/javascripts/helpers/spec_helper.coffee
|
105
|
+
- spec/javascripts/support/jasmine-jquery.js
|
106
|
+
- spec/javascripts/support/jasmine-sinon.coffee
|
107
|
+
- spec/javascripts/support/jasmine.yml
|
108
|
+
- spec/javascripts/support/jasmine_helper.rb
|
109
|
+
- spec/javascripts/support/sinon-1.7.3.js
|
110
|
+
- spec/javascripts/views/base_spec.coffee
|
111
|
+
- spec/javascripts/views/list_spec.coffee
|
112
|
+
- vendor/assets/javascripts/backbone-1.1.2.js
|
113
|
+
- vendor/assets/javascripts/jquery-1.11.0.js
|
114
|
+
- vendor/assets/javascripts/json2.js
|
115
|
+
- vendor/assets/javascripts/ppx.js
|
116
|
+
- vendor/assets/javascripts/underscore-1.5.1.js
|
117
|
+
- vendor/assets/javascripts/uri.js
|
118
|
+
- vendor/assets/javascripts/zepto-detect.js
|
119
|
+
homepage: http://getfannypack.com
|
120
|
+
licenses: []
|
121
|
+
metadata: {}
|
122
|
+
post_install_message:
|
123
|
+
rdoc_options: []
|
124
|
+
require_paths:
|
125
|
+
- lib
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
requirements: []
|
137
|
+
rubyforge_project:
|
138
|
+
rubygems_version: 2.0.14
|
139
|
+
signing_key:
|
140
|
+
specification_version: 4
|
141
|
+
summary: A simple set of base views to help develop Backbone applications.
|
142
|
+
test_files:
|
143
|
+
- spec/javascripts/helpers/spec_helper.coffee
|
144
|
+
- spec/javascripts/support/jasmine-jquery.js
|
145
|
+
- spec/javascripts/support/jasmine-sinon.coffee
|
146
|
+
- spec/javascripts/support/jasmine.yml
|
147
|
+
- spec/javascripts/support/jasmine_helper.rb
|
148
|
+
- spec/javascripts/support/sinon-1.7.3.js
|
149
|
+
- spec/javascripts/views/base_spec.coffee
|
150
|
+
- spec/javascripts/views/list_spec.coffee
|