bitbroker 0.1.3 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab60137b26ea57de405e7c97b3b6e832877b535f
4
- data.tar.gz: c35f901f321a971e14f4068b9b018efc5cb65637
3
+ metadata.gz: 1fceda5f170032b31df72a2af1ffb3dcf1d94857
4
+ data.tar.gz: b4069d436a8444c2485e06f972c75c2e7af2b54e
5
5
  SHA512:
6
- metadata.gz: 1fa4b107c58eae6def8e4d9b4e738b3a962dda78bc558475d765012c47d2fb7b19d1cef24c5d840afebe7e41e8d0496ab81aacdfadd5a8301168defa7773292b
7
- data.tar.gz: fc7adb67bd8f823c6095b26eca5024817b94a2483d046526e6d6307c4f4fbff46e2d130e30fcf9a3b1353bf0890b20fa7a0094cad9867828807781b61434636d
6
+ metadata.gz: f9b46f0b2679ef9a7f3d40191adb5ad4770927bc6e4f5aef33403e3c8fbe255960257dbad57af4f3e34eca9920aab179383c28f4b1cd812b62e6f26908879f71
7
+ data.tar.gz: c7d8560964d0b5bb64d7784fb4f5aed38fe45cf9eb30c948c2f68097c581f740565212e08f3340d1fab1705f985d0a28c7dd8f1cbae72f6f867b18430412b8a3
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fileutils'
4
+ require 'colorize'
5
+
6
+ TEMPLATE_PATH = "#{File.dirname(__FILE__)}/../static/.bitbroker"
7
+ BASEDIR = "#{ENV['HOME']}/.bitbroker"
8
+
9
+ if FileTest.exist? BASEDIR
10
+ puts "BitBroker is already initialized".yellow
11
+ exit 1
12
+ end
13
+
14
+ # initialize configuration dir
15
+ FileUtils.cp_r(TEMPLATE_PATH, BASEDIR)
16
+ puts "created #{BASEDIR}".green
17
+ puts <<EOS
18
+
19
+ ---
20
+ Please rename the file of 'config.example' to 'config'
21
+ in #{BASEDIR}, and modify it as appropriate.
22
+ EOS
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bitbroker'
4
+ require 'colorize'
4
5
 
5
6
  PIDFILE = BitBroker::Config.path_pid
6
7
  BitBroker::Log.level = Logger::DEBUG
7
8
 
8
9
  if FileTest.exists? PIDFILE
9
- puts "(NOTICE) bitbroker is now running"
10
+ puts "BitBroker is now running".yellow
10
11
  exit
11
12
  end
12
13
 
13
14
  BitBroker::Manager.start
14
15
 
15
- puts "bitbroker is started."
16
+ puts "scucessed to start BitBroker".green
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bitbroker'
4
+ require 'colorize'
4
5
 
5
6
  PIDFILE = BitBroker::Config.path_pid
6
7
 
@@ -14,7 +15,7 @@ def is_stopped? pid
14
15
  end
15
16
 
16
17
  unless FileTest.exists? PIDFILE
17
- puts "(NOTICE) bitbroker is not running"
18
+ puts "BitBroker is not running".yellow
18
19
  exit
19
20
  end
20
21
 
@@ -31,4 +32,4 @@ while pids.size > 0
31
32
  end
32
33
  File.unlink PIDFILE
33
34
 
34
- puts "bitbroker is stopped."
35
+ puts "successed to stop BitBroker".green
@@ -23,8 +23,10 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
24
  spec.add_development_dependency "rspec"
25
25
 
26
- spec.add_runtime_dependency "fileutils", "0.7"
27
26
  spec.add_runtime_dependency "msgpack", "0.7.1"
28
27
  spec.add_runtime_dependency "turnip", "2.0.1"
29
- spec.add_runtime_dependency "listen", "3.0"
28
+ spec.add_runtime_dependency "listen", "3.0.5"
29
+ spec.add_runtime_dependency "bunny", "2.2.1"
30
+ spec.add_runtime_dependency "macaddr", "1.7.1"
31
+ spec.add_runtime_dependency "colorize", "0.7.7"
30
32
  end
