repres-react 1.1.1 → 1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/Rakefile +2 -2
- data/app/assets/config/repres-react_manifest.js +2 -0
- data/app/assets/javascripts/repres/react/application.js +1 -1
- data/app/assets/stylesheets/repres/react/application.css +3 -3
- data/app/controllers/repres/react/application_controller.rb +1 -0
- data/app/jobs/repres/react/application_job.rb +2 -0
- data/app/mailers/repres/react/application_mailer.rb +4 -0
- data/app/models/repres/react/application_record.rb +3 -0
- data/app/views/layouts/repres/react/application.html.erb +1 -1
- data/app/views/repres/react/_script.html.erb +2 -0
- data/lib/repres/react/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47ed0e80446e5a58988c39480e3c9f8af37cc2ef
|
4
|
+
data.tar.gz: da07800370d6a05220c35d91dc089b22f6f23306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba999d75af2d6e3c686fd03d102847a1d42790fb3a38626ed6f499f5f7e37b83c41d5b0d7db6997b046e19ce9096544db7463ff47cb28894d558029f447eb231
|
7
|
+
data.tar.gz: 887fab7486bf3849a15bb93801d718d45956346cdf49f62f6b2d49bb8f7c6236336f949c8021edb870adbe7f6decd6fc6d631a7d964bc9fb1f26b5c1df89879c
|
data/README.md
CHANGED
@@ -9,12 +9,14 @@ Repres (REsource PRESentation) is a series of resource presentation engines. The
|
|
9
9
|
|
10
10
|
|
11
11
|
## Recent Update
|
12
|
+
|
12
13
|
Check out the [Road Map](ROADMAP.md) to find out what's the next.
|
13
14
|
Check out the [Change Log](CHANGELOG.md) to find out what's new.
|
14
15
|
|
15
16
|
|
16
17
|
|
17
18
|
## Usage in Gemfile
|
19
|
+
|
18
20
|
```ruby
|
19
21
|
gem 'repres-react'
|
20
22
|
```
|
@@ -22,6 +24,7 @@ gem 'repres-react'
|
|
22
24
|
|
23
25
|
|
24
26
|
## Include the Helper in your Application Controller before Render the Script with the helper methods
|
27
|
+
|
25
28
|
```ruby
|
26
29
|
helper Repres::React::ApplicationHelper
|
27
30
|
```
|
@@ -31,6 +34,7 @@ helper Repres::React::ApplicationHelper
|
|
31
34
|
## Render the Pre-defined Partials
|
32
35
|
|
33
36
|
### Render the Script
|
37
|
+
|
34
38
|
The Script partial includes the HTML script tags for React and its extensions. Only the [Boot CDN](http://cdn.bootcss.com/) servers are supported.
|
35
39
|
|
36
40
|
The following code snippet does __not__ load any JavaScript library.
|
@@ -49,12 +53,12 @@ The following code snippet loads the latest React JavaScript library.
|
|
49
53
|
|
50
54
|
The following code snippet loads the React JavaScript library with the given version.
|
51
55
|
```erb
|
52
|
-
<%= render partial: 'repres/bootstrap/script', locals: { options: { react: { version: '15.0.2' }, 'react-dom': { version: '15.0.2' } } }
|
56
|
+
<%= render partial: 'repres/bootstrap/script', locals: { options: { react: { version: '15.0.2' }, 'react-dom': { version: '15.0.2' } } } %>
|
53
57
|
<!-- or the following line works identically -->
|
54
58
|
<%= react_script react: { version: '15.0.2' }, 'react-dom': { version: '15.0.2' } %>
|
55
|
-
%>
|
56
59
|
```
|
57
60
|
|
58
61
|
The following JavaScript libraries are switchable, and the version can be configurable:
|
59
62
|
- :react
|
60
63
|
- :'react-dom'
|
64
|
+
- :redux
|
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
10
10
|
rdoc.rdoc_dir = 'rdoc'
|
11
11
|
rdoc.title = 'Repres React'
|
12
12
|
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
@@ -20,5 +20,5 @@ load 'rails/tasks/statistics.rake'
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
|
23
|
+
require 'bundler/gem_tasks'
|
24
24
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
6
|
//
|
7
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
9
|
//
|
10
10
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
@@ -6,9 +6,9 @@
|
|
6
6
|
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
7
|
*
|
8
8
|
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any
|
10
|
-
*
|
11
|
-
* file per style scope.
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
13
|
*= require_self
|
14
14
|
*/
|
@@ -2,3 +2,5 @@
|
|
2
2
|
|
3
3
|
<%= javascript_include_tag "//cdn.bootcss.com/react/#{library_version(:react, '15.3.2', options)}/react.min.js" if library_enabled?(:react, options) %>
|
4
4
|
<%= javascript_include_tag "//cdn.bootcss.com/react/#{library_version(:'react-dom', '15.3.2', options)}/react-dom.min.js" if library_enabled?(:'react-dom', options) %>
|
5
|
+
|
6
|
+
<%= javascript_include_tag "//cdn.bootcss.com/redux/#{library_version(:redux, '3.6.0', options)}/redux.min.js" if library_enabled?(:redux, options) %>
|
data/lib/repres/react/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repres-react
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -50,10 +50,14 @@ files:
|
|
50
50
|
- MIT-LICENSE
|
51
51
|
- README.md
|
52
52
|
- Rakefile
|
53
|
+
- app/assets/config/repres-react_manifest.js
|
53
54
|
- app/assets/javascripts/repres/react/application.js
|
54
55
|
- app/assets/stylesheets/repres/react/application.css
|
55
56
|
- app/controllers/repres/react/application_controller.rb
|
56
57
|
- app/helpers/repres/react/application_helper.rb
|
58
|
+
- app/jobs/repres/react/application_job.rb
|
59
|
+
- app/mailers/repres/react/application_mailer.rb
|
60
|
+
- app/models/repres/react/application_record.rb
|
57
61
|
- app/views/layouts/repres/react/application.html.erb
|
58
62
|
- app/views/repres/react/_script.html.erb
|
59
63
|
- config/routes.rb
|