web_translate_it 1.7.1.5 → 1.7.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/history.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Version 1.7.1.6 / 2011-02-25
2
+
3
+ * Fix: Make sure `log` directory exists on `wti server` start up.
4
+ * New: Upgrade Sinatra to 1.1.3
5
+
1
6
  ## Version 1.7.1.5 / 2011-02-10
2
7
 
3
8
  * Fix an issue with `wti server` swallowing all `wti` outputs.
@@ -3,7 +3,7 @@ module WebTranslateIt
3
3
  class Project
4
4
 
5
5
  def self.fetch_info(api_key)
6
- puts "Gathering project's information..."
6
+ puts "Gathering project's information..." unless Object.const_defined?(:Spec)
7
7
  begin
8
8
  WebTranslateIt::Util.http_connection do |http|
9
9
  request = Net::HTTP::Get.new("/api/projects/#{api_key}.yaml")
@@ -52,6 +52,8 @@ module WebTranslateIt
52
52
  end
53
53
 
54
54
  def self.start(host, port)
55
+ puts "Starting wti server..."
56
+ Dir::mkdir('log') unless FileTest::directory?('log')
55
57
  logger = ::File.open("log/webtranslateit.log", "a+")
56
58
  STDOUT.reopen(logger)
57
59
  STDERR.reopen(logger)
@@ -1,12 +1,13 @@
1
1
  # encoding: utf-8
2
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'util')
3
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'configuration')
4
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'translation_file')
5
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'auto_fetch')
6
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'command_line')
7
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'project')
8
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'tasks')
9
- require File.join(File.dirname(__FILE__), 'web_translate_it', 'server')
2
+ require 'rubygems'
3
+ require 'web_translate_it/util'
4
+ require 'web_translate_it/configuration'
5
+ require 'web_translate_it/translation_file'
6
+ require 'web_translate_it/auto_fetch'
7
+ require 'web_translate_it/command_line'
8
+ require 'web_translate_it/project'
9
+ require 'web_translate_it/tasks'
10
+ require 'web_translate_it/server'
10
11
 
11
12
  module WebTranslateIt
12
13
 
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,2 @@
1
1
  require File.dirname(__FILE__) + '/../lib/web_translate_it'
2
- # $:.unshift File.dirname(__FILE__) + '/../lib'
3
- # Dir[File.join(File.dirname(__FILE__), '../vendor/*/lib')].each do |path|
4
- # $:.unshift path
5
- # end
2
+ require 'spec'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe WebTranslateIt::Configuration do
4
4
  describe "#initialize" do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe WebTranslateIt::TranslationFile do
4
4
 
@@ -12,7 +12,7 @@ describe WebTranslateIt::TranslationFile do
12
12
  end
13
13
 
14
14
  describe "#fetch" do
15
- let(:translation_file) { WebTranslateIt::TranslationFile.new(2267, "examples/en.yml", 'fr', "4af21ce1fb3a4f7127a60b31ebc41c1446b38bb2") }
15
+ let(:translation_file) { WebTranslateIt::TranslationFile.new(2267, "examples/en.yml", 'fr', "4af21ce1fb3a4f7127a60b31ebc41c1446b38bb2", Time.now) }
16
16
 
17
17
  it "should prepare a HTTP request and get a 200 OK if the language file is stale" do
18
18
  file = mock(File)
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe WebTranslateIt::Util do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), 'spec_helper')
1
+ require 'spec/spec_helper'
2
2
 
3
3
  module WebTranslateIt
4
4
  class I18n
data/version.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :major: 1
3
3
  :minor: 7
4
4
  :tiny: 1
5
- :patch: 5
5
+ :patch: 6
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_translate_it
3
3
  version: !ruby/object:Gem::Version
4
- hash: 105
4
+ hash: 111
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
9
  - 1
10
- - 5
11
- version: 1.7.1.5
10
+ - 6
11
+ version: 1.7.1.6
12
12
  platform: ruby
13
13
  authors:
14
14
  - "\xC3\x89douard Bri\xC3\xA8re"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-02-10 00:00:00 +01:00
19
+ date: 2011-02-25 00:00:00 +01:00
20
20
  default_executable: wti
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -59,12 +59,12 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- hash: 23
62
+ hash: 21
63
63
  segments:
64
64
  - 1
65
65
  - 1
66
- - 2
67
- version: 1.1.2
66
+ - 3
67
+ version: 1.1.3
68
68
  type: :runtime
69
69
  version_requirements: *id003
70
70
  - !ruby/object:Gem::Dependency
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  requirements: []
158
158
 
159
159
  rubyforge_project:
160
- rubygems_version: 1.5.0
160
+ rubygems_version: 1.5.2
161
161
  signing_key:
162
162
  specification_version: 3
163
163
  summary: Sync your translations between your app and Web Translate It