joosy 1.2.0.alpha.63 → 1.2.0.alpha.64

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: 69739c36a5ebd92252282522b35939310ad81bc1
4
- data.tar.gz: d594f2adcdeefa91aacf255cbf0a3985e23de4de
3
+ metadata.gz: 0823adf3077e02d1d72bf7dda25eca2619f6af2b
4
+ data.tar.gz: 93a63a4a7a5ddb792667df29374155773fd28ea9
5
5
  SHA512:
6
- metadata.gz: 91bb29b74b08df165afa9623556424de32ea0540692d09e2e929df9b89089983377d21f20cd9b4ae4f3ce2b5ca6681f7055d12e6670947cbd843951eca808d08
7
- data.tar.gz: 4846c9b0cdc628f0d75c958936d18191fc42d9bfa15ad23660963b4850ca9536c24602831f71654e27857be7eedb0dcad87005ea1472631d8fc8a20633b8a5a2
6
+ metadata.gz: 1307d42fe3cbb35e2a14b072c735122dfadcbdb3027384b1e63c692f61ec4860704c2ae3a4d0c8be500175c41c65b752540a6416b21320c1497802200f5e542d
7
+ data.tar.gz: b0610530a29bcd99bf4abfeda87f4cbb670011b137ecbc7e5b7c6076d4e095d8f125bc0a51a751646cccb9a785e4e61bac0bcc94d2fcdf911673975c7336f0d3
data/Gruntfile.coffee CHANGED
@@ -1,5 +1,8 @@
1
1
  require 'sugar'
2
2
 
3
+ Mincer = require 'mincer'
4
+ semver = require 'semver'
5
+
3
6
  module.exports = (grunt) ->
4
7
  #
5
8
  # Common settings
@@ -29,7 +32,6 @@ module.exports = (grunt) ->
29
32
  #
30
33
  # Grunt extensions
31
34
  #
32
- grunt.loadTasks 'lib/tasks'
33
35
  grunt.loadNpmTasks 'grunt-contrib-testem'
34
36
  grunt.loadNpmTasks 'grunt-coffeelint'
35
37
  grunt.loadNpmTasks 'grunt-release'
@@ -111,3 +113,131 @@ module.exports = (grunt) ->
111
113
  grunt.task.run if @args[0] then "testem:run:#{@args[0]}" else 'testem'
112
114
 
113
115
  grunt.registerTask 'publish', ['testem', 'publish:ensureCommits', 'doc', 'release', 'publish:gem']
