simple_sync 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -3
- data/bin/simple_sync +6 -3
- data/lib/simple_sync/simple_sync.rb +7 -7
- data/lib/simple_sync/version.rb +2 -2
- data/simple_sync.gemspec +2 -0
- metadata +2 -4
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d33cda9c934b024253b445ade7038c6761e8428
|
4
|
+
data.tar.gz: c5c4f2432020f4dbd23af2054f78239553e04b83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6b3db16a47cd174c3e346978cb3e3b4f81640a858f06ed26a7e21c9015dc3acf019a706f56cbeb34ca62a87aa67d915e206480ce6d6a6cc66bb915d3f79ac20
|
7
|
+
data.tar.gz: 26d4e1635d9853450973db7e8d7e3babed4aa3c315e605267487e8bf8316d88a9e2d388a5b46f5aa9fa7b27a4c03abcaf54305351eb33f57586e5aeb7be07611
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/bin/simple_sync
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require 'rsync'
|
3
2
|
require 'json'
|
4
3
|
|
5
4
|
class SimpleSync
|
@@ -11,22 +10,23 @@ class SimpleSync
|
|
11
10
|
|
12
11
|
def read_config_from_file
|
13
12
|
if File.exists?(@config_file)
|
14
|
-
|
13
|
+
puts "opening file #{@config_file}"
|
15
14
|
config = File.open(@config_file).read
|
16
15
|
elsif File.exists?(File.join(Dir.home, @config_file))
|
17
16
|
config = File.open(File.join(Dir.home, @config_file)).read
|
18
|
-
|
17
|
+
puts "opening file #{File.join(Dir.home, @config_file)}"
|
19
18
|
else
|
20
|
-
|
21
|
-
return { status: 'error
|
22
|
-
return { status: 'error
|
23
|
-
config = File.open(ENV['
|
19
|
+
puts "opening environment #{ENV['SIMPLE_SYNC']}"
|
20
|
+
return { status: 'error', message: "could not find configuration file #{@config_file}" } unless ENV['SIMPLE_SYNC']
|
21
|
+
return { status: 'error', message: "could not find configuration file #{@config_file}" } unless File.exists?(ENV['SIMPLE_SYNC'])
|
22
|
+
config = File.open(ENV['SIMPLE_SYNC']).read
|
24
23
|
end
|
25
24
|
{ status: 'success', config: config }
|
26
25
|
end
|
27
26
|
|
28
27
|
def load_config
|
29
28
|
configuration = read_config_from_file()
|
29
|
+
#puts configuration
|
30
30
|
return configuration if configuration[:status] == 'error'
|
31
31
|
@config_list = JSON.parse(configuration[:config], symbolize_names: true)
|
32
32
|
return { status: 'success' }
|
data/lib/simple_sync/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
VERSION = "0.0.
|
1
|
+
class SimpleSync
|
2
|
+
VERSION = "0.0.2"
|
3
3
|
end
|
data/simple_sync.gemspec
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'simple_sync/version'
|
5
|
+
require 'bundler'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
8
|
spec.name = "simple_sync"
|
@@ -24,4 +25,5 @@ Gem::Specification.new do |spec|
|
|
24
25
|
spec.add_development_dependency "pry-nav", "~>0.2"
|
25
26
|
spec.add_development_dependency "autotest-standalone", "~>4.4"
|
26
27
|
|
28
|
+
Bundler.require(:default, :development)
|
27
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Claburn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,7 +92,6 @@ extra_rdoc_files: []
|
|
92
92
|
files:
|
93
93
|
- ".autotest"
|
94
94
|
- ".gitignore"
|
95
|
-
- ".ruby-version"
|
96
95
|
- ".travis.yml"
|
97
96
|
- Gemfile
|
98
97
|
- LICENSE.txt
|
@@ -147,4 +146,3 @@ test_files:
|
|
147
146
|
- test/test_source/somedirectory/dir1/another_file1.txt
|
148
147
|
- test/test_source/somedirectory/dir2/another_file2.txt
|
149
148
|
- test/unit/test_simple_sync.rb
|
150
|
-
has_rdoc:
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1
|