tattle 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -10,5 +10,5 @@ Hoe.new('tattle', Tattle::VERSION::STRING) do |p|
10
10
  EOD
11
11
  p.url = "http://tattle.rubyforge.org"
12
12
  p.email = %q{chad@chadfowler.com}
13
- p.author = ["Chad Fowler", "Jim Weirich"]
13
+ p.author = ["Chad Fowler", "Jim Weirich", "Bruce Williams"]
14
14
  end
data/bin/tattle CHANGED
@@ -1,11 +1,15 @@
1
1
  #!/usr/bin/env ruby
2
+ # Run this to generate the tattle report for your system.
3
+ # Supplying an argument of -h or help will provide usage
4
+ # instructions. An argument of report will produce the report
5
+ # No arguments will post the data.
2
6
  require 'tattle'
3
7
  operation = ARGV.shift
4
8
  $DEBUG = true if ENV['DEBUG']
5
9
  case operation
6
10
  when 'report'
7
11
  Tattle::Collector.report
8
- when '-h', 'help'
12
+ when '-h', 'help', '--help'
9
13
  puts "Usage:"
10
14
  puts "tattle report # Print config data without sending"
11
15
  puts "tattle post # Post config data (this is the default)"
@@ -4,6 +4,10 @@ require 'net/http'
4
4
  require 'rbconfig'
5
5
  require 'fileutils'
6
6
  module Tattle
7
+
8
+ # Collector gathers the information about the platform
9
+ # on which tattle is being run in order to send it off
10
+ # to the tattle site.
7
11
  class Collector
8
12
  KEY_FILE = File.join(Gem.user_home, '.tattle/key')
9
13
  REPORTING_URL = if ENV['LOCAL']
@@ -24,6 +28,7 @@ module Tattle
24
28
  'host_vendor',
25
29
  'SHELL']
26
30
 
31
+ # Post the report to REPORTING_URL
27
32
  def self.post
28
33
  collector = self.new
29
34
  Net::HTTP.new(REPORTING_URL.host, REPORTING_URL.port).start do |http|
@@ -39,10 +44,15 @@ module Tattle
39
44
  end
40
45
  end
41
46
 
47
+ # Create a new instance, and call its report method
42
48
  def self.report
43
49
  self.new.report
44
50
  end
45
51
 
52
+
53
+ # Collect the DESIRED_CONFIG_KEYS from Ruby's
54
+ # Config hash, add date, Rubygems version and
55
+ # data read from KEY_FILE.
46
56
  def system_data
47
57
  data = DESIRED_CONFIG_KEYS.inject({}) do |hash, key|
48
58
  hash[key] = Config::CONFIG[key]
@@ -51,7 +61,7 @@ module Tattle
51
61
  data['report_time'] = Time.now.to_s
52
62
  data['rubygems_version'] = Gem::RubyGemsVersion
53
63
  data['ruby_version'] = RUBY_VERSION
54
- data['key'] = key
64
+ data['user_key'] = key
55
65
  data.extend(StringExtensions)
56
66
  $stderr.puts data.inspect if $DEBUG
57
67
  data
@@ -76,6 +86,7 @@ module Tattle
76
86
  end
77
87
  end
78
88
 
89
+ # Report system_data to io, and return system_data
79
90
  def report(io = STDOUT)
80
91
  system_data.each do |key, value|
81
92
  io.puts "#{key}, #{value}"
@@ -2,7 +2,7 @@ module Tattle #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: tattle
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.1
7
- date: 2006-12-08 00:00:00 -07:00
6
+ version: 1.0.3
7
+ date: 2007-04-26 00:00:00 -06:00
8
8
  summary: Tattle is a little reporting script used for collecting system information from the Ruby community.
9
9
  require_paths:
10
10
  - lib
@@ -29,6 +29,7 @@ post_install_message:
29
29
  authors:
30
30
  - Chad Fowler
31
31
  - Jim Weirich
32
+ - Bruce Williams
32
33
  files:
33
34
  - ./bin/tattle
34
35
  - ./CHANGELOG
@@ -59,5 +60,5 @@ dependencies:
59
60
  requirements:
60
61
  - - ">="
61
62
  - !ruby/object:Gem::Version
62
- version: 1.1.4
63
+ version: 1.2.0
63
64
  version: