multi_sync 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/README.md +100 -56
  4. data/lib/multi_sync/attributes/pathname.rb +12 -0
  5. data/lib/multi_sync/client.rb +34 -36
  6. data/lib/multi_sync/configuration.rb +3 -5
  7. data/lib/multi_sync/extensions/middleman.rb +1 -1
  8. data/lib/multi_sync/extensions/rails/asset_sync.rb +2 -2
  9. data/lib/multi_sync/extensions/rails.rb +1 -1
  10. data/lib/multi_sync/logging.rb +2 -2
  11. data/lib/multi_sync/resource.rb +15 -32
  12. data/lib/multi_sync/resources/local_resource.rb +1 -0
  13. data/lib/multi_sync/resources/remote_resource.rb +1 -4
  14. data/lib/multi_sync/source.rb +10 -22
  15. data/lib/multi_sync/sources/manifest_source.rb +2 -2
  16. data/lib/multi_sync/target.rb +5 -16
  17. data/lib/multi_sync/targets/aws_target.rb +7 -10
  18. data/lib/multi_sync/targets/local_target.rb +6 -9
  19. data/lib/multi_sync/version.rb +1 -1
  20. data/lib/multi_sync.rb +1 -1
  21. data/lib/tasks/multi_sync_rails.rake +8 -2
  22. data/multi_sync.gemspec +2 -2
  23. data/spec/unit/multi_sync/client_spec.rb +3 -0
  24. data/spec/unit/multi_sync/resources/local_resource_spec.rb +6 -8
  25. data/spec/unit/multi_sync_spec.rb +0 -8
  26. metadata +7 -106
  27. data/examples/custom.rb +0 -34
  28. data/examples/rails-3-2/.gitignore +0 -15
  29. data/examples/rails-3-2/Gemfile +0 -43
  30. data/examples/rails-3-2/README.rdoc +0 -261
  31. data/examples/rails-3-2/Rakefile +0 -7
  32. data/examples/rails-3-2/app/assets/images/rails.png +0 -0
  33. data/examples/rails-3-2/app/assets/javascripts/application.js +0 -15
  34. data/examples/rails-3-2/app/assets/stylesheets/application.css +0 -13
  35. data/examples/rails-3-2/app/controllers/application_controller.rb +0 -3
  36. data/examples/rails-3-2/app/helpers/application_helper.rb +0 -2
  37. data/examples/rails-3-2/app/mailers/.gitkeep +0 -0
  38. data/examples/rails-3-2/app/models/.gitkeep +0 -0
  39. data/examples/rails-3-2/app/views/layouts/application.html.erb +0 -14
  40. data/examples/rails-3-2/config/application.rb +0 -62
  41. data/examples/rails-3-2/config/asset_sync.yml +0 -21
  42. data/examples/rails-3-2/config/boot.rb +0 -6
  43. data/examples/rails-3-2/config/database.yml +0 -25
  44. data/examples/rails-3-2/config/environment.rb +0 -5
  45. data/examples/rails-3-2/config/environments/development.rb +0 -37
  46. data/examples/rails-3-2/config/environments/production.rb +0 -67
  47. data/examples/rails-3-2/config/environments/test.rb +0 -37
  48. data/examples/rails-3-2/config/initializers/backtrace_silencers.rb +0 -7
  49. data/examples/rails-3-2/config/initializers/inflections.rb +0 -15
  50. data/examples/rails-3-2/config/initializers/mime_types.rb +0 -5
  51. data/examples/rails-3-2/config/initializers/multi_sync.rb +0 -29
  52. data/examples/rails-3-2/config/initializers/secret_token.rb +0 -7
  53. data/examples/rails-3-2/config/initializers/session_store.rb +0 -8
  54. data/examples/rails-3-2/config/initializers/wrap_parameters.rb +0 -14
  55. data/examples/rails-3-2/config/locales/en.yml +0 -5
  56. data/examples/rails-3-2/config/routes.rb +0 -58
  57. data/examples/rails-3-2/config.ru +0 -4
  58. data/examples/rails-3-2/db/seeds.rb +0 -7
  59. data/examples/rails-3-2/lib/assets/.gitkeep +0 -0
  60. data/examples/rails-3-2/lib/tasks/.gitkeep +0 -0
  61. data/examples/rails-3-2/log/.gitkeep +0 -0
  62. data/examples/rails-3-2/public/404.html +0 -26
  63. data/examples/rails-3-2/public/422.html +0 -26
  64. data/examples/rails-3-2/public/500.html +0 -25
  65. data/examples/rails-3-2/public/favicon.ico +0 -0
  66. data/examples/rails-3-2/public/index.html +0 -241
  67. data/examples/rails-3-2/public/robots.txt +0 -5
  68. data/examples/rails-3-2/script/rails +0 -6
  69. data/examples/rails-3-2/test/fixtures/.gitkeep +0 -0
  70. data/examples/rails-3-2/test/functional/.gitkeep +0 -0
  71. data/examples/rails-3-2/test/integration/.gitkeep +0 -0
  72. data/examples/rails-3-2/test/performance/browsing_test.rb +0 -12
  73. data/examples/rails-3-2/test/test_helper.rb +0 -13
  74. data/examples/rails-3-2/test/unit/.gitkeep +0 -0
  75. data/examples/rails-4-0/.gitignore +0 -16
  76. data/examples/rails-4-0/Gemfile +0 -50
  77. data/examples/rails-4-0/README.rdoc +0 -28
  78. data/examples/rails-4-0/Rakefile +0 -6
  79. data/examples/rails-4-0/app/assets/images/.keep +0 -0
  80. data/examples/rails-4-0/app/assets/javascripts/application.js +0 -16
  81. data/examples/rails-4-0/app/assets/stylesheets/application.css +0 -13
  82. data/examples/rails-4-0/app/controllers/application_controller.rb +0 -5
  83. data/examples/rails-4-0/app/controllers/concerns/.keep +0 -0
  84. data/examples/rails-4-0/app/helpers/application_helper.rb +0 -2
  85. data/examples/rails-4-0/app/mailers/.keep +0 -0
  86. data/examples/rails-4-0/app/models/.keep +0 -0
  87. data/examples/rails-4-0/app/models/concerns/.keep +0 -0
  88. data/examples/rails-4-0/app/views/layouts/application.html.erb +0 -14
  89. data/examples/rails-4-0/bin/bundle +0 -3
  90. data/examples/rails-4-0/bin/rails +0 -4
  91. data/examples/rails-4-0/bin/rake +0 -4
  92. data/examples/rails-4-0/config/application.rb +0 -24
  93. data/examples/rails-4-0/config/asset_sync.yml +0 -21
  94. data/examples/rails-4-0/config/boot.rb +0 -4
  95. data/examples/rails-4-0/config/database.yml +0 -25
  96. data/examples/rails-4-0/config/environment.rb +0 -5
  97. data/examples/rails-4-0/config/environments/development.rb +0 -29
  98. data/examples/rails-4-0/config/environments/production.rb +0 -80
  99. data/examples/rails-4-0/config/environments/test.rb +0 -36
  100. data/examples/rails-4-0/config/initializers/backtrace_silencers.rb +0 -7
  101. data/examples/rails-4-0/config/initializers/filter_parameter_logging.rb +0 -4
  102. data/examples/rails-4-0/config/initializers/inflections.rb +0 -16
  103. data/examples/rails-4-0/config/initializers/mime_types.rb +0 -5
  104. data/examples/rails-4-0/config/initializers/multi_sync.rb +0 -29
  105. data/examples/rails-4-0/config/initializers/secret_token.rb +0 -12
  106. data/examples/rails-4-0/config/initializers/session_store.rb +0 -3
  107. data/examples/rails-4-0/config/initializers/wrap_parameters.rb +0 -14
  108. data/examples/rails-4-0/config/locales/en.yml +0 -23
  109. data/examples/rails-4-0/config/routes.rb +0 -56
  110. data/examples/rails-4-0/config.ru +0 -4
  111. data/examples/rails-4-0/db/seeds.rb +0 -7
  112. data/examples/rails-4-0/lib/assets/.keep +0 -0
  113. data/examples/rails-4-0/lib/tasks/.keep +0 -0
  114. data/examples/rails-4-0/log/.keep +0 -0
  115. data/examples/rails-4-0/public/404.html +0 -58
  116. data/examples/rails-4-0/public/422.html +0 -58
  117. data/examples/rails-4-0/public/500.html +0 -57
  118. data/examples/rails-4-0/public/favicon.ico +0 -0
  119. data/examples/rails-4-0/public/robots.txt +0 -5
  120. data/examples/rails-4-0/test/controllers/.keep +0 -0
  121. data/examples/rails-4-0/test/fixtures/.keep +0 -0
  122. data/examples/rails-4-0/test/helpers/.keep +0 -0
  123. data/examples/rails-4-0/test/integration/.keep +0 -0
  124. data/examples/rails-4-0/test/mailers/.keep +0 -0
  125. data/examples/rails-4-0/test/models/.keep +0 -0
  126. data/examples/rails-4-0/test/test_helper.rb +0 -15
