jim 0.3.0.pre → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,5 +1,8 @@
1
1
  source "http://rubygems.org"
2
2
 
3
+ gem "rake"
4
+ gem "jeweler"
5
+ gem "test-unit"
3
6
  gem "downlow", "~> 0.1.3"
4
7
  gem "thor"
5
8
  gem "fssm"
@@ -8,4 +11,5 @@ gem "version_sorter", "~> 1.1.0"
8
11
  gem "leftright"
9
12
  gem "shoulda", ">= 0"
10
13
  gem "fakeweb", ">= 1.2.8"
14
+ gem "rack-test"
11
15
  gem "mocha"
data/Gemfile.lock CHANGED
@@ -6,12 +6,22 @@ GEM
6
6
  archive-tar-minitar (>= 0.5.2)
7
7
  rubyzip (>= 0.9.4)
8
8
  fakeweb (1.3.0)
9
+ fssm (0.2.5)
10
+ git (1.2.5)
11
+ jeweler (1.5.2)
12
+ bundler (~> 1.0.0)
13
+ git (>= 1.2.5)
14
+ rake
9
15
  leftright (0.9.0)
10
16
  mocha (0.9.8)
11
17
  rake
18
+ rack (1.2.1)
19
+ rack-test (0.5.7)
20
+ rack (>= 1.0)
12
21
  rake (0.8.7)
13
22
  rubyzip (0.9.4)
14
23
  shoulda (2.11.3)
24
+ test-unit (2.1.2)
15
25
  thor (0.14.4)
16
26
  version_sorter (1.1.0)
17
27
  yajl-ruby (0.7.7)
@@ -22,9 +32,14 @@ PLATFORMS
22
32
  DEPENDENCIES
23
33
  downlow (~> 0.1.3)
24
34
  fakeweb (>= 1.2.8)
35
+ fssm
36
+ jeweler
25
37
  leftright
26
38
  mocha
39
+ rack-test
40
+ rake
27
41
  shoulda
42
+ test-unit
28
43
  thor
29
44
  version_sorter (~> 1.1.0)
30
45
  yajl-ruby
data/README.md CHANGED
@@ -116,7 +116,7 @@ with a specific command.
116
116
  ### Why not implement it in JavaScript itself?
117
117
 
118
118
  CommonJS has certainly come a long way in a year, but in general the file
119
- system support and variety of libraries just isnt completely there yet for
119
+ system support and variety of libraries just isn't completely there yet for
120
120
  this type of project (IMHO). Also, I love Ruby and writing this was actually
121
121
  fun and pretty fast.
122
122
 
@@ -128,9 +128,12 @@ just being lazy about it)
128
128
  Probably?? Its all very new at this point so please test it out and let me
129
129
  know.
130
130
 
131
- ## Thanks
131
+ ## Contributors
132
132
 
