copydrone 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a590bf7c7959298fd7aded3fac5e5e6f70e8d051ad794df4c926aef4c3a9d17
4
- data.tar.gz: 172275f4ff3ca6e1d16470ed47e0fad37582c1c3f7c4a55f7552d3454ee82a67
3
+ metadata.gz: a3af9cddcf85499b28074994f5b73dd88c6283d684a6d9fe92e4109ff3331ff6
4
+ data.tar.gz: da9ed4d8df29b06891cb2afafbfca51d17d9e9c688653c01eab243cf36907fbd
5
5
  SHA512:
6
- metadata.gz: 213bf893bfbb01ce10b1b15cb514c022ba2278d7cdd412a17f7a88ac22a52c90d4c9e503af4536575c7f01fc1abe4b441d1a02ae6af6e9110891853c569472fe
7
- data.tar.gz: '0305386d2788bc09c6479a6a58ae786ff75cad9f84a29f8e17c549c79c7daaab7401937337e16a9fd125128e2222f81b6325c3f675fd47d79eb1a398da80bb68'
6
+ metadata.gz: 05b2d0dcb72339064acf3960a7e301f0673501af2aca80761541d0b5b4b8db5370b3bcdaaecb114697e33bbadc518ff821cb7b1c732aec457b6ee9239e936773
7
+ data.tar.gz: ba1b49614d7363bcee7d1c66256ad724392c3c83c2e5a24ab141a746e1bb88f6a1f1912b8f97c3562e60716bf1b3548647b882684f17b9e4dc2246a53359f874
@@ -0,0 +1,18 @@
1
+ module Copydrone
2
+ module Rails
3
+ def self.initialize
4
+ Copydrone.configure(false) do |config|
5
+ config.environment_name = ::Rails.env
6
+ config.logger = ::Rails.logger
7
+ config.framework = "Rails: #{::Rails::VERSION::STRING}"
8
+ config.middleware = ::Rails.configuration.middleware
9
+ end
10
+ end
11
+ end
12
+ end
13
+
14
+ if defined?(Rails::Railtie)
15
+ require 'copudrone/railtie'
16
+ else
17
+ Copydrone::Rails.initialize
18
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Copydrone
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
data/lib/copydrone.rb CHANGED
@@ -1,15 +1,16 @@
1
1
  require 'copydrone/version'
2
+ require 'copydrone/configuration'
2
3
 
3
4
  module Copydrone
4
- def self.included(base)
5
- base.class_eval do
6
- extend ClassMethods
7
- end
5
+ def self.configure(apply = true)
6
+ self.configuration ||= Configuration.new
7
+
8
+ yield configuration
9
+
10
+ configuration.apply if apply
8
11
  end
9
12
 
10
- module ClassMethods
11
- def hi
12
- puts "Hello From Copydrone"
13
- end
13
+ if defined? Rails
14
+ require 'copydrone/rails'
14
15
  end
15
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copydrone
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
  - Sergii Demianchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-28 00:00:00.000000000 Z
11
+ date: 2023-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -45,6 +45,7 @@ extensions: []
45
45
  extra_rdoc_files: []
46
46
  files:
47
47
  - lib/copydrone.rb
48
+ - lib/copydrone/rails.rb
48
49
  - lib/copydrone/version.rb
49
50
  homepage: https://github.com/systemu-net/copydrone
50
51
  licenses:
@@ -68,5 +69,5 @@ requirements: []
68
69
  rubygems_version: 3.1.6
69
70
  signing_key:
70
71
  specification_version: 4
71
- summary: Simple copydrone implementation
72
+ summary: Main copydrone implementation
72
73
  test_files: []