evil-front 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +1 -0
  3. data/ChangeLog.md +3 -0
  4. data/LICENSE +20 -0
  5. data/Rakefile +13 -0
  6. data/evil-front.gemspec +27 -0
  7. data/lib/assets/javascripts/evil-front/after.js +7 -0
  8. data/lib/assets/javascripts/evil-front/ajax.js +61 -0
  9. data/lib/assets/javascripts/evil-front/core.js +13 -0
  10. data/lib/assets/javascripts/evil-front/detect-3d.js +5 -0
  11. data/lib/assets/javascripts/evil-front/every.js +7 -0
  12. data/lib/assets/javascripts/evil-front/http.js +29 -0
  13. data/lib/assets/javascripts/evil-front/jquery.js +43 -0
  14. data/lib/assets/javascripts/evil-front/links.js +10 -0
  15. data/lib/assets/javascripts/evil-front/outside.js +40 -0
  16. data/lib/assets/javascripts/evil-front/queue.js +43 -0
  17. data/lib/assets/javascripts/evil-front/tappable.js +46 -0
  18. data/lib/assets/javascripts/evil-front/transform3d.js +38 -0
  19. data/lib/assets/javascripts/evil-front.js +7 -0
  20. data/lib/assets/stylesheets/evil-front/clearfix.sass +8 -0
  21. data/lib/assets/stylesheets/evil-front/colors.sass +11 -0
  22. data/lib/assets/stylesheets/evil-front/easings.sass +35 -0
  23. data/lib/assets/stylesheets/evil-front/flying-quotes.sass +6 -0
  24. data/lib/assets/stylesheets/evil-front/height.sass +9 -0
  25. data/lib/assets/stylesheets/evil-front/import-ruble.sass +42 -0
  26. data/lib/assets/stylesheets/evil-front/media.sass +25 -0
  27. data/lib/assets/stylesheets/evil-front/no-hover.sass +17 -0
  28. data/lib/assets/stylesheets/evil-front/no-tap-highlight.sass +9 -0
  29. data/lib/assets/stylesheets/evil-front/reset.sass +31 -0
  30. data/lib/assets/stylesheets/evil-front/size.sass +8 -0
  31. data/lib/assets/stylesheets/evil-front/sticky-footer.sass +20 -0
  32. data/lib/assets/stylesheets/evil-front/stroke-text.sass +8 -0
  33. data/lib/assets/stylesheets/evil-front/styled-taps.sass +11 -0
  34. data/lib/assets/stylesheets/evil-front/to-px.sass +6 -0
  35. data/lib/assets/stylesheets/evil-front.sass +18 -0
  36. data/lib/evil-front/helpers/capitalize_first.rb +8 -0
  37. data/lib/evil-front/helpers/disable_mobile_zoom.rb +13 -0
  38. data/lib/evil-front/helpers/flying_quote.rb +20 -0
  39. data/lib/evil-front/helpers/head_content.rb +10 -0
  40. data/lib/evil-front/helpers/head_tag.rb +26 -0
  41. data/lib/evil-front/helpers/ruble.rb +15 -0
  42. data/lib/evil-front/helpers/russian_typograph.rb +21 -0
  43. data/lib/evil-front/helpers/standard_assets.rb +13 -0
  44. data/lib/evil-front/helpers/tel.rb +12 -0
  45. data/lib/evil-front/helpers/title.rb +14 -0
  46. data/lib/evil-front/helpers/title_tag.rb +27 -0
  47. data/lib/evil-front/helpers.rb +25 -0
  48. data/lib/evil-front/russian.rb +84 -0
  49. data/lib/evil-front/slim.rb +6 -0
  50. data/lib/evil-front/version.rb +3 -0
  51. data/lib/evil-front.rb +30 -0
  52. data/spec/helpers_spec.rb +98 -0
  53. data/spec/russian_spec.rb +100 -0
  54. data/spec/sass/empty.txt +0 -0
  55. data/spec/sass/inline-ruble.sass +3 -0
  56. data/spec/sass/load.sass +7 -0
  57. data/spec/sass/media.sass +9 -0
  58. data/spec/sass/ruble.sass +3 -0
  59. data/spec/sass/size.sass +10 -0
  60. data/spec/sass_spec.rb +75 -0
  61. data/spec/spec_helper.rb +3 -0
  62. data/vendor/assets/fonts/evil-front/alsrubl-arial-bold.woff +0 -0
  63. data/vendor/assets/fonts/evil-front/alsrubl-arial-bolditalic.woff +0 -0
  64. data/vendor/assets/fonts/evil-front/alsrubl-arial-italic.woff +0 -0
  65. data/vendor/assets/fonts/evil-front/alsrubl-arial-regular.woff +0 -0
  66. metadata +220 -0
