filezor 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -2
- data/Gemfile.lock +2 -11
- data/Rakefile +12 -20
- data/VERSION +1 -1
- data/filezor.gemspec +1 -4
- data/lib/filezor/file.rb +3 -2
- data/spec/filezor/client_spec.rb +0 -8
- data/spec/spec_helper.rb +9 -0
- metadata +32 -46
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,7 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
git (1.2.5)
|
6
|
-
jeweler (1.4.0)
|
7
|
-
gemcutter (>= 0.1.0)
|
8
|
-
git (>= 1.2.5)
|
9
|
-
rubyforge (>= 2.0.0)
|
10
|
-
json_pure (1.4.6)
|
4
|
+
json (1.4.6)
|
11
5
|
mime-types (1.16)
|
12
6
|
rack (1.2.1)
|
13
7
|
rack-test (0.5.6)
|
@@ -16,8 +10,6 @@ GEM
|
|
16
10
|
rest-client (1.6.1)
|
17
11
|
mime-types (>= 1.16)
|
18
12
|
rspec (1.3.1)
|
19
|
-
rubyforge (2.0.4)
|
20
|
-
json_pure (>= 1.1.7)
|
21
13
|
sinatra (1.1.0)
|
22
14
|
rack (~> 1.1)
|
23
15
|
tilt (~> 1.1)
|
@@ -28,8 +20,7 @@ PLATFORMS
|
|
28
20
|
ruby
|
29
21
|
|
30
22
|
DEPENDENCIES
|
31
|
-
|
32
|
-
jeweler
|
23
|
+
json
|
33
24
|
rack-test
|
34
25
|
rake
|
35
26
|
rest-client
|
data/Rakefile
CHANGED
@@ -1,25 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "filezor"
|
8
|
-
gem.summary = %Q{pure ruby file sync}
|
9
|
-
gem.description = %Q{pure ruby file sync}
|
10
|
-
gem.email = "kyle@kylemaxwell.com"
|
11
|
-
gem.homepage = "http://github.com/fizx/filezor"
|
12
|
-
gem.authors = ["Kyle Maxwell"]
|
13
|
-
gem.add_dependency "trollop"
|
14
|
-
gem.add_dependency "rest-client", "~> 1.3"
|
15
|
-
gem.add_development_dependency "rspec", ">= 1.2.9"
|
16
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
|
-
end
|
18
|
-
Jeweler::GemcutterTasks.new
|
19
|
-
rescue LoadError
|
20
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
21
|
-
end
|
22
|
-
|
23
4
|
def sys(s);puts s; system s; end
|
24
5
|
|
25
6
|
require 'spec/rake/spectask'
|
@@ -34,7 +15,18 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
|
|
34
15
|
spec.rcov = true
|
35
16
|
end
|
36
17
|
|
37
|
-
|
18
|
+
desc 'Release Sunspot and Sunspot::Rails to Gemcutter'
|
19
|
+
task :release do
|
20
|
+
version = File.read("VERSION").strip
|
21
|
+
version_tag = "v#{version}"
|
22
|
+
system "git tag -am 'Release version #{version}' '#{version_tag}'"
|
23
|
+
system "git push origin #{version_tag}:#{version_tag}"
|
24
|
+
|
25
|
+
system "gem build *.gemspec"
|
26
|
+
system "gem push *-#{version}.gem"
|
27
|
+
end
|
28
|
+
|
29
|
+
task :spec
|
38
30
|
|
39
31
|
task :default => :spec
|
40
32
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.6
|
data/filezor.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{filezor}
|
8
|
-
s.version = "1.3.
|
8
|
+
s.version = "1.3.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kyle Maxwell"]
|
@@ -67,7 +67,6 @@ Gem::Specification.new do |s|
|
|
67
67
|
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
|
68
68
|
s.add_runtime_dependency(%q<rack-test>, [">= 0"])
|
69
69
|
s.add_runtime_dependency(%q<rest-client>, [">= 0"])
|
70
|
-
s.add_runtime_dependency(%q<rspec>, ["< 2"])
|
71
70
|
s.add_runtime_dependency(%q<sinatra>, [">= 0"])
|
72
71
|
s.add_runtime_dependency(%q<trollop>, [">= 0"])
|
73
72
|
s.add_runtime_dependency(%q<rest-client>, ["~> 1.3"])
|
@@ -79,7 +78,6 @@ Gem::Specification.new do |s|
|
|
79
78
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
80
79
|
s.add_dependency(%q<rack-test>, [">= 0"])
|
81
80
|
s.add_dependency(%q<rest-client>, [">= 0"])
|
82
|
-
s.add_dependency(%q<rspec>, ["< 2"])
|
83
81
|
s.add_dependency(%q<sinatra>, [">= 0"])
|
84
82
|
s.add_dependency(%q<trollop>, [">= 0"])
|
85
83
|
s.add_dependency(%q<rest-client>, ["~> 1.3"])
|
@@ -92,7 +90,6 @@ Gem::Specification.new do |s|
|
|
92
90
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
93
91
|
s.add_dependency(%q<rack-test>, [">= 0"])
|
94
92
|
s.add_dependency(%q<rest-client>, [">= 0"])
|
95
|
-
s.add_dependency(%q<rspec>, ["< 2"])
|
96
93
|
s.add_dependency(%q<sinatra>, [">= 0"])
|
97
94
|
s.add_dependency(%q<trollop>, [">= 0"])
|
98
95
|
s.add_dependency(%q<rest-client>, ["~> 1.3"])
|
data/lib/filezor/file.rb
CHANGED
@@ -4,14 +4,15 @@ class Filezor::File
|
|
4
4
|
attr_accessor :tempfile, :md5, :path
|
5
5
|
|
6
6
|
module Pathable
|
7
|
-
|
7
|
+
attr_accessor :path
|
8
8
|
end
|
9
9
|
|
10
10
|
def initialize(tempfile, path, hash = nil)
|
11
11
|
@tempfile = tempfile
|
12
12
|
|
13
13
|
# for ruby 1.9 compat. Restclient duck-types files on path
|
14
|
-
@tempfile.extend(Pathable) unless @tempfile.respond_to?(:path)
|
14
|
+
@tempfile.extend(Pathable) unless @tempfile.respond_to?(:path) && @tempfile.respond_to?(:path=)
|
15
|
+
@tempfile.path ||= path
|
15
16
|
|
16
17
|
@path = path
|
17
18
|
@md5 = hash || Filezor::Util::md5(tempfile)
|
data/spec/filezor/client_spec.rb
CHANGED
@@ -1,13 +1,5 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../spec_helper'
|
2
2
|
|
3
|
-
fixtures = File.dirname(__FILE__) + "/../fixtures/."
|
4
|
-
@root = File.dirname(__FILE__) + "/../tmp/filezor-test"
|
5
|
-
rm_rf @root
|
6
|
-
mkdir_p @root
|
7
|
-
cp_r fixtures, @root
|
8
|
-
|
9
|
-
Filezor::Server.start_embedded!(@root, "hiworld")
|
10
|
-
|
11
3
|
describe Filezor::Client do
|
12
4
|
|
13
5
|
before do
|
data/spec/spec_helper.rb
CHANGED
@@ -19,3 +19,12 @@ end
|
|
19
19
|
def upload_fixture_file(name)
|
20
20
|
Rack::Test::UploadedFile.new(fixture_file(name).path, "application/binary")
|
21
21
|
end
|
22
|
+
|
23
|
+
|
24
|
+
fixtures = File.dirname(__FILE__) + "/fixtures/."
|
25
|
+
@root = File.dirname(__FILE__) + "/tmp/filezor-test"
|
26
|
+
rm_rf @root
|
27
|
+
mkdir_p @root
|
28
|
+
cp_r fixtures, @root
|
29
|
+
|
30
|
+
Filezor::Server.start_embedded!(@root, "hiworld")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filezor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 6
|
10
|
+
version: 1.3.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kyle Maxwell
|
@@ -19,6 +19,8 @@ date: 2010-12-05 00:00:00 -08:00
|
|
19
19
|
default_executable: filezor
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
name: trollop
|
23
|
+
prerelease: false
|
22
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
23
25
|
none: false
|
24
26
|
requirements:
|
@@ -29,10 +31,10 @@ dependencies:
|
|
29
31
|
- 0
|
30
32
|
version: "0"
|
31
33
|
type: :runtime
|
32
|
-
name: trollop
|
33
|
-
prerelease: false
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake
|
37
|
+
prerelease: false
|
36
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
39
|
none: false
|
38
40
|
requirements:
|
@@ -43,10 +45,10 @@ dependencies:
|
|
43
45
|
- 0
|
44
46
|
version: "0"
|
45
47
|
type: :runtime
|
46
|
-
name: rake
|
47
|
-
prerelease: false
|
48
48
|
version_requirements: *id002
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
+
name: gemcutter
|
51
|
+
prerelease: false
|
50
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
51
53
|
none: false
|
52
54
|
requirements:
|
@@ -57,10 +59,10 @@ dependencies:
|
|
57
59
|
- 0
|
58
60
|
version: "0"
|
59
61
|
type: :runtime
|
60
|
-
name: gemcutter
|
61
|
-
prerelease: false
|
62
62
|
version_requirements: *id003
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
+
name: jeweler
|
65
|
+
prerelease: false
|
64
66
|
requirement: &id004 !ruby/object:Gem::Requirement
|
65
67
|
none: false
|
66
68
|
requirements:
|
@@ -71,10 +73,10 @@ dependencies:
|
|
71
73
|
- 0
|
72
74
|
version: "0"
|
73
75
|
type: :runtime
|
74
|
-
name: jeweler
|
75
|
-
prerelease: false
|
76
76
|
version_requirements: *id004
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
|
+
name: rack-test
|
79
|
+
prerelease: false
|
78
80
|
requirement: &id005 !ruby/object:Gem::Requirement
|
79
81
|
none: false
|
80
82
|
requirements:
|
@@ -85,10 +87,10 @@ dependencies:
|
|
85
87
|
- 0
|
86
88
|
version: "0"
|
87
89
|
type: :runtime
|
88
|
-
name: rack-test
|
89
|
-
prerelease: false
|
90
90
|
version_requirements: *id005
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
|
+
name: rest-client
|
93
|
+
prerelease: false
|
92
94
|
requirement: &id006 !ruby/object:Gem::Requirement
|
93
95
|
none: false
|
94
96
|
requirements:
|
@@ -99,25 +101,11 @@ dependencies:
|
|
99
101
|
- 0
|
100
102
|
version: "0"
|
101
103
|
type: :runtime
|
102
|
-
name: rest-client
|
103
|
-
prerelease: false
|
104
104
|
version_requirements: *id006
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
|
-
|
107
|
-
none: false
|
108
|
-
requirements:
|
109
|
-
- - <
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
hash: 7
|
112
|
-
segments:
|
113
|
-
- 2
|
114
|
-
version: "2"
|
115
|
-
type: :runtime
|
116
|
-
name: rspec
|
106
|
+
name: sinatra
|
117
107
|
prerelease: false
|
118
|
-
|
119
|
-
- !ruby/object:Gem::Dependency
|
120
|
-
requirement: &id008 !ruby/object:Gem::Requirement
|
108
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
121
109
|
none: false
|
122
110
|
requirements:
|
123
111
|
- - ">="
|
@@ -127,11 +115,11 @@ dependencies:
|
|
127
115
|
- 0
|
128
116
|
version: "0"
|
129
117
|
type: :runtime
|
130
|
-
|
131
|
-
prerelease: false
|
132
|
-
version_requirements: *id008
|
118
|
+
version_requirements: *id007
|
133
119
|
- !ruby/object:Gem::Dependency
|
134
|
-
|
120
|
+
name: trollop
|
121
|
+
prerelease: false
|
122
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
135
123
|
none: false
|
136
124
|
requirements:
|
137
125
|
- - ">="
|
@@ -141,11 +129,11 @@ dependencies:
|
|
141
129
|
- 0
|
142
130
|
version: "0"
|
143
131
|
type: :runtime
|
144
|
-
|
145
|
-
prerelease: false
|
146
|
-
version_requirements: *id009
|
132
|
+
version_requirements: *id008
|
147
133
|
- !ruby/object:Gem::Dependency
|
148
|
-
|
134
|
+
name: rest-client
|
135
|
+
prerelease: false
|
136
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
149
137
|
none: false
|
150
138
|
requirements:
|
151
139
|
- - ~>
|
@@ -156,11 +144,11 @@ dependencies:
|
|
156
144
|
- 3
|
157
145
|
version: "1.3"
|
158
146
|
type: :runtime
|
159
|
-
|
160
|
-
prerelease: false
|
161
|
-
version_requirements: *id010
|
147
|
+
version_requirements: *id009
|
162
148
|
- !ruby/object:Gem::Dependency
|
163
|
-
|
149
|
+
name: rspec
|
150
|
+
prerelease: false
|
151
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
164
152
|
none: false
|
165
153
|
requirements:
|
166
154
|
- - ">="
|
@@ -172,9 +160,7 @@ dependencies:
|
|
172
160
|
- 9
|
173
161
|
version: 1.2.9
|
174
162
|
type: :development
|
175
|
-
|
176
|
-
prerelease: false
|
177
|
-
version_requirements: *id011
|
163
|
+
version_requirements: *id010
|
178
164
|
description: pure ruby file sync
|
179
165
|
email: kyle@kylemaxwell.com
|
180
166
|
executables:
|
@@ -240,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
226
|
requirements: []
|
241
227
|
|
242
228
|
rubyforge_project:
|
243
|
-
rubygems_version: 1.
|
229
|
+
rubygems_version: 1.5.0
|
244
230
|
signing_key:
|
245
231
|
specification_version: 3
|
246
232
|
summary: pure ruby file sync
|