tendersync 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,13 @@
1
- == 1.0.4 2008-08-25
1
+ == 1.0.6 2010-01-15
2
+
3
+ * Merged some stuff from technoweenie
4
+ * Cleaned up init file stuff
5
+
6
+ == 1.0.5 2009-10-01
7
+
8
+ * Bug fixes
9
+
10
+ == 1.0.4 2009-08-25
2
11
 
3
12
  * Fix bug in index generation
4
13
  * Add option to override index permalink
data/bin/tendersync CHANGED
@@ -5,8 +5,6 @@
5
5
 
6
6
  require File.expand_path(File.dirname(__FILE__) + "/../lib/tendersync")
7
7
 
8
- require "tendersync/runner"
9
-
10
8
  begin
11
9
  Tendersync::Runner.new(ARGV.dup).run
12
10
  rescue Tendersync::Runner::Error => e
@@ -1,7 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'optparse'
3
- require 'tendersync/session'
4
- require 'tendersync/document'
5
3
  require 'mechanize'
6
4
  require 'yaml'
7
5
 
@@ -45,6 +43,8 @@ class Tendersync::Runner
45
43
  one-time tasks). Programmers only.
46
44
  create PERMALINK -- create a new tender document with the specified permalink in the section
47
45
  specified by --section=... (must be only one.)
46
+
47
+ Version #{Tendersync::VERSION}
48
48
 
49
49
  }.split(/\n/).each {|line| op.separator line.chomp }
50
50
  end
@@ -196,13 +196,13 @@ class Tendersync::Runner
196
196
  @sections
197
197
  end
198
198
  def settings
199
- case
200
- when @settings
201
- return @settings
202
- when File.exists?(".tendersync")
203
- File.open(".tendersync", "r") { |f| @settings = YAML.load(f) }
204
- else
205
- @settings = {}
199
+ return @settings if @settings
200
+ @settings = {}
201
+ for init_file in ['.tendersync', "#{ENV['HOME']}/.tendersync", "#{File.dirname(__FILE__)}/../../.tendersync"] do
202
+ if File.exists? init_file
203
+ File.open(init_file, "r") { |f| @settings = YAML.load(f) }
204
+ break
205
+ end
206
206
  end
207
207
  def @settings.save!
208
208
  File.open(".tendersync","w") do |f|
@@ -1,4 +1,3 @@
1
-
2
1
  class Tendersync::Session
3
2
  attr_reader :agent
4
3
  def initialize(site, user, pass)
data/lib/tendersync.rb CHANGED
@@ -2,5 +2,9 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module Tendersync
5
- VERSION = '1.0.5'
5
+ autoload :Document, 'tendersync/document'
6
+ autoload :Runner, 'tendersync/runner'
7
+ autoload :Session, 'tendersync/session'
8
+
9
+ VERSION = '1.0.6'
6
10
  end
data/tendersync.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{tendersync}
5
- s.version = "1.0.5"
5
+ s.version = "1.0.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Bill Kayser"]
9
- s.date = %q{2009-10-21}
9
+ s.date = %q{2010-01-15}
10
10
  s.default_executable = %q{tendersync}
11
11
  s.description = %q{Tendersync is a utility for syncing files from ENTP's Tender site for managing customer facing documentation. It can be used to pull and push documents to a local repository as well as create indexes for each documentation section.
12
12
  }
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Tendersync", "--main", "README.md"]
19
19
  s.require_paths = ["lib"]
20
20
  s.rubyforge_project = %q{newrelic}
21
- s.rubygems_version = %q{1.3.4}
21
+ s.rubygems_version = %q{1.3.5}
22
22
  s.summary = %q{Utility for syncing and indexing files from ENTP's Tender site.}
23
23
 
24
24
  if s.respond_to? :specification_version then
@@ -27,13 +27,13 @@ Gem::Specification.new do |s|
27
27
 
28
28
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
29
29
  s.add_runtime_dependency(%q<mechanize>, [">= 0.9.3"])
30
- s.add_development_dependency(%q<newgem>, [">= 1.4.1"])
30
+ s.add_development_dependency(%q<newgem>, [">= 1.5.2"])
31
31
  else
32
32
  s.add_dependency(%q<mechanize>, [">= 0.9.3"])
33
- s.add_dependency(%q<newgem>, [">= 1.4.1"])
33
+ s.add_dependency(%q<newgem>, [">= 1.5.2"])
34
34
  end
35
35
  else
36
36
  s.add_dependency(%q<mechanize>, [">= 0.9.3"])
37
- s.add_dependency(%q<newgem>, [">= 1.4.1"])
37
+ s.add_dependency(%q<newgem>, [">= 1.5.2"])
38
38
  end
39
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tendersync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Kayser
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-21 00:00:00 -07:00
12
+ date: 2010-01-15 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.4.1
33
+ version: 1.5.2
34
34
  version:
35
35
  description: |
36
36
  Tendersync is a utility for syncing files from ENTP's Tender site for managing customer facing documentation. It can be used to pull and push documents to a local repository as well as create indexes for each documentation section.
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements: []
108
108
 
109
109
  rubyforge_project: newrelic
110
- rubygems_version: 1.3.4
110
+ rubygems_version: 1.3.5
111
111
  signing_key:
112
112
  specification_version: 3
113
113
  summary: Utility for syncing and indexing files from ENTP's Tender site.