data/spec/sass_spec.rb ADDED
@@ -0,0 +1,75 @@
1
+ require_relative 'spec_helper'
2
+
3
+ describe 'Sass Helpers' do
4
+ before(:all) do
5
+ @assets = Sprockets::Environment.new
6
+ @assets.append_path File.expand_path('../sass', __FILE__)
7
+ EvilFront.install(@assets)
8
+
9
+ @assets.context_class.class_eval do
10
+ def asset_path(path, options = {})
11
+ ''
12
+ end
13
+ end
14
+ end
15
+
16
+ it 'loads Rails Sass Images' do
17
+ @assets['load'].to_s.should =~ /data:text\/plain/
18
+ end
19
+
20
+ it 'loads variables, functions and mixins' do
21
+ load = @assets['load'].to_s
22
+ load.should =~ /rgba\(0, 0, 0, 0.5\)/
23
+ load.should =~ /cubic-bezier\(0.47, 0, 0.745, 0.715\)/
24
+ load.should =~ /a:after/
25
+ end
26
+
27
+ describe '+import-ruble' do
28
+
29
+ it 'adds font-faces and .ruble' do
30
+ ruble = @assets['ruble'].to_s
31
+ ruble.should =~ /font-family: ALSRubl-Arial, PT Sans, sans-serif/
32
+ ruble.should_not =~ /font-woff;base64/
33
+ end
34
+
35
+ it 'inlines specified fonts' do
36
+ ruble = @assets['inline-ruble'].to_s
37
+ ruble.should =~ /font-style: italic;\s*src: url\('data/n
38
+ end
39
+
40
+ end
41
+
42
+ describe 'media mixins' do
43
+ before(:all) do
44
+ @media = @assets['media'].to_s
45
+ end
46
+
47
+ it 'receives size without units' do
48
+ @media.should =~ /max-width: 100px/
49
+ end
50
+
51
+ it 'receives size with units' do
52
+ @media.should =~ /min-width: 200px/
53
+ end
54
+
55
+ end
56
+
57
+ describe '+size' do
58
+ before(:all) do
59
+ @size = @assets['size'].to_s
60
+ end
61
+
62
+ it 'receives 2 sizes' do
63
+ @size.should =~ /.all {\s*width: 10px;\s*height: 20px; }/
64
+ end
65
+
66
+ it 'receives 1 sizes' do
67
+ @size.should =~ /.one {\s*width: 30px;\s*height: 30px; }/
68
+ end
69
+
70
+ it 'receives size without unit' do
71
+ @size.should =~ /.no-unit {\s*width: 15px;\s*height: 15px; }/
72
+ end
73
+
74
+ end
75
+ end
@@ -0,0 +1,3 @@
1
+ require_relative '../lib/evil-front'
2
+
3
+ I18n.enforce_available_locales = false
metadata ADDED
@@ -0,0 +1,220 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: evil-front
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Andrey Sitnik
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: i18n
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: slim
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.3.9
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.3.9
41
+ - !ruby/object:Gem::Dependency
42
+ name: sass
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 3.2.9
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 3.2.9
55
+ - !ruby/object:Gem::Dependency
56
+ name: nokogiri
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sprockets
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '1'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '1'
83
+ - !ruby/object:Gem::Dependency
84
+ name: unicode_utils
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '1.4'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '1.4'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rails-sass-images
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0.3'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0.3'
111
+ - !ruby/object:Gem::Dependency
112
+ name: standalone_typograf
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 3.0.1
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 3.0.1
125
+ description:
126
+ email: andrey@sitnik.ru
127
+ executables: []
128
+ extensions: []
129
+ extra_rdoc_files:
130
+ - LICENSE
131
+ files:
132
+ - ".rspec"
133
+ - ChangeLog.md
134
+ - LICENSE
135
+ - Rakefile
136
+ - evil-front.gemspec
137
+ - lib/assets/javascripts/evil-front.js
138
+ - lib/assets/javascripts/evil-front/after.js
139
+ - lib/assets/javascripts/evil-front/ajax.js
140
+ - lib/assets/javascripts/evil-front/core.js
141
+ - lib/assets/javascripts/evil-front/detect-3d.js
142
+ - lib/assets/javascripts/evil-front/every.js
143
+ - lib/assets/javascripts/evil-front/http.js
144
+ - lib/assets/javascripts/evil-front/jquery.js
145
+ - lib/assets/javascripts/evil-front/links.js
146
+ - lib/assets/javascripts/evil-front/outside.js
147
+ - lib/assets/javascripts/evil-front/queue.js
148
+ - lib/assets/javascripts/evil-front/tappable.js
149
+ - lib/assets/javascripts/evil-front/transform3d.js
150
+ - lib/assets/stylesheets/evil-front.sass
151
+ - lib/assets/stylesheets/evil-front/clearfix.sass
152
+ - lib/assets/stylesheets/evil-front/colors.sass
153
+ - lib/assets/stylesheets/evil-front/easings.sass
154
+ - lib/assets/stylesheets/evil-front/flying-quotes.sass
155
+ - lib/assets/stylesheets/evil-front/height.sass
156
+ - lib/assets/stylesheets/evil-front/import-ruble.sass
157
+ - lib/assets/stylesheets/evil-front/media.sass
158
+ - lib/assets/stylesheets/evil-front/no-hover.sass
159
+ - lib/assets/stylesheets/evil-front/no-tap-highlight.sass
160
+ - lib/assets/stylesheets/evil-front/reset.sass
161
+ - lib/assets/stylesheets/evil-front/size.sass
162
+ - lib/assets/stylesheets/evil-front/sticky-footer.sass
163
+ - lib/assets/stylesheets/evil-front/stroke-text.sass
164
+ - lib/assets/stylesheets/evil-front/styled-taps.sass
165
+ - lib/assets/stylesheets/evil-front/to-px.sass
166
+ - lib/evil-front.rb
167
+ - lib/evil-front/helpers.rb
168
+ - lib/evil-front/helpers/capitalize_first.rb
169
+ - lib/evil-front/helpers/disable_mobile_zoom.rb
170
+ - lib/evil-front/helpers/flying_quote.rb
171
+ - lib/evil-front/helpers/head_content.rb
172
+ - lib/evil-front/helpers/head_tag.rb
173
+ - lib/evil-front/helpers/ruble.rb
174
+ - lib/evil-front/helpers/russian_typograph.rb
175
+ - lib/evil-front/helpers/standard_assets.rb
176
+ - lib/evil-front/helpers/tel.rb
177
+ - lib/evil-front/helpers/title.rb
178
+ - lib/evil-front/helpers/title_tag.rb
179
+ - lib/evil-front/russian.rb
180
+ - lib/evil-front/slim.rb
181
+ - lib/evil-front/version.rb
182
+ - spec/helpers_spec.rb
183
+ - spec/russian_spec.rb
184
+ - spec/sass/empty.txt
185
+ - spec/sass/inline-ruble.sass
186
+ - spec/sass/load.sass
187
+ - spec/sass/media.sass
188
+ - spec/sass/ruble.sass
189
+ - spec/sass/size.sass
190
+ - spec/sass_spec.rb
191
+ - spec/spec_helper.rb
192
+ - vendor/assets/fonts/evil-front/alsrubl-arial-bold.woff
193
+ - vendor/assets/fonts/evil-front/alsrubl-arial-bolditalic.woff
194
+ - vendor/assets/fonts/evil-front/alsrubl-arial-italic.woff
195
+ - vendor/assets/fonts/evil-front/alsrubl-arial-regular.woff
196
+ homepage: https://github.com/ai/evil-front
197
+ licenses:
198
+ - MIT
199
+ metadata: {}
200
+ post_install_message:
201
+ rdoc_options: []
202
+ require_paths:
203
+ - lib
204
+ required_ruby_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ required_rubygems_version: !ruby/object:Gem::Requirement
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ requirements: []
215
+ rubyforge_project:
216
+ rubygems_version: 2.2.0
217
+ signing_key:
218
+ specification_version: 4
219
+ summary: Helpers, Sass mixins and JS shortcuts from Evil Martians
220
+ test_files: []