masonry-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +11 -0
  4. data/Gemfile.lock +109 -0
  5. data/LICENSE.txt +20 -0
  6. data/Masonry.mdown +51 -0
  7. data/README.md +53 -0
  8. data/Rakefile +49 -0
  9. data/VERSION +1 -0
  10. data/_config.yml +6 -0
  11. data/lib/masonry-rails.rb +7 -0
  12. data/masonry-rails.gemspec +107 -0
  13. data/minify.sh +16 -0
  14. data/spec/_layouts/default.html +75 -0
  15. data/spec/_posts/demos/2011-05-01-basic-single-column.html +206 -0
  16. data/spec/_posts/demos/2011-05-02-basic-multi-column.html +213 -0
  17. data/spec/_posts/demos/2011-05-03-images.html +57 -0
  18. data/spec/_posts/demos/2011-05-04-tumblelog.html +226 -0
  19. data/spec/_posts/demos/2011-05-05-animating-jquery.html +144 -0
  20. data/spec/_posts/demos/2011-05-06-animating-css-transitions.html +132 -0
  21. data/spec/_posts/demos/2011-05-07-animating-modernizr.html +136 -0
  22. data/spec/_posts/demos/2011-05-08-adding-items.html +89 -0
  23. data/spec/_posts/demos/2011-05-09-infinite-scroll.html +268 -0
  24. data/spec/_posts/demos/2011-05-10-gutters.html +209 -0
  25. data/spec/_posts/demos/2011-05-11-right-to-left.html +135 -0
  26. data/spec/_posts/demos/2011-05-17-centered.html +137 -0
  27. data/spec/_posts/demos/2011-07-26-fluid.html +219 -0
  28. data/spec/_posts/demos/2011-10-07-corner-stamp.html +249 -0
  29. data/spec/_posts/docs/2011-05-01-intro.mdown +149 -0
  30. data/spec/_posts/docs/2011-05-02-options.mdown +157 -0
  31. data/spec/_posts/docs/2011-05-03-methods.mdown +155 -0
  32. data/spec/_posts/docs/2011-05-04-animating.mdown +96 -0
  33. data/spec/_posts/docs/2011-05-30-help.mdown +139 -0
  34. data/spec/_posts/pages/2011-05-02-2.html +189 -0
  35. data/spec/_posts/pages/2011-05-03-3.html +174 -0
  36. data/spec/_posts/pages/2011-05-04-4.html +159 -0
  37. data/spec/_posts/pages/2011-05-05-5.html +167 -0
  38. data/spec/_posts/tests/2011-01-01-index.html +14 -0
  39. data/spec/_posts/tests/2011-05-14-lots-of-bricks.html +1438 -0
  40. data/spec/_posts/tests/2011-05-17-dual.html +247 -0
  41. data/spec/_posts/tests/2011-05-18-first-child-no-width.html +217 -0
  42. data/spec/_posts/tests/2011-05-19-empty.html +205 -0
  43. data/spec/_posts/tests/2011-08-08-destroy.html +214 -0
  44. data/spec/_posts/tests/2011-09-27-centered-few.html +50 -0
  45. data/spec/index.html +58 -0
  46. data/spec/spec_helper.rb +12 -0
  47. data/vendor/assets/javascripts/masonry/box-maker.js +38 -0
  48. data/vendor/assets/javascripts/masonry/jquery.event.drag-2.2.js +402 -0
  49. data/vendor/assets/javascripts/masonry/jquery.infinitescroll.min.js +47 -0
  50. data/vendor/assets/javascripts/masonry/jquery.masonry.js +682 -0
  51. data/vendor/assets/javascripts/masonry/jquery.masonry.min.js +10 -0
  52. data/vendor/assets/javascripts/masonry/modernizr-transitions.js +2 -0
  53. data/vendor/assets/stylesheets/masonry/style.css +616 -0
  54. metadata +199 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'rails'