116
+
117
+
118
+ #
119
+ # Building
120
+ #
121
+ grunt.registerMultiTask 'mince', ->
122
+ Mincer.CoffeeEngine.configure bare: false
123
+ environment = new Mincer.Environment
124
+ environment.appendPath x for x in @data.include
125
+ grunt.file.write @data.dest, environment.findAsset(@data.src).toString()
126
+
127
+ grunt.registerTask 'bowerize', ->
128
+ bower = require './bower.json'
129
+ meta = require './package.json'
130
+
131
+ bower.version = meta.version
132
+ grunt.file.write 'bower.json', JSON.stringify(bower, null, 2)
133
+
134
+ #
135
+ # Publishing
136
+ #
137
+ grunt.registerTask 'publish:ensureCommits', ->
138
+ complete = @async()
139
+
140
+ grunt.util.spawn {cmd: "git", args: ["status", "--porcelain" ]}, (error, result) ->
141
+ if !!error || result.stdout.length > 0
142
+ console.log ""
143
+ console.log "Uncommited changes found. Please commit prior to release or use `--force`.".bold
144
+ console.log ""
145
+ complete false
146
+ else
147
+ complete true
148
+
149
+ grunt.registerTask 'publish:gem', ->
150
+ meta = require './package.json'
151
+ complete = @async()
152
+
153
+ grunt.util.spawn {cmd: "gem", args: ["build", "joosy.gemspec"]}, (error, result) ->
154
+ return complete false if error
155
+
156
+ gem = "joosy-#{meta.version.replace('-', '.')}.gem"
157
+ grunt.log.ok "Built #{gem}"
158
+
159
+ grunt.util.spawn {cmd: "gem", args: ["push", gem]}, (error, result) ->
160
+ return complete false if error
161
+ grunt.log.ok "Published #{gem}"
162
+ grunt.file.delete gem
163
+ complete(true)
164
+
165
+ #
166
+ # Documentation
167
+ #
168
+ grunt.registerTask 'doc', ['doc:prepare', 'doc:generate']
169
+
170
+ grunt.registerTask 'doc:generate', ->
171
+ complete = @async()
172
+ version = JSON.parse(grunt.file.read 'package.json').version.split('-')
173
+ version = version[0]+'-'+version[1]?.split('.')[0]
174
+ destination = "doc/#{version}"
175
+ args = ['source', '--output-dir', destination]
176
+
177
+ git = (args, callback) ->
178
+ grunt.util.spawn {cmd: "git", args: args, opts: {stdio: [0,1,2], cwd: 'doc'}}, callback
179
+
180
+ date = (version) ->
181
+ return undefined unless version
182
+ Date.create(grunt.file.read "doc/#{version}/DATE").format "{d} {Month} {yyyy}"
183
+
184
+ git ['pull'], (error, result) ->
185
+ grunt.fatal "Error pulling from git" if error
186
+
187
+ grunt.file.delete destination if grunt.file.exists destination
188
+ grunt.util.spawn {cmd: "codo", args: args, opts: {stdio: [0,1,2]}}, (error, result) ->
189
+ grunt.fatal "Error generating docs" if error
190
+ grunt.file.write "#{destination}/DATE", (new Date).toISOString()
191
+
192
+ versions = []
193
+ for version in grunt.file.expand({cwd: 'doc'}, '*')
194
+ versions.push version if semver.valid(version)
195
+
196
+ versions = versions.sort(semver.rcompare)
197
+ edge = versions.find (x) -> x.has('-')
198
+ stable = versions.find (x) -> !x.has('-')
199
+ versions = versions.remove edge, stable
200
+
201
+ versions = {
202
+ edge:
203
+ version: edge
204
+ date: date(edge)
205
+ stable:
206
+ version: stable
207
+ date: date(stable)
208
+ versions: versions.map (x) -> { version: x, date: date(x) }
209
+ }
210
+ grunt.file.write 'doc/versions.js', "window.versions = #{JSON.stringify(versions)}"
211
+
212
+ git ['add', '-A'], (error, result) ->
213
+ grunt.fatal "Error adding files" if error
214
+
215
+ git ['commit', '-m', "Updated at #{(new Date).toISOString()}"], (error, result) ->
216
+ grunt.fatal "Error commiting" if error
217
+
218
+ git ['push', 'origin', 'gh-pages'], (error, result) ->
219
+ grunt.fatal "Error pushing" if error
220
+ complete()
221
+
222
+ grunt.registerTask 'doc:prepare', ->
223
+ if grunt.file.exists 'doc'
224
+ unless grunt.file.exists 'doc/.git'
225
+ grunt.fatal "Documentation directory exists. Please remove it"
226
+ else
227
+ return
228
+
229
+ complete = @async()
230
+
231
+ base = process.cwd()
232
+ git = (args, callback) ->
233
+ grunt.util.spawn {cmd: "git", args: args, opts: {stdio: [0,1,2]}}, callback
234
+
235
+ git ["clone", "git@github.com:joosy/joosy.git", "doc"], (error, result) ->
236
+ grunt.fatal "Erorr cloning repo" if error
237
+ process.chdir 'doc'
238
+
239
+ git ["checkout", "gh-pages"], (error, result) ->
240
+ grunt.fatal "Erorr checking branch out" if error
241
+
242
+ process.chdir base
243
+ complete()
data/bower.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "joosy",
3
- "version": "1.2.0-alpha.63",
4
- "main": "lib/joosy.js",
3
+ "version": "1.2.0-alpha.64",
4
+ "main": "build/joosy.js",
5
5
  "ignore": [
6
- "bin",
6
+ "lib",
7
7
  "spec",
8
8
  "tasks",
9
9
  "templates",
10
- "Gemfile",
11
10
  "Gruntfile.coffee",
12
11
  "joosy.gemspec",
13
12
  "package.json",
14
- "lib/**/*.rb"
13
+ ".*"
15
14
  ],
16
15
  "dependencies": {
17
16
  "jquery": "~1.10.1",
data/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "joosy"
6
6
  ],
7
- "version": "1.2.0-alpha.63",
7
+ "version": "1.2.0-alpha.64",
8
8
  "author": "Boris Staal <boris@staal.io>",
9
9
  "homepage": "http://joosy.ws/",
10
10
  "repository": {
@@ -15,17 +15,11 @@
15
15
  "node": ">=0.4.0"
16
16
  },
17
17
  "dependencies": {
18
- "grunt": "~0.4.1",
19
- "coffee-script": "~1.6.3",
20
- "sugar": "~1.3.8",
21
- "grill": "~1.0.0-alpha.5",
22
- "command-router": "0.0.5",
23
- "resolve": "~0.4.0",
24
- "ejs": "~0.8.4",
25
- "commander": "~1.2.0",
26
- "colors": "~0.6.0-1"
18
+ "grill": "~1.0.0-alpha.12"
27
19
  },
