serf_handler 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: d33048b27550b3dca5819f6169b83bae581b64be
4
- data.tar.gz: 8b9b281100c01c077e04c3fc8babe5246e91c598
3
+ metadata.gz: 00eea1fb24bfec8dfead8736d7cb23440912bf85
4
+ data.tar.gz: 0782038b311bda6e41a695ef20fd03ac053dec9b
5
5
  SHA512:
6
- metadata.gz: 7e65bf47996eadf228055a613601549c9fd61a2182f54c1e4e3e39168eef2a07e29b1bbf1d49a8e56fae7338d3100562d65c5d8ef518db9eb02580c444db09d5
7
- data.tar.gz: 0682ee1ea57d4839e7fb94f46cb3be42d3cb9fb93071d25ecbca52d2e6018a7bdf1034b355603cbfe9ed603a5e596f09f68abe27e7ab90d18277be058a31a91c
6
+ metadata.gz: 54ce860d1c4a1c108d661b56708dab420912cad330707593b66404cb2fb01e0bb9a9960071ae7f9e426ed19560756e28a1f5cd67d1af9e77e2f12cc16708085c
7
+ data.tar.gz: c080b5a54e9cc28aded5a503015f0de1ed5658c753707deaa5a9e0382f413960effcfda3bb7f673b9278c51535760539c4e513f8df0907f428916f03eebd68e4
data/.gitignore CHANGED
@@ -20,4 +20,4 @@ vendor
20
20
  *~
21
21
  .gitignore~
22
22
  *.zip
23
-
23
+ build/
data/README.md CHANGED
@@ -35,6 +35,19 @@ class MyEventHandler < SerfHandler
35
35
  log "start processing custom event"
36
36
  # write your code
37
37
  end
38
+
39
+ # called by SerfHandlerProxy when you issue custom query
40
+ # ex. serf query your_query_name "PAYLOAD"
41
+ def your_query_name
42
+ # write your code
43
+
44
+ reponse("query reponse message you want to return")
45
+ # if reponse message exceeds 1024 bytes limitation,
46
+ # SerfHandler returns "message exceeds limit of 1024 bytes." to serf query client.
47
+ # if you implement the methods for queries,
48
+ # you have to set logfile.
49
+ # serf query command returns output of stdout/stderr.
50
+ end
38
51
  end
39
52
 
40
53
  if __FILE__ == $0