133
- Thanks to Yehuda Katz for talking through some of the ideas with me.
133
+ Jim is mostly written by Aaron Quint, but not without the help of
134
+ [these fine individuals.](https://github.com/quirkey/jim/contributors)
135
+
136
+ Also, Thanks to Yehuda Katz for talking through some of the original ideas.
134
137
 
135
138
  ## Note on Patches/Pull Requests
136
139
 
data/Rakefile CHANGED
@@ -1,5 +1,8 @@
1
1
  require 'rubygems'
2
- require 'rake'
2
+ require 'bundler'
3
+
4
+ Bundler.require
5
+
3
6
 
4
7
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
5
8
 
@@ -54,7 +57,6 @@ rescue LoadError
54
57
  end
55
58
  end
56
59
 
57
- task :test => :check_dependencies
58
60
 
59
61
  task :default => :test
60
62
 
data/jim.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{jim}
8
- s.version = "0.3.0.pre"
8
+ s.version = "0.3.0"
9
9
 
10
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aaron Quint"]
12
- s.date = %q{2010-11-21}
12
+ s.date = %q{2011-02-28}
13
13
  s.default_executable = %q{jim}
14
14
  s.description = %q{jim is your friendly javascript library manager. He downloads, stores, bundles, vendors and compresses.}
15
15
  s.email = %q{aaron@quirkey.com}
@@ -128,6 +128,9 @@ Gem::Specification.new do |s|
128
128
  s.specification_version = 3
129
129
 
130
130
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
131
+ s.add_runtime_dependency(%q<rake>, [">= 0"])
132
+ s.add_runtime_dependency(%q<jeweler>, [">= 0"])
133
+ s.add_runtime_dependency(%q<test-unit>, [">= 0"])
131
134
  s.add_runtime_dependency(%q<downlow>, ["~> 0.1.3"])
132
135
  s.add_runtime_dependency(%q<thor>, [">= 0"])
133
136
  s.add_runtime_dependency(%q<fssm>, [">= 0"])
@@ -136,6 +139,7 @@ Gem::Specification.new do |s|
136
139
  s.add_runtime_dependency(%q<leftright>, [">= 0"])
137
140
  s.add_runtime_dependency(%q<shoulda>, [">= 0"])
138
141
  s.add_runtime_dependency(%q<fakeweb>, [">= 1.2.8"])
142
+ s.add_runtime_dependency(%q<rack-test>, [">= 0"])
139
143
  s.add_runtime_dependency(%q<mocha>, [">= 0"])
140
144
  s.add_runtime_dependency(%q<downlow>, ["~> 0.1.4"])
141
145
  s.add_runtime_dependency(%q<thor>, ["~> 0.14.4"])
@@ -148,6 +152,9 @@ Gem::Specification.new do |s|
148
152
  s.add_development_dependency(%q<leftright>, [">= 0"])
149
153
  s.add_development_dependency(%q<rack-test>, [">= 0.5.4"])
150
154
  else
155
+ s.add_dependency(%q<rake>, [">= 0"])
156
+ s.add_dependency(%q<jeweler>, [">= 0"])
157
+ s.add_dependency(%q<test-unit>, [">= 0"])
151
158
  s.add_dependency(%q<downlow>, ["~> 0.1.3"])
152
159
  s.add_dependency(%q<thor>, [">= 0"])
153
160
  s.add_dependency(%q<fssm>, [">= 0"])
@@ -156,6 +163,7 @@ Gem::Specification.new do |s|
156
163
  s.add_dependency(%q<leftright>, [">= 0"])
157
164
  s.add_dependency(%q<shoulda>, [">= 0"])
158
165
  s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
166
+ s.add_dependency(%q<rack-test>, [">= 0"])
159
167
  s.add_dependency(%q<mocha>, [">= 0"])
160
168
  s.add_dependency(%q<downlow>, ["~> 0.1.4"])
161
169
  s.add_dependency(%q<thor>, ["~> 0.14.4"])
@@ -169,6 +177,9 @@ Gem::Specification.new do |s|
169
177
  s.add_dependency(%q<rack-test>, [">= 0.5.4"])
170
178
  end
171
179
  else
180
+ s.add_dependency(%q<rake>, [">= 0"])
181
+ s.add_dependency(%q<jeweler>, [">= 0"])
182
+ s.add_dependency(%q<test-unit>, [">= 0"])
172
183
  s.add_dependency(%q<downlow>, ["~> 0.1.3"])
173
184
  s.add_dependency(%q<thor>, [">= 0"])
174
185
  s.add_dependency(%q<fssm>, [">= 0"])
@@ -177,6 +188,7 @@ Gem::Specification.new do |s|
177
188
  s.add_dependency(%q<leftright>, [">= 0"])
178
189
  s.add_dependency(%q<shoulda>, [">= 0"])
179
190
  s.add_dependency(%q<fakeweb>, [">= 1.2.8"])
191
+ s.add_dependency(%q<rack-test>, [">= 0"])
180
192
  s.add_dependency(%q<mocha>, [">= 0"])
181
193
  s.add_dependency(%q<downlow>, ["~> 0.1.4"])
182
194
  s.add_dependency(%q<thor>, ["~> 0.14.4"])
data/lib/jim/bundler.rb CHANGED
@@ -25,7 +25,8 @@ module Jim
25
25
  #
26
26
  # Pre jim version 0.3 had a different simpler but proprietary and (possibly confusing)
27
27
  # Jimfile format. Bundler can still read that format and can actually convert
28
- # it into the new JSON format for you. Future versions may remove this support.
28
+ # it into the new JSON format for you. See `Jim::CLI.update_jimfile`.
29
+ # Future versions may remove this support.
29
30
  class Bundler
30
31
  class MissingFile < Jim::Error; end
31
32
  class InvalidBundle < Jim::Error; end
data/lib/jim.rb CHANGED
@@ -5,7 +5,7 @@ require 'version_sorter'
5
5
  require 'digest/md5'
6
6
 
7
7
  module Jim
8
- VERSION = '0.3.0.pre'
8
+ VERSION = '0.3.0'
9
9
 
10
10
  class Error < RuntimeError; end
11
11
  class InstallError < Error; end
@@ -29,6 +29,14 @@ class TestJimRack < Test::Unit::TestCase
29
29
  assert_equal 'text/javascript', last_response.headers['Content-Type']
30
30
  end
31
31
 
32
+ should "get non default bundle" do
33
+ Jim::Bundler.any_instance.expects(:bundle!).with('base').once.returns('jQuery')
34
+ get "#{@bundle_uri}base.js"
35
+ assert last_response
36
+ assert_equal 'jQuery', last_response.body
37
+ assert_equal 'text/javascript', last_response.headers['Content-Type']
38
+ end
39
+
32
40
  should "get individual compressed bundle" do
33
41
  Jim::Bundler.any_instance.expects(:compress!).with('default').once.returns('jQuery')
34
42
  get "#{@bundle_uri}default.min.js"
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jim
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ prerelease: false
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
8
  - 0
9
- - pre
10
- version: 0.3.0.pre
9
+ version: 0.3.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Aaron Quint
@@ -15,12 +14,51 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-11-21 00:00:00 -08:00
17
+ date: 2011-02-28 00:00:00 -08:00
19
18
  default_executable: jim
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- name: downlow
21
+ name: rake
23
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: jeweler
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
42
+ version: "0"
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: test-unit
48
+ requirement: &id003 !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *id003
59
+ - !ruby/object:Gem::Dependency
60
+ name: downlow
61
+ requirement: &id004 !ruby/object:Gem::Requirement
24
62
  none: false
25
63
  requirements:
26
64
  - - ~>
@@ -32,10 +70,10 @@ dependencies:
32
70
  version: 0.1.3
33
71
  type: :runtime
34
72
  prerelease: false
35
- version_requirements: *id001
73
+ version_requirements: *id004
36
74
  - !ruby/object:Gem::Dependency
37
75
  name: thor
38
- requirement: &id002 !ruby/object:Gem::Requirement
76
+ requirement: &id005 !ruby/object:Gem::Requirement
39
77
  none: false
40
78
  requirements:
41
79
  - - ">="
@@ -45,10 +83,10 @@ dependencies:
45
83
  version: "0"
46
84
  type: :runtime
47
85
  prerelease: false
48
- version_requirements: *id002
86
+ version_requirements: *id005
49
87
  - !ruby/object:Gem::Dependency
50
88
  name: fssm
51
- requirement: &id003 !ruby/object:Gem::Requirement
89
+ requirement: &id006 !ruby/object:Gem::Requirement
52
90
  none: false
53
91
  requirements:
54
92
  - - ">="
@@ -58,10 +96,10 @@ dependencies:
58
96
  version: "0"
59
97
  type: :runtime
60
98
  prerelease: false
61
- version_requirements: *id003
99
+ version_requirements: *id006
62
100
  - !ruby/object:Gem::Dependency
63
101
  name: yajl-ruby
64
- requirement: &id004 !ruby/object:Gem::Requirement
102
+ requirement: &id007 !ruby/object:Gem::Requirement
65
103
  none: false
66
104
  requirements:
67
105
  - - ">="
@@ -71,10 +109,10 @@ dependencies:
71
109
  version: "0"
72
110
  type: :runtime
73
111
  prerelease: false
74
- version_requirements: *id004
112
+ version_requirements: *id007
75
113
  - !ruby/object:Gem::Dependency
76
114
  name: version_sorter
77
- requirement: &id005 !ruby/object:Gem::Requirement
115
+ requirement: &id008 !ruby/object:Gem::Requirement
78
116
  none: false
79
117
  requirements:
80
118
  - - ~>
@@ -86,10 +124,10 @@ dependencies:
86
124
  version: 1.1.0
87
125
  type: :runtime
88
126
  prerelease: false
89
- version_requirements: *id005
127
+ version_requirements: *id008
90
128
  - !ruby/object:Gem::Dependency
91
129
  name: leftright
92
- requirement: &id006 !ruby/object:Gem::Requirement
130
+ requirement: &id009 !ruby/object:Gem::Requirement
93
131
  none: false
94
132
  requirements:
95
133
  - - ">="
@@ -99,10 +137,10 @@ dependencies:
99
137
  version: "0"
100
138
  type: :runtime
101
139
  prerelease: false
102
- version_requirements: *id006
140
+ version_requirements: *id009
103
141
  - !ruby/object:Gem::Dependency
104
142
  name: shoulda
105
- requirement: &id007 !ruby/object:Gem::Requirement
143
+ requirement: &id010 !ruby/object:Gem::Requirement
106
144
  none: false
107
145
  requirements:
108
146
  - - ">="
@@ -112,10 +150,10 @@ dependencies:
112
150
  version: "0"
113
151
  type: :runtime
114
152
  prerelease: false
115
- version_requirements: *id007
153
+ version_requirements: *id010
116
154
  - !ruby/object:Gem::Dependency
117
155
  name: fakeweb
118
- requirement: &id008 !ruby/object:Gem::Requirement
156
+ requirement: &id011 !ruby/object:Gem::Requirement
119
157
  none: false
120
158
  requirements:
121
159
  - - ">="
@@ -127,10 +165,23 @@ dependencies:
127
165
  version: 1.2.8
128
166
  type: :runtime
129
167
  prerelease: false
130
- version_requirements: *id008
168
+ version_requirements: *id011
169
+ - !ruby/object:Gem::Dependency
170
+ name: rack-test
171
+ requirement: &id012 !ruby/object:Gem::Requirement
172
+ none: false
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ segments:
177
+ - 0
178
+ version: "0"
179
+ type: :runtime
180
+ prerelease: false
181
+ version_requirements: *id012
131
182
  - !ruby/object:Gem::Dependency
132
183
  name: mocha
133
- requirement: &id009 !ruby/object:Gem::Requirement
184
+ requirement: &id013 !ruby/object:Gem::Requirement
134
185
  none: false
135
186
  requirements:
136
187
  - - ">="
@@ -140,10 +191,10 @@ dependencies:
140
191
  version: "0"
141
192
  type: :runtime
142
193
  prerelease: false
143
- version_requirements: *id009
194
+ version_requirements: *id013
144
195
  - !ruby/object:Gem::Dependency
145
196
  name: downlow
146
- requirement: &id010 !ruby/object:Gem::Requirement
197
+ requirement: &id014 !ruby/object:Gem::Requirement
147
198
  none: false
148
199
  requirements:
149
200
  - - ~>
@@ -155,10 +206,10 @@ dependencies:
155
206
  version: 0.1.4
156
207
  type: :runtime
157
208
  prerelease: false
158
- version_requirements: *id010
209
+ version_requirements: *id014
159
210
  - !ruby/object:Gem::Dependency
160
211
  name: thor
161
- requirement: &id011 !ruby/object:Gem::Requirement
212
+ requirement: &id015 !ruby/object:Gem::Requirement
162
213
  none: false
163
214
  requirements:
164
215
  - - ~>
@@ -170,10 +221,10 @@ dependencies:
170
221
  version: 0.14.4
171
222
  type: :runtime
172
223
  prerelease: false
173
- version_requirements: *id011
224
+ version_requirements: *id015
174
225
  - !ruby/object:Gem::Dependency
175
226
  name: yajl-ruby
176
- requirement: &id012 !ruby/object:Gem::Requirement
227
+ requirement: &id016 !ruby/object:Gem::Requirement
177
228
  none: false
178
229
  requirements:
179
230
  - - ">="
@@ -183,10 +234,10 @@ dependencies:
183
234
  version: "0"
184
235
  type: :runtime
185
236
  prerelease: false
186
- version_requirements: *id012
237
+ version_requirements: *id016
187
238
  - !ruby/object:Gem::Dependency
188
239
  name: version_sorter
189
- requirement: &id013 !ruby/object:Gem::Requirement
240
+ requirement: &id017 !ruby/object:Gem::Requirement
190
241
  none: false
191
242
  requirements:
192
243
  - - ~>
@@ -198,10 +249,10 @@ dependencies:
198
249
  version: 1.1.0
199
250
  type: :runtime
200
251
  prerelease: false
201
- version_requirements: *id013
252
+ version_requirements: *id017
202
253
  - !ruby/object:Gem::Dependency
203
254
  name: fssm
204
- requirement: &id014 !ruby/object:Gem::Requirement
255
+ requirement: &id018 !ruby/object:Gem::Requirement
205
256
  none: false
206
257
  requirements:
207
258
  - - ~>
@@ -213,10 +264,10 @@ dependencies:
213
264
  version: 0.2.0
214
265
  type: :runtime
215
266
  prerelease: false
216
- version_requirements: *id014
267
+ version_requirements: *id018
217
268
  - !ruby/object:Gem::Dependency
218
269
  name: shoulda
219
- requirement: &id015 !ruby/object:Gem::Requirement
270
+ requirement: &id019 !ruby/object:Gem::Requirement
220
271
  none: false
221
272
  requirements:
222
273
  - - ">="
@@ -226,10 +277,10 @@ dependencies:
226
277
  version: "0"
227
278
  type: :development
228
279
  prerelease: false
229
- version_requirements: *id015
280
+ version_requirements: *id019
230
281
  - !ruby/object:Gem::Dependency
231
282
  name: fakeweb
232
- requirement: &id016 !ruby/object:Gem::Requirement
283
+ requirement: &id020 !ruby/object:Gem::Requirement
233
284
  none: false
234
285
  requirements:
235
286
  - - ">="
@@ -241,10 +292,10 @@ dependencies:
241
292
  version: 1.2.8
242
293
  type: :development
243
294
  prerelease: false
244
- version_requirements: *id016
295
+ version_requirements: *id020
245
296
  - !ruby/object:Gem::Dependency
246
297
  name: mocha
247
- requirement: &id017 !ruby/object:Gem::Requirement
298
+ requirement: &id021 !ruby/object:Gem::Requirement
248
299
  none: false
249
300
  requirements:
250
301
  - - ">="
@@ -254,10 +305,10 @@ dependencies:
254
305
  version: "0"
255
306
  type: :development
256
307
  prerelease: false
257
- version_requirements: *id017
308
+ version_requirements: *id021
258
309
  - !ruby/object:Gem::Dependency
259
310
  name: leftright
260
- requirement: &id018 !ruby/object:Gem::Requirement
311
+ requirement: &id022 !ruby/object:Gem::Requirement
261
312
  none: false
262
313
  requirements:
263
314
  - - ">="
@@ -267,10 +318,10 @@ dependencies:
267
318
  version: "0"
268
319
  type: :development
269
320
  prerelease: false
270
- version_requirements: *id018
321
+ version_requirements: *id022
271
322
  - !ruby/object:Gem::Dependency
272
323
  name: rack-test
273
- requirement: &id019 !ruby/object:Gem::Requirement
324
+ requirement: &id023 !ruby/object:Gem::Requirement
274
325
  none: false
275
326
  requirements:
276
327
  - - ">="
@@ -282,7 +333,7 @@ dependencies:
282
333
  version: 0.5.4
283
334
  type: :development
284
335
  prerelease: false
285
- version_requirements: *id019
336
+ version_requirements: *id023
286
337
  description: jim is your friendly javascript library manager. He downloads, stores, bundles, vendors and compresses.
287
338
  email: aaron@quirkey.com
288
339
  executables:
@@ -394,19 +445,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
394
445
  requirements:
395
446
  - - ">="
396
447
  - !ruby/object:Gem::Version
448
+ hash: 3683419874421523468
397
449
  segments:
398
450
  - 0
399
451
  version: "0"
400
452
  required_rubygems_version: !ruby/object:Gem::Requirement
401
453
  none: false
402
454
  requirements:
403
- - - ">"
455
+ - - ">="
404
456
  - !ruby/object:Gem::Version
405
457
  segments:
406
- - 1
407
- - 3
408
- - 1
409
- version: 1.3.1
458
+ - 0
459
+ version: "0"
410
460
  requirements: []
411
461
 
412
462
  rubyforge_project: