dandelion 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ module Dandelion
21
21
  exit
22
22
  end
23
23
 
24
- config = YAML.load_file 'deploy.yml'
24
+ config = YAML.load_file config_file
25
25
 
26
26
  if config['scheme'] == 'sftp'
27
27
  service = Service::SFTP.new(config['host'], config['username'], config['password'], config['path'])
@@ -30,7 +30,7 @@ module Dandelion
30
30
  exit
31
31
  end
32
32
 
33
- puts "Connecting to: #{service.uri}"
33
+ puts "Connecting to: #{service.uri}"
34
34
 
35
35
  begin
36
36
  # Deploy changes since remote revision
@@ -34,13 +34,15 @@ module Deployment
34
34
  end
35
35
 
36
36
  def deploy
37
- if remote_revision != local_revision && any?
37
+ if !revisions_match? && any?
38
38
  deploy_changed
39
39
  deploy_deleted
40
- write_revision
41
40
  else
42
41
  puts "Nothing to deploy"
43
42
  end
43
+ unless revisions_match?
44
+ write_revision
45
+ end
44
46
  end
45
47
 
46
48
  def deploy_changed
@@ -69,6 +71,10 @@ module Deployment
69
71
  @diff.changed.any? || @diff.deleted.any?
70
72
  end
71
73
 
74
+ def revisions_match?
75
+ remote_revision == local_revision
76
+ end
77
+
72
78
  private
73
79
 
74
80
  def read_revision
@@ -1,3 +1,3 @@
1
1
  module Dandelion
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dandelion
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 2
9
- version: 0.1.2
4
+ prerelease:
5
+ version: 0.1.3
10
6
  platform: ruby
11
7
  authors:
12
8
  - Scott Nelson
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-01-31 00:00:00 -05:00
13
+ date: 2011-02-09 00:00:00 -05:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -25,10 +21,6 @@ dependencies:
25
21
  requirements:
26
22
  - - ">="
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 2
30
- - 0
31
- - 5
32
24
  version: 2.0.5
33
25
  type: :runtime
34
26
  version_requirements: *id001
@@ -40,10 +32,6 @@ dependencies:
40
32
  requirements:
41
33
  - - ">="
42
34
  - !ruby/object:Gem::Version
43
- segments:
44
- - 2
45
- - 4
46
- - 1
47
35
  version: 2.4.1
48
36
  type: :runtime
49
37
  version_requirements: *id002
@@ -82,23 +70,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
70
  requirements:
83
71
  - - ">="
84
72
  - !ruby/object:Gem::Version
85
- segments:
86
- - 0
87
73
  version: "0"
88
74
  required_rubygems_version: !ruby/object:Gem::Requirement
89
75
  none: false
90
76
  requirements:
91
77
  - - ">="
92
78
  - !ruby/object:Gem::Version
93
- segments:
94
- - 0
95
79
  version: "0"
96
80
  requirements: []
97
81
 
98
82
  rubyforge_project:
99
- rubygems_version: 1.3.7
83
+ rubygems_version: 1.5.0
100
84
  signing_key:
101
85
  specification_version: 3
102
- summary: dandelion-0.1.2
86
+ summary: dandelion-0.1.3
103
87
  test_files: []
104
88