batcave 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Makefile ADDED
@@ -0,0 +1,46 @@
1
+ GEMSPEC=$(shell ls *.gemspec)
2
+ VERSION=$(shell awk -F\" '/spec.version/ { print $$2 }' $(GEMSPEC))
3
+ NAME=$(shell awk -F\" '/spec.name/ { print $$2 }' $(GEMSPEC))
4
+ GEM=$(NAME)-$(VERSION).gem
5
+
6
+ .PHONY: test
7
+ test:
8
+ sh notify-failure.sh ruby test/all.rb
9
+
10
+ .PHONY: testloop
11
+ testloop:
12
+ while true; do \
13
+ $(MAKE) test; \
14
+ $(MAKE) wait-for-changes; \
15
+ done
16
+
17
+ .PHONY: serve-coverage
18
+ serve-coverage:
19
+ cd coverage; python -mSimpleHTTPServer
20
+
21
+ .PHONY: wait-for-changes
22
+ wait-for-changes:
23
+ -inotifywait --exclude '\.swp' -e modify $$(find $(DIRS) -name '*.rb'; find $(DIRS) -type d)
24
+
25
+ .PHONY: package
26
+ package: | $(GEM)
27
+
28
+ .PHONY: gem
29
+ gem: $(GEM)
30
+
31
+ $(GEM):
32
+ gem build $(GEMSPEC)
33
+
34
+ .PHONY: test-package
35
+ test-package: $(GEM)
36
+ # Sometimes 'gem build' makes a faulty gem.
37
+ gem unpack $(GEM)
38
+ rm -rf ftw-$(VERSION)/
39
+
40
+ .PHONY: publish
41
+ publish: test-package
42
+ gem push $(GEM)
43
+
44
+ .PHONY: install
45
+ install: $(GEM)
46
+ gem install $(GEM)
data/batcave.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |spec|
2
2
  files = %x{git ls-files}.split("\n")
3
3
 
4
4
  spec.name = "batcave"
5
- spec.version = "0.0.4"
5
+ spec.version = "0.0.5"
6
6
  spec.summary = "Experiments in tools, boilerplatery, debugging, etc."
7
7
  spec.description = spec.summary
8
8
  spec.add_dependency("clamp")
data/lib/batcave/dsl.rb CHANGED
@@ -150,6 +150,7 @@ class BatCave::DSL
150
150
 
151
151
  if localpath =~ /\.erb$/
152
152
  localpath = localpath[0...-4]
153
+ originalpath = originalpath[0...-4]
153
154
  use_erb = true
154
155
  else
155
156
  use_erb = false
data/lib/batcave/main.rb CHANGED
@@ -8,9 +8,6 @@ class BatCave::Main < Clamp::Command
8
8
  option ["-v", "--verbose"], :flag, "enable verbose logging" do
9
9
  require "logger"
10
10
  logger = Cabin::Channel.get("batcave")
11
- p Cabin::Channel.get("batcave").object_id
12
- p Cabin::Channel.get("batcave").object_id
13
- p Cabin::Channel.get("batcave").object_id
14
11
  logger.subscribe(Logger.new(STDOUT))
15
12
  logger.level = :info
16
13
  end
data/lib/batcave/store.rb CHANGED
@@ -70,5 +70,5 @@ class BatCave::Store
70
70
  # Handle empty manifest. (YAML.load returns false for empty files)
71
71
  manifest["things"] ||= {}
72
72
  return manifest
73
- end # def manifest
73
+ end # def load
74
74
  end # class BatCave::Store
@@ -0,0 +1,46 @@
1
+ GEMSPEC=$(shell ls *.gemspec)
2
+ VERSION=$(shell awk -F\" '/spec.version/ { print $$2 }' $(GEMSPEC))
3
+ NAME=$(shell awk -F\" '/spec.name/ { print $$2 }' $(GEMSPEC))
4
+ GEM=$(NAME)-$(VERSION).gem
5
+
6
+ .PHONY: test
7
+ test:
8
+ sh notify-failure.sh ruby test/all.rb
9
+
10
+ .PHONY: testloop
11
+ testloop:
12
+ while true; do \
13
+ $(MAKE) test; \
14
+ $(MAKE) wait-for-changes; \
15
+ done
16
+
17
+ .PHONY: serve-coverage
18
+ serve-coverage:
19
+ cd coverage; python -mSimpleHTTPServer
20
+
21
+ .PHONY: wait-for-changes
22
+ wait-for-changes:
23
+ -inotifywait --exclude '\.swp' -e modify $$(find $(DIRS) -name '*.rb'; find $(DIRS) -type d)
24
+
25
+ .PHONY: package
26
+ package: | $(GEM)
27
+
28
+ .PHONY: gem
29
+ gem: $(GEM)
30
+
31
+ $(GEM):
32
+ gem build $(GEMSPEC)
33
+
34
+ .PHONY: test-package
35
+ test-package: $(GEM)
36
+ # Sometimes 'gem build' makes a faulty gem.
37
+ gem unpack $(GEM)
38
+ rm -rf ftw-$(VERSION)/
39
+
40
+ .PHONY: publish
41
+ publish: test-package
42
+ gem push $(GEM)
43
+
44
+ .PHONY: install
45
+ install: $(GEM)
46
+ gem install $(GEM)
@@ -1,10 +1,8 @@
1
1
  environment :project
2
2
 
3
3
  # Don't overwrite these files on update
4
- create_only [ "Gemfile", "{name}.gemspec" ]
4
+ create_only [ "Gemfile", "{name}.gemspec", "Makefile" ]
5
5
 
6
6
  options do
7
7
  parameter "NAME", "The name of the project", :attribute_name => :name
8
8
  end
9
-
10
- boilerplate = [ "Gemfile" ]
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+
3
+ "$@"
4
+ status=$?
5
+
6
+ if [ ! -z "$TMUX" ] ; then
7
+ if [ "$status" -ne 0 ] ; then
8
+ tmux display-message "Tests Fail"
9
+ else
10
+ tmux display-message "Tests OK"
11
+ fi
12
+ fi
13
+
14
+ exit $status
15
+
@@ -1,5 +1,5 @@
1
1
  Gem::Specification.new do |spec|
2
- files = %x{git ls-files}
2
+ files = %x{git ls-files}.split("\n")
3
3
 
4
4
  spec.name = "<%= name %>"
5
5
  spec.version = "0.0.1"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: batcave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-21 00:00:00.000000000 Z
12
+ date: 2012-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: clamp
16
- requirement: &4815200 !ruby/object:Gem::Requirement
16
+ requirement: &10992540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *4815200
24
+ version_requirements: *10992540
25
25
  description: Experiments in tools, boilerplatery, debugging, etc.
26
26
  email: jls@semicomplete.com
27
27
  executables:
@@ -32,6 +32,7 @@ files:
32
32
  - .gitignore
33
33
  - Gemfile
34
34
  - Gemfile.lock
35
+ - Makefile
35
36
  - README.md
36
37
  - batcave.gemspec
37
38
  - bin/dk
@@ -48,7 +49,9 @@ files:
48
49
  - things/go/self/THING
49
50
  - things/go/self/src/{name}/{name}.go
50
51
  - things/ruby/self/Gemfile
52
+ - things/ruby/self/Makefile
51
53
  - things/ruby/self/THING
54
+ - things/ruby/self/notify-failure.sh
52
55
  - things/ruby/self/test/all.rb
53
56
  - things/ruby/self/test/docs.rb
54
57
  - things/ruby/self/test/testing.rb
@@ -79,3 +82,4 @@ signing_key:
79
82
  specification_version: 3
80
83
  summary: Experiments in tools, boilerplatery, debugging, etc.
81
84
  test_files: []
85
+ has_rdoc: