carte-server 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9ec151590cdcf41c9eca74c23baec0fce5cefad
4
- data.tar.gz: 6b8966161d19a8e0c911bd2536df1c74d7157fe7
3
+ metadata.gz: ea8ba3e099c22995406bea46da747e0a946a76de
4
+ data.tar.gz: b09af6170a04272a31e259bb16f4497b0b5b05ab
5
5
  SHA512:
6
- metadata.gz: 7db8ee6f8b114c56fad2104b31019c87a82053ead56d3d1552deb25f10a4cbf62e862cf1b39b56e0215a2502fd300881bb2d7e08e1cd65f4538d94c38e69ffb3
7
- data.tar.gz: de06f2eca3db3658e49d1646bd70efe20ab3b0bd22cf2b08ad923921dedbf9899656783def2ef8b3f804aa43c62d1c34b4397d2c38c365eedb26f7ab6e69d650
6
+ metadata.gz: b7949667b7863001901f96089f09e9a3285ebabc12c3601a8a81d1511ee3d6f2d32c28b227861017e02914edd8298fb83c1caea4ffb4a6dee7a23c4340ff9751
7
+ data.tar.gz: bb17ea69b992365e73d5d5dc7b1f1fab7ca6785ffe11ff7e6b80c9ca3dac6149c890272e827568dae3cf0bff80d171934fe6a0ff32ef2d77d0dba164349b218b
data/config.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "title": "carte",
2
+ "title": "carte sandbox",
3
3
  "description": "something like dictionary, wiki, or information card",
4
4
  "public_folder": "public",
5
5
  "script_path": "public/app.js"
data/gulpfile.coffee CHANGED
@@ -5,7 +5,13 @@ carte = new Carte()
5
5
  path = 'public/app.js'
6
6
 
7
7
  gulp.task 'build', ->
8
- carte.build watch: false, config: __dirname + '/config.json'
8
+ carte.build
9
+ watch: false
10
+ minify: true
11
+ config: __dirname + '/config.json'
9
12
 
10
13
  gulp.task 'watch', ->
11
- carte.build watch: true, config: __dirname + '/config.json'
14
+ carte.build
15
+ watch: true
16
+ minifty: false
17
+ config: __dirname + '/config.json'
data/lib/carte.coffee CHANGED
@@ -2,9 +2,12 @@ fs = require 'fs'
2
2
  path = require 'path'
3
3
  gulp = require 'gulp'
4
4
  gulpUtil = require 'gulp-util'
5
+ gulpIf = require 'gulp-if'
5
6
  source = require 'vinyl-source-stream'
6
7
  browserify = require 'browserify'
7
8
  watchify = require 'watchify'
9
+ uglify = require 'gulp-uglify'
10
+ streamify = require 'gulp-streamify'
8
11
 
9
12
  module.exports = class Carte
10
13
  build: (options)->
@@ -12,6 +15,7 @@ module.exports = class Carte
12
15
  fs.writeFileSync(__dirname + '/carte/shared/config.json', JSON.stringify(config))
13
16
  dir = path.dirname config.script_path
14
17
  file = path.basename config.script_path
18
+ minify = options.minify
15
19
  browserify = browserify
16
20
  cache: {}
17
21
  packageCache: {}
@@ -23,12 +27,13 @@ module.exports = class Carte
23
27
  .transform 'debowerify'
24
28
  if options.watch
25
29
  watchified = watchify(browserify)
26
- watchified.on 'update', ()=> @bundle(browserify, dir, file)
30
+ watchified.on 'update', ()=> @bundle(browserify, dir, file, minify)
27
31
  watchified.on 'log', gulpUtil.log
28
- @bundle(browserify, dir, file)
32
+ @bundle(browserify, dir, file, minify)
29
33
 
30
- bundle: (browserify, dir, file)->
34
+ bundle: (browserify, dir, file, minify)->
31
35
  browserify
32
36
  .bundle()
33
37
  .pipe source file
38
+ .pipe gulpIf(minify, streamify(uglify()))
34
39
  .pipe gulp.dest dir
@@ -3,7 +3,6 @@ $ = require('jquery')
3
3
  React = require('react')
4
4
  Modal = require('react-bootstrap/lib/Modal')
5
5
  Button = require('react-bootstrap/lib/Button')
6
- Loader = require('react-loader')
7
6
 
8
7
  module.exports = React.createClass
9
8
  displayName: 'Edit'
@@ -7,6 +7,9 @@ CardCollection = require('../models/cards')
7
7
  module.exports = React.createClass
8
8
  displayName: 'List'
9
9
 
10
+ componentDidMount: ->
11
+ @props.cards.on 'sync', @forceUpdate.bind(@, null)
12
+
10
13
  componentWillReceiveProps: (nextProps)->
11
14
  console.log 'List: component will receive props'
12
15
  nextProps.cards.on 'sync', @forceUpdate.bind(@, null)
data/lib/carte/server.rb CHANGED
@@ -7,6 +7,7 @@ require 'carte/server/models'
7
7
 
8
8
  module Carte
9
9
  class Server < Sinatra::Base
10
+ use Rack::Deflater
10
11
  register Sinatra::Namespace
11
12
  include Carte::Server::Models
12
13
 
@@ -2,6 +2,6 @@ require 'sinatra/base'
2
2
 
3
3
  module Carte
4
4
  class Server < Sinatra::Base
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.3"
6
6
  end
7
7
  end
data/mongoid.yml CHANGED
@@ -7,4 +7,4 @@ development:
7
7
  production:
8
8
  sessions:
9
9
  default:
10
- uri: <%= ENV['MONGOHQ_URL'] %>
10
+ uri: <%= ENV['MONGOLAB_URI'] %>
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.1",
4
+ "version": "0.0.3",
5
5
  "main": "lib/carte.coffee",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -26,6 +26,9 @@
26
26
  "cssify": "^0.7.0",
27
27
  "debowerify": "^1.2.1",
28
28
  "gulp": "^3.8.11",
29
+ "gulp-if": "^1.2.5",
30
+ "gulp-streamify": "0.0.5",
31
+ "gulp-uglify": "^1.2.0",
29
32
  "gulp-util": "^3.0.4",
30
33
  "jquery": "^2.1.3",
31
34
  "react": "^0.13.2",
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.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - tily
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler