react-rails-img 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b5d052ce9d454508c2fa6aea393861f3695529f
4
- data.tar.gz: 7e4b866c63c137ff2c8a13dbb867128ef7d328ed
3
+ metadata.gz: 41eaf1b97c60077772c6c62dd02f7d1039adbbec
4
+ data.tar.gz: 007cbe110a1372cbc7fd04e6b9febfbb029ab455
5
5
  SHA512:
6
- metadata.gz: 559e410f2627080fdc3617b9e903c6817a7f8bf4b391e4b71c38f841aa523703a27c7baa1163bdf020979ceea5cbce090e7c78dec843d5a75cc86d675e8afc01
7
- data.tar.gz: f974fd3ccca6990d8cc3f1a7cadb2d353f0f04afbbef2fc89903af8e9c64dc387c1cb9538b1939e8deb5d16a64b1efa2bcc124ca79dc11be8521e959729bf7cd
6
+ metadata.gz: 32863e470fc8a4b481534d9ecc712c44063417e1bc351cb3ca9a825789d84a107027d0632ff3544224c5b9224125ad72749c728dad857a6f4bdc1e63d6d4c4e8
7
+ data.tar.gz: 02da928fa15b2da526de91960805c696c82b2cefd80f2af3560c4cdadcc6ba735cad5c56a54a03a0afc4130d6ba53399a9005fc50b5691d6c196a3f3e7036254
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.9
4
+ - 2.2.5
3
5
  - 2.3.1
4
6
  env:
5
7
  global:
@@ -1,7 +1,7 @@
1
1
  module React
2
2
  module Rails
3
3
  module Img
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
6
6
  end
7
7
  end
@@ -68,7 +68,11 @@ var Img = React.createClass({
68
68
  src = result.src;
69
69
  className = result.className;
70
70
  }
71
- return <img src={src} id={this.props.id} alt={this.props.alt} className={className} size={this.props.size} width={this.props.width} height={this.props.height} />;
71
+ var props = {src: src};
72
+ if(className){
73
+ props.className = className;
74
+ }
75
+ return <img {...this.props} {...props} />;
72
76
  }
73
77
  });
74
78
 
@@ -81,5 +85,5 @@ var Img = React.createClass({
81
85
  function imageTag (source, options) {
82
86
  if(!options)options = {};
83
87
  var src = "/assets/"+source;
84
- return <Img src={src} id={options.id} alt={options.alt} className={options.className} size={options.size} width={options.width} height={options.height} />;
88
+ return <Img {...options} src={src} />;
85
89
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react-rails-img
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - RainChen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-10 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: react-rails