@@ -3,31 +3,20 @@ require 'lazily'
3
3
  require 'virtus'
4
4
  require 'pathname'
5
5
  require 'celluloid'
6
+ require 'multi_sync/attributes/pathname'
6
7
  require 'multi_sync/mixins/log_helper'
7
8
 
8
9
  module MultiSync
9
10
  class Target
10
- include Virtus
11
11
  include Celluloid
12
+ include Virtus.model
12
13
  include MultiSync::Mixins::LogHelper
13
-
14
- attribute :connection
15
- attribute :target_dir, Pathname
16
- attribute :destination_dir, Pathname
14
+
15
+ attribute :target_dir, MultiSync::Attributes::Pathname, default: Pathname.new('')
16
+ attribute :destination_dir, MultiSync::Attributes::Pathname, default: Pathname.new('')
17
17
  attribute :credentials, Hash, default: :default_credentials
18
18
 
19
- # Initialize a new Target object
20
- #
21
- # @param options [Hash]
22
- def initialize(options = {})
23
- fail(ArgumentError, 'target_dir must be present') unless options[:target_dir]
24
- self.target_dir = Pathname.new(options.fetch(:target_dir, ''))
25
- self.destination_dir = Pathname.new(options.fetch(:destination_dir, ''))
26
- credentials.merge!(options.fetch(:credentials, {}))
27
- end
28
-
29
19
  def default_credentials
