mclone 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +5 -0
  3. data/README.md +3 -3
  4. data/lib/mclone.rb +11 -9
  5. metadata +5 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55aeb4153e4c0c1387458da22ac441d0a53dfb7778845f94ccc8e6c48ef699db
4
- data.tar.gz: 32d565d1ea60267cd3da77ae03b408a8a42d02a7a6bf3ab6d4ff30ac9e9d3c3c
3
+ metadata.gz: c89cb8e633183fd633ff44b2e87fdc73c5cd348bb377e61f77d12cde4d389e61
4
+ data.tar.gz: 1844a2921e78e5cc2057b0aa906494e978883ffda60a487f1881743fbe5598cd
5
5
  SHA512:
6
- metadata.gz: 00eef197ed719146957579af92909974433514ebfeff86d6ca4f97cd1a9ff0969fbed7848a468166d1ca20049d014576bc2ddb9027154a91383aed9860c54cc7
7
- data.tar.gz: 130f20d592e4c73f320e6e7680f4b100c840f06258eca96c28f7c036e230f305de760f908187b88a8b40cf36dc3834af93724798c7bdb0bfa1b4c017414b517f
6
+ metadata.gz: dec529f91301c96fd64b839aa4fdcd4cb733f076d8e56ab506ab86ebe0ec075821623d5e5bf8e91a871d72498b2a77db70b5328837764f9d95987b2a24a62150
7
+ data.tar.gz: fac7f8a99b14bdacbe1048d7ba5e7d325863677bf3149a6f2c2a23665996ec75790caed9b51dde2260300c4afd838795c05134284b3f738c94c268d601108c21
data/CHANGES.md ADDED
@@ -0,0 +1,5 @@
1
+ # 0.1.1 (2021-06-24)
2
+
3
+ * Switch from FFI to Fiddle.
4
+
5
+ # 0.1.0 (2021-06-22)
data/README.md CHANGED
@@ -57,7 +57,7 @@ Let's start with the simplest case.
57
57
  Suppose you have a data directory `/data` and you'd want to set up the backup of the `/data/files` subdirectory
58
58
  into a backup directory `/mnt/backup`. The latter may be an ordinary directory or a mounted portable storage, or whatever.
59
59
 
60
- ### 1. Format the Mclone volumes
60
+ ### 1. Create volumes
61
61
 
62
62
  Mclone has a notion of a volume - a file system directory containing the `.mclone` file, which is used as a root directory
63
63
  for all Mclone operations.
@@ -100,7 +100,7 @@ $ mclone info
100
100
  Each volume is identified by the randomly generated tag shown within the square brackets `[...]`.
101
101
  _Obviously, the tags will be different in your case._
102
102
 
103
- ### 2. Create the Mclone task
103
+ ### 2. Create a task
104
104
 
105
105
  A Mclone task corresponds to a single Rclone command. It contains the source and destination volume identifiers,
106
106
  the source and destination subdirectories _relative to the respective volumes_,
@@ -152,7 +152,7 @@ portable storage directory it will be mounted in next time provided that it will
152
152
  The same applies to the Windows system where the portable storage can be appear as different disk drives and yet
153
153
  be detectable by the Mclone.
154
154
 
155
- ### 3. Modify the Mclone task
155
+ ### 3. Modify the task
156
156
 
157
157
  Once a task is created, its source and destination volumes and directories get fixed and can not be changed.
158
158
  Therefore the only way to modify it is to start from scratch preceded by the task deletion with the `mclone task delete` command.
data/lib/mclone.rb CHANGED
@@ -11,7 +11,7 @@ require 'securerandom'
11
11
  module Mclone
12
12
 
13
13
 
14
- VERSION = '0.1.0'
14
+ VERSION = '0.1.1'
15
15
 
16
16
 
17
17
  #
@@ -618,16 +618,18 @@ module Mclone
618
618
  end
619
619
  # TODO handle Windows variants
620
620
  when /^mingw/ # RubyInstaller's MRI
621
- require 'ffi'
622
- module FileAPI
623
- extend FFI::Library
624
- ffi_lib 'kernel32'
625
- ffi_convention :stdcall
626
- attach_function :disks_mask, :GetLogicalDrives, [], :ulong
627
- end
621
+ module Kernel32
622
+ require 'fiddle'
623
+ require 'fiddle/types'
624
+ require 'fiddle/import'
625
+ extend Fiddle::Importer
626
+ dlload('kernel32')
627
+ include Fiddle::Win32Types
628
+ extern 'DWORD WINAPI GetLogicalDrives()'
629
+ end
628
630
  def self.system_mounts
629
- mask = FileAPI.disks_mask
630
631
  mounts = []
632
+ mask = Kernel32.GetLogicalDrives
631
633
  ('A'..'Z').each do |x|
632
634
  mounts << "#{x}:" if mask & 1 == 1
633
635
  mask >>= 1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mclone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg A. Khlybov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-22 00:00:00.000000000 Z
11
+ date: 2021-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
- - !ruby/object:Gem::Dependency
28
- name: ffi
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.15'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.15'
41
27
  description:
42
28
  email:
43
29
  - fougas@mail.ru
@@ -46,7 +32,9 @@ executables:
46
32
  extensions: []
47
33
  extra_rdoc_files:
48
34
  - README.md
35
+ - CHANGES.md
49
36
  files:
37
+ - CHANGES.md
50
38
  - README.md
51
39
  - bin/mclone
52
40
  - lib/mclone.rb
@@ -69,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
57
  - !ruby/object:Gem::Version
70
58
  version: '0'
71
59
  requirements: []
72
- rubygems_version: 3.0.9
60
+ rubygems_version: 3.2.20
73
61
  signing_key:
74
62
  specification_version: 4
75
63
  summary: Rclone frontend for offline synchronization