@@ -0,0 +1,17 @@
1
+ example
2
+ =======
3
+ You may control the service and system by using serf queries.
4
+ For example,
5
+
6
+ ```
7
+ serf query -tag role=web start iis
8
+ ```
9
+
10
+ allows to start iis on the machine which has the role of web.
11
+
12
+ ```
13
+ serf query -node your_host reboot
14
+ ```
15
+
16
+ allow to reboot on your_host.
17
+
@@ -0,0 +1,31 @@
1
+ # service, system control commands
2
+ service:
3
+ start:
4
+ iis: "iisreset.exe /start > nul"
5
+ mongo: "service mongod start > /dev/null 2>&1"
6
+ haproxy: "service haproxy start >/dev/null 2>&1"
7
+ stop:
8
+ iis: "iisreset.exe /stop > nul"
9
+ mongo: "service mongod stop > /dev/null 2>&1"
10
+ haproxy: "service haproxy stop >/dev/null 2>&1"
11
+ restart:
12
+ iis: "iisreset.exe /restart > nul"
13
+ mongo: "service mongod restart > /dev/null 2>&1"
14
+ haproxy: "service haproxy restart >/dev/null 2>&1"
15
+ reload:
16
+ iis: "iisreset.exe /restart > nul"
17
+ mongo: "service mongod restart > /dev/null 2>&1"
18
+ haproxy: "service haproxy reload >/dev/null 2>&1"
19
+ status:
20
+ iis: "iisreset.exe /status"
21
+ mongo: "service mongod status > /dev/null 2>&1"
22
+ haproxy: "service haproxy status"
23
+ system:
24
+ shutdown:
25
+ lb: "shutdown -h 1 >/dev/null 2>&1"
26
+ mongo: "shutdown -h 1 >/dev/null 2>&1"
27
+ web: "shutdown /s /t 60 > nul"
28
+ reboot:
29
+ lb: "shutdown -r 1 >/dev/null 2>&1"
30
+ mongo: "shutdown -r 1 >/dev/null 2>&1"
31
+ web: "shutdown /r /t 60 > nul"
@@ -0,0 +1,66 @@
1
+ # -*- coding: utf-8 -*-
2
+ # custome_event_handler.rb
3
+ #
4
+ # for maintenance
5
+ # Control services
6
+ # serf query -tag role=web status iis
7
+ # Control system shutdown or reboot
8
+ # serf event system_ctl 'shutdown lb'
9
+
10
+ require 'yaml'
11
+ require 'serf_handler'
12
+
13
+ # extended class processing serf custom queries
14
+ class CustomQueryHandler < SerfHandler
15
+ CMDFILE = '/etc/serf/cmd.yml'
16
+ LOGFILE = '/var/log/serf/query_handler.log'
17
+ SERVICE_METHOD_NAME = %w( start stop restart reload status )
18
+ SYSTEM_METHOD_NAME = %w( shutdown reboot )
19
+
20
+ def initialize
21
+ super(LOGFILE)
22
+ @cmds = YAML.load_file(CMDFILE)
23
+ end
24
+
25
+ # generate start, stop, restart, reload, status methods.
26
+ SERVICE_METHOD_NAME.each do |m|
27
+ define_method(m) do
28
+ info = {}
29
+ STDIN.each_line { |line| info[:target], _ = line.split(' ') }
30
+ execute_command @cmds['service']["#{m}"][info[:target]]
31
+ end
32
+ end
33
+
34
+ # generate shutdown, reboot methods.
35
+ SYSTEM_METHOD_NAME.each do |m|
36
+ define_method(m) { execute_command @cmds['system']["#{m}"][@role] }
37
+ end
38
+
39
+ def execute_command(command)
40
+ result = `#{command}`
41
+ log "execute #{command} => result: #{$CHILD_STATUS}"
42
+ result_response $CHILD_STATUS unless command.downcase.include?('status')
43
+ status_response result if command.downcase.include?('status')
44
+ end
45
+
46
+ def result_response(result)
47
+ if result.to_s.include?('exit 0')
48
+ response('success')
49
+ else
50
+ response('fail')
51
+ end
52
+ end
53
+
54
+ def status_response(result)
55
+ case result.encode('UTF-8')
56
+ when /実行中|running/ then response('running')
57
+ when /停止|stopped/ then response('stopped')
58
+ end
59
+ end
60
+ end
61
+
62
+ if __FILE__ == $PROGRAM_NAME
63
+ handler = SerfHandlerProxy.new
64
+ handler.register('default', CustomQueryHandler.new)
65
+ handler.run
66
+ end
@@ -1,41 +1,39 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # @author katsuyuki
3
3
  #
4
- require "logger"
4
+ require 'logger'
5
5
 
6
+ # Base class for processing serf events
6
7
  class SerfHandler
7
- attr :name, :role, :event
8
+ attr_reader :name, :role, :event
8
9
 
9
- def initialize(log=nil)
10
- if log
11
- if log.kind_of?(String)
12
- @logger = Logger.new(log)
13
- else
14
- @logger = log
15
- end
16
- else
17
- @logger = Logger.new(STDOUT)
18
- @logger.level = Logger::INFO
19
- end
10
+ def initialize(log_file = nil)
11
+ @logger = create_logger(log_file)
12
+ @logger.level = Logger::INFO
20
13
  @name = ENV['SERF_SELF_NAME']
21
14
  @role = ENV['SERF_TAG_ROLE'] || ENV['SERF_SELF_ROLE']
22
15
  @event = case ENV['SERF_EVENT']
23
- when 'user'
24
- ENV['SERF_USER_EVENT']
25
- when 'query'
26
- ENV['SERF_QUERY_NAME']
27
- else
28
- ENV['SERF_EVENT'].gsub(/-/, '_')
16
+ when 'user' then ENV['SERF_USER_EVENT']
17
+ when 'query' then ENV['SERF_QUERY_NAME']
18
+ else ENV['SERF_EVENT'].gsub(/-/, '_')
29
19
  end
30
20
  end
31
21
 
22
+ def create_logger(log_file)
23
+ if log_file
24
+ log_file.is_a?(String) ? Logger.new(log_file) : log_file
25
+ else
26
+ Logger.new(STDOUT)
27
+ end
28
+ end
29
+
32
30
  def log(msg)