28
20
  "devDependencies": {
21
+ "coffee-script": "~1.6.3",
22
+ "sugar": "~1.3.8",
29
23
  "bower": "~1.1.2",
30
24
  "mincer": ">= 0.5.5",
31
25
  "semver": "~2.1.0",
data/tasks/joosy.coffee CHANGED
@@ -2,7 +2,7 @@ module.exports = (grunt) ->
2
2
 
3
3
  #
4
4
  # Joosy utilizes Grill to setup standalone environment
5
- # Check out https://github.com/inossidabile/grill
5
+ # Check out https://github.com/joosy/grill
6
6
  #
7
7
  require('grill').setup grunt,
8
8
  prefix: 'joosy'
@@ -0,0 +1,4 @@
1
+ language: node_js
2
+ node_js:
3
+ - '0.8'
4
+ - '0.10'
@@ -33,23 +33,26 @@ module.exports = (grunt) ->
33
33
  testem:
34
34
  application:
35
35
  src: [
36
- 'public/application.js',
36
+ 'app/javascripts/application.coffee',
37
37
  'spec/helpers/*.coffee',
38
38
  'spec/**/*_spec.coffee'
39
39
  ]
40
+ assets:
41
+ setup: ->
42
+ grunt.joosy.assetter('development').environment
40
43
  options:
41
- parallel: 4
42
44
  launch_in_dev: ['PhantomJS'],
43
45
  launch_in_ci: ['PhantomJS']
44
46
 
45
47
  #
46
48
  # Tasks
47
49
  #
50
+ grunt.registerTask 'default', ['testem']
51
+ grunt.registerTask 'spec', ['testem']
52
+
48
53
  grunt.registerTask 'compile', ['joosy:compile', 'uglify', 'cssmin']
49
54
  grunt.registerTask 'server', ['joosy:server']
50
55
 
51
- grunt.registerTask 'spec', ['testem']
52
-
53
56
  grunt.registerTask 'deploy', ->
54
57
  if process.env['NODE_ENV'] == 'production'
55
58
  grunt.task.run ['joosy:bower', 'joosy:compile']
@@ -8,10 +8,11 @@
8
8
  "grunt-cli": "~0.1.9",
9
9
  "grunt-contrib-uglify": "~0.2.2",
10
10
  "grunt-contrib-cssmin": "~0.6.1",
11
- "grunt-contrib-testem": "~0.2.0",
11
+ "grunt-contrib-testem": "~0.3.0",
12
12
  "phantom": "~0.5.2"
13
13
  },
14
14
  "scripts": {
15
+ "test": "node_modules/.bin/grunt testem:ci --launch=phantomjs",
15
16
  "postinstall": "node_modules/.bin/grunt deploy"
16
17
  }
17
18
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joosy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.alpha.63
4
+ version: 1.2.0.alpha.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Staal
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-08-20 00:00:00.000000000 Z
13
+ date: 2013-08-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sprockets
@@ -57,9 +57,6 @@ files:
57
57
  - build/joosy/extensions/resources.js
58
58
  - joosy.gemspec
59
59
  - lib/joosy.rb
60
- - lib/tasks/build.coffee
61
- - lib/tasks/doc.coffee
62
- - lib/tasks/publish.coffee
63
60
  - package.json
64
61
  - source/joosy.coffee
65
62
  - source/joosy/application.coffee
@@ -131,6 +128,7 @@ files:
131
128
  - templates/application/templates/layouts/application.jst.hamlc
132
129
  - templates/application/templates/pages/welcome/index.jst.hamlc
133
130
  - templates/environment/.gitignore
131
+ - templates/environment/.travis.yml
134
132
  - templates/environment/Gruntfile.coffee
135
133
  - templates/environment/Procfile
136
134
  - templates/environment/app/haml/index.haml
