fancybox-rails 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem "rails", "3.1.0.rc4"
4
- gem "capybara", :git => "https://github.com/jnicklas/capybara"
4
+ gem "capybara", "~> 1.0.0"
5
5
  gem "sqlite3"
6
6
 
7
7
  # Asset template engines
@@ -9,6 +9,7 @@ gem 'sprockets', '2.0.0.beta.10'
9
9
  gem 'sass'
10
10
  gem 'coffee-script'
11
11
  gem 'uglifier'
12
+ gem 'nokogiri'
12
13
 
13
14
  gem 'jquery-rails'
14
15
 
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  fancybox-rails
2
2
  ==============
3
3
 
4
+ [![Build Status](http://travis-ci.org/hecticjeff/fancybox-rails.png)](http://travis-ci.org/hecticjeff/fancybox-rails)
5
+
4
6
  Use [fancybox](http://fancybox.net/) with rails 3.1 asset pipeline.
5
7
 
6
8
  ## Installation
@@ -21,6 +23,7 @@ Now you need to edit your `app/assets/javascripts/application.js`
21
23
  file and add the following line:
22
24
 
23
25
  ``` javascript
26
+ //= require jquery
24
27
  //= require fancybox
25
28
  ```
26
29
 
@@ -47,3 +50,9 @@ jQuery(function() {
47
50
  $("a.fancybox").fancybox();
48
51
  });
49
52
  ```
53
+
54
+ ## More information
55
+
56
+ * [DHH's RailsConf 2011 talk on the rails 3.1 asset pipeline](http://www.youtube.com/watch?v=cGdCI2HhfAU)
57
+
58
+ Copyright (c) Chris Mytton
data/Rakefile CHANGED
@@ -5,6 +5,13 @@ rescue LoadError
5
5
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
6
  end
7
7
 
8
+ # For checking remote fancybox version.
9
+ require 'nokogiri'
10
+ require 'open-uri'
11
+
12
+ # Path to atom feed with fancybox updates.
13
+ $fancybox_feed = "http://code.google.com/feeds/p/fancybox/downloads/basic"
14
+
8
15
  Bundler::GemHelper.install_tasks
9
16
 
10
17
  require 'rake/testtask'
@@ -17,3 +24,36 @@ Rake::TestTask.new(:test) do |t|
17
24
  end
18
25
 
19
26
  task :default => :test
27
+
28
+ namespace :fancybox do
29
+ desc "Get the local and remote fancybox versions."
30
+ task :version do
31
+ local = local_version
32
+ remote = remote_version
33
+
34
+ puts "local: v#{local}"
35
+ puts "remote: v#{remote}"
36
+
37
+ if local != remote
38
+ warn "\nthere is a newer remote version available"
39
+ end
40
+ end
41
+ end
42
+
43
+ # Get the current local version of the vendored fancybox library.
44
+ #
45
+ # Returns the String representing the local version.
46
+ def local_version
47
+ `grep ' * Version' vendor/assets/javascripts/jquery.fancybox.js | \
48
+ cut -d ' ' -f 4`.chomp
49
+ end
50
+
51
+ # Get the current version of the remote version of the library. Uses
52
+ # nokogiri and open-uri to grab the atom feed from google code, then
53
+ # parses the version out of the title.
54
+ #
55
+ # Returns the String representing the remote version.
56
+ def remote_version
57
+ doc = Nokogiri::HTML(open($fancybox_feed))
58
+ doc.css('entry:first title').text.match(/\d\.\d\.\d/)[0]
59
+ end
@@ -324,15 +324,15 @@
324
324
 
325
325
  /* IE6 */
326
326
 
327
- .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
327
+ .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_close.png', sizingMethod='scale'); }
328
328
 
329
- .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
330
- .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
329
+ .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_nav_left.png', sizingMethod='scale'); }
330
+ .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_nav_right.png', sizingMethod='scale'); }
331
331
 
332
- .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333
- .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
334
- .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
335
- .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
332
+ .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
333
+ .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_title_left.png', sizingMethod='scale'); }
334
+ .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_title_main.png', sizingMethod='scale'); }
335
+ .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_title_right.png', sizingMethod='scale'); }
336
336
 
337
337
  .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
338
338
  height: expression(this.parentNode.clientHeight + "px");
@@ -343,17 +343,17 @@
343
343
  top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
344
344
  }
345
345
 
346
- #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
346
+ #fancybox-loading.fancybox-ie6 div { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_loading.png', sizingMethod='scale'); }
347
347
 
348
348
  /* IE6, IE7, IE8 */
349
349
 
350
350
  .fancybox-ie .fancybox-bg { background: transparent !important; }
351
351
 
352
- .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
353
- .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
354
- .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
355
- .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
356
- .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
357
- .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
358
- .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
359
- .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
352
+ .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_n.png', sizingMethod='scale'); }
353
+ .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_ne.png', sizingMethod='scale'); }
354
+ .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_e.png', sizingMethod='scale'); }
355
+ .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_se.png', sizingMethod='scale'); }
356
+ .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_s.png', sizingMethod='scale'); }
357
+ .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_sw.png', sizingMethod='scale'); }
358
+ .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_w.png', sizingMethod='scale'); }
359
+ .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='assets/fancy_shadow_nw.png', sizingMethod='scale'); }
metadata CHANGED
@@ -1,95 +1,113 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fancybox-rails
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Chris Mytton
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-06-11 00:00:00 Z
19
- dependencies: []
20
-
12
+ date: 2011-07-31 00:00:00.000000000 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: railties
17
+ requirement: &2153524540 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 3.1.0.rc
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *2153524540
26
+ - !ruby/object:Gem::Dependency
27
+ name: bundler
28
+ requirement: &2153518080 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *2153518080
37
+ - !ruby/object:Gem::Dependency
38
+ name: rails
39
+ requirement: &2153517180 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '3.1'
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *2153517180
21
48
  description: This gem provides jQuery FancyBox for your Rails 3.1 application.
22
- email:
49
+ email:
23
50
  - self@hecticjeff.net
24
51
  executables: []
25
-
26
52
  extensions: []
27
-
28
53
  extra_rdoc_files: []
29
-
30
- files:
31
- - lib/fancybox-rails.rb
54
+ files:
32
55
  - lib/fancybox-rails/engine.rb
33
- - vendor/assets/javascripts/jquery.fancybox.js
34
- - vendor/assets/javascripts/fancybox.js
35
- - vendor/assets/images/fancy_title_main.png
36
- - vendor/assets/images/fancy_nav_left.png
37
- - vendor/assets/images/fancybox-x.png
56
+ - lib/fancybox-rails.rb
38
57
  - vendor/assets/images/blank.gif
39
- - vendor/assets/images/fancybox.png
40
- - vendor/assets/images/fancy_shadow_nw.png
41
- - vendor/assets/images/fancy_title_over.png
42
- - vendor/assets/images/fancy_shadow_sw.png
43
- - vendor/assets/images/fancy_title_right.png
44
58
  - vendor/assets/images/fancy_close.png
59
+ - vendor/assets/images/fancy_loading.png
60
+ - vendor/assets/images/fancy_nav_left.png
61
+ - vendor/assets/images/fancy_nav_right.png
45
62
  - vendor/assets/images/fancy_shadow_e.png
46
63
  - vendor/assets/images/fancy_shadow_n.png
47
- - vendor/assets/images/fancybox-y.png
64
+ - vendor/assets/images/fancy_shadow_ne.png
65
+ - vendor/assets/images/fancy_shadow_nw.png
66
+ - vendor/assets/images/fancy_shadow_s.png
48
67
  - vendor/assets/images/fancy_shadow_se.png
68
+ - vendor/assets/images/fancy_shadow_sw.png
49
69
  - vendor/assets/images/fancy_shadow_w.png
50
70
  - vendor/assets/images/fancy_title_left.png
51
- - vendor/assets/images/fancy_nav_right.png
52
- - vendor/assets/images/fancy_loading.png
53
- - vendor/assets/images/fancy_shadow_s.png
54
- - vendor/assets/images/fancy_shadow_ne.png
55
- - vendor/assets/stylesheets/jquery.fancybox.css
71
+ - vendor/assets/images/fancy_title_main.png
72
+ - vendor/assets/images/fancy_title_over.png
73
+ - vendor/assets/images/fancy_title_right.png
74
+ - vendor/assets/images/fancybox-x.png
75
+ - vendor/assets/images/fancybox-y.png
76
+ - vendor/assets/images/fancybox.png
77
+ - vendor/assets/javascripts/fancybox.js
78
+ - vendor/assets/javascripts/jquery.fancybox.js
56
79
  - vendor/assets/stylesheets/fancybox.css
80
+ - vendor/assets/stylesheets/jquery.fancybox.css
57
81
  - MIT-LICENSE
58
82
  - Rakefile
59
83
  - Gemfile
60
84
  - README.md
85
+ has_rdoc: true
61
86
  homepage: https://github.com/hecticjeff/fancybox-rails
62
87
  licenses: []
63
-
64
88
  post_install_message:
65
89
  rdoc_options: []
66
-
67
- require_paths:
90
+ require_paths:
68
91
  - lib
69
- required_ruby_version: !ruby/object:Gem::Requirement
92
+ required_ruby_version: !ruby/object:Gem::Requirement
70
93
  none: false
71
- requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- hash: 3
75
- segments:
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ segments:
76
99
  - 0
77
- version: "0"
78
- required_rubygems_version: !ruby/object:Gem::Requirement
100
+ hash: 358470496486197136
101
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
102
  none: false
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- hash: 3
84
- segments:
85
- - 0
86
- version: "0"
103
+ requirements:
104
+ - - ! '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
87
107
  requirements: []
88
-
89
108
  rubyforge_project:
90
- rubygems_version: 1.8.5
109
+ rubygems_version: 1.6.2
91
110
  signing_key:
92
111
  specification_version: 3
93
112
  summary: Use FancyBox with Rails 3.1
94
113
  test_files: []
95
-