4
+
5
+ group :development do
6
+ gem "rspec", "> 2.8.0"
7
+ gem "rdoc", ">= 3.12"
8
+ gem "bundler", "> 1.0.0"
9
+ gem "jeweler", ">= 1.8.4"
10
+ gem "simplecov",">= 0.5"
11
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,109 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.8)
5
+ actionpack (= 3.2.8)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.8)
8
+ activemodel (= 3.2.8)
9
+ activesupport (= 3.2.8)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.1.3)
17
+ activemodel (3.2.8)
18
+ activesupport (= 3.2.8)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.8)
21
+ activemodel (= 3.2.8)
22
+ activesupport (= 3.2.8)
23
+ arel (~> 3.0.2)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.8)
26
+ activemodel (= 3.2.8)
27
+ activesupport (= 3.2.8)
28
+ activesupport (3.2.8)
29
+ i18n (~> 0.6)
30
+ multi_json (~> 1.0)
31
+ arel (3.0.2)
32
+ builder (3.0.0)
33
+ diff-lcs (1.1.3)
34
+ erubis (2.7.0)
35
+ git (1.2.5)
36
+ hike (1.2.1)
37
+ i18n (0.6.0)
38
+ jeweler (1.8.4)
39
+ bundler (~> 1.0)
40
+ git (>= 1.2.5)
41
+ rake
42
+ rdoc
43
+ journey (1.0.4)
44
+ json (1.7.4)
45
+ mail (2.4.4)
46
+ i18n (>= 0.4.0)
47
+ mime-types (~> 1.16)
48
+ treetop (~> 1.4.8)
49
+ mime-types (1.19)
50
+ multi_json (1.3.6)
51
+ polyglot (0.3.3)
52
+ rack (1.4.1)
53
+ rack-cache (1.2)
54
+ rack (>= 0.4)
55
+ rack-ssl (1.3.2)
56
+ rack
57
+ rack-test (0.6.1)
58
+ rack (>= 1.0)
59
+ rails (3.2.8)
60
+ actionmailer (= 3.2.8)
61
+ actionpack (= 3.2.8)
62
+ activerecord (= 3.2.8)
63
+ activeresource (= 3.2.8)
64
+ activesupport (= 3.2.8)
65
+ bundler (~> 1.0)
66
+ railties (= 3.2.8)
67
+ railties (3.2.8)
68
+ actionpack (= 3.2.8)
69
+ activesupport (= 3.2.8)
70
+ rack-ssl (~> 1.3.2)
71
+ rake (>= 0.8.7)
72
+ rdoc (~> 3.4)
73
+ thor (>= 0.14.6, < 2.0)
74
+ rake (0.9.2.2)
75
+ rdoc (3.12)
76
+ json (~> 1.4)
77
+ rspec (2.11.0)
78
+ rspec-core (~> 2.11.0)
79
+ rspec-expectations (~> 2.11.0)
80
+ rspec-mocks (~> 2.11.0)
81
+ rspec-core (2.11.1)
82
+ rspec-expectations (2.11.2)
83
+ diff-lcs (~> 1.1.3)
84
+ rspec-mocks (2.11.2)
85
+ simplecov (0.6.4)
86
+ multi_json (~> 1.0)
87
+ simplecov-html (~> 0.5.3)
88
+ simplecov-html (0.5.3)
89
+ sprockets (2.1.3)
90
+ hike (~> 1.2)
91
+ rack (~> 1.0)
92
+ tilt (~> 1.1, != 1.3.0)
93
+ thor (0.15.4)
94
+ tilt (1.3.3)
95
+ treetop (1.4.10)
96
+ polyglot
97
+ polyglot (>= 0.3.1)
98
+ tzinfo (0.3.33)
99
+
100
+ PLATFORMS
101
+ ruby
102
+
103
+ DEPENDENCIES
104
+ bundler (> 1.0.0)
105
+ jeweler (>= 1.8.4)
106
+ rails
107
+ rdoc (>= 3.12)
108
+ rspec (> 2.8.0)
109
+ simplecov (>= 0.5)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Kristian Mandrup
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Masonry.mdown ADDED
@@ -0,0 +1,51 @@
1
+ jQuery Masonry
2
+ ==============
3
+
4
+ Masonry is a dynamic grid layout plugin for jQuery. Think of it as the flip-side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically, positioning each element in the next open spot in the grid. The result minimizes vertical gaps between elements of varying height, just like a mason fitting stones in a wall.
5
+
6
+ This package has all the documentation and demos to get you started.
7
+
8
+ View this project live at [http://masonry.desandro.com](http://masonry.desandro.com).
9
+
10
+ ## Viewing this project locally
11
+
12
+
13
+ ### Via download
14
+
15
+ You can download a zip of all the flat HTML files from [http://meta.metafizzy.co/files/masonry-site.zip](http://meta.metafizzy.co/files/masonry-site.zip).
16
+
17
+ ### Via Jekyll
18
+
19
+ The documentation and demo pages are generated using [Jekyll](http://github.com/mojombo/jekyll/wiki). With Jekyll installed, you can clone this repo and run Jekyll from Terminal:
20
+
21
+ git clone https://github.com/desandro/masonry.git
22
+ cd masonry/
23
+ jekyll --server --auto
24
+
25
+ Then view the live site at [http://localhost:4000](http://localhost:4000).
26
+
27
+ ## Including Masonry as a submodule
28
+
29
+ The _module_ branch has just `jquery.masonry.js` and `jquery.masonry.min.js`, perfect for adding to your repo as a [submodule](http://dropshado.ws/post/20058825150/git-submodules).
30
+
31
+ ``` bash
32
+ git submodule add https://github.com/desandro/masonry.git
33
+ cd masonry/
34
+ git checkout module
35
+ git pull origin module
36
+ cd ../
37
+ git submodule update --init
38
+ ```
39
+
40
+ Then you can reference `masonry/jquery.masonry.min.js` within your own project.
41
+
42
+ To pull in the lastest version of the masonry submodule:
43
+
44
+ ``` bash
45
+ cd masonry/
46
+ git pull origin module
47
+ ```
48
+
49
+ * * *
50
+
51
+ Copyright (c) 2012 David DeSandro
data/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # Masonry for Rails asset pipeline
2
+
3
+ [masonry](http://masonry.desandro.com/docs/intro.html) at [github](https://github.com/desandro/masonry)
4
+
5
+ Using fork from [masonry](https://github.com/kristianmandrup/masonry)
6
+
7
+ See more Masonry info at [masonry README](https://github.com/desandro/masonry/README.mdown)
8
+
9
+ ## Usage
10
+
11
+ In Gemfile
12
+
13
+ `gem 'masonry-rails'`
14
+
15
+ ### CSS
16
+
17
+ Manifest `application.css` file:
18
+
19
+ ```css
20
+ *= require 'masonry/style'
21
+ ```
22
+
23
+ ### Javascript
24
+
25
+ ```javascript
26
+ // require masonry/jquery.masonry
27
+ ```
28
+
29
+ Optional
30
+
31
+ // require masonry/box-maker
32
+ // require masonry/modernizr-transitions
33
+ // require masonry/jquery.infinitescroll
34
+ // require masonry/jquery.event.drag-2.2
35
+
36
+
37
+ See examples on [masonry](http://masonry.desandro.com/docs/intro.html) or [github](https://github.com/desandro/masonry)
38
+
39
+ ## Contributing to masonry-rails
40
+
41
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
42
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
43
+ * Fork the project.
44
+ * Start a feature/bugfix branch.
45
+ * Commit and push until you are happy with your contribution.
46
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
47
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
48
+
49
+ ## Copyright
50
+
51
+ Copyright (c) 2012 Kristian Mandrup. See LICENSE.txt for
52
+ further details.
53
+
data/Rakefile ADDED
@@ -0,0 +1,49 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "masonry-rails"
18
+ gem.homepage = "http://github.com/kristianmandrup/masonry-rails"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Use JQuery Masonry with Rails asset pipeline}
21
+ gem.description = %Q{Masonry will rock your world!}
22
+ gem.email = "kmandrup@gmail.com"
23
+ gem.authors = ["Kristian Mandrup"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
35
+ spec.pattern = 'spec/**/*_spec.rb'
36
+ spec.rcov = true
37
+ end
38
+
39
+ task :default => :spec
40
+
41
+ require 'rdoc/task'
42
+ Rake::RDocTask.new do |rdoc|
43
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
+
45
+ rdoc.rdoc_dir = 'rdoc'
46
+ rdoc.title = "masonry-rails #{version}"
47
+ rdoc.rdoc_files.include('README*')
48
+ rdoc.rdoc_files.include('lib/**/*.rb')
49
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/_config.yml ADDED
@@ -0,0 +1,6 @@
1
+ name: jQuery Masonry
2
+ permalink: /:categories/:title.html
3
+ pygments: true
4
+ masonry_js: jquery.masonry.min.js
5
+ jquery_js: js/jquery-1.7.1.min.js
6
+ exclude: [ minify.sh, notes.mdown ]
@@ -0,0 +1,7 @@
1
+ module Masonry
2
+ module Rails
3
+ # add vendor/assets to Rails asset pipeline
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,107 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "masonry-rails"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Kristian Mandrup"]
12
+ s.date = "2012-08-13"
13
+ s.description = "Masonry will rock your world!"
14
+ s.email = "kmandrup@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "Masonry.mdown",
26
+ "README.md",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "_config.yml",
30
+ "lib/masonry-rails.rb",
31
+ "masonry-rails.gemspec",
32
+ "minify.sh",
33
+ "spec/_layouts/default.html",
34
+ "spec/_posts/demos/2011-05-01-basic-single-column.html",
35
+ "spec/_posts/demos/2011-05-02-basic-multi-column.html",
36
+ "spec/_posts/demos/2011-05-03-images.html",
37
+ "spec/_posts/demos/2011-05-04-tumblelog.html",
38
+ "spec/_posts/demos/2011-05-05-animating-jquery.html",
39
+ "spec/_posts/demos/2011-05-06-animating-css-transitions.html",
40
+ "spec/_posts/demos/2011-05-07-animating-modernizr.html",
41
+ "spec/_posts/demos/2011-05-08-adding-items.html",
42
+ "spec/_posts/demos/2011-05-09-infinite-scroll.html",
43
+ "spec/_posts/demos/2011-05-10-gutters.html",
44
+ "spec/_posts/demos/2011-05-11-right-to-left.html",
45
+ "spec/_posts/demos/2011-05-17-centered.html",
46
+ "spec/_posts/demos/2011-07-26-fluid.html",
47
+ "spec/_posts/demos/2011-10-07-corner-stamp.html",
48
+ "spec/_posts/docs/2011-05-01-intro.mdown",
49
+ "spec/_posts/docs/2011-05-02-options.mdown",
50
+ "spec/_posts/docs/2011-05-03-methods.mdown",
51
+ "spec/_posts/docs/2011-05-04-animating.mdown",
52
+ "spec/_posts/docs/2011-05-30-help.mdown",
53
+ "spec/_posts/pages/2011-05-02-2.html",
54
+ "spec/_posts/pages/2011-05-03-3.html",
55
+ "spec/_posts/pages/2011-05-04-4.html",
56
+ "spec/_posts/pages/2011-05-05-5.html",
57
+ "spec/_posts/tests/2011-01-01-index.html",
58
+ "spec/_posts/tests/2011-05-14-lots-of-bricks.html",
59
+ "spec/_posts/tests/2011-05-17-dual.html",
60
+ "spec/_posts/tests/2011-05-18-first-child-no-width.html",
61
+ "spec/_posts/tests/2011-05-19-empty.html",
62
+ "spec/_posts/tests/2011-08-08-destroy.html",
63
+ "spec/_posts/tests/2011-09-27-centered-few.html",
64
+ "spec/index.html",
65
+ "spec/spec_helper.rb",
66
+ "vendor/assets/javascripts/masonry/box-maker.js",
67
+ "vendor/assets/javascripts/masonry/jquery.event.drag-2.2.js",
68
+ "vendor/assets/javascripts/masonry/jquery.infinitescroll.min.js",
69
+ "vendor/assets/javascripts/masonry/jquery.masonry.js",
70
+ "vendor/assets/javascripts/masonry/jquery.masonry.min.js",
71
+ "vendor/assets/javascripts/masonry/modernizr-transitions.js",
72
+ "vendor/assets/stylesheets/masonry/style.css"
73
+ ]
74
+ s.homepage = "http://github.com/kristianmandrup/masonry-rails"
75
+ s.licenses = ["MIT"]
76
+ s.require_paths = ["lib"]
77
+ s.rubygems_version = "1.8.24"
78
+ s.summary = "Use JQuery Masonry with Rails asset pipeline"
79
+
80
+ if s.respond_to? :specification_version then
81
+ s.specification_version = 3
82
+
83
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
84
+ s.add_runtime_dependency(%q<rails>, [">= 0"])
85
+ s.add_development_dependency(%q<rspec>, ["> 2.8.0"])
86
+ s.add_development_dependency(%q<rdoc>, [">= 3.12"])
87
+ s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
88
+ s.add_development_dependency(%q<jeweler>, [">= 1.8.4"])
89
+ s.add_development_dependency(%q<simplecov>, [">= 0.5"])
90
+ else
91
+ s.add_dependency(%q<rails>, [">= 0"])
92
+ s.add_dependency(%q<rspec>, ["> 2.8.0"])
93
+ s.add_dependency(%q<rdoc>, [">= 3.12"])
94
+ s.add_dependency(%q<bundler>, ["> 1.0.0"])
95
+ s.add_dependency(%q<jeweler>, [">= 1.8.4"])
96
+ s.add_dependency(%q<simplecov>, [">= 0.5"])
97
+ end
98
+ else
99
+ s.add_dependency(%q<rails>, [">= 0"])
100
+ s.add_dependency(%q<rspec>, ["> 2.8.0"])
101
+ s.add_dependency(%q<rdoc>, [">= 3.12"])
102
+ s.add_dependency(%q<bundler>, ["> 1.0.0"])
103
+ s.add_dependency(%q<jeweler>, [">= 1.8.4"])
104
+ s.add_dependency(%q<simplecov>, [">= 0.5"])
105
+ end
106
+ end
107
+
data/minify.sh ADDED
@@ -0,0 +1,16 @@
1
+ #!/bin/bash
2
+
3
+ # minifies jquery.masonry.js
4
+ # requires nodejs & uglifyjs
5
+
6
+ IN=jquery.masonry.js
7
+ OUT=jquery.masonry.min.js
8
+
9
+ # remove any lines that begin with /*jshint or /*global
10
+ # then, minify with Uglify JS
11
+ # then, add newline characters after `*/`, but not last newline character
12
+ awk '!/^\/\*[jshint|global]/' $IN \
13
+ | uglifyjs \
14
+ | awk '{ORS=""; gsub(/\*\//,"*/\n"); if (NR!=1) print "\n"; print;}' > $OUT
15
+ echo "Minified" $IN "as" $OUT
16
+