dimensions-rails 1.0.5 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f5930c38aeeed1c03d98b517898f2839676c8192
4
+ data.tar.gz: ca50e737ba2fc2ea72bb5bfd6b9f3e16e0c8eace
5
+ SHA512:
6
+ metadata.gz: fe19779c0b2fab713355700b4c4827e39b3dcceda358fb033ce1265016b5582d7b158b474dfc7670748299228696c3a970b294b954dbe384ca5c82d810bd85a5
7
+ data.tar.gz: 6b532472bd90bba6f2389d87b6b6163055c575a76b7ff443b707270b6eeba6f574e498fcf75c7cfbf2cbd3128ab792c86bf4fd40a501e348baf9a07cd051d167
@@ -3,3 +3,13 @@ language: ruby
3
3
  rvm:
4
4
  - 1.8.7
5
5
  - 1.9.3
6
+ - 2.0.0
7
+
8
+ env:
9
+ - RAILS_VERSION=3.2
10
+ - RAILS_VERSION=4.0
11
+
12
+ matrix:
13
+ exclude:
14
+ - rvm: 1.8.7
15
+ env: RAILS_VERSION=4.0
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## v1.1.0 (2013-07-30)
4
+
5
+ - Add support for Rails 4 (@nicolaracco)
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in dimensions-rails.gemspec
4
4
  gemspec
5
+
6
+ gem 'rails', ENV['RAILS_VERSION']
@@ -20,9 +20,9 @@ Gem::Specification.new do |gem|
20
20
  gem.version = Dimensions::Rails::VERSION
21
21
 
22
22
  gem.add_runtime_dependency 'dimensions'
23
- gem.add_runtime_dependency 'railties', '~> 3.0'
24
- gem.add_runtime_dependency 'actionpack', '~> 3.0'
25
- gem.add_runtime_dependency 'activesupport', '~> 3.0'
26
- gem.add_development_dependency 'rails', '~> 3.0'
23
+ gem.add_runtime_dependency 'railties', '>= 3.0', '< 4.1'
24
+ gem.add_runtime_dependency 'actionpack', '>= 3.0', '< 4.1'
25
+ gem.add_runtime_dependency 'activesupport', '>= 3.0', '< 4.1'
26
+ gem.add_development_dependency 'rails', '>= 3.0', '< 4.1'
27
27
  gem.add_development_dependency 'rspec-rails', '~> 2.0'
28
28
  end
@@ -18,13 +18,8 @@ module Dimensions
18
18
  disable_dimensions = options[:dimensions] == false
19
19
 
20
20
  unless disable_dimensions or options[:size] or options[:width] or options[:height]
21
- fs_path = begin
22
- asset_paths.asset_for(source, nil)
23
- rescue Sprockets::FileOutsidePaths
24
- nil
25
- end if respond_to? :asset_paths
26
-
27
- fs_path = fs_path.present? ? fs_path.to_path : File.join(::Rails.public_path, source)
21
+ fs_path = ::Rails.application.assets.find_asset(source)
22
+ fs_path = fs_path.present? ? fs_path.pathname : File.join(::Rails.public_path, source)
28
23
 
29
24
  if fs_path.present? and File.exist? fs_path
30
25
  options[:width], options[:height] = ::Dimensions.dimensions(fs_path)
@@ -1,5 +1,5 @@
1
1
  module Dimensions
2
2
  module Rails
3
- VERSION = '1.0.5'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -11,9 +11,6 @@ Dummy::Application.configure do
11
11
  config.serve_static_assets = true
12
12
  config.static_cache_control = "public, max-age=3600"
13
13
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
14
  # Show full error reports and disable caching
18
15
  config.consider_all_requests_local = true
19
16
  config.action_controller.perform_caching = false
@@ -34,4 +31,6 @@ Dummy::Application.configure do
34
31
 
35
32
  # Print deprecation notices to the stderr
36
33
  config.active_support.deprecation = :stderr
34
+
35
+ config.eager_load = false
37
36
  end
metadata CHANGED
@@ -1,82 +1,123 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimensions-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Elia Schito
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
11
+ date: 2013-07-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: dimensions
16
- requirement: &70142348500100 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70142348500100
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: railties
27
- requirement: &70142348496960 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ~>
31
+ - - '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: '3.0'
34
+ - - <
35
+ - !ruby/object:Gem::Version
36
+ version: '4.1'
33
37
  type: :runtime
34
38
  prerelease: false