30
- # deep clone just in case
31
20
  Marshal.load(Marshal.dump(MultiSync.credentials))
32
21
  end
33
22
  end
@@ -3,13 +3,10 @@ require 'multi_sync/resources/remote_resource'
3
3
 
4
4
  module MultiSync
5
5
  class AwsTarget < Target
6
- # Initialize a new AwsTarget object
7
- #
8
- # @param options [Hash]
9
- def initialize(options = {})
10
- super(options)
11
- self.connection = ::Fog::Storage.new(credentials.merge(provider: :aws))
12
- end
6
+
7
+ attribute :connection, Fog::Storage, lazy: true, default: lambda { |target, attribute|
8
+ Fog::Storage.new(target.credentials.merge(provider: :aws))
9
+ }
13
10
 
14
11
  def files
15
12
  files = []
@@ -26,8 +23,8 @@ module MultiSync
26
23
 
27
24
  files << MultiSync::RemoteResource.new(
28
25
  file: file,
29
- with_root: target_dir + pathname, # pathname seems to already have the prefix (destination_dir)
30
- without_root: destination_dir != '' ? pathname.relative_path_from(destination_dir).cleanpath : pathname
26
+ path_with_root: target_dir + pathname, # pathname seems to already have the prefix (destination_dir)
27
+ path_without_root: destination_dir != '' ? pathname.relative_path_from(destination_dir).cleanpath : pathname
31
28
  )
32
29
 
33
30
  }
@@ -58,7 +55,7 @@ module MultiSync
58
55
  end
59
56
 
60
57
  def delete(resource)
61
- MultiSync.say_status :upload, resource.path_without_root.to_s
58
+ MultiSync.say_status :delete, resource.path_without_root.to_s
62
59
  MultiSync.debug "Delete #{resource.class_name}:'#{resource.path_without_root}' from #{class_name}:'#{File.join('/', target_dir + destination_dir)}'"
63
60
  connection.delete_object(target_dir.to_s, (destination_dir + resource.path_without_root).to_s)
64
61
  resource
@@ -3,13 +3,10 @@ require 'multi_sync/resources/remote_resource'
3
3
 
4
4
  module MultiSync
5
5
  class LocalTarget < Target
