carte-server 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +28 -0
- data/README.md +10 -0
- data/carte.gemspec +2 -2
- data/lib/carte/client/views/edit.cjsx +3 -3
- data/lib/carte/client/views/header.cjsx +2 -2
- data/mongoid.yml +4 -0
- data/nginx.conf +9 -0
- data/package.json +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 578b63ee21c185a3eb2a97d8c12527666fe67004
|
4
|
+
data.tar.gz: 9d22c1637d7c67624ae59d45b4eb976b04528e01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ef6e662bb70e336fc4440e5722161a5431d94f1fa2b85e63ddcb13928e1ac29f12c8cd249b75f6a79caa509a899181d47eb5b9fbb0281dbf7d0c5f306be6ded
|
7
|
+
data.tar.gz: 947df6a57f8cb370607a05ac1536582f461a23caa48623ad4a9bb3bd9ca7be00dbc1e0c1a8922c8c575402e403c86a7e9a3a60224b4825a465ed7835da46fe32
|
data/Dockerfile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
FROM phusion/passenger-customizable:latest
|
2
|
+
CMD ["/sbin/my_init"]
|
3
|
+
|
4
|
+
# install ruby and node.js
|
5
|
+
RUN /pd_build/ruby2.2.sh
|
6
|
+
RUN /pd_build/nodejs.sh
|
7
|
+
|
8
|
+
## configure nginx
|
9
|
+
RUN rm /etc/nginx/sites-enabled/default
|
10
|
+
ADD nginx.conf /etc/nginx/sites-enabled/carte.conf
|
11
|
+
|
12
|
+
## add source code
|
13
|
+
RUN mkdir /home/app/carte
|
14
|
+
ADD . /home/app/carte
|
15
|
+
|
16
|
+
## install dependencies
|
17
|
+
RUN npm install gulp -g
|
18
|
+
RUN cd /home/app/carte && bundle install
|
19
|
+
RUN cd /home/app/carte && npm install
|
20
|
+
|
21
|
+
## build client side code
|
22
|
+
RUN cd /home/app/carte && gulp build
|
23
|
+
|
24
|
+
## cleanup
|
25
|
+
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
26
|
+
|
27
|
+
## enable nginx
|
28
|
+
RUN rm -f /etc/service/nginx/down
|
data/README.md
CHANGED
@@ -28,6 +28,8 @@ Japanese introduction is [here](http://tily.tumblr.com/post/117678137942/carte).
|
|
28
28
|
|
29
29
|
## Deploy
|
30
30
|
|
31
|
+
**Heroku**
|
32
|
+
|
31
33
|
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/tily/carte-sandbox)
|
32
34
|
|
33
35
|
Deploy your carte with the button above. After deployment, you may want to customize your carte.
|
@@ -38,3 +40,11 @@ $ vi config.json
|
|
38
40
|
## replace brand icon
|
39
41
|
$ cp ~/Desktop/icon.png public/images/icon.png
|
40
42
|
```
|
43
|
+
|
44
|
+
**Docker**
|
45
|
+
|
46
|
+
```bash
|
47
|
+
$ docker build -t carte .
|
48
|
+
$ docker run --name mongo -d mongo
|
49
|
+
$ docker run --name carte --link mongo:mongo -p 80:80 -d carte
|
50
|
+
```
|
data/carte.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'json'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "carte-server"
|
8
|
-
spec.version =
|
8
|
+
spec.version = JSON.parse(File.read("./package.json"))['version']
|
9
9
|
spec.authors = ["tily"]
|
10
10
|
spec.email = ["tidnlyam@gmail.com"]
|
11
11
|
spec.summary = %q{something like dictionary, wiki, or information card}
|
@@ -18,13 +18,13 @@ module.exports = React.createClass
|
|
18
18
|
errors: false
|
19
19
|
shaking: false
|
20
20
|
|
21
|
-
onChangeTitle: ->
|
21
|
+
onChangeTitle: (event)->
|
22
22
|
@setState title: event.target.value
|
23
23
|
|
24
|
-
onChangeContent: ->
|
24
|
+
onChangeContent: (event)->
|
25
25
|
@setState content: event.target.value
|
26
26
|
|
27
|
-
onClickOk: ()->
|
27
|
+
onClickOk: (event)->
|
28
28
|
event.preventDefault()
|
29
29
|
@setState updating: true
|
30
30
|
if @props.card.isNew()
|
@@ -39,10 +39,10 @@ module.exports = React.createClass
|
|
39
39
|
console.log 'componentWillMount un'
|
40
40
|
@props.router.off "route", @callback
|
41
41
|
|
42
|
-
onChangeSearchText: ()->
|
42
|
+
onChangeSearchText: (event)->
|
43
43
|
@setState searchText: event.target.value
|
44
44
|
|
45
|
-
onKeyPressSearchText: ()->
|
45
|
+
onKeyPressSearchText: (event)->
|
46
46
|
if event.keyCode == 13 # ENTER
|
47
47
|
console.log '13 enter'
|
48
48
|
event.preventDefault()
|
data/mongoid.yml
CHANGED
data/nginx.conf
ADDED
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carte-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tily
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,6 +229,7 @@ extra_rdoc_files: []
|
|
229
229
|
files:
|
230
230
|
- .gitignore
|
231
231
|
- .rspec
|
232
|
+
- Dockerfile
|
232
233
|
- Gemfile
|
233
234
|
- LICENSE.txt
|
234
235
|
- README.md
|
@@ -269,6 +270,7 @@ files:
|
|
269
270
|
- lib/carte/shared/.keep
|
270
271
|
- lib/carte/shared/default.json
|
271
272
|
- mongoid.yml
|
273
|
+
- nginx.conf
|
272
274
|
- package.json
|
273
275
|
- public/images/icon.png
|
274
276
|
- screenshot.png
|