murlsh 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,12 @@
1
+ 1.9.1
2
+ 2011-10-02
3
+
4
+ Detect if using Heroku and add postgresql gem to gemfile.
5
+
6
+ Automatically set root_url if using Heroku.
7
+
8
+ Remove sqlite3 as a dependency.
9
+
1
10
  1.9.0
2
11
  2011-09-25
3
12
 
data/README.textile CHANGED
@@ -57,8 +57,6 @@ rake app:gemfile
57
57
  bundle install
58
58
 
59
59
  rake heroku:config
60
- heroku info
61
- rake config[root_url,<your app's Heroku url>]
62
60
  rake config[s3_bucket,<your S3 bucket name>]
63
61
  rake config[s3_id,<your S3 id>]
64
62
  rake config[s3_secret,<your S3 secret>]
data/Rakefile CHANGED
@@ -27,6 +27,8 @@ if File.exist?(db_config_file)
27
27
  config['db'] = YAML.load_file(db_config_file)['production']
28
28
  end
29
29
 
30
+ heroku_info = {}
31
+
30
32
  # Wrapper for database connection and cleanup from a Rake task.
31
33
  def use_db(db_config)
32
34
  ActiveRecord::Base.establish_connection db_config
@@ -406,7 +408,7 @@ end
406
408
  namespace :app do
407
409
 
408
410
  desc 'Generate a bundler Gemfile for a murlsh instance.'
409
- task :gemfile do
411
+ task :gemfile => %w{heroku:info} do
410
412
  open('Gemfile', 'w') do |f|
411
413
  f.write <<EOS
412
414
  # generated by 'rake app:gemfile'
@@ -414,6 +416,8 @@ namespace :app do
414
416
  source :rubygems
415
417
 
416
418
  gem 'murlsh', '= #{Murlsh::VERSION}'
419
+
420
+ #{heroku_info.empty? ? '' : "gem 'pg'"}
417
421
  EOS
418
422
  end
419
423
  end
@@ -422,13 +426,27 @@ end
422
426
 
423
427
  namespace :heroku do
424
428
 
429
+ desc 'Get Heroku info.'
430
+ task :info do
431
+ output = `heroku info -r 2>/dev/null`
432
+ if $?.exitstatus == 0
433
+ puts 'Heroku detected'
434
+ heroku_info = Hash[output.split($/).map { |line| line.split('=', 2) }]
435
+ end
436
+ end
437
+
425
438
  desc 'Set config options for deployment on Heroku.'
426
- task :config => %w{compress} do
439
+ task :config => %w{compress info} do
427
440
  config.delete 'cache_entitystore'
428
441
  config.delete 'cache_metastore'
442
+ puts 'removed cache_entitystore and cache_metastore from config, Rack::Cache disabled'
443
+
444
+ if heroku_url = heroku_info['web_url']
445
+ config['root_url'] = heroku_url
446
+ puts "Set root_url to #{config['root_url']}"
447
+ end
429
448
 
430
449
  Murlsh.write_ordered_hash config, 'config.yaml'
431
- puts 'removed cache_entitystore and cache_metastore from config, Rack::Cache disabled'
432
450
  end
433
451
 
434
452
  end
@@ -1,3 +1,3 @@
1
1
  module Murlsh
2
- VERSION = '1.9.0'
2
+ VERSION = '1.9.1'
3
3
  end
data/murlsh.gemspec CHANGED
@@ -32,7 +32,6 @@ Gem::Specification.new do |s|
32
32
  rack-rewrite
33
33
  rmagick
34
34
  rmail
35
- sqlite3
36
35
  tinyatom
37
36
  treetop
38
37
  twitter
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: murlsh
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 9
9
- - 0
10
- version: 1.9.0
9
+ - 1
10
+ version: 1.9.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matthew M. Boedicker
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-25 00:00:00 -04:00
18
+ date: 2011-10-02 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -243,7 +243,7 @@ dependencies:
243
243
  type: :runtime
244
244
  version_requirements: *id016
245
245
  - !ruby/object:Gem::Dependency
246
- name: sqlite3
246
+ name: tinyatom
247
247
  prerelease: false
248
248
  requirement: &id017 !ruby/object:Gem::Requirement
249
249
  none: false
@@ -257,7 +257,7 @@ dependencies:
257
257
  type: :runtime
258
258
  version_requirements: *id017
259
259
  - !ruby/object:Gem::Dependency
260
- name: tinyatom
260
+ name: treetop
261
261
  prerelease: false
262
262
  requirement: &id018 !ruby/object:Gem::Requirement
263
263
  none: false
@@ -271,7 +271,7 @@ dependencies:
271
271
  type: :runtime
272
272
  version_requirements: *id018
273
273
  - !ruby/object:Gem::Dependency
274
- name: treetop
274
+ name: twitter
275
275
  prerelease: false
276
276
  requirement: &id019 !ruby/object:Gem::Requirement
277
277
  none: false
@@ -285,7 +285,7 @@ dependencies:
285
285
  type: :runtime
286
286
  version_requirements: *id019
287
287
  - !ruby/object:Gem::Dependency
288
- name: twitter
288
+ name: fakeweb
289
289
  prerelease: false
290
290
  requirement: &id020 !ruby/object:Gem::Requirement
291
291
  none: false
@@ -296,10 +296,10 @@ dependencies:
296
296
  segments:
297
297
  - 0
298
298
  version: "0"
299
- type: :runtime
299
+ type: :development
300
300
  version_requirements: *id020
301
301
  - !ruby/object:Gem::Dependency
302
- name: fakeweb
302
+ name: flog
303
303
  prerelease: false
304
304
  requirement: &id021 !ruby/object:Gem::Requirement
305
305
  none: false
@@ -313,7 +313,7 @@ dependencies:
313
313
  type: :development
314
314
  version_requirements: *id021
315
315
  - !ruby/object:Gem::Dependency
316
- name: flog
316
+ name: rack-test
317
317
  prerelease: false
318
318
  requirement: &id022 !ruby/object:Gem::Requirement
319
319
  none: false
@@ -327,7 +327,7 @@ dependencies:
327
327
  type: :development
328
328
  version_requirements: *id022
329
329
  - !ruby/object:Gem::Dependency
330
- name: rack-test
330
+ name: rspec
331
331
  prerelease: false
332
332
  requirement: &id023 !ruby/object:Gem::Requirement
333
333
  none: false
@@ -340,20 +340,6 @@ dependencies:
340
340
  version: "0"
341
341
  type: :development
342
342
  version_requirements: *id023
343
- - !ruby/object:Gem::Dependency
344
- name: rspec
345
- prerelease: false
346
- requirement: &id024 !ruby/object:Gem::Requirement
347
- none: false
348
- requirements:
349
- - - ">="
350
- - !ruby/object:Gem::Version
351
- hash: 3
352
- segments:
353
- - 0
354
- version: "0"
355
- type: :development
356
- version_requirements: *id024
357
343
  description: Host your bookmarks or maintain a link blog
358
344
  email:
359
345
  - matthewm@boedicker.org