6
- # Initialize a new LocalTarget object
7
- #
8
- # @param options [Hash]
9
- def initialize(options = {})
10
- super(options)
11
- self.connection = ::Fog::Storage.new(credentials.merge(provider: :local))
12
- end
6
+
7
+ attribute :connection, Fog::Storage, lazy: true, default: lambda { |target, attribute|
8
+ Fog::Storage.new(target.credentials.merge(provider: :local))
9
+ }
13
10
 
14
11
  def files
15
12
  files = []
@@ -28,8 +25,8 @@ module MultiSync
28
25
 
29
26
  files << MultiSync::RemoteResource.new(
30
27
  file: file,
31
- with_root: target_dir + destination_dir + pathname,
32
- without_root: pathname
28
+ path_with_root: target_dir + destination_dir + pathname,
29
+ path_without_root: pathname
33
30
  )
34
31
 
35
32
  }
@@ -1,3 +1,3 @@
1
1
  module MultiSync
2
- VERSION = '0.0.1' unless defined?(MultiSync::VERSION)
2
+ VERSION = '0.0.2' unless defined?(MultiSync::VERSION)
3
3
  end
data/lib/multi_sync.rb CHANGED
@@ -80,7 +80,7 @@ module MultiSync
80
80
  self.reset_configuration!
81
81
  end
82
82
 
83
- # by rescuing from a LoadError we can sniff out gems in use and try to automagically hook into them
83
+ # By rescuing from a LoadError we can sniff out gems in use and try to automatically hook into them
84
84
  REQUIREMENT_MAP.each do |library, extension|
85
85
  begin
86
86
  require library
@@ -5,11 +5,17 @@ namespace :assets do
5
5
  task :sync => :environment do
6
6
  ActiveSupport::Notifications.instrument 'multi_sync.run' do
7
7
  MultiSync::Extensions::AssetSync.check_and_migrate
8
- MultiSync.run
8
+ MultiSync.run if MultiSync.run_on_build
9
9
  end
10
10
  end
11
11
  end
12
12
 
13
13
  Rake::Task['assets:precompile'].enhance do
14
- Rake::Task['assets:sync'].invoke if defined?(MultiSync) && MultiSync.run_on_build
14
+ Rake::Task['assets:sync'].invoke if defined?(MultiSync)
15
+ end
16
+
17
+ if Rake::Task.task_defined?('assets:precompile:nondigest')
18
+ Rake::Task['assets:precompile:nondigest'].enhance do
19
+ Rake::Task['assets:sync'].invoke if defined?(MultiSync)
20
+ end
15
21
  end
data/multi_sync.gemspec CHANGED
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
  spec.required_ruby_version = '>= 1.9.3'
21
21
 
22
- spec.add_dependency 'fog', '~> 1.12'
22
+ spec.add_dependency 'fog', '~> 1.2'
23
23
  spec.add_dependency 'lazily', '~> 0.1'
24
- spec.add_dependency 'virtus', '~> 0.5'
24
+ spec.add_dependency 'virtus', '~> 1.0'
25
25
  spec.add_dependency 'celluloid', '~> 0.15'
26
26
  spec.add_dependency 'multi_mime', '~> 1.0'
27
27
  spec.add_dependency 'multi_json', '~> 1.7'
@@ -296,6 +296,9 @@ describe MultiSync::Client, fakefs: true do
296
296
  expect(without_destination_dir_target).to have(3).files
297
297
  end
298
298
  end
299
+
300
+ context 'with resource_options' do
301
+ end
299
302
  end
300
303
  end
301
304
  end
@@ -9,10 +9,8 @@ describe MultiSync::LocalResource, fakefs: true do
9
9
  describe :local do
10
10
  context :valid do
11
11
  it 'should return correct file details' do
12
- resource = MultiSync::LocalResource.new(
13
- with_root: Pathname.new('/tmp/local-resource/foo.txt'),
14
- without_root: Pathname.new('foo.txt')
15
- )
12
+ # binding.pry
13
+ resource = MultiSync::LocalResource.new(path_with_root: Pathname.new('/tmp/local-resource/foo.txt'), path_without_root: Pathname.new('foo.txt'))
16
14
  expect(resource.body).to eq 'foo'
17
15
  expect(resource.content_length).to eq 3
18
16
  expect(resource.content_type).to eq 'text/plain'
