glynn 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1,2 @@
1
+ rvm use 1.9.2@glynn
2
+ rvm_gemset_create_on_use_flag=1
data/Gemfile CHANGED
@@ -14,5 +14,6 @@ gem "sdoc-helpers"
14
14
  group :test do
15
15
  gem "rspec"
16
16
  gem "mocha"
17
- gem "fakefs"
17
+ gem "fakefs",
18
+ :git => 'https://github.com/dmathieu/fakefs.git'
18
19
  end
data/Gemfile.lock ADDED
@@ -0,0 +1,59 @@
1
+ GIT
2
+ remote: https://github.com/dmathieu/fakefs.git
3
+ revision: 09f238b23772d95e8790235b7d3eee99e431deac
4
+ specs:
5
+ fakefs (0.3.1)
6
+
7
+ GEM
8
+ remote: http://gemcutter.org/
9
+ specs:
10
+ classifier (1.3.3)
11
+ fast-stemmer (>= 1.0.0)
12
+ diff-lcs (1.1.2)
13
+ directory_watcher (1.4.0)
14
+ fast-stemmer (1.0.0)
15
+ git (1.2.5)
16
+ jekyll (0.10.0)
17
+ classifier (>= 1.3.1)
18
+ directory_watcher (>= 1.1.1)
19
+ liquid (>= 1.9.0)
20
+ maruku (>= 0.5.9)
21
+ jeweler (1.5.2)
22
+ bundler (~> 1.0.0)
23
+ git (>= 1.2.5)
24
+ rake
25
+ json (1.5.1)
26
+ liquid (2.2.2)
27
+ maruku (0.6.0)
28
+ syntax (>= 1.0.0)
29
+ mocha (0.9.12)
30
+ rake (0.8.7)
31
+ rdiscount (1.6.8)
32
+ rdoc (2.4.3)
33
+ rspec (2.5.0)
34
+ rspec-core (~> 2.5.0)
35
+ rspec-expectations (~> 2.5.0)
36
+ rspec-mocks (~> 2.5.0)
37
+ rspec-core (2.5.1)
38
+ rspec-expectations (2.5.0)
39
+ diff-lcs (~> 1.1.2)
40
+ rspec-mocks (2.5.0)
41
+ sdoc (0.2.20)
42
+ json (>= 1.1.3)
43
+ rdoc (= 2.4.3)
44
+ sdoc-helpers (0.1.4)
45
+ sdoc (~> 0.2)
46
+ syntax (1.0.0)
47
+
48
+ PLATFORMS
49
+ ruby
50
+
51
+ DEPENDENCIES
52
+ fakefs!
53
+ jekyll
54
+ jeweler
55
+ mocha
56
+ rdiscount
57
+ rspec
58
+ sdoc
59
+ sdoc-helpers
data/Rakefile CHANGED
@@ -1,11 +1,4 @@
1
- begin
2
- require File.expand_path('../vendor/environment', __FILE__)
3
- rescue LoadError
4
- require "rubygems"
5
- require "bundler"
6
- Bundler.setup
7
- end
8
- require 'spec/rake/spectask'
1
+ require 'bundler/setup'
9
2
 
10
3
  begin
11
4
  require 'jeweler'
@@ -27,13 +20,10 @@ end
27
20
  #
28
21
  # The rspec tasks
29
22
  #
23
+ require 'rspec/core'
24
+ require 'rspec/core/rake_task'
30
25
  task :default => :spec
31
-
32
- desc "Run all specs"
33
- Spec::Rake::SpecTask.new('spec') do |t|
34
- t.spec_files = FileList['spec/**/*.rb']
35
- t.spec_opts = ['-cfs']
36
- end
26
+ RSpec::Core::RakeTask.new(:spec)
37
27
 
38
28
  #
39
29
  # The sdoc generator
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.4
1
+ 1.0.5
data/glynn.gemspec CHANGED
@@ -1,64 +1,78 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{glynn}
8
- s.version = "1.0.4"
8
+ s.version = "1.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Damien MATHIEU"]
12
- s.date = %q{2010-02-10}
12
+ s.date = %q{2011-04-08}
13
13
  s.default_executable = %q{glynn}
14
14
  s.description = %q{Deploy a jekyll weblog through ftp}
15
15
  s.email = %q{42@dmathieu.com}
16
16
  s.executables = ["glynn"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
- "README.md"
19
+ "README.md"
20
20
  ]
