ohajiki 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 79fe4274aaacd9de9ab3b7b1f57b77eccb908db5
4
+ data.tar.gz: e5da5497568028d38fda1bdb6b5f3967471bfbcd
5
+ SHA512:
6
+ metadata.gz: 2412d617c67ab3d6790a62d98e1151020264442b71a8eb03ec114e20845c0c20088cf51eea0e971b05cf3feb5e2f4f0f2f343bcf707389e110ccccc836820351
7
+ data.tar.gz: e0c97ec96f6d6ed544be3a8b4f917c50610c23085f37e768fe1bf6f64a43e5e7111e1c0f2e5273fcf0692cce39952fa23ed0d79e72dc4c769c59a04f8daf37eb
data/README.md CHANGED
@@ -2,9 +2,6 @@
2
2
 
3
3
  Minimum Dropbox clone using Ruby and Git
4
4
 
5
- ## Naming
6
- >節子,それドロップ(Drop)やない,おはじき(Ohajiki)や :「火垂るの墓」より
7
-
8
5
  ## Installation
9
6
 
10
7
  $ gem install ohajiki
@@ -12,7 +9,7 @@ Minimum Dropbox clone using Ruby and Git
12
9
  ## Usage
13
10
  Write config file
14
11
  ```ruby
15
- REMOTE_REPO_URL = 'https://github.com/kitak/ohajiki.git' # Your remote repository url (necessary entry)
12
+ REMOTE_REPO_URL = 'https://github.com/kitak/ohajiki_howm.git' # Your remote repository url (necessary entry)
16
13
  SYNC_DIR_PATH = '/Users/kitak/.ohajiki' # Sync target (necessary entry)
17
14
  SYNC_INTERVAL_SEC = 5 # Polling interval (optional entry. default 10)
18
15
  LOG_PATH = '/tmp/ohajiki.log' # Logfile location (optional entry. default /tmp/ohajiki.log)
@@ -9,6 +9,6 @@ end
9
9
 
10
10
  pid_dir = '/tmp'
11
11
  Daemons.run_proc('ohajiki', {:dir => pid_dir}) do
12
- controller = Ohajiki::Service.new
13
- controller.start
12
+ service = Ohajiki::Service.new
13
+ service.start
14
14
  end
@@ -76,9 +76,11 @@ module Ohajiki
76
76
  end
77
77
 
78
78
  def commit_all!
79
+ res = nil
79
80
  in_dir do
80
- @repo.commit_all("#{changed_count} files updated")
81
+ res = @repo.commit_all("#{changed_count} files updated")
81
82
  end
83
+ res.match(/nothing to commit/).nil?
82
84
  end
83
85
 
84
86
  def file_changed?
@@ -52,10 +52,10 @@ module Ohajiki
52
52
  end
53
53
 
54
54
  def update
55
- if @repo.file_changed?
56
- @log.info "push #{@repo.changed_count} files"
57
- @repo.add_stage! if @repo.file_added?
58
- @repo.commit_all!
55
+ @repo.add_stage! if @repo.file_changed? and @repo.file_added?
56
+ message = "push #{@repo.changed_count} files"
57
+ if @repo.commit_all!
58
+ @log.info message
59
59
  @repo.push!
60
60
  else
61
61
  @log.info "no changed"
@@ -1,3 +1,3 @@
1
1
  module Ohajiki
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohajiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
5
- prerelease:
4
+ version: 0.0.9
6
5
  platform: ruby
7
6
  authors:
8
7
  - Keisuke KITA
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-22 00:00:00.000000000 Z
11
+ date: 2013-03-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: grit
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: daemons
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: minimum dropbox clone
@@ -66,27 +61,25 @@ files:
66
61
  - ohajiki.gemspec
67
62
  homepage: https://github.com/kitak/ohajiki
68
63
  licenses: []
64
+ metadata: {}
69
65
  post_install_message:
70
66
  rdoc_options: []
71
67
  require_paths:
72
68
  - lib
73
69
  required_ruby_version: !ruby/object:Gem::Requirement
74
- none: false
75
70
  requirements:
76
- - - ! '>='
71
+ - - '>='
77
72
  - !ruby/object:Gem::Version
78
73
  version: '0'
79
74
  required_rubygems_version: !ruby/object:Gem::Requirement
80
- none: false
81
75
  requirements:
82
- - - ! '>='
76
+ - - '>='
83
77
  - !ruby/object:Gem::Version
84
78
  version: '0'
85
79
  requirements: []
86
80
  rubyforge_project:
87
- rubygems_version: 1.8.23
81
+ rubygems_version: 2.0.0
88
82
  signing_key:
89
- specification_version: 3
83
+ specification_version: 4
90
84
  summary: minimum dropbox clone
91
85
  test_files: []
92
- has_rdoc: