hyper-react 0.12.7 → 0.99.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +48 -34
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +5 -6
- data/README.md +47 -98
- data/Rakefile +6 -28
- data/hyper-react.gemspec +36 -43
- data/lib/hyper-react.rb +4 -73
- data/lib/react/version.rb +3 -0
- metadata +91 -249
- data/.codeclimate.yml +0 -27
- data/.rubocop.yml +0 -1159
- data/.travis.yml +0 -62
- data/Appraisals +0 -31
- data/CHANGELOG.md +0 -143
- data/LICENSE +0 -19
- data/UPGRADING.md +0 -24
- data/component-name-lookup.md +0 -145
- data/config.ru +0 -26
- data/gemfiles/opal_0.10_react_13.gemfile +0 -15
- data/gemfiles/opal_0.10_react_14.gemfile +0 -15
- data/gemfiles/opal_0.10_react_15.gemfile +0 -15
- data/gemfiles/opal_0.8_react_13.gemfile +0 -15
- data/gemfiles/opal_0.8_react_14.gemfile +0 -15
- data/gemfiles/opal_0.8_react_15.gemfile +0 -15
- data/gemfiles/opal_0.9_react_13.gemfile +0 -15
- data/gemfiles/opal_0.9_react_14.gemfile +0 -15
- data/gemfiles/opal_0.9_react_15.gemfile +0 -15
- data/gemfiles/opal_master_react_15.gemfile +0 -16
- data/lib/generators/reactive_ruby/test_app/templates/assets/javascripts/components.rb +0 -3
- data/lib/generators/reactive_ruby/test_app/templates/assets/javascripts/test_application.rb +0 -2
- data/lib/generators/reactive_ruby/test_app/templates/boot.rb.erb +0 -6
- data/lib/generators/reactive_ruby/test_app/templates/script/rails +0 -5
- data/lib/generators/reactive_ruby/test_app/templates/test_application.rb.erb +0 -13
- data/lib/generators/reactive_ruby/test_app/templates/views/components/hello_world.rb +0 -11
- data/lib/generators/reactive_ruby/test_app/templates/views/components/todo.rb +0 -14
- data/lib/generators/reactive_ruby/test_app/templates/views/layouts/test_layout.html.erb +0 -0
- data/lib/generators/reactive_ruby/test_app/test_app_generator.rb +0 -111
- data/lib/rails-helpers/top_level_rails_component.rb +0 -54
- data/lib/react-sources/react-server.js +0 -2
- data/lib/react/api.rb +0 -173
- data/lib/react/callbacks.rb +0 -41
- data/lib/react/children.rb +0 -30
- data/lib/react/component.rb +0 -168
- data/lib/react/component/api.rb +0 -50
- data/lib/react/component/base.rb +0 -13
- data/lib/react/component/class_methods.rb +0 -189
- data/lib/react/component/dsl_instance_methods.rb +0 -23
- data/lib/react/component/params.rb +0 -6
- data/lib/react/component/props_wrapper.rb +0 -78
- data/lib/react/component/should_component_update.rb +0 -94
- data/lib/react/component/tags.rb +0 -129
- data/lib/react/config.rb +0 -5
- data/lib/react/config/client.rb.erb +0 -19
- data/lib/react/config/server.rb +0 -23
- data/lib/react/element.rb +0 -169
- data/lib/react/event.rb +0 -76
- data/lib/react/ext/hash.rb +0 -9
- data/lib/react/ext/opal-jquery/element.rb +0 -26
- data/lib/react/ext/string.rb +0 -8
- data/lib/react/hash.rb +0 -13
- data/lib/react/native_library.rb +0 -87
- data/lib/react/object.rb +0 -15
- data/lib/react/react-source-browser.rb +0 -3
- data/lib/react/react-source-server.rb +0 -3
- data/lib/react/react-source.rb +0 -20
- data/lib/react/ref_callback.rb +0 -31
- data/lib/react/rendering_context.rb +0 -144
- data/lib/react/server.rb +0 -23
- data/lib/react/state_wrapper.rb +0 -23
- data/lib/react/test.rb +0 -16
- data/lib/react/test/dsl.rb +0 -17
- data/lib/react/test/matchers/render_html_matcher.rb +0 -56
- data/lib/react/test/rspec.rb +0 -15
- data/lib/react/test/session.rb +0 -37
- data/lib/react/test/utils.rb +0 -25
- data/lib/react/top_level.rb +0 -118
- data/lib/react/top_level_render.rb +0 -29
- data/lib/react/validator.rb +0 -136
- data/lib/reactive-ruby/component_loader.rb +0 -50
- data/lib/reactive-ruby/isomorphic_helpers.rb +0 -212
- data/lib/reactive-ruby/rails.rb +0 -7
- data/lib/reactive-ruby/rails/component_mount.rb +0 -46
- data/lib/reactive-ruby/rails/controller_helper.rb +0 -15
- data/lib/reactive-ruby/rails/railtie.rb +0 -33
- data/lib/reactive-ruby/serializers.rb +0 -15
- data/lib/reactive-ruby/server_rendering/contextual_renderer.rb +0 -42
- data/lib/reactive-ruby/version.rb +0 -3
- data/lib/reactrb/auto-import.rb +0 -27
- data/lib/reactrb/deep-compare.rb +0 -24
- data/lib/reactrb/new-event-name-convention.rb +0 -11
- data/logo1.png +0 -0
- data/logo2.png +0 -0
- data/logo3.png +0 -0
- data/path_release_steps.md +0 -9
- data/spec/controller_helper_spec.rb +0 -34
- data/spec/index.html.erb +0 -11
- data/spec/react/callbacks_spec.rb +0 -138
- data/spec/react/children_spec.rb +0 -76
- data/spec/react/component/base_spec.rb +0 -32
- data/spec/react/component_spec.rb +0 -884
- data/spec/react/dsl_spec.rb +0 -303
- data/spec/react/element_spec.rb +0 -136
- data/spec/react/event_spec.rb +0 -24
- data/spec/react/native_library_spec.rb +0 -322
- data/spec/react/observable_spec.rb +0 -42
- data/spec/react/opal_jquery_extensions_spec.rb +0 -68
- data/spec/react/param_declaration_spec.rb +0 -269
- data/spec/react/react_spec.rb +0 -215
- data/spec/react/refs_callback_spec.rb +0 -56
- data/spec/react/server_spec.rb +0 -25
- data/spec/react/state_spec.rb +0 -55
- data/spec/react/test/dsl_spec.rb +0 -43
- data/spec/react/test/matchers/render_html_matcher_spec.rb +0 -83
- data/spec/react/test/rspec_spec.rb +0 -62
- data/spec/react/test/session_spec.rb +0 -88
- data/spec/react/test/utils_spec.rb +0 -28
- data/spec/react/top_level_component_spec.rb +0 -101
- data/spec/react/tutorial/tutorial_spec.rb +0 -36
- data/spec/react/validator_spec.rb +0 -124
- data/spec/reactive-ruby/component_loader_spec.rb +0 -77
- data/spec/reactive-ruby/isomorphic_helpers_spec.rb +0 -160
- data/spec/reactive-ruby/rails/asset_pipeline_spec.rb +0 -10
- data/spec/reactive-ruby/rails/component_mount_spec.rb +0 -66
- data/spec/reactive-ruby/server_rendering/contextual_renderer_spec.rb +0 -35
- data/spec/spec_helper.rb +0 -149
- data/spec/support/react/spec_helpers.rb +0 -44
- data/spec/vendor/es5-shim.min.js +0 -6
- data/spec/vendor/jquery-2.2.4.min.js +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1015888c1b0bf9c06d4ab1a7aa15f92108e662b6a6176ddfe1ad1b9bc90cef32
|
4
|
+
data.tar.gz: 53f593db95bc32895aaeacb2acf6739ae483fa7baf0c446073d8ade78f7ec206
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80948f32af7f20b3f230d09a1cc8dafed8a39d0b15124d445077482b46f419a56cebc9fe3d49fce384801e9eef4ba3855bdcd7f2ba77030cd0a27524ab217df0
|
7
|
+
data.tar.gz: 7d086b04cbd5c2e21fbc9989962e9a0679071d08b607698d04d3fb4a1271e13226285783c9ced385fb86300880baa64a81911db63097acb49c6cad6fce9fb895
|
data/.gitignore
CHANGED
@@ -1,36 +1,50 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
.
|
18
|
-
|
19
|
-
#
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
.
|
31
|
-
|
32
|
-
|
1
|
+
*.rbc
|
2
|
+
capybara-*.html
|
3
|
+
.rspec
|
4
|
+
/log
|
5
|
+
/tmp
|
6
|
+
/db/*.sqlite3
|
7
|
+
/db/*.sqlite3-journal
|
8
|
+
/public/system
|
9
|
+
/coverage/
|
10
|
+
/spec/tmp
|
11
|
+
**.orig
|
12
|
+
rerun.txt
|
13
|
+
pickle-email-*.html
|
14
|
+
|
15
|
+
# TODO Comment out these rules if you are OK with secrets being uploaded to the repo
|
16
|
+
config/initializers/secret_token.rb
|
17
|
+
config/secrets.yml
|
18
|
+
|
19
|
+
# dotenv
|
20
|
+
# TODO Comment out this rule if environment variables can be committed
|
21
|
+
.env
|
22
|
+
|
23
|
+
## Environment normalization:
|
24
|
+
/.bundle
|
25
|
+
/vendor/bundle
|
26
|
+
|
27
|
+
# these should all be checked in to normalize the environment:
|
28
|
+
# Gemfile.lock, .ruby-version, .ruby-gemset
|
29
|
+
|
30
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
31
|
+
.rvmrc
|
32
|
+
|
33
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
34
|
+
/vendor/assets/bower_components
|
35
|
+
*.bowerrc
|
36
|
+
bower.json
|
37
|
+
|
38
|
+
# Ignore pow environment settings
|
39
|
+
.powenv
|
40
|
+
|
41
|
+
# Ignore Byebug command history file.
|
42
|
+
.byebug_history
|
43
|
+
|
44
|
+
# ignore gems
|
45
|
+
*.gem
|
33
46
|
Gemfile.lock
|
34
47
|
|
35
|
-
|
36
|
-
|
48
|
+
# ignore Idea
|
49
|
+
.idea
|
50
|
+
.vscode
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at mitch@catprint.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
+
#gem "opal-jquery", git: "https://github.com/opal/opal-jquery.git", branch: "master"
|
3
|
+
gem 'hyper-spec', path: '../hyper-spec'
|
4
|
+
gem 'hyperloop-config', path: '../hyperloop-config'
|
5
|
+
gem 'hyper-store', path: '../hyper-store'
|
6
|
+
gem 'hyper-component', path: '../hyper-component'
|
2
7
|
gemspec
|
3
|
-
|
4
|
-
ruby ">= 1.9.3"
|
5
|
-
|
6
|
-
group :development do
|
7
|
-
gem "appraisal"
|
8
|
-
end
|
data/README.md
CHANGED
@@ -1,128 +1,77 @@
|
|
1
|
-
|
1
|
+
<div class="githubhyperloopheader">
|
2
2
|
|
3
|
-
|
4
|
-
[![Build Status](https://travis-ci.org/ruby-hyperloop/hyper-react.svg?branch=master)](https://travis-ci.org/ruby-hyperloop/hyper-react)
|
5
|
-
[![Code Climate](https://codeclimate.com/github/reactrb/reactrb/badges/gpa.svg)](https://codeclimate.com/github/reactrb/reactrb)
|
6
|
-
[![Gem Version](https://badge.fury.io/rb/hyper-react.svg)](https://badge.fury.io/rb/hyper-react)
|
3
|
+
<p align="center">
|
7
4
|
|
8
|
-
|
9
|
-
|
5
|
+
<a href="http://ruby-hyperloop.org/" alt="Hyperloop" title="Hyperloop">
|
6
|
+
<img width="350px" src="http://ruby-hyperloop.org/images/hyperloop-github-logo.png">
|
7
|
+
</a>
|
10
8
|
|
11
|
-
|
12
|
-
and true React.js engine. :heart:
|
9
|
+
</p>
|
13
10
|
|
14
|
-
|
11
|
+
<h2 align="center">The Complete Isomorphic Ruby Framework</h2>
|
15
12
|
|
16
|
-
|
13
|
+
<br>
|
17
14
|
|
18
|
-
|
15
|
+
<a href="http://ruby-hyperloop.org/" alt="Hyperloop" title="Hyperloop">
|
16
|
+
<img src="http://ruby-hyperloop.org/images/githubhyperloopbadge.png">
|
17
|
+
</a>
|
19
18
|
|
20
|
-
|
19
|
+
<a href="https://gitter.im/ruby-hyperloop/chat" alt="Gitter chat" title="Gitter chat">
|
20
|
+
<img src="http://ruby-hyperloop.org/images/githubgitterbadge.png">
|
21
|
+
</a>
|
21
22
|
|
22
|
-
|
23
|
-
2. Or `gem install hyper-react`
|
24
|
-
3. Or install (or load via cdn) from [reactrb-express.js](http://github.com/ruby-hyperloop/reactrb-express)
|
23
|
+
[![Gem Version](https://badge.fury.io/rb/hyper-component.svg)](https://badge.fury.io/rb/hyper-component)
|
25
24
|
|
26
|
-
|
25
|
+
<p align="center">
|
26
|
+
<img src="http://ruby-hyperloop.org/images/HyperComponents.png" width="100" alt="Hyper-components">
|
27
|
+
</p>
|
27
28
|
|
28
|
-
|
29
|
+
</div>
|
29
30
|
|
30
|
-
|
31
|
+
## Hyper-Component GEM is part of Hyperloop GEMS family
|
31
32
|
|
32
|
-
|
33
|
-
class HelloMessage
|
34
|
-
def render
|
35
|
-
React.create_element("div") { "Hello World!" }
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
puts React.render_to_static_markup(React.create_element(HelloMessage))
|
33
|
+
Build interactive Web applications quickly. Hyperloop encourages rapid development with clean, pragmatic design. With developer productivity as our highest goal, Hyperloop takes care of much of the hassle of Web development, so you can focus on innovation and delivering end-user value.
|
40
34
|
|
41
|
-
|
42
|
-
```
|
35
|
+
One language. One model. One set of tests. The same business logic and domain models running on the clients and the server. Hyperloop is fully integrated with Rails and also gives you unfettered access to the complete universe of JavaScript libraries (including React) from within your Ruby code. Hyperloop lets you build beautiful interactive user interfaces in Ruby.
|
43
36
|
|
44
|
-
|
37
|
+
Everything has a place in our architecture. Components deliver interactive user experiences, Operations encapsulate business logic, Models magically synchronize data between clients and servers, Policies govern authorization and Stores hold local state.
|
45
38
|
|
46
|
-
|
39
|
+
**Hyper-component** brings Components modules uesed in the Hyperloop interface.
|
47
40
|
|
48
|
-
|
41
|
+
## Getting Started
|
49
42
|
|
43
|
+
1. Update your Gemfile:
|
44
|
+
|
50
45
|
```ruby
|
51
|
-
|
52
|
-
require 'browser/interval'
|
53
|
-
require 'opal-jquery'
|
54
|
-
require 'react/react-source'
|
55
|
-
require 'hyper-react'
|
56
|
-
require 'react/top_level_render'
|
57
|
-
|
58
|
-
class HelloWorld < React::Component::Base
|
59
|
-
param :time, type: Time
|
60
|
-
render do
|
61
|
-
p do
|
62
|
-
span { "Hello, " }
|
63
|
-
input(type: :text, placeholder: "Your Name Here")
|
64
|
-
span { "! It is #{params.time}"}
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
every(1) do
|
70
|
-
Element["#example"].render do
|
71
|
-
HelloWorld(time: Time.now)
|
72
|
-
end
|
73
|
-
end
|
74
|
-
```
|
75
|
-
|
76
|
-
hyper-react components are *isomorphic* (or *univeral*) meaning they can run on the server as well as the client.
|
77
|
-
|
78
|
-
hyper-react integrates well with Rails, Sinatra, and simple static sites, and can be added to existing web pages very easily.
|
79
|
-
|
80
|
-
Under the hood the actual work is effeciently done by the [React.js](https://facebook.github.io/react) engine.
|
81
|
-
|
82
|
-
|
83
|
-
## Why ?
|
46
|
+
#Gemfile
|
84
47
|
|
85
|
-
|
86
|
-
|
87
|
-
+ *Ruby Goodness:* Use all the features of Ruby to create reusable, maintainable UI code
|
88
|
-
+ *React Simplicity:* Nothing is taken away from the React.js model
|
89
|
-
+ *Enhanced Features:* Enhanced parameter and state management and other new features
|
90
|
-
+ *Plays well with Others:* Works with other frameworks, React.js components, Rails, Sinatra and static web pages
|
91
|
-
|
92
|
-
## Problems, Questions, Issues
|
93
|
-
|
94
|
-
+ [Stack Overflow](http://stackoverflow.com/questions/tagged/react.rb) tag `react.rb` for specific problems.
|
95
|
-
+ [Gitter.im](https://gitter.im/reactrb/chat) for general questions, discussion, and interactive help.
|
96
|
-
+ [Github Issues](https://github.com/reactrb/reactrb/issues) for bugs, feature enhancements, etc.
|
97
|
-
|
98
|
-
|
99
|
-
## Roadmap
|
100
|
-
|
101
|
-
Version 0.10.x **will not be** 100% backward compatible with 0.3.0 (`react.rb`) or 0.7.x (`reactive-ruby`).
|
102
|
-
|
103
|
-
Please let us know either at [Gitter.im](https://gitter.im/reactrb/chat) or [via an issue](https://github.com/reactrb/reactrb/issues) if you have specific concerns with the upgrade from 0.3.0 to 0.10.x.
|
104
|
-
|
105
|
-
## Developing
|
48
|
+
gem 'hyperloop'
|
49
|
+
```
|
106
50
|
|
107
|
-
|
51
|
+
2. At the command prompt, update your bundle :
|
108
52
|
|
109
|
-
|
53
|
+
$ bundle update
|
110
54
|
|
111
|
-
|
55
|
+
3. Run the hyperloop install generator:
|
112
56
|
|
113
|
-
|
57
|
+
$ rails g hyperloop:install
|
114
58
|
|
115
|
-
|
116
|
-
|
117
|
-
|
59
|
+
4. Follow the guidelines to start developing your application. You may find
|
60
|
+
the following resources handy:
|
61
|
+
* [Getting Started with Hyperloop](http://ruby-hyperloop.org/start/components/)
|
62
|
+
* [Hyperloop Guides](http://ruby-hyperloop.org/docs/architecture)
|
63
|
+
* [Hyperloop Tutorial](http://ruby-hyperloop.org/tutorials)
|
118
64
|
|
119
|
-
##
|
65
|
+
## Community
|
120
66
|
|
121
|
-
|
122
|
-
|
67
|
+
#### Getting Help
|
68
|
+
Please **do not post** usage questions to GitHub Issues. For these types of questions use our [Gitter chatroom](https://gitter.im/ruby-hyperloop/chat) or [StackOverflow](http://stackoverflow.com/questions/tagged/hyperloop).
|
123
69
|
|
70
|
+
#### Submitting Bugs and Enhancements
|
71
|
+
[GitHub Issues](https://github.com/ruby-hyperloop/hyperloop/issues) is for suggesting enhancements and reporting bugs. Before submiting a bug make sure you do the following:
|
72
|
+
* Check out our [contributing guide](https://github.com/ruby-hyperloop/hyperloop/blob/master/CONTRIBUTING.md) for info on our release cycle.
|
124
73
|
|
125
74
|
## License
|
126
75
|
|
127
|
-
|
128
|
-
|
76
|
+
Hyperloop is released under the [MIT License](http://www.opensource.org/licenses/MIT).
|
77
|
+
|
data/Rakefile
CHANGED
@@ -1,33 +1,11 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
Bundler.require
|
3
|
-
Bundler::GemHelper.install_tasks
|
4
|
-
|
5
|
-
# Store the BUNDLE_GEMFILE env, since rake or rspec seems to clean it
|
6
|
-
# while invoking task.
|
7
|
-
ENV['REAL_BUNDLE_GEMFILE'] = ENV['BUNDLE_GEMFILE']
|
8
|
-
|
1
|
+
require 'bundler/gem_tasks'
|
9
2
|
require 'rspec/core/rake_task'
|
10
|
-
require 'opal/rspec/rake_task'
|
11
|
-
|
12
|
-
RSpec::Core::RakeTask.new('ruby:rspec')
|
13
3
|
|
14
|
-
|
15
|
-
s.append_path 'spec/vendor'
|
16
|
-
s.index_path = 'spec/index.html.erb'
|
17
|
-
task.timeout = 80000 if task
|
18
|
-
end
|
19
|
-
|
20
|
-
task :test do
|
21
|
-
Rake::Task['ruby:rspec'].invoke
|
22
|
-
Rake::Task['opal:rspec'].invoke
|
23
|
-
end
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
24
5
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
ReactiveRuby::TestAppGenerator.start
|
29
|
-
puts "Setting up test app database..."
|
30
|
-
system("bundle exec rake db:drop db:create db:migrate > #{File::NULL}")
|
6
|
+
namespace :spec do
|
7
|
+
task :prepare do
|
8
|
+
end
|
31
9
|
end
|
32
10
|
|
33
|
-
task default:
|
11
|
+
task default: :spec
|
data/hyper-react.gemspec
CHANGED
@@ -1,48 +1,41 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'react/version'
|
3
4
|
|
4
|
-
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'hyper-react'
|
7
|
+
spec.version = React::VERSION
|
8
|
+
spec.authors = ['Mitch VanDuyn', 'Jan Biedermann']
|
9
|
+
spec.email = ['mitch@catprint.com', 'jan@kursator.com']
|
10
|
+
spec.summary = 'Write advanced React components in Ruby.'
|
11
|
+
spec.homepage = 'http://ruby-hyperloop.org'
|
12
|
+
spec.license = 'MIT'
|
13
|
+
# spec.metadata = {
|
14
|
+
# "homepage_uri" => 'http://ruby-hyperloop.org',
|
15
|
+
# "source_code_uri" => 'https://github.com/ruby-hyperloop/hyper-component'
|
16
|
+
# }
|
5
17
|
|
6
|
-
|
7
|
-
|
8
|
-
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
19
|
+
spec.bindir = 'exe'
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ['lib']
|
9
22
|
|
10
|
-
|
11
|
-
s.email = 'reactrb@catprint.com'
|
12
|
-
s.homepage = 'http://ruby-hyperloop.io/gems/reactrb/'
|
13
|
-
s.summary = 'Opal Ruby wrapper of React.js library.'
|
14
|
-
s.license = 'MIT'
|
15
|
-
s.description = "Write React UI components in pure Ruby."
|
16
|
-
s.files = `git ls-files`.split("\n")
|
17
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
18
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.require_paths = ['lib']
|
23
|
+
spec.add_dependency 'actionview', '>= 4.0.0'
|
20
24
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
s.add_development_dependency 'nokogiri', '< 1.7'
|
39
|
-
s.add_development_dependency 'rubocop'
|
40
|
-
if RUBY_PLATFORM == 'java'
|
41
|
-
s.add_development_dependency 'jdbc-sqlite3'
|
42
|
-
s.add_development_dependency 'activerecord-jdbcsqlite3-adapter'
|
43
|
-
s.add_development_dependency 'therubyrhino'
|
44
|
-
else
|
45
|
-
s.add_development_dependency 'sqlite3', '1.3.10'
|
46
|
-
s.add_development_dependency 'therubyracer', '0.12.2'
|
47
|
-
end
|
25
|
+
spec.add_dependency 'hyper-component', React::VERSION
|
26
|
+
spec.add_development_dependency 'bundler'
|
27
|
+
spec.add_development_dependency 'chromedriver-helper'
|
28
|
+
spec.add_development_dependency 'hyper-spec', React::VERSION
|
29
|
+
spec.add_development_dependency 'listen'
|
30
|
+
spec.add_development_dependency 'mini_racer', '~> 0.1.15'
|
31
|
+
spec.add_development_dependency 'opal', '>= 0.11.0', '< 0.12.0'
|
32
|
+
spec.add_development_dependency 'opal-browser', '~> 0.2.0'
|
33
|
+
spec.add_development_dependency 'opal-rails', '~> 0.9.4'
|
34
|
+
spec.add_development_dependency 'puma'
|
35
|
+
spec.add_development_dependency 'rails', '>= 4.0.0'
|
36
|
+
spec.add_development_dependency 'rake'
|
37
|
+
spec.add_development_dependency 'rspec', '~> 3.7.0'
|
38
|
+
spec.add_development_dependency 'rspec-steps', '~> 2.1.1'
|
39
|
+
spec.add_development_dependency 'rubocop', '~> 0.51.0'
|
40
|
+
spec.add_development_dependency 'sqlite3'
|
48
41
|
end
|