@@ -2,7 +2,7 @@ require 'yaml'
2
2
 
3
3
  module BitBroker
4
4
  class Config
5
- DEFAULT_PATH_CONFIG = "#{ENV['HOME']}/.bitbroker/config.yml"
5
+ DEFAULT_PATH_CONFIG = "#{ENV['HOME']}/.bitbroker/config"
6
6
  DEFAULT_PATH_PID = "#{ENV['HOME']}/.bitbroker/pid"
7
7
 
8
8
  def self.[](param)
@@ -1,3 +1,3 @@
1
1
  module Bitbroker
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -0,0 +1,29 @@
1
+ ### NOTE ###
2
+ # This configuration file is written in YAML format.
3
+ # The configuration of bitbroker is consist of two components.
4
+ #
5
+ # - One is the configuration of MQ (Message Queue) environment
6
+ # which is described as 'mqconfig' in this file.
7
+ # - Another is the configurations about directory which is shared
8
+ # with nodes you want to. This is described as 'directories'.
9
+ #
10
+
11
+ ### MQ configuration ###
12
+ # This configuration is mandatory for running bitbroker
13
+ #
14
+ mqconfig:
15
+ user: mq-user
16
+ host: mq-host
17
+ vhost: /
18
+ passwd: mq-password
19
+
20
+ ### Directory Configuration ###
21
+ # This configuration has two attributes that are 'name' and 'path'
22
+ #
23
+ # - 'path' describes shared-directory path you want to share in the local machine.
24
+ # - 'name' describes a label of shared-directory. This attribute must be shared
25
+ # with each nodes corresponding to the shared-directory.
26
+ #
27
+ directories:
28
+ # - name: label-of-shared-directory
29
+ # path: /tmp/shared-directory-path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bitbroker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyasu OHYAMA
@@ -53,65 +53,94 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: fileutils
56
+ name: msgpack
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0.7'
61
+ version: 0.7.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '0.7'
68
+ version: 0.7.1
69
69
  - !ruby/object:Gem::Dependency
70
- name: msgpack
70
+ name: turnip
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.7.1
75
+ version: 2.0.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.7.1
82
+ version: 2.0.1
83
83
  - !ruby/object:Gem::Dependency
84
- name: turnip
84
+ name: listen
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 2.0.1
89
+ version: 3.0.5
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: 2.0.1
96
+ version: 3.0.5
97
97
  - !ruby/object:Gem::Dependency
98
- name: listen
98
+ name: bunny
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 2.2.1
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 2.2.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: macaddr
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 1.7.1
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 1.7.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: colorize
99
127
  requirement: !ruby/object:Gem::Requirement
100
128
  requirements:
101
129
  - - '='
102
130
  - !ruby/object:Gem::Version
103
- version: '3.0'
131
+ version: 0.7.7
104
132
  type: :runtime
105
133
  prerelease: false
106
134
  version_requirements: !ruby/object:Gem::Requirement
107
135
  requirements:
108
136
  - - '='
109
137
  - !ruby/object:Gem::Version
110
- version: '3.0'
138
+ version: 0.7.7
111
139
  description: Yet another File Synchronize Software using AMQP
112
140
  email:
113
141
  - user.localhost2000@gmail.com
114
142
  executables:
143
+ - bitbroker-init
115
144
  - bitbroker-start
116
145
  - bitbroker-stop
117
146
  - console
@@ -126,6 +155,7 @@ files:
126
155
  - LICENSE.txt
127
156
  - README.md
128
157
  - Rakefile
158
+ - bin/bitbroker-init
129
159
  - bin/bitbroker-start
130
160
  - bin/bitbroker-stop
131
161
  - bin/console
@@ -142,6 +172,7 @@ files:
142
172
  - lib/bitbroker/observer.rb
143
173
  - lib/bitbroker/solvant.rb
144
174
  - lib/bitbroker/version.rb
175
+ - static/.bitbroker/config.example
145
176
  homepage: https://github.com/userlocalhost2000/bitbroker
146
177
  licenses:
147
178
  - MIT