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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be61f300271a7c15528399b3d5bf97509040df43
4
- data.tar.gz: 4a2c93053d438c671ec887434e784de5f1da0d9f
3
+ metadata.gz: 47ed0e80446e5a58988c39480e3c9f8af37cc2ef
4
+ data.tar.gz: da07800370d6a05220c35d91dc089b22f6f23306
5
5
  SHA512:
6
- metadata.gz: f248c1b04dde34431bcd2cd11843738f333b526081efa35f27586ac38f09ddef9e478d35f81c399cdec1dec76ffa81cbccc31700ff1e784cc904044d4bcf4d7f
7
- data.tar.gz: 0ea71e07814c6485d5a72ee01856c42e7fd88aff48f2b7821bf2fe3fae6e5fbfc1cf7e6406f9c94d2ac9f8c4519dbbf93b92c45324ea2ecd71d3d647e38408c8
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.rdoc')
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
- Bundler::GemHelper.install_tasks
23
+ require 'bundler/gem_tasks'
24
24
 
@@ -0,0 +1,2 @@
1
+ //= link_directory ../javascripts/repres/react .js
2
+ //= link_directory ../stylesheets/repres/react .css
@@ -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 styles
10
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
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
  */
@@ -1,2 +1,3 @@
1
1
  class Repres::React::ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
2
3
  end
@@ -0,0 +1,2 @@
1
+ class Repres::React::ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class Repres::React::ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class Repres::React::ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Repres React</title>
5
- <%= stylesheet_link_tag "repres/react/application", media: "all" %>
5
+ <%= stylesheet_link_tag 'repres/react/application', media: 'all' %>
6
6
  <%= csrf_meta_tags %>
7
7
  </head>
8
8
  <body>
@@ -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) %>
@@ -1,5 +1,5 @@
1
1
  module Repres
2
2
  module React
3
- VERSION = '1.1.1'.freeze
3
+ VERSION = '1.2'.freeze
4
4
  end
5
5
  end
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.1.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-10-01 00:00:00.000000000 Z
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