33
31
  @logger.info(msg)
34
32
  end
35
33
 
36
34
  def response(msg)
37
35
  if msg.bytesize > 1024
38
- message = "message exceeds limit of 1024 bytes."
36
+ message = 'message exceeds limit of 1024 bytes.'
39
37
  log message
40
38
  puts message
41
39
  else
@@ -44,8 +42,9 @@ class SerfHandler
44
42
  end
45
43
  end
46
44
 
45
+ # Proxy for handling serf event
47
46
  class SerfHandlerProxy < SerfHandler
48
- def initialize(log_file=nil)
47
+ def initialize(log_file = nil)
49
48
  super(log_file)
50
49
  @handlers = {}
51
50
  end
@@ -54,25 +53,25 @@ class SerfHandlerProxy < SerfHandler
54
53
  @handlers[role] = handler
55
54
  end
56
55
 
57
- def get_klass()
58
- klass = false
56
+ def good_handler
57
+ handler = nil
59
58
  if @handlers.include?(@role)
60
- klass = @handlers[@role]
59
+ handler = @handlers[@role]
61
60
  elsif @handlers.include?('default')
62
- klass = @handlers['default']
61
+ handler = @handlers['default']
63
62
  end
64
- klass
63
+ handler
65
64
  end
66
65
 
67
- def run()
68
- unless klass = get_klass
69
- log "no handler for role"
70
- else
66
+ def run
67
+ if (the_handler = good_handler)
71
68
  begin
72
- klass.send @event
73
- rescue NoMethodError => e
69
+ the_handler.send @event
70
+ rescue NoMethodError
74
71
  log "#{@event} event not implemented by class"
75
72
  end
73
+ else
74
+ log 'no handler for role'
76
75
  end
77
76
  end
78
77
  end
@@ -5,7 +5,7 @@ require 'serf_handler'
5
5
 
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = 'serf_handler'
8
- gem.version = '0.2.0'
8
+ gem.version = '0.2.1'
9
9
  gem.authors = ['KONNO Katsuyuki']
10
10
  gem.email = 'konno.katsuyuki@nifty.com'
11
11
  gem.description = 'Serf event handler for ruby'
@@ -23,5 +23,5 @@ Gem::Specification.new do |gem|
23
23
  'README.md'
24
24
  ]
25
25
 
26
- gem.add_runtime_dependency('logger', ['>= 1.2.8'])
27
- end
26
+ gem.add_runtime_dependency('logger')
27
+ end
@@ -1,30 +1,31 @@
1
1
  require 'spec_helper'
2
+ require 'logger'
2
3
 
3
- describe "SerfHandler" do
4
- context "Check initialize process" do
4
+ describe 'SerfHandler' do
5
+ context 'Check initialize process' do
5
6
  before do
6
7
  ENV['SERF_SELF_NAME'] = 'local'
7
8
  ENV['SERF_SELF_ROLE'] = 'web'
8
9
  ENV['SERF_EVENT'] = 'member-join'
9
10
  end
10
11
 
11
- it "has handler name as 'local'" do
12
+ it 'has handler name as local' do
12
13
  handler = SerfHandler.new
13
14
  expect(handler.name).to eq('local')
14
15
  end
15
16
 
16
- it "has handler role as 'web'" do
17
+ it 'has handler role as web' do
17
18
  handler = SerfHandler.new
18
19
  expect(handler.role).to eq('web')
19
20
  end
20
21
 
21
- it "is set the event: 'member-join'" do
22
+ it 'is set the event: member-join' do
22
23
  handler = SerfHandler.new
23
24
  expect(handler.event).to eq('member_join')
24
25
  end
25
26
  end
26
27
 
27
- context "Check user event processing" do
28
+ context 'Check user event processing' do
28
29
  before do
29
30
  ENV['SERF_SELF_NAME'] = 'local'
30
31
  ENV['SERF_SELF_ROLE'] = 'web'
@@ -32,28 +33,28 @@ describe "SerfHandler" do
32
33
  ENV['SERF_USER_EVENT'] = 'deploy'
33
34
  end
34
35
 
35
- it "has custome event: user" do
36
+ it 'has custome event: user' do
36
37
  handler = SerfHandler.new
37
38
  expect(handler.event).to eq('deploy')