@@ -1,16 +0,0 @@
1
- Mincer = require 'mincer'
2
-
3
- module.exports = (grunt) ->
4
-
5
- grunt.registerMultiTask 'mince', ->
6
- Mincer.CoffeeEngine.configure bare: false
7
- environment = new Mincer.Environment
8
- environment.appendPath x for x in @data.include
9
- grunt.file.write @data.dest, environment.findAsset(@data.src).toString()
10
-
11
- grunt.registerTask 'bowerize', ->
12
- bower = require '../../bower.json'
13
- meta = require '../../package.json'
14
-
15
- bower.version = meta.version
16
- grunt.file.write 'bower.json', JSON.stringify(bower, null, 2)
data/lib/tasks/doc.coffee DELETED
@@ -1,80 +0,0 @@
1
- semver = require 'semver'
2
-
3
- module.exports = (grunt) ->
4
-
5
- grunt.registerTask 'doc', ['doc:prepare', 'doc:generate']
6
-
7
- grunt.registerTask 'doc:generate', ->
8
- complete = @async()
9
- version = JSON.parse(grunt.file.read 'package.json').version.split('-')
10
- version = version[0]+'-'+version[1]?.split('.')[0]
11
- destination = "doc/#{version}"
12
- args = ['source', '--output-dir', destination]
13
-
14
- git = (args, callback) ->
15
- grunt.util.spawn {cmd: "git", args: args, opts: {stdio: [0,1,2], cwd: 'doc'}}, callback
16
-
17
- date = (version) ->
18
- return undefined unless version
19
- Date.create(grunt.file.read "doc/#{version}/DATE").format "{d} {Month} {yyyy}"
20
-
21
- git ['pull'], (error, result) ->
22
- grunt.fatal "Error pulling from git" if error
23
-
24
- grunt.file.delete destination if grunt.file.exists destination
25
- grunt.util.spawn {cmd: "codo", args: args, opts: {stdio: [0,1,2]}}, (error, result) ->
26
- grunt.fatal "Error generating docs" if error
27
- grunt.file.write "#{destination}/DATE", (new Date).toISOString()
28
-
29
- versions = []
30
- for version in grunt.file.expand({cwd: 'doc'}, '*')
31
- versions.push version if semver.valid(version)
32
-
33
- versions = versions.sort(semver.rcompare)
34
- edge = versions.find (x) -> x.has('-')
35
- stable = versions.find (x) -> !x.has('-')
36
- versions = versions.remove edge, stable
37
-
38
- versions = {
39
- edge:
40
- version: edge
41
- date: date(edge)
42
- stable:
43
- version: stable
44
- date: date(stable)
45
- versions: versions.map (x) -> { version: x, date: date(x) }
46
- }
47
- grunt.file.write 'doc/versions.js', "window.versions = #{JSON.stringify(versions)}"
48
-
49
- git ['add', '-A'], (error, result) ->
50
- grunt.fatal "Error adding files" if error
51
-
52
- git ['commit', '-m', "Updated at #{(new Date).toISOString()}"], (error, result) ->
53
- grunt.fatal "Error commiting" if error
54
-
55
- git ['push', 'origin', 'gh-pages'], (error, result) ->
56
- grunt.fatal "Error pushing" if error
57
- complete()
58
-
59
- grunt.registerTask 'doc:prepare', ->
60
- if grunt.file.exists 'doc'
61
- unless grunt.file.exists 'doc/.git'
62
- grunt.fatal "Documentation directory exists. Please remove it"
63
- else
64
- return
65
-
66
- complete = @async()
67
-
68
- base = process.cwd()
69
- git = (args, callback) ->
70
- grunt.util.spawn {cmd: "git", args: args, opts: {stdio: [0,1,2]}}, callback
71
-
72
- git ["clone", "git@github.com:joosy/joosy.git", "doc"], (error, result) ->
73
- grunt.fatal "Erorr cloning repo" if error
74
- process.chdir 'doc'
75
-
76
- git ["checkout", "gh-pages"], (error, result) ->
77
- grunt.fatal "Erorr checking branch out" if error
78
-
79
- process.chdir base
80
- complete()
@@ -1,29 +0,0 @@
1
- module.exports = (grunt) ->
2
-
3
- grunt.registerTask 'publish:ensureCommits', ->
4
- complete = @async()
5
-
6
- grunt.util.spawn {cmd: "git", args: ["status", "--porcelain" ]}, (error, result) ->
7
- if !!error || result.stdout.length > 0
8
- console.log ""
9
- console.log "Uncommited changes found. Please commit prior to release or use `--force`.".bold
10
- console.log ""
11
- complete false
12
- else
13
- complete true
14
-
15
- grunt.registerTask 'publish:gem', ->
16
- meta = require '../../package.json'
17
- complete = @async()
18
-
19
- grunt.util.spawn {cmd: "gem", args: ["build", "joosy.gemspec"]}, (error, result) ->
20
- return complete false if error
21
-
22
- gem = "joosy-#{meta.version.replace('-', '.')}.gem"
23
- grunt.log.ok "Built #{gem}"
24
-
25
- grunt.util.spawn {cmd: "gem", args: ["push", gem]}, (error, result) ->
26
- return complete false if error
27
- grunt.log.ok "Published #{gem}"
28
- grunt.file.delete gem
29
- complete(true)