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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26dafc6e5255037410c3973431e017c31d42bdd9
4
- data.tar.gz: 524bd7a234e6228c2d178fa6d5e59443bcf38710
3
+ metadata.gz: 578b63ee21c185a3eb2a97d8c12527666fe67004
4
+ data.tar.gz: 9d22c1637d7c67624ae59d45b4eb976b04528e01
5
5
  SHA512:
6
- metadata.gz: 7acba901ddf7a430fe8b4bc04a3185e695ff29c399d6e9fe0783a959ec2168c56fd8adc7fa15a9ee359fec0522f06441c26cc80af04d3c25157362f8e30ee1a4
7
- data.tar.gz: ffd3ae13a93ace4e9af3bd3a56aab0d76c9bf8ce2525bcc76a3e5bb2345e1a8697c7f72681ed515c82b92b524686220a534deefd128d34934f92c33bb64e6cd4
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 'carte/server/version'
4
+ require 'json'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "carte-server"
8
- spec.version = Carte::Server::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
@@ -8,3 +8,7 @@ production:
8
8
  sessions:
9
9
  default:
10
10
  uri: <%= ENV['MONGOLAB_URI'] %>
11
+ docker:
12
+ sessions:
13
+ default:
14
+ uri: mongodb://mongo/carte
data/nginx.conf ADDED
@@ -0,0 +1,9 @@
1
+ server {
2
+ listen 80;
3
+ server_name www.webapp.com;
4
+ root /home/app/carte/public;
5
+ passenger_enabled on;
6
+ passenger_user app;
7
+ passenger_ruby /usr/bin/ruby2.2;
8
+ passenger_app_env docker;
9
+ }
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "carte-client",
3
3
  "description": "something like dictionary, wiki, or information card",
4
- "version": "0.0.20",
4
+ "version": "0.0.21",
5
5
  "main": "lib/carte.coffee",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
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.20
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-07 00:00:00.000000000 Z
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