38
39
  end
39
40
  end
40
41
  end
41
42
 
42
- describe "SerfHandlerProxy" do
43
- context "Check Processing Tags" do
43
+ describe 'SerfHandlerProxy' do
44
+ context 'Check Processing Tags' do
44
45
  before do
45
46
  ENV['SERF_SELF_NAME'] = nil
46
47
  ENV['SERF_TAG_ROLE'] = 'bob'
47
48
  ENV['SERF_EVENT'] = 'member-join'
48
49
  end
49
50
 
50
- it "has the role as bob" do
51
+ it 'has the role as bob' do
51
52
  handler = SerfHandlerProxy.new
52
53
  expect(handler.role).to eq('bob')
53
54
  end
54
55
  end
55
56
 
56
- context "Test negative cases" do
57
+ context 'Test negative cases' do
57
58
  before do
58
59
  ENV['SERF_TAG_ROLE'] = nil
59
60
  ENV['SERF_SELF_NAME'] = nil
@@ -61,23 +62,25 @@ describe "SerfHandlerProxy" do
61
62
  ENV['SERF_EVENT'] = 'member-join'
62
63
  end
63
64
 
64
- it "has no role" do
65
+ it 'has no role' do
65
66
  logger = double('Logger')
66
- expect(logger).to receive(:info).with("no handler for role").and_return(true)
67
+ expect(logger).to receive(:level=).with(Logger::INFO)
68
+ expect(logger).to receive(:info).with('no handler for role').and_return(true)
67
69
  handler = SerfHandlerProxy.new(logger)
68
70
  expect(handler.run).to be true
69
71
  end
70
72
 
71
- it "has no method implemented" do
73
+ it 'has no method implemented' do
72
74
  logger = double('Logger')
73
- expect(logger).to receive(:info).with("member_join event not implemented by class").and_return(true)
75
+ expect(logger).to receive(:level=).with(Logger::INFO)
76
+ expect(logger).to receive(:info).with('member_join event not implemented by class').and_return(true)
74
77
  handler = SerfHandlerProxy.new(logger)
75
78
  handler.register('default', SerfHandler.new)
76
79
  expect(handler.run).to be true
77
80
  end
78
81
  end
79
82
 
80
- context "Test custom event" do
83
+ context 'Test custom event' do
81
84
  before do
82
85
  ENV['SERF_SELF_NAME'] = nil
83
86
  ENV['SERF_SELF_ROLE'] = nil
@@ -85,7 +88,7 @@ describe "SerfHandlerProxy" do
85
88
  ENV['SERF_USER_EVENT'] = 'implemented'
86
89
  end
87
90
 
88
- it "has method to process custom event" do
91
+ it 'has method to process custom event' do
89
92
  handler = SerfHandlerProxy.new
90
93
  sample = double('SerfHandler')
91
94
  expect(sample).to receive(:implemented).and_return(true)
@@ -94,7 +97,7 @@ describe "SerfHandlerProxy" do
94
97
  end
95
98
  end
96
99
 
97
- context "Test custom query" do
100
+ context 'Test custom query' do
98
101
  before do
99
102
  ENV['SERF_SELF_NAME'] = nil
100
103
  ENV['SERF_SELF_ROLE'] = nil
@@ -102,7 +105,7 @@ describe "SerfHandlerProxy" do
102
105
  ENV['SERF_QUERY_NAME'] = 'query_command'
103
106
  end
104
107
 
105
- it "has method to process custom event" do
108
+ it 'has method to process custom event' do
106
109
  handler = SerfHandlerProxy.new
107
110
  sample = double('SerfHandler')
108
111
  expect(sample).to receive(:query_command).and_return(true)
@@ -110,9 +113,9 @@ describe "SerfHandlerProxy" do
110
113
  expect(handler.run).to be true
111
114
  end
112
115
 
113
- it "exceeds limitation" do
116
+ it 'exceeds limitation' do
114
117
  handler = SerfHandler.new
115
- message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at purus sapien. Fusce vitae odio tristique,
118
+ message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at purus sapien. Fusce vitae odio tristique,
116
119
  lacinia purus sed, dictum risus. Nullam rhoncus auctor sapien, nec interdum diam interdum sed. Nulla quis
117
120
  posuere justo. Donec porta, odio eget mollis laoreet, elit leo sollicitudin nisl, luctus vehicula velit
