ultimate-base 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitignore +5 -0
  2. data/.rvmrc +2 -0
  3. data/.rvmrc.example +2 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +14 -0
  6. data/LICENSE +5 -0
  7. data/README.md +1 -0
  8. data/Rakefile +1 -0
  9. data/app/assets/javascripts/backbone/backbone.js +1452 -0
  10. data/app/assets/javascripts/backbone/ultimate/app.js.coffee +25 -0
  11. data/app/assets/javascripts/backbone/ultimate/collection.js.coffee +12 -0
  12. data/app/assets/javascripts/backbone/ultimate/model.js.coffee +12 -0
  13. data/app/assets/javascripts/backbone/ultimate/router.js.coffee +13 -0
  14. data/app/assets/javascripts/backbone/ultimate/view.js.coffee +96 -0
  15. data/app/assets/javascripts/ultimate/base.js.coffee +103 -0
  16. data/app/assets/javascripts/ultimate/bus.js.coffee +57 -0
  17. data/app/assets/javascripts/ultimate/devise.js.coffee +18 -0
  18. data/app/assets/javascripts/ultimate/experimental/_inflections/dzone.inflections.js +154 -0
  19. data/app/assets/javascripts/ultimate/experimental/_inflections/inflections.js.coffee +2 -0
  20. data/app/assets/javascripts/ultimate/experimental/_inflections/plur.js +29 -0
  21. data/app/assets/javascripts/ultimate/experimental/_inflections/underscore.inflection.js +175 -0
  22. data/app/assets/javascripts/ultimate/experimental/fuzzy-json-generator.js.coffee +48 -0
  23. data/app/assets/javascripts/ultimate/helpers/array.js.coffee +63 -0
  24. data/app/assets/javascripts/ultimate/helpers/asset_tag.js.coffee +63 -0
  25. data/app/assets/javascripts/ultimate/helpers/decor.js.coffee +14 -0
  26. data/app/assets/javascripts/ultimate/helpers/forms.js.coffee +0 -0
  27. data/app/assets/javascripts/ultimate/helpers/tags.js.coffee +70 -0
  28. data/app/assets/javascripts/ultimate/helpers.js.coffee +149 -0
  29. data/app/assets/javascripts/ultimate/improves/datepicker.js.coffee +34 -0
  30. data/app/assets/javascripts/ultimate/improves/form-errors.js.coffee +146 -0
  31. data/app/assets/javascripts/ultimate/improves/form.js.coffee +155 -0
  32. data/app/assets/javascripts/ultimate/improves/magic-radios.js.coffee +41 -0
  33. data/app/assets/javascripts/ultimate/improves/tablesorter.js +59 -0
  34. data/app/assets/javascripts/ultimate/improves/typed-field.js.coffee +98 -0
  35. data/app/assets/javascripts/ultimate/underscore/underscore.js +1059 -0
  36. data/app/assets/javascripts/ultimate/underscore/underscore.string.js +480 -0
  37. data/app/assets/javascripts/ultimate/widgets/dock.js.coffee +70 -0
  38. data/app/assets/javascripts/ultimate/widgets/gear.js.coffee +84 -0
  39. data/app/assets/javascripts/ultimate/widgets/jquery-ext.js.coffee +104 -0
  40. data/app/assets/javascripts/ultimate/widgets/jquery.adapter.js.coffee +62 -0
  41. data/app/assets/javascripts/ultimate/widgets/widget.js.coffee +115 -0
  42. data/app/assets/stylesheets/polyfills/PIE.htc +96 -0
  43. data/app/assets/stylesheets/polyfills/boxsizing.htc +300 -0
  44. data/app/assets/stylesheets/ultimate/mixins/_routines.css.scss +95 -0
  45. data/app/assets/stylesheets/ultimate/mixins/_vendors.css.scss +34 -0
  46. data/app/assets/stylesheets/ultimate/mixins/css3/_text-shadow.scss +37 -0
  47. data/app/assets/stylesheets/ultimate/mixins/css3.css.scss +328 -0
  48. data/app/assets/stylesheets/ultimate/mixins/decor.css.scss +86 -0
  49. data/app/assets/stylesheets/ultimate/mixins/fonts.css.scss +100 -0
  50. data/app/assets/stylesheets/ultimate/mixins/microstructures.css.scss +188 -0
  51. data/app/assets/stylesheets/ultimate/structures/slider.css.scss +53 -0
  52. data/lib/ultimate-base/engine.rb +6 -0
  53. data/lib/ultimate-base/extensions/directive_processor.rb +64 -0
  54. data/lib/ultimate-base/extensions/sass_script_functions.rb +39 -0
  55. data/lib/ultimate-base/version.rb +5 -0
  56. data/lib/ultimate-base.rb +10 -0
  57. data/ultimate-base.gemspec +25 -0
  58. metadata +102 -0