35
- version_requirements: *70142348496960
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
44
+ - - <
45
+ - !ruby/object:Gem::Version
46
+ version: '4.1'
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: actionpack
38
- requirement: &70142348494600 !ruby/object:Gem::Requirement
39
- none: false
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  requirements:
41
- - - ~>
51
+ - - '>='
42
52
  - !ruby/object:Gem::Version
43
53
  version: '3.0'
54
+ - - <
55
+ - !ruby/object:Gem::Version
56
+ version: '4.1'
44
57
  type: :runtime
45
58
  prerelease: false
46
- version_requirements: *70142348494600
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '3.0'
64
+ - - <
65
+ - !ruby/object:Gem::Version
66
+ version: '4.1'
47
67
  - !ruby/object:Gem::Dependency
48
68
  name: activesupport
49
- requirement: &70142348509020 !ruby/object:Gem::Requirement
50
- none: false
69
+ requirement: !ruby/object:Gem::Requirement
51
70
  requirements:
52
- - - ~>
71
+ - - '>='
53
72
  - !ruby/object:Gem::Version
54
73
  version: '3.0'
74
+ - - <
75
+ - !ruby/object:Gem::Version
76
+ version: '4.1'
55
77
  type: :runtime
56
78
  prerelease: false
57
- version_requirements: *70142348509020
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '3.0'
84
+ - - <
85
+ - !ruby/object:Gem::Version
86
+ version: '4.1'
58
87
  - !ruby/object:Gem::Dependency
59
88
  name: rails
60
- requirement: &70142348506380 !ruby/object:Gem::Requirement
61
- none: false
89
+ requirement: !ruby/object:Gem::Requirement
62
90
  requirements:
63
- - - ~>
91
+ - - '>='
64
92
  - !ruby/object:Gem::Version
65
93
  version: '3.0'
94
+ - - <
95
+ - !ruby/object:Gem::Version
96
+ version: '4.1'
66
97
  type: :development
67
98
  prerelease: false
68
- version_requirements: *70142348506380
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
104
+ - - <
105
+ - !ruby/object:Gem::Version
106
+ version: '4.1'
69
107
  - !ruby/object:Gem::Dependency
70
108
  name: rspec-rails
71
- requirement: &70142348504320 !ruby/object:Gem::Requirement
72
- none: false
109
+ requirement: !ruby/object:Gem::Requirement
73
110
  requirements:
74
111
  - - ~>
75
112
  - !ruby/object:Gem::Version
76
113
  version: '2.0'
77
114
  type: :development
78
115
  prerelease: false
79
- version_requirements: *70142348504320
116
+ version_requirements: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ~>
119
+ - !ruby/object:Gem::Version
120
+ version: '2.0'
80
121
  description: Use dimensions by @sstephenson to add automatic images size and improve
81
122
  browser rendering
82
123
  email:
@@ -88,6 +129,7 @@ files:
88
129
  - .gitignore
89
130
  - .rspec
90
131
  - .travis.yml
132
+ - CHANGELOG.md
91
133
  - Gemfile
92
134
  - LICENSE
93
135
  - README.md
@@ -134,33 +176,26 @@ files:
134
176
  - spec/spec_helper.rb
135
177
  homepage: http://elia.github.com/dimensions-rails
136
178
  licenses: []
179
+ metadata: {}
137
180
  post_install_message:
138
181
  rdoc_options: []
139
182
  require_paths:
140
183
  - lib
141
184
  required_ruby_version: !ruby/object:Gem::Requirement
142
- none: false
143
185
  requirements:
144
- - - ! '>='
186
+ - - '>='
145
187
  - !ruby/object:Gem::Version
146
188
  version: '0'
147
- segments:
148
- - 0
149
- hash: 2160485572906887229
150
189
  required_rubygems_version: !ruby/object:Gem::Requirement
151
- none: false
152
190
  requirements:
153
- - - ! '>='
191
+ - - '>='
154
192
  - !ruby/object:Gem::Version
155
193
  version: '0'
156
- segments:
157
- - 0
158
- hash: 2160485572906887229
159
194
  requirements: []
160
195
  rubyforge_project:
161
- rubygems_version: 1.8.17
196
+ rubygems_version: 2.0.3
162
197
  signing_key:
163
- specification_version: 3
198
+ specification_version: 4
164
199
  summary: Improve browser rendering adding the size to <img> tags
165
200
  test_files:
166
201
  - spec/dummy/.gitignore