118
121
  erat eu est. Fusce ligula urna, blandit a iaculis nec, suscipit ut purus. Donec sed magna ac mi cursus
@@ -123,18 +126,18 @@ describe "SerfHandlerProxy" do
123
126
  Donec nec hendrerit dolor. Phasellus ac augue lobortis, vestibulum lacus at, ornare enim. Donec condimentum
124
127
  quis tellus vulputate auctor. Fusce eu tortor vel velit gravida eleifend id a lorem. Maecenas porta est vel
125
128
  sollicitudin ornare. Morbi et commodo diam, non congue nisi. Pellentesque mattis enim lobortis, hendrerit
126
- nulla eget, tempus diam. Donec orci aliquam."
129
+ nulla eget, tempus diam. Donec orci aliquam.'
127
130
  expect{ handler.response(message) }.to output("message exceeds limit of 1024 bytes.\n").to_stdout
128
131
  end
129
132
  end
130
133
 
131
- context "Test standard event when role is default" do
134
+ context 'Test standard event when role is default' do
132
135
  before do
133
136
  ENV['SERF_SELF_NAME'] = nil
134
137
  ENV['SERF_EVENT'] = 'member-join'
135
138
  end
136
139
 
137
- it "has method to process member_join event" do
140
+ it 'has method to process member_join event' do
138
141
  handler = SerfHandlerProxy.new
139
142
  sample = double('SerfHandler')
140
143
  expect(sample).to receive(:member_join).and_return(true)
@@ -143,14 +146,14 @@ describe "SerfHandlerProxy" do
143
146
  end
144
147
  end
145
148
 
146
- context "Test standard event when role is web" do
149
+ context 'Test standard event when role is web' do
147
150
  before do
148
151
  ENV['SERF_SELF_NAME'] = nil
149
152
  ENV['SERF_SELF_ROLE'] = 'web'
150
153
  ENV['SERF_EVENT'] = 'member-join'
151
154
  end
152
155
 
153
- it "has method to process member_join event" do
156
+ it 'has method to process member_join event' do
154
157
  handler = SerfHandlerProxy.new
155
158
  sample = double('SerfHandler')
156
159
  expect(sample).to receive(:member_join).and_return(true)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serf_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - KONNO Katsuyuki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-04 00:00:00.000000000 Z
11
+ date: 2014-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.8
19
+ version: '0'
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.2.8
26
+ version: '0'
27
27
  description: Serf event handler for ruby
28
28
  email: konno.katsuyuki@nifty.com
29
29
  executables: []
@@ -38,14 +38,9 @@ files:
38
38
  - LICENSE
39
39
  - README.md
40
40
  - Rakefile
41
- - build/.gitignore
42
- - build/Gemfile
43
- - build/LICENSE.txt
44
- - build/README.md
45
- - build/Rakefile
46
- - build/build.gemspec
47
- - build/lib/build.rb
48
- - build/lib/build/version.rb
41
+ - example/README.md
42
+ - example/cmd.yml
43
+ - example/custom_query_handler.rb
49
44
  - lib/serf_handler.rb
50
45
  - serf_handler.gemspec
51
46
  - spec/serf_handler_spec.rb
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in build.gemspec
4
- gemspec
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 konchan
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,31 +0,0 @@
1
- # Build
2
-
3
- TODO: Write a gem description
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'build'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install build
20
-
21
- ## Usage
22
-
23
- TODO: Write usage instructions here
24
-
25
- ## Contributing
26
-
27
- 1. Fork it ( https://github.com/[my-github-username]/build/fork )
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create a new Pull Request
@@ -1,2 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'build/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "build"
8
- spec.version = Build::VERSION
9
- spec.authors = ["konchan"]
10
- spec.email = ["konno.katsuyuki@nifty.com"]
11
- spec.summary = %q{TODO: Write a short summary. Required.}
12
- spec.description = %q{TODO: Write a longer description. Optional.}
13
- spec.homepage = ""
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.6"
22
- spec.add_development_dependency "rake", "~> 10.0"
23
- end
@@ -1,5 +0,0 @@
1
- require "build/version"
2
-
3
- module Build
4
- # Your code goes here...
5
- end
@@ -1,3 +0,0 @@
1
- module Build
2
- VERSION = "0.0.1"
3
- end