21
21
  s.files = [
22
- ".gitignore",
23
- "Gemfile",
24
- "LICENSE",
25
- "README.md",
26
- "Rakefile",
27
- "VERSION",
28
- "bin/glynn",
29
- "glynn.gemspec",
30
- "lib/glynn.rb",
31
- "lib/glynn/file.rb",
32
- "lib/glynn/ftp.rb",
33
- "lib/glynn/jekyll.rb",
34
- "spec/lib/file.rb",
35
- "spec/lib/ftp.rb",
36
- "spec/lib/jekyll.rb",
37
- "spec/spec.opts",
38
- "spec/spec_helper.rb"
22
+ ".rvmrc",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE",
26
+ "README.md",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bin/glynn",
30
+ "glynn.gemspec",
31
+ "lib/glynn.rb",
32
+ "lib/glynn/file.rb",
33
+ "lib/glynn/ftp.rb",
34
+ "lib/glynn/jekyll.rb",
35
+ "spec/lib/file_spec.rb",
36
+ "spec/lib/ftp_spec.rb",
37
+ "spec/lib/jekyll_spec.rb",
38
+ "spec/spec.opts",
39
+ "spec/spec_helper.rb"
39
40
  ]
40
41
  s.homepage = %q{http://github.com/dmathieu/glynn}
41
- s.rdoc_options = ["--charset=UTF-8"]
42
42
  s.require_paths = ["lib"]
43
- s.rubygems_version = %q{1.3.5}
43
+ s.rubygems_version = %q{1.5.1}
44
44
  s.summary = %q{Deploy a jekyll weblog through ftp}
45
45
  s.test_files = [
46
- "spec/lib/file.rb",
47
- "spec/lib/ftp.rb",
48
- "spec/lib/jekyll.rb",
49
- "spec/spec_helper.rb"
46
+ "spec/lib/file_spec.rb",
47
+ "spec/lib/ftp_spec.rb",
48
+ "spec/lib/jekyll_spec.rb",
49
+ "spec/spec_helper.rb"
50
50
  ]
51
51
 
52
52
  if s.respond_to? :specification_version then
53
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
54
53
  s.specification_version = 3
55
54
 
56
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
55
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
+ s.add_runtime_dependency(%q<rdiscount>, [">= 0"])
57
+ s.add_runtime_dependency(%q<jekyll>, [">= 0"])
58
+ s.add_runtime_dependency(%q<jeweler>, [">= 0"])
59
+ s.add_runtime_dependency(%q<sdoc>, [">= 0"])
60
+ s.add_runtime_dependency(%q<sdoc-helpers>, [">= 0"])
57
61
  s.add_runtime_dependency(%q<jekyll>, [">= 0.5.4"])
58
62
  else
63
+ s.add_dependency(%q<rdiscount>, [">= 0"])
64
+ s.add_dependency(%q<jekyll>, [">= 0"])
65
+ s.add_dependency(%q<jeweler>, [">= 0"])
66
+ s.add_dependency(%q<sdoc>, [">= 0"])
67
+ s.add_dependency(%q<sdoc-helpers>, [">= 0"])
59
68
  s.add_dependency(%q<jekyll>, [">= 0.5.4"])
60
69
  end
61
70
  else
71
+ s.add_dependency(%q<rdiscount>, [">= 0"])
72
+ s.add_dependency(%q<jekyll>, [">= 0"])
73
+ s.add_dependency(%q<jeweler>, [">= 0"])
74
+ s.add_dependency(%q<sdoc>, [">= 0"])
75
+ s.add_dependency(%q<sdoc-helpers>, [">= 0"])
62
76
  s.add_dependency(%q<jekyll>, [">= 0.5.4"])
63
77
  end
64
78
  end
data/lib/glynn/file.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'ftools'
2
-
3
1
  module Glynn
4
2
  class File
5
3
 
@@ -12,14 +12,19 @@ describe "FTP Interface" do
12
12
  end
13
13
 
14
14
  it 'should login to ftp server' do
15
+ @mock.should_receive(:close)
15
16
  Net::FTP.should_receive(:new).with('localhost', nil, nil).and_return(@mock)
17
+
18
+
16
19
  Glynn::Ftp.new('localhost').send(:connect) do |ftp|
17
20
  ftp.should eql(@mock)
18
21
  end
19
22
  end
20
23
 
21
24
  it 'should accept a username and password' do
25
+ @mock.should_receive(:close)
22
26
  Net::FTP.should_receive(:new).with('localhost', 'username', 'password').and_return(@mock)
27
+
23
28
  Glynn::Ftp.new('localhost', 21, {:username => 'username', :password => 'password'}).send(:connect) do |ftp|
24
29
  ftp.should eql(@mock)
25
30
  end
@@ -29,10 +34,13 @@ describe "FTP Interface" do
29
34
  # We expect NET/FTP to create every file
30
35
  @mock.should_receive(:putbinaryfile).with('/test/README', '/blah/README').and_return(true)
31
36
  @mock.should_receive(:putbinaryfile).with('/test/subdir/README', '/blah/subdir/README').and_return(true)
37
+ @mock.should_receive(:mkdir).with('/blah')
38
+ @mock.should_receive(:mkdir).with('/blah/subdir').twice
39
+
32
40
  FakeFS do
33
41
  # We create the fake files and directories
34
- Dir.mkdir('/test')
35
- Dir.mkdir('/test/subdir')
42
+ Dir.mkdir('/test') unless File.exists?('/test')
43
+ Dir.mkdir('/test/subdir') unless File.exists?('/test')
36
44
  File.open('/test/README', 'w') { |f| f.write 'N/A' }
37
45
  File.open('/test/subdir/README', 'w') { |f| f.write 'N/A' }
38
46
 
@@ -42,6 +50,8 @@ describe "FTP Interface" do
42
50
  end
43
51
 
44
52
  it 'should connect itself to the server and send the local file to distant directory' do
53
+ @mock.should_receive(:close)
54
+
45
55
  FakeFS do
46
56
  interface = Glynn::Ftp.new('localhost')
47
57
  Net::FTP.should_receive(:new).with('localhost', nil, nil).and_return(@mock)
data/spec/spec_helper.rb CHANGED
@@ -1,15 +1,12 @@
1
1
  require 'rubygems'
2
- require 'spec'
3
2
  require 'mocha'
4
- require 'spec/autorun'
5
- require 'spec/interop/test'
6
3
  require 'fakefs/safe'
7
4
 
8
5
 
9
6
  $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
10
7
  require 'glynn'
11
8
 
12
- Spec::Runner.configure do |config|
9
+ RSpec.configure do |config|
13
10
 
14
11
 
15
12
  end
metadata CHANGED
@@ -1,39 +1,95 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: glynn
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.4
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.5
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Damien MATHIEU
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2010-02-10 00:00:00 +01:00
12
+ date: 2011-04-08 00:00:00.000000000 +02:00
13
13
  default_executable: glynn
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rdiscount
17
+ requirement: &2152256340 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: '0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *2152256340
26
+ - !ruby/object:Gem::Dependency
16
27
  name: jekyll
28
+ requirement: &2152255280 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *2152255280
37
+ - !ruby/object:Gem::Dependency
38
+ name: jeweler
39
+ requirement: &2152254220 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *2152254220
48
+ - !ruby/object:Gem::Dependency
49
+ name: sdoc
50
+ requirement: &2152253200 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
17
56
  type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
57
+ prerelease: false
58
+ version_requirements: *2152253200
59
+ - !ruby/object:Gem::Dependency
60
+ name: sdoc-helpers
61
+ requirement: &2152251760 !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ type: :runtime
68
+ prerelease: false
69
+ version_requirements: *2152251760
70
+ - !ruby/object:Gem::Dependency
71
+ name: jekyll
72
+ requirement: &2152250920 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
23
77
  version: 0.5.4
24
- version:
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: *2152250920
25
81
  description: Deploy a jekyll weblog through ftp
26
82
  email: 42@dmathieu.com
27
- executables:
83
+ executables:
28
84
  - glynn
29
85
  extensions: []
30
-
31
- extra_rdoc_files:
86
+ extra_rdoc_files:
32
87
  - LICENSE
33
88
  - README.md
34
- files:
35
- - .gitignore
89
+ files:
90
+ - .rvmrc
36
91
  - Gemfile
92
+ - Gemfile.lock
37
93
  - LICENSE
38
94
  - README.md
39
95
  - Rakefile
@@ -44,41 +100,41 @@ files:
44
100
  - lib/glynn/file.rb
45
101
  - lib/glynn/ftp.rb
46
102
  - lib/glynn/jekyll.rb
47
- - spec/lib/file.rb
48
- - spec/lib/ftp.rb
49
- - spec/lib/jekyll.rb
103
+ - spec/lib/file_spec.rb
104
+ - spec/lib/ftp_spec.rb
105
+ - spec/lib/jekyll_spec.rb
50
106
  - spec/spec.opts
51
107
  - spec/spec_helper.rb
52
108
  has_rdoc: true
53
109
  homepage: http://github.com/dmathieu/glynn
54
110
  licenses: []
55
-
56
111
  post_install_message:
57
- rdoc_options:
58
- - --charset=UTF-8
59
- require_paths:
112
+ rdoc_options: []
113
+ require_paths:
60
114
  - lib
61
- required_ruby_version: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: "0"
66
- version:
67
- required_rubygems_version: !ruby/object:Gem::Requirement
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- version: "0"
72
- version:
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ segments:
122
+ - 0
123
+ hash: -1900938787396399437
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ none: false
126
+ requirements:
127
+ - - ! '>='
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
73
130
  requirements: []
74
-
75
131
  rubyforge_project:
76
- rubygems_version: 1.3.5
132
+ rubygems_version: 1.5.1
77
133
  signing_key:
78
134
  specification_version: 3
79
135
  summary: Deploy a jekyll weblog through ftp
80
- test_files:
81
- - spec/lib/file.rb
82
- - spec/lib/ftp.rb
83
- - spec/lib/jekyll.rb
136
+ test_files:
137
+ - spec/lib/file_spec.rb
138
+ - spec/lib/ftp_spec.rb
139
+ - spec/lib/jekyll_spec.rb
84
140
  - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- _site/*
2
- pkg/*
3
- *.kpf
4
- *.tmproj
5
- .DS_Store
6
- vendor/gems/*
7
- bin/*
File without changes
File without changes