@@ -24,8 +22,8 @@ describe MultiSync::LocalResource, fakefs: true do
24
22
  context :known do
25
23
  it 'should return correct file details (with overwritten info)' do
26
24
  resource = MultiSync::LocalResource.new(
27
- with_root: Pathname.new('/tmp/local-resource/foo.txt'),
28
- without_root: Pathname.new('foo.txt'),
25
+ path_with_root: Pathname.new('/tmp/local-resource/foo.txt'),
26
+ path_without_root: Pathname.new('foo.txt'),
29
27
  content_length: 42,
30
28
  mtime: Time.now - 1,
31
29
  etag: 'etag'
@@ -41,8 +39,8 @@ describe MultiSync::LocalResource, fakefs: true do
41
39
  context :unknown do
42
40
  it 'should return default file details' do
43
41
  resource = MultiSync::LocalResource.new(
44
- with_root: Pathname.new('/tmp/local-resource/missing.txt'),
45
- without_root: Pathname.new('missing.txt')
42
+ path_with_root: Pathname.new('/tmp/local-resource/missing.txt'),
43
+ path_without_root: Pathname.new('missing.txt')
46
44
  )
47
45
  expect(resource.body).to eq nil
48
46
  expect(resource.content_length).to eq 0
@@ -1,9 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe MultiSync do
4
-
5
4
  context :methods do
6
-
7
5
  describe :version do
8
6
  subject { MultiSync::VERSION }
9
7
  it { should be_kind_of(String) }
@@ -33,13 +31,10 @@ describe MultiSync do
33
31
  subject { MultiSync.respond_to?(:configure) }
34
32
  it { should be_true }
35
33
  end
36
-
37
34
  end
38
35
 
39
36
  context :configure do
40
-
41
37
  it 'should allow you to set configuration' do
42
-
43
38
  MultiSync.configure do |config|
44
39
  config.verbose = true
45
40
  config.target_pool_size = 2
@@ -47,9 +42,6 @@ describe MultiSync do
47
42
 
48
43
  expect(MultiSync.verbose).to be_true
49
44
  expect(MultiSync.target_pool_size).to be 2
50
-
51
45
  end
52
-
53
46
  end
54
-
55
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Freeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-03 00:00:00.000000000 Z
11
+ date: 2014-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.12'
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.12'
26
+ version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: lazily
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.5'
47
+ version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.5'
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: celluloid
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -196,110 +196,11 @@ files:
196
196
  - LICENSE.md
197
197
  - README.md
198
198
  - Rakefile
199
- - examples/custom.rb
200
- - examples/rails-3-2/.gitignore
201
- - examples/rails-3-2/Gemfile
202
- - examples/rails-3-2/README.rdoc
203
- - examples/rails-3-2/Rakefile
204
- - examples/rails-3-2/app/assets/images/rails.png
205
- - examples/rails-3-2/app/assets/javascripts/application.js
206
- - examples/rails-3-2/app/assets/stylesheets/application.css
207
- - examples/rails-3-2/app/controllers/application_controller.rb
208
- - examples/rails-3-2/app/helpers/application_helper.rb
209
- - examples/rails-3-2/app/mailers/.gitkeep
210
- - examples/rails-3-2/app/models/.gitkeep
211
- - examples/rails-3-2/app/views/layouts/application.html.erb
212
- - examples/rails-3-2/config.ru
213
- - examples/rails-3-2/config/application.rb
214
- - examples/rails-3-2/config/asset_sync.yml
215
- - examples/rails-3-2/config/boot.rb
216
- - examples/rails-3-2/config/database.yml
217
- - examples/rails-3-2/config/environment.rb
218
- - examples/rails-3-2/config/environments/development.rb
219
- - examples/rails-3-2/config/environments/production.rb
220
- - examples/rails-3-2/config/environments/test.rb
221
- - examples/rails-3-2/config/initializers/backtrace_silencers.rb
222
- - examples/rails-3-2/config/initializers/inflections.rb
223
- - examples/rails-3-2/config/initializers/mime_types.rb
224
- - examples/rails-3-2/config/initializers/multi_sync.rb
225
- - examples/rails-3-2/config/initializers/secret_token.rb
226
- - examples/rails-3-2/config/initializers/session_store.rb
227
- - examples/rails-3-2/config/initializers/wrap_parameters.rb
228
- - examples/rails-3-2/config/locales/en.yml
229
- - examples/rails-3-2/config/routes.rb
230
- - examples/rails-3-2/db/seeds.rb
231
- - examples/rails-3-2/lib/assets/.gitkeep
232
- - examples/rails-3-2/lib/tasks/.gitkeep
233
- - examples/rails-3-2/log/.gitkeep
234
- - examples/rails-3-2/public/404.html
235
- - examples/rails-3-2/public/422.html
236
- - examples/rails-3-2/public/500.html
237
- - examples/rails-3-2/public/favicon.ico
238
- - examples/rails-3-2/public/index.html
239
- - examples/rails-3-2/public/robots.txt
240
- - examples/rails-3-2/script/rails
241
- - examples/rails-3-2/test/fixtures/.gitkeep
242
- - examples/rails-3-2/test/functional/.gitkeep
243
- - examples/rails-3-2/test/integration/.gitkeep
244
- - examples/rails-3-2/test/performance/browsing_test.rb
245
- - examples/rails-3-2/test/test_helper.rb
246
- - examples/rails-3-2/test/unit/.gitkeep
247
- - examples/rails-4-0/.gitignore
248
- - examples/rails-4-0/Gemfile
249
- - examples/rails-4-0/README.rdoc
250
- - examples/rails-4-0/Rakefile
251
- - examples/rails-4-0/app/assets/images/.keep
252
- - examples/rails-4-0/app/assets/javascripts/application.js
253
- - examples/rails-4-0/app/assets/stylesheets/application.css
254
- - examples/rails-4-0/app/controllers/application_controller.rb
255
- - examples/rails-4-0/app/controllers/concerns/.keep
256
- - examples/rails-4-0/app/helpers/application_helper.rb
257
- - examples/rails-4-0/app/mailers/.keep
258
- - examples/rails-4-0/app/models/.keep
259
- - examples/rails-4-0/app/models/concerns/.keep
260
- - examples/rails-4-0/app/views/layouts/application.html.erb
261
- - examples/rails-4-0/bin/bundle
262
- - examples/rails-4-0/bin/rails
263
- - examples/rails-4-0/bin/rake
264
- - examples/rails-4-0/config.ru
265
- - examples/rails-4-0/config/application.rb
266
- - examples/rails-4-0/config/asset_sync.yml
267
- - examples/rails-4-0/config/boot.rb
268
- - examples/rails-4-0/config/database.yml
269
- - examples/rails-4-0/config/environment.rb
270
- - examples/rails-4-0/config/environments/development.rb
271
- - examples/rails-4-0/config/environments/production.rb
272
- - examples/rails-4-0/config/environments/test.rb
273
- - examples/rails-4-0/config/initializers/backtrace_silencers.rb
274
- - examples/rails-4-0/config/initializers/filter_parameter_logging.rb
275
- - examples/rails-4-0/config/initializers/inflections.rb
276
- - examples/rails-4-0/config/initializers/mime_types.rb
277
- - examples/rails-4-0/config/initializers/multi_sync.rb
278
- - examples/rails-4-0/config/initializers/secret_token.rb
279
- - examples/rails-4-0/config/initializers/session_store.rb
280
- - examples/rails-4-0/config/initializers/wrap_parameters.rb
281
- - examples/rails-4-0/config/locales/en.yml
282
- - examples/rails-4-0/config/routes.rb
283
- - examples/rails-4-0/db/seeds.rb
284
- - examples/rails-4-0/lib/assets/.keep
285
- - examples/rails-4-0/lib/tasks/.keep
286
- - examples/rails-4-0/log/.keep
287
- - examples/rails-4-0/public/404.html
288
- - examples/rails-4-0/public/422.html
289
- - examples/rails-4-0/public/500.html
290
- - examples/rails-4-0/public/favicon.ico
291
- - examples/rails-4-0/public/robots.txt
292
- - examples/rails-4-0/test/controllers/.keep
293
- - examples/rails-4-0/test/fixtures/.keep
294
- - examples/rails-4-0/test/helpers/.keep
295
- - examples/rails-4-0/test/integration/.keep
296
- - examples/rails-4-0/test/mailers/.keep
297
- - examples/rails-4-0/test/models/.keep
298
- - examples/rails-4-0/test/test_helper.rb
299
199
  - gemfiles/middleman-3.1.x.gemfile
300
200
  - gemfiles/rails-3.2.x.gemfile
301
201
  - gemfiles/rails-4.0.x.gemfile
302
202
  - lib/multi_sync.rb
203
+ - lib/multi_sync/attributes/pathname.rb
303
204
  - lib/multi_sync/client.rb
304
205
  - lib/multi_sync/configuration.rb
305
206
  - lib/multi_sync/environment.rb
data/examples/custom.rb DELETED
@@ -1,34 +0,0 @@
1
- require "multi_sync"
2
-
3
- MultiSync.configuration do |config|
4
- # config.verbose = false # turn on verbose logging (defaults to false)
5
- # config.force = false # force syncing of outdated_files (defaults to false)
6
- # config.run_on_build = true # when within a framework which `builds` assets, whether to sync afterwards (defaults to true)
7
- # config.sync_outdated_files = true # when an outdated file is found whether to replace it (defaults to true)
8
- # config.delete_abandoned_files = true # when an abondoned file is found whether to remove it (defaults to true)
9
- # config.upload_missing_files = true # when a missing file is found whether to upload it (defaults to true)
10
- # config.target_pool_size = 8 # how many threads you would like to open for each target (defaults to the amount of CPU core's your machine has)
11
- # config.max_sync_attempts = 1 # how many times a file should be retried if there was an error during sync (defaults to 3)
12
- end
13
-
14
- MultiSync.run do
15
-
16
- source :build {
17
- :type => :local, # :local is the source's type, current options are :local, :manifest
18
- :source_dir => "/path_to_your_build_folder",
19
- :targets => [ :www ] # an array of target names that this source should sync against
20
- # targets optional? default to all
21
- }
22
-
23
- target :www {
24
- :type => :aws, # :aws is the target's type, current options are :aws
25
- :target_dir => "your_aws_bucket",
26
- :destination_dir => "an_optional_directory_inside_your_aws_bucket",
27
- :credentials => {
28
- :region => "us-east-1",
29
- :aws_access_key_id => "super_secret",
30
- :aws_secret_access_key => "super_secret"
31
- }
32
- }
33
-
34
- end
@@ -1,15 +0,0 @@
1
- # See http://help.github.com/ignore-files/ for more about ignoring files.
2
- #
3
- # If you find yourself ignoring temporary files generated by your text editor
4
- # or operating system, you probably want to add a global ignore instead:
5
- # git config --global core.excludesfile ~/.gitignore_global
6
-
7
- # Ignore bundler config
8
- /.bundle
9
-
10
- # Ignore the default SQLite database.
11
- /db/*.sqlite3
12
-
13
- # Ignore all logfiles and tempfiles.
14
- /log/*.log
15
- /tmp
@@ -1,43 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rails', '~> 3.2'
4
-
5
- # Bundle edge Rails instead:
6
- # gem 'rails', :git => 'git://github.com/rails/rails.git'
7
-
8
- gem 'sqlite3'
9
-
10
-
11
- # Gems used only for assets and not required
12
- # in production environments by default.
13
- group :assets do
14
- gem 'sass-rails', '~> 3.2.3'
15
- gem 'coffee-rails', '~> 3.2.1'
16
-
17
- # See https://github.com/sstephenson/execjs#readme for more supported runtimes
18
- # gem 'therubyracer', :platforms => :ruby
19
-
20
- gem 'uglifier', '>= 1.0.3'
21
- end
22
-
23
- gem 'jquery-rails'
24
-
25
- # To use ActiveModel has_secure_password
26
- # gem 'bcrypt-ruby', '~> 3.0.0'
27
-
28
- # To use Jbuilder templates for JSON
29
- # gem 'jbuilder'
30
-
31
- # Use unicorn as the app server
32
- # gem 'unicorn'
33
-
34
- # Deploy with Capistrano
35
- # gem 'capistrano'
36
-
37
- # To use debugger
38
- # gem 'debugger'
39
-
40
- gem 'awesome_print', :require => 'awesome_print'
41
- gem 'celluloid', :github => 'celluloid/celluloid'
42
- gem 'multi_mime', :github => 'karlfreeman/multi_mime'
43
- gem 'multi_sync', :path => '../../'