creact 0.0.1 → 0.0.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: 812ea1eb269849e07692620d979d35d59d996b4c
4
- data.tar.gz: a7f73ae05e0a52f6d4b60bc14712d07c43e7a069
3
+ metadata.gz: b79e6bfab5327ae896ff07756678d0f90c3b3e1c
4
+ data.tar.gz: 4439f42f524b21abad0cb5403c60b15b6a8c479a
5
5
  SHA512:
6
- metadata.gz: 4737342559a6ba233825f95dafac74882280a29ad47eeae0b559d6ca6d325743397041a726eb2d73c4536abb242a88151c08458bcd99c7107cda8c45c47e1d6c
7
- data.tar.gz: 49c2b8a372b5477e5a3e0c5c049de24276fc2ced8365da86d13cb8b9c87e3c30a0f36c72d5813e985bf9f821bbcf05d4a4fcd52dfc5b06ac66128f6107d2eadc
6
+ metadata.gz: cff7d059bbe6528aeb99869f395082a6baac9fc892529e2d16a56af2e5c0c29f3f8f6991a0bec87c921f415a25187ecb802f4e6d477642038d9d747c65e376eb
7
+ data.tar.gz: 0570540162eedae105d445b71aa13478aa9791f053d48c4e5e6b0427e8e218c3b478933e57e0bcb07689d26e49c04b43ca59b2b51fdbb6fb5f8b40ac19b24936
data/README.md CHANGED
@@ -1,3 +1,6 @@
1
+ [![Gem Version](http://img.shields.io/gem/v/creact.svg)](https://rubygems.org/gems/creact)
2
+ [![Build Status](https://travis-ci.org/disavowd/creact.svg?branch=master)](https://travis-ci.org/disavowd/creact)
3
+ [![Dependency Status](https://gemnasium.com/disavowd/creact.svg)](https://gemnasium.com/disavowd/creact)
1
4
  # Creact
2
5
 
3
6
  Creact is designed to seamlessly integrate React with the [cuba](https://github.com/soveran/cuba) microframework, but is ultimately framework agnostic.
@@ -19,7 +22,15 @@ Or install it yourself as:
19
22
 
20
23
  ## Usage
21
24
 
22
- TODO: Write usage instructions here
25
+ First, generate the files Creact needs with:
26
+
27
+ creact generate
28
+
29
+ Ensure that you route 'home.mote' in your url config.
30
+
31
+ Then navigate to your homepage. You should see 'Hello, World'.
32
+
33
+ Congratulations - you just integrated React into your Cuba project!
23
34
 
24
35
  ## Development
25
36
 
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'creact'
4
+
5
+ Creact::Generate.start( ARGV )
@@ -22,16 +22,17 @@ Gem::Specification.new do |spec|
22
22
  end
23
23
 
24
24
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
- spec.bindir = "exe"
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
+ spec.bindir = "bin"
26
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ["lib"]
28
28
 
29
29
  spec.add_development_dependency "bundler", "~> 1.11"
30
- spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rake", "~> 11.0"
31
31
  spec.add_development_dependency "rspec", "~> 3.0"
32
32
  spec.add_dependency 'opal'
33
33
  spec.add_dependency 'jquery'
34
34
  spec.add_dependency 'opal-jquery'
35
35
  spec.add_dependency 'nokogiri'
36
36
  spec.add_dependency 'reactive-ruby'
37
+ spec.add_dependency 'thor'
37
38
  end
@@ -3,6 +3,7 @@ require "creact/file_handlers"
3
3
  require 'opal'
4
4
  require 'opal-jquery'
5
5
  require 'reactive-ruby'
6
+ require 'creact/cli'
6
7
 
7
8
  module Creact
8
9
  def loader
@@ -0,0 +1,28 @@
1
+ require 'thor'
2
+
3
+ module Creact
4
+ class Generate < Thor
5
+ desc "generate", "This will generate mote and js files."
6
+ long_desc <<-GENERATE
7
+
8
+ `generate` will generate the following tree in your project:
9
+
10
+ ├── js\n
11
+ │   ├── jquery.js\n
12
+ │   └── react.rb\n
13
+ ├── views\n
14
+ │   ├── home.mote\n
15
+ │   └── layout.mote\n
16
+
17
+ This will integrate React into your project.\n
18
+
19
+ GENERATE
20
+ # option :upcase
21
+ def generate( template=nil )
22
+ # greeting = "Hello, #{template}"
23
+ # greeting.upcase! if options[:upcase]
24
+ # puts greeting
25
+ Creact::FileOperations.run_generator
26
+ end
27
+ end
28
+ end
@@ -1,3 +1,3 @@
1
1
  module Creact
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: creact
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Bush
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-08 00:00:00.000000000 Z
11
+ date: 2016-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '11.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '11.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -122,10 +122,27 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: thor
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  description:
126
140
  email:
127
141
  - github@david-bush.co.uk
128
- executables: []
142
+ executables:
143
+ - console
144
+ - creact
145
+ - setup
129
146
  extensions: []
130
147
  extra_rdoc_files: []
131
148
  files:
@@ -137,9 +154,11 @@ files:
137
154
  - README.md
138
155
  - Rakefile
139
156
  - bin/console
157
+ - bin/creact
140
158
  - bin/setup
141
159
  - creact.gemspec
142
160
  - lib/creact.rb
161
+ - lib/creact/cli.rb
143
162
  - lib/creact/file_handlers.rb
144
163
  - lib/creact/files/home.mote
145
164
  - lib/creact/files/jquery.js