fresnel 0.6.6 → 0.6.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -51,4 +51,9 @@ end
51
51
  desc 'Local install the latest gem version'
52
52
  task :reinstall do
53
53
  system("rm -f pkg/*.gem && rake gem && gem install pkg/*.gem")
54
+ end
55
+
56
+ desc 'Uninstall all Fresnel versions and install the latest gem version'
57
+ task :upgrade do
58
+ system("gem uninstall -a -x fresnel && rm -f pkg/*.gem && rake gem && gem install pkg/*.gem")
54
59
  end
data/fresnel.gemspec CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
  s.name = 'fresnel'
4
4
  s.summary = "Fresnel is a console manager to LighthouseApp.com using the official lighthouse api."
5
5
  s.description = s.summary
6
- s.version = '0.6.6'
6
+ s.version = '0.6.7'
7
7
  s.date = '2010-01-11'
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Gerard de Brieder", "Wes Oldenbeuving"]
data/lib/fresnel.rb CHANGED
@@ -34,6 +34,7 @@ class Fresnel
34
34
  @app_description="A lighthouseapp console manager"
35
35
  @lighthouse=Lighthouse
36
36
  @cache=Cache.new
37
+ Cache.clear_all
37
38
  load_global_config
38
39
  load_project_config
39
40
  end
@@ -92,7 +93,8 @@ class Fresnel
92
93
  @lighthouse_token = @@accounts[config['account_name']]['token']
93
94
  end
94
95
  @current_project_id = config['project_id']
95
- @@tags=config['tags'] if config.has_key?('tags')
96
+ @@tags+=config['tags'] if config.has_key?('tags')
97
+ @@tags.uniq!
96
98
  @@cache_timeout=config['cache_timeout'] if config.has_key?('cache_timeout')
97
99
  @@debug=config['debug'] if config.has_key?('debug')
98
100
  @@term_size=config['term_size'] if config.has_key?('term_size')
@@ -462,7 +464,7 @@ class Fresnel
462
464
  def comment(number,state=nil)
463
465
  puts "create comment for #{number}"
464
466
  ticket=get_ticket(number)
465
- File.open("/tmp/fresnel_ticket_#{number}_comment", "w+") do |f|
467
+ File.open("/tmp/fresnel_ticket_#{number}_comment", "w") do |f|
466
468
  f.puts
467
469
  f.puts "# Please enter the comment for this ticket. Lines starting"
468
470
  f.puts "# with '#' will be ignored, and an empty message aborts the commit."
@@ -481,6 +483,7 @@ class Fresnel
481
483
  ticket.body=body
482
484
  ticket.state=state unless state.nil?
483
485
  if ticket.save
486
+ system("rm /tmp/fresnel_ticket_#{number}_comment")
484
487
  cache.clear(:name=>"fresnel_ticket_#{number}")
485
488
  show_ticket(number)
486
489
  else
data/lib/fresnel/cache.rb CHANGED
@@ -4,6 +4,11 @@ class Cache
4
4
  def initialize(options=Hash.new)
5
5
  @active=options[:active]||true
6
6
  end
7
+
8
+ def self.clear_all
9
+ `rm -rf /tmp/fresnel*`
10
+ end
11
+
7
12
  def timeout
8
13
  @@cache_timeout
9
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fresnel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerard de Brieder