reactrb-router 0.8.1 → 0.8.2

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: 560f5e4ceb0cf919265e4be43f4835b9d52040a9
4
- data.tar.gz: 18412d2c5caa9760f48a683d7faff813c2600a1d
3
+ metadata.gz: bcb4edb9b54f4f2ac22e8cafa8f921e4aea482e7
4
+ data.tar.gz: e530393c6c40642b8c3a2019b073a637d0f36831
5
5
  SHA512:
6
- metadata.gz: d060b980b6d63dd302eaa7e05677893dac2e94da3b948aef5a7f57971ee82e60279c9b6a43e16332288bde2cfb86607b946a08bc489ea34e25f10884507a4caa
7
- data.tar.gz: a81767b732acf324860098494e1b326960c7b7ed8f3374f2bec9843a28b95c72f7e86450f422703ed883fd85cabb6f65e7a2b8de2ed63572253ab8bb868150b9
6
+ metadata.gz: 27174a13b67bc1ceeb8dd55ddaba0e20e45abb059edb84d020f36d9f620a13ab5a2c86bc435cd5ce3169ca79864a37c9a43a0d95fb7989c5e090b43a2e4d0b18
7
+ data.tar.gz: ad25970d326c40fc04497621ed613fe2c61c7d4ca077d6150805a43075a7bb6feb1a0f3bb6b32dcc90a44a431098cde65c584d23d0b3cd510c05677613850d34
data/README.md CHANGED
@@ -5,9 +5,14 @@ Reactrb Router allows you write and use the React Router in Ruby through Opal.
5
5
  ### Note
6
6
 
7
7
  This gem is in the process of being re-written. It will be based on latest react-router which is way better. Please see the [v2-4-0 branch](https://github.com/reactrb/reactrb-router/tree/v2-4-0).
8
- If you you want to use this branch with `reactrb-rails-generator`, be sure to remove `require 'react_router` from `components.rb`. And to use the new Router syntax as per the docs.
9
8
 
10
- ## Installation
9
+ During the transition you will need to pick between the following branches:
10
+
11
+ 1. **0-7-stable** is the source for the deprecated reactive-router gem, and is compatible with the deprecated reactive-ruby gem.
12
+ 2. **0-8-stable** is the current active source for reactrb-router, and is compatible with the reactrb gem, and is bundled with the pre 1.0 react-router js library source.
13
+ 3. **v2-4-0** is being developed, and is compatible with the latest reactrb and react-router. While not released, it is stable and is recommended if you are developing a new app and need a router.
14
+
15
+ ## Installation (0.8 and beyond...)
11
16
 
12
17
  Add this line to your application's Gemfile:
13
18
 
@@ -21,9 +26,9 @@ And then execute:
21
26
 
22
27
  Or install it yourself as:
23
28
 
24
- $ gem install reactor-router
29
+ $ gem install reactrb-router
25
30
 
26
- ## Usage
31
+ ## Usage (0.8 only)
27
32
 
28
33
  The router is a React component that loads other components depending on the current URL.
29
34
 
@@ -1,15 +1,19 @@
1
1
  module React
2
+ # adds router_handler method, and overrides the built_in tag method
2
3
  module Component
3
- module ClassMethods
4
- end
5
-
6
4
  def route_handler(*args)
7
5
  Router::RR::RouteHandler(*args)
8
6
  end
9
7
 
10
- def link(opts = {}, &block)
11
- opts[:params] = opts[:params].to_n if opts[:params]
12
- Router::RR::Link(opts, &block)
8
+ class << self
9
+ alias _reactrb_router_original_included included
10
+ def included(base)
11
+ _reactrb_router_original_included(base)
12
+ base.define_method :link do |opts = {}, &block|
13
+ opts[:params] = opts[:params].to_n if opts[:params]
14
+ Router::RR::Link(opts, &block)
15
+ end
16
+ end
13
17
  end
14
18
  end
15
19
  end
@@ -4,7 +4,7 @@ module React
4
4
  end
5
5
 
6
6
  class RR < React::NativeLibrary
7
- imports ReactRouter
7
+ imports 'ReactRouter'
8
8
  end
9
9
 
10
10
  def self.included(base)
@@ -1,3 +1,3 @@
1
1
  module ReactrbRouter
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactrb-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam George
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  version: '0'
88
88
  requirements: []
89
89
  rubyforge_project:
90
- rubygems_version: 2.5.1
90
+ rubygems_version: 2.4.8
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: react-router for Opal, part of the reactrb gem family