@@ -0,0 +1,53 @@
1
+ @mixin _slider__nav($type, $nav_width) {
2
+ &.#{$type} {
3
+ $offset_x: 0;
4
+ @if $type == prev {
5
+ left: 0;
6
+ } @else {
7
+ right: 0;
8
+ $offset_x: -$nav_width;
9
+ }
10
+ background-position: $offset_x (-$nav_width * 3);
11
+ cursor: default;
12
+ &.enabled {
13
+ background-position: $offset_x 0;
14
+ cursor: pointer;
15
+ &:hover { background-position: $offset_x (-$nav_width); }
16
+ &:active { background-position: $offset_x (-$nav_width * 2); }
17
+ }
18
+ }
19
+ }
20
+
21
+ @mixin slider($nav_width: 40px, $nav_sprite: "structures/slider__nav.png") {
22
+ position: relative;
23
+ padding: 0 !important;
24
+ min-height: 24px;
25
+ > .slide-display {
26
+ height: 100%;
27
+ margin: 0 $nav_width;
28
+ overflow: hidden;
29
+ position: relative;
30
+ > .slide-line {
31
+ position: absolute;
32
+ top: 0;
33
+ width: 10000px;
34
+ height: 100%;
35
+ > .item {
36
+ float: left;
37
+ display: block;
38
+ }
39
+ }
40
+ }
41
+ > .nav {
42
+ display: block;
43
+ width: $nav_width !important;
44
+ height: 100%;
45
+ position: absolute;
46
+ top: 0;
47
+ @if $nav_sprite {
48
+ background: image-url($nav_sprite) 1000px center no-repeat;
49
+ }
50
+ @include _slider__nav(prev, $nav_width);
51
+ @include _slider__nav(next, $nav_width);
52
+ }
53
+ }
@@ -0,0 +1,6 @@
1
+ module Ultimate
2
+ module Base
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,64 @@
1
+ require 'sprockets'
2
+
3
+ module Ultimate
4
+ module Extensions
5
+ module DirectiveProcessor
6
+ extend ActiveSupport::Concern
7
+
8
+
9
+ def process_require_all_directive(path)
10
+ raise ArgumentError, "require_all argument must be a relative path" unless relative?(path)
11
+
12
+ context.environment.paths.each do |root_path|
13
+ root = Pathname.new(root_path).join(path).expand_path
14
+
15
+ if root.exist? && root.directory?
16
+ context.depend_on(root)
17
+
18
+ #Dir["#{root}/*"].sort.each do |filename|
19
+ entries(root).each do |pathname|
20
+ filename = root.join(pathname)
21
+ if filename == self.file
22
+ next
23
+ elsif context.asset_requirable?(filename)
24
+ context.require_asset(filename)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+
31
+ # `require_first` requires all the files
32
+ # inside a first counter single directory.
33
+ #
34
+ # //= require_first "./ultimate/underscore"
35
+ #
36
+ def process_require_first_directive(path)
37
+ raise ArgumentError, "require_first argument must be a relative path" unless relative?(path)
38
+
39
+ context.environment.paths.each do |root_path|
40
+ root = Pathname.new(root_path).join(path).expand_path
41
+
42
+ if root.exist? && root.directory?
43
+ context.depend_on(root)
44
+ Rails.logger.info('----------')
45
+ Rails.logger.info(root)
46
+ Dir["#{root}/*"].sort.each do |filename|
47
+ if filename == self.file
48
+ next
49
+ elsif context.asset_requirable?(filename)
50
+ context.require_asset(filename)
51
+ end
52
+ end
53
+
54
+ break
55
+
56
+ end
57
+ end
58
+ end
59
+
60
+ end
61
+ end
62
+ end
63
+
64
+ Sprockets::DirectiveProcessor.send :include, Ultimate::Extensions::DirectiveProcessor
@@ -0,0 +1,39 @@
1
+ require "sass"
2
+
3
+ module Ultimate
4
+ module Extensions
5
+ module SassScriptFunctions
6
+ #def reverseB(string)
7
+ # assert_type string, :String
8
+ # Sass::Script::String.new(string.value.reverse)
9
+ #end
10
+ #
11
+ #def min(a, b)
12
+ # assert_type a, :Number
13
+ # assert_type b, :Number
14
+ # a.value < b.value ? a : b
15
+ #end
16
+ #
17
+ def polar(x, y)
18
+ assert_type x, :Number
19
+ assert_type y, :Number
20
+
21
+ theta = Sass::Script::Number.new(Math.atan2(y.value, x.value) / Math::PI * 180 + 90)
22
+ r = Sass::Script::Number.new(Math.hypot(x.value, y.value))
23
+ Sass::Script::List.new([theta, r], :comma)
24
+ end
25
+
26
+ #Sass::Script::Functions.declare :reverseB, [:string]
27
+ #Sass::Script::Functions.declare :min, [:a, :b]
28
+ Sass::Script::Functions.declare :polar, [:x, :y]
29
+ end
30
+ end
31
+ end
32
+
33
+ module Sass::Script::Functions
34
+ include Ultimate::Extensions::SassScriptFunctions
35
+ end
36
+
37
+ class Sass::Script::Functions::EvaluationContext
38
+ include Sass::Script::Functions
39
+ end
@@ -0,0 +1,5 @@
1
+ module Ultimate
2
+ module Base
3
+ VERSION = "0.2.0"
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ require "ultimate-base/version"
2
+ require "ultimate-base/extensions/directive_processor"
3
+ require "ultimate-base/engine"
4
+ require "ultimate-base/extensions/sass_script_functions"
5
+
6
+ module Ultimate
7
+ module Base
8
+
9
+ end
10
+ end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "ultimate-base/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "ultimate-base"
7
+ s.version = Ultimate::Base::VERSION
8
+ s.authors = ["Dmitry KODer Karpunin"]
9
+ s.email = ["koderfunk@gmail.com"]
10
+ s.homepage = "http://github.com/KODer/ultimate-base"
11
+ s.summary = %q{Ultimate UI core, base helpers and improves for Ruby on Rails Front-end}
12
+ s.description = %q{Ultimate UI core, base helpers and improves for Ruby on Rails Front-end}
13
+
14
+ s.rubyforge_project = "ultimate-base"
15
+
16
+ #s.add_dependency "rails", "~> 3.1"
17
+ #s.add_dependency "coffee-script", "~> 2.1"
18
+ #s.add_dependency "sass", "~> 3.1"
19
+
20
+ s.files = `git ls-files`.split("\n")
21
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
23
+ s.require_paths = ["lib"]
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ultimate-base
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dmitry KODer Karpunin
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-07 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Ultimate UI core, base helpers and improves for Ruby on Rails Front-end
15
+ email:
16
+ - koderfunk@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - .rvmrc
23
+ - .rvmrc.example
24
+ - Gemfile
25
+ - Gemfile.lock
26
+ - LICENSE
27
+ - README.md
28
+ - Rakefile
29
+ - app/assets/javascripts/backbone/backbone.js
30
+ - app/assets/javascripts/backbone/ultimate/app.js.coffee
31
+ - app/assets/javascripts/backbone/ultimate/collection.js.coffee
32
+ - app/assets/javascripts/backbone/ultimate/model.js.coffee
33
+ - app/assets/javascripts/backbone/ultimate/router.js.coffee
34
+ - app/assets/javascripts/backbone/ultimate/view.js.coffee
35
+ - app/assets/javascripts/ultimate/base.js.coffee
36
+ - app/assets/javascripts/ultimate/bus.js.coffee
37
+ - app/assets/javascripts/ultimate/devise.js.coffee
38
+ - app/assets/javascripts/ultimate/experimental/_inflections/dzone.inflections.js
39
+ - app/assets/javascripts/ultimate/experimental/_inflections/inflections.js.coffee
40
+ - app/assets/javascripts/ultimate/experimental/_inflections/plur.js
41
+ - app/assets/javascripts/ultimate/experimental/_inflections/underscore.inflection.js
42
+ - app/assets/javascripts/ultimate/experimental/fuzzy-json-generator.js.coffee
43
+ - app/assets/javascripts/ultimate/helpers.js.coffee
44
+ - app/assets/javascripts/ultimate/helpers/array.js.coffee
45
+ - app/assets/javascripts/ultimate/helpers/asset_tag.js.coffee
46
+ - app/assets/javascripts/ultimate/helpers/decor.js.coffee
47
+ - app/assets/javascripts/ultimate/helpers/forms.js.coffee
48
+ - app/assets/javascripts/ultimate/helpers/tags.js.coffee
49
+ - app/assets/javascripts/ultimate/improves/datepicker.js.coffee
50
+ - app/assets/javascripts/ultimate/improves/form-errors.js.coffee
51
+ - app/assets/javascripts/ultimate/improves/form.js.coffee
52
+ - app/assets/javascripts/ultimate/improves/magic-radios.js.coffee
53
+ - app/assets/javascripts/ultimate/improves/tablesorter.js
54
+ - app/assets/javascripts/ultimate/improves/typed-field.js.coffee
55
+ - app/assets/javascripts/ultimate/underscore/underscore.js
56
+ - app/assets/javascripts/ultimate/underscore/underscore.string.js
57
+ - app/assets/javascripts/ultimate/widgets/dock.js.coffee
58
+ - app/assets/javascripts/ultimate/widgets/gear.js.coffee
59
+ - app/assets/javascripts/ultimate/widgets/jquery-ext.js.coffee
60
+ - app/assets/javascripts/ultimate/widgets/jquery.adapter.js.coffee
61
+ - app/assets/javascripts/ultimate/widgets/widget.js.coffee
62
+ - app/assets/stylesheets/polyfills/PIE.htc
63
+ - app/assets/stylesheets/polyfills/boxsizing.htc
64
+ - app/assets/stylesheets/ultimate/mixins/_routines.css.scss
65
+ - app/assets/stylesheets/ultimate/mixins/_vendors.css.scss
66
+ - app/assets/stylesheets/ultimate/mixins/css3.css.scss
67
+ - app/assets/stylesheets/ultimate/mixins/css3/_text-shadow.scss
68
+ - app/assets/stylesheets/ultimate/mixins/decor.css.scss
69
+ - app/assets/stylesheets/ultimate/mixins/fonts.css.scss
70
+ - app/assets/stylesheets/ultimate/mixins/microstructures.css.scss
71
+ - app/assets/stylesheets/ultimate/structures/slider.css.scss
72
+ - lib/ultimate-base.rb
73
+ - lib/ultimate-base/engine.rb
74
+ - lib/ultimate-base/extensions/directive_processor.rb
75
+ - lib/ultimate-base/extensions/sass_script_functions.rb
76
+ - lib/ultimate-base/version.rb
77
+ - ultimate-base.gemspec
78
+ homepage: http://github.com/KODer/ultimate-base
79
+ licenses: []
80
+ post_install_message:
81
+ rdoc_options: []
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ requirements: []
97
+ rubyforge_project: ultimate-base
98
+ rubygems_version: 1.8.10
99
+ signing_key:
100
+ specification_version: 3
101
+ summary: Ultimate UI core, base helpers and improves for Ruby on Rails Front-end
102
+ test_files: []