hisrc-rails 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +21 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/README.md +7 -7
- data/Rakefile +2 -3
- data/gemfiles/Rails_3_1.gemfile +5 -0
- data/gemfiles/Rails_3_2.gemfile +5 -0
- data/gemfiles/Rails_master.gemfile +12 -0
- data/hisrc-rails.gemspec +6 -3
- data/lib/hisrc-rails/version.rb +3 -0
- data/spec/integration_spec.rb +5 -5
- data/spec/responsive_image_tag_helper_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +35 -32
data/.travis.yml
CHANGED
@@ -1,4 +1,25 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
1
3
|
rvm:
|
2
4
|
- 1.9.2
|
3
5
|
- 1.9.3
|
6
|
+
- 2.0.0
|
4
7
|
- ruby-head
|
8
|
+
|
9
|
+
gemfile:
|
10
|
+
- Gemfile
|
11
|
+
- gemfiles/Rails_3_1.gemfile
|
12
|
+
- gemfiles/Rails_3_2.gemfile
|
13
|
+
- gemfiles/Rails_master.gemfile
|
14
|
+
|
15
|
+
branches:
|
16
|
+
only:
|
17
|
+
- master
|
18
|
+
|
19
|
+
matrix:
|
20
|
+
exclude:
|
21
|
+
- rvm: 1.9.2
|
22
|
+
gemfile: gemfiles/Rails_master.gemfile
|
23
|
+
allow_failures:
|
24
|
+
- rvm: ruby-head
|
25
|
+
- gemfile: gemfiles/Rails_master.gemfile
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# hisrc-rails
|
1
|
+
# hisrc-rails [![Build Status](https://travis-ci.org/haihappen/hisrc-rails.png?branch=master)](https://travis-ci.org/haihappen/hisrc-rails)
|
2
2
|
|
3
3
|
Retina displays are coming! Be sure to make your Rails app ready today.
|
4
4
|
|
@@ -6,10 +6,10 @@ How? Well, there are a lot of different approaches:
|
|
6
6
|
* http://css-tricks.com/which-responsive-images-solution-should-you-use/
|
7
7
|
* http://www.alistapart.com/articles/responsive-images-how-they-almost-worked-and-what-we-need/
|
8
8
|
|
9
|
-
The one I like the most is [HiSRC](https://github.com/teleject/hisrc).
|
9
|
+
The one I like the most is [HiSRC](https://github.com/teleject/hisrc). However I don't like stuffing JavaScript files into my `vendor/assets` folder, so I created this gem with following benefits:
|
10
10
|
|
11
|
-
* It adds HiSRC to the Rails
|
12
|
-
* It provides a helper method to
|
11
|
+
* It adds HiSRC to the Rails assets pipeline – no more messing around with javascript files (and a clean `vendor/assets` folder).
|
12
|
+
* It provides a little helper method to include retina ready images in your Rails views.
|
13
13
|
|
14
14
|
## Installation
|
15
15
|
|
@@ -33,7 +33,7 @@ For detailed information about available configuration options be sure to checko
|
|
33
33
|
|
34
34
|
## Usage
|
35
35
|
|
36
|
-
This gem provides a nice little helper method to optimize your views: `responsive_image_tag`
|
36
|
+
This gem provides a nice little helper method to optimize your views for retina screens: `responsive_image_tag`
|
37
37
|
|
38
38
|
`responsive_image_tag` accepts the same options as `image_tag`, and two additional options as well:
|
39
39
|
|
@@ -64,7 +64,7 @@ Many thanks to [1Mark](https://github.com/1Marc) for [his first version](https:/
|
|
64
64
|
|
65
65
|
(The MIT license)
|
66
66
|
|
67
|
-
Copyright (c) 2012 Mario Uher
|
67
|
+
Copyright (c) 2012 - 2013 Mario Uher
|
68
68
|
|
69
69
|
Permission is hereby granted, free of charge, to any person obtaining
|
70
70
|
a copy of this software and associated documentation files (the
|
@@ -83,4 +83,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
83
83
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
84
84
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
85
85
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
86
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
86
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
data/hisrc-rails.gemspec
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
$: << File.expand_path('../lib', __FILE__)
|
2
|
+
require 'hisrc-rails/version'
|
3
|
+
|
1
4
|
Gem::Specification.new do |gem|
|
2
5
|
gem.name = 'hisrc-rails'
|
3
|
-
gem.version =
|
6
|
+
gem.version = HisrcRails::VERSION
|
4
7
|
gem.authors = 'Mario Uher'
|
5
8
|
gem.email = 'uher.mario@gmail.com'
|
6
9
|
gem.description = 'Make owners of the MacBook Pro with Retina Display happy and provide high-res images within your Rails app.'
|
@@ -10,9 +13,9 @@ Gem::Specification.new do |gem|
|
|
10
13
|
gem.files = `git ls-files`.split("\n")
|
11
14
|
gem.require_path = 'lib'
|
12
15
|
|
13
|
-
gem.add_dependency 'activesupport', '
|
16
|
+
gem.add_dependency 'activesupport', '>= 3.1'
|
14
17
|
gem.add_dependency 'jquery-rails', '~> 2.0'
|
15
18
|
|
16
19
|
gem.add_development_dependency 'minitest'
|
17
|
-
gem.add_development_dependency 'rails', '
|
20
|
+
gem.add_development_dependency 'rails', '>= 3.1'
|
18
21
|
end
|
data/spec/integration_spec.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
|
1
|
+
require_relative 'spec_helper'
|
2
2
|
require 'rails/railtie'
|
3
3
|
require 'hisrc-rails/railtie'
|
4
4
|
require 'action_controller/railtie'
|
5
5
|
|
6
6
|
class App < Rails::Application
|
7
|
-
config.
|
8
|
-
|
7
|
+
config.eager_load = true
|
8
|
+
initialize!
|
9
9
|
end
|
10
10
|
|
11
11
|
describe ActionView::Base do
|
12
12
|
it 'haz method' do
|
13
|
-
ActionView::Base.instance_methods.must_include
|
13
|
+
ActionView::Base.instance_methods.must_include :responsive_image_tag
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
|
18
18
|
describe ActionController::Base do
|
19
19
|
it 'haz helper' do
|
20
|
-
ActionController::Base.helpers.methods.must_include
|
20
|
+
ActionController::Base.helpers.methods.must_include :responsive_image_tag
|
21
21
|
end
|
22
22
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,80 +1,80 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hisrc-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0
|
5
4
|
prerelease:
|
5
|
+
version: 0.3.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Mario Uher
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
+
prerelease: false
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ! '>='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '3.1'
|
21
|
+
none: false
|
22
|
+
type: :runtime
|
15
23
|
name: activesupport
|
16
24
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
25
|
requirements:
|
19
|
-
- -
|
26
|
+
- - ! '>='
|
20
27
|
- !ruby/object:Gem::Version
|
21
28
|
version: '3.1'
|
22
|
-
|
29
|
+
none: false
|
30
|
+
- !ruby/object:Gem::Dependency
|
23
31
|
prerelease: false
|
24
32
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
33
|
requirements:
|
27
34
|
- - ~>
|
28
35
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
|
36
|
+
version: '2.0'
|
37
|
+
none: false
|
38
|
+
type: :runtime
|
31
39
|
name: jquery-rails
|
32
40
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
41
|
requirements:
|
35
42
|
- - ~>
|
36
43
|
- !ruby/object:Gem::Version
|
37
44
|
version: '2.0'
|
38
|
-
|
45
|
+
none: false
|
46
|
+
- !ruby/object:Gem::Dependency
|
39
47
|
prerelease: false
|
40
48
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
49
|
requirements:
|
43
|
-
- -
|
50
|
+
- - ! '>='
|
44
51
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
46
|
-
|
52
|
+
version: '0'
|
53
|
+
none: false
|
54
|
+
type: :development
|
47
55
|
name: minitest
|
48
56
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
57
|
requirements:
|
51
58
|
- - ! '>='
|
52
59
|
- !ruby/object:Gem::Version
|
53
60
|
version: '0'
|
54
|
-
|
61
|
+
none: false
|
62
|
+
- !ruby/object:Gem::Dependency
|
55
63
|
prerelease: false
|
56
64
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
65
|
requirements:
|
59
66
|
- - ! '>='
|
60
67
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
62
|
-
|
68
|
+
version: '3.1'
|
69
|
+
none: false
|
70
|
+
type: :development
|
63
71
|
name: rails
|
64
72
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
73
|
requirements:
|
67
|
-
- -
|
74
|
+
- - ! '>='
|
68
75
|
- !ruby/object:Gem::Version
|
69
76
|
version: '3.1'
|
70
|
-
type: :development
|
71
|
-
prerelease: false
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
73
77
|
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '3.1'
|
78
78
|
description: Make owners of the MacBook Pro with Retina Display happy and provide
|
79
79
|
high-res images within your Rails app.
|
80
80
|
email: uher.mario@gmail.com
|
@@ -88,10 +88,14 @@ files:
|
|
88
88
|
- Gemfile
|
89
89
|
- README.md
|
90
90
|
- Rakefile
|
91
|
+
- gemfiles/Rails_3_1.gemfile
|
92
|
+
- gemfiles/Rails_3_2.gemfile
|
93
|
+
- gemfiles/Rails_master.gemfile
|
91
94
|
- hisrc-rails.gemspec
|
92
95
|
- lib/hisrc-rails.rb
|
93
96
|
- lib/hisrc-rails/railtie.rb
|
94
97
|
- lib/hisrc-rails/responsive_image_tag_helper.rb
|
98
|
+
- lib/hisrc-rails/version.rb
|
95
99
|
- spec/integration_spec.rb
|
96
100
|
- spec/responsive_image_tag_helper_spec.rb
|
97
101
|
- spec/spec_helper.rb
|
@@ -103,22 +107,21 @@ rdoc_options: []
|
|
103
107
|
require_paths:
|
104
108
|
- lib
|
105
109
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
110
|
requirements:
|
108
111
|
- - ! '>='
|
109
112
|
- !ruby/object:Gem::Version
|
110
113
|
version: '0'
|
111
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
114
|
none: false
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
116
|
requirements:
|
114
117
|
- - ! '>='
|
115
118
|
- !ruby/object:Gem::Version
|
116
119
|
version: '0'
|
120
|
+
none: false
|
117
121
|
requirements: []
|
118
122
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.8.
|
123
|
+
rubygems_version: 1.8.25
|
120
124
|
signing_key:
|
121
125
|
specification_version: 3
|
122
126
|
summary: Use hisrc-rails with Rails 3.1+.
|
123
127
|
test_files: []
|
124
|